This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Option not supported error in GCC cross compilation


Xiao-lei Cui<climber.cui@gmail.com> writes:

I am building a coff-gcc to fulfill some requirements at work.
The tool chain we are trying to develop based on GCC needs to
support coff format on SPARC V7/V8.

This requirement puts one to think the ESA/ESTEC ERC32 CPU, the commercial "XGC" GCC maybe used COFF with SPARC. It is hard to remember any other toolchain where coff-sparc could have been used as the default format...

I forgot to mention that the version I am trying to build is
GCC-3.4.6, and the native GCC on my Linux is version 4.1.

The gcc-3.4.6 doesn't support 'sparc-coff' as target, it should support 'sparclite-coff' but that will fail because of a bug. The earlier 3.3.6 too :(

Ian Lance Taylor writes:

As far as I know gcc 3.4.6 should support sparc-coff.

Probably 'sparc-coff' was never supported in the FSF GCC sources :(

Generally the clause "needs to support coff format on SPARC V7/V8"
would require more elaboration...

The ESA/ESTEC ERC32 CPU ("radiation hardened") used RTEMS, so the
usual $target name was 'sparc-rtems', not 'sparc-aout', 'sparc-coff'
or 'sparc-elf', although one, two or all three object formats were
supported in a SPARC/RTEMS toolchain, for instance :

[root@localhost bin]# ./objdump --help
Usage: ./objdump <option(s)> <file(s)>
 Display information from object <file(s)>.
 At least one of the following switches must be given:
  -a, --archive-headers    Display archive header information

<snip>

./objdump: supported targets: elf32-sparc a.out-sunos-big coff-sparc elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex
./objdump: supported architectures: sparc sparc:sparclet sparc:sparclite sparc:v8plus sparc:v8plusa sparc:sparclite_le sparc:v9 sparc:v9a sparc:v8plusb sparc:v9b


with a 'sparc-rtems' targeted 'objdump'...

With the 'sparc-coff' your possibility to succeed may be miserable,
with 'sparc-rtems' much, much better...  IF your real goal is the
ERC32 "Sparc for Space". For instance you can download prebuilt
toolchains from Jiri Gaisler, like :

ftp://gaisler.com/gaisler.com/rcc/bin/linux/sparc-rtems-4.6.5-gcc-3.2.3-1.0.19-linux.tar.bz2
ftp://gaisler.com/gaisler.com/rcc/bin/linux/sparc-rtems-4.8-gcc-4.2.4-1.1.2-linux.tar.bz2
ftp://gaisler.com/gaisler.com/rcc/bin/linux/sparc-rtems-4.10-gcc-4.3.3-1.1.99.12a-linux.tar.bz2

with gcc-3.2.3, gcc-4.2.4 or gcc-4.3.3, for Linux/x86 host :

[root@localhost bin]# cd /opt/rtems-4.6/bin
[root@localhost bin]# ls
cklength sparc-rtems-c++filt sparc-rtems-nm
ddd sparc-rtems-cpp sparc-rtems-objcopy
dddx sparc-rtems-g++ sparc-rtems-objdump
eolstrip sparc-rtems-gcc sparc-rtems-ranlib
install-if-change sparc-rtems-gccbug sparc-rtems-readelf
mkprom-erc32 sparc-rtems-gcov sparc-rtems-size
packhex sparc-rtems-gdb sparc-rtems-strings
sparc-rtems-addr2line sparc-rtems-gdbtui sparc-rtems-strip
sparc-rtems-ar sparc-rtems-gdb52 unhex
sparc-rtems-as sparc-rtems-ld
sparc-rtems-c++ sparc-rtems-mkprom
[root@localhost bin]# ./sparc-rtems-gcc -v
Reading specs from ./../lib/gcc-lib/sparc-rtems/3.2.3/specs
Configured with: ../gcc-3.2.3/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=sparc-rtems --with-gnu-as --with-gnu-ld --with-newlib --verbose --with-system-zlib --disable-nls --enable-version-specific-runtime-libs --enable-threads=rtems --prefix=/opt/rtems-4.6 --enable-languages=c,c++,ada
Thread model: rtems
gcc version 3.2.3 (OAR Corporation gcc-3.2.3-20040420/newlib-1.11.0-20030605-4)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]