[Bug target/17043] Can't build a compiler that works for big and littleendian targets
peter at chubb dot wattle dot id dot au
gcc-bugzilla@gcc.gnu.org
Mon Aug 16 00:44:00 GMT 2004
------- Additional Comments From peter at chubb dot wattle dot id dot au 2004-08-16 00:44 -------
Subject: Re: Can't build a compiler that works for big and littleendian targets
>>>>> "pinskia" == pinskia at gcc dot gnu dot org <gcc-bugzilla@gcc.gnu.org> writes:
pinskia> ------- Additional Comments From pinskia at gcc dot gnu dot
pinskia> org 2004-08-16 00:26 ------- I think you have to pass
pinskia> -mbigendian when linking also.
It doesn't help.
$ arm-linux-gcc -o h hello.c
$ arm-linux-gcc -mbig-endian -o h hello.c
/usr/arm-linux/lib/libc.so.6: could not read symbols: Invalid
operation
collect2: ld returned 1 exit status
arm-linux-gcc -v -mbig-endian -o h hello.c
Reading specs from /usr/lib/gcc-lib/arm-linux/3.3.3/specs
Configured with: ../src/configure -v --enable-languages=c
--prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man
--with-gxx-include-dir=/usr/arm-linux/include/g++ --enable-shared
--with-as=/usr/arm-linux/bin/as --with-gnu-as
--with-ld=/usr/arm-linux/bin/ld --with-gnu-ld --with-system-zlib
--enable-long-long --enable-nls --without-included-gettext
--disable-checking --build=ia64-linux --host=ia64-linux
--target=arm-linux
Thread model: posix
gcc version 3.3.3 (Debian 20040401)
/usr/lib/gcc-lib/arm-linux/3.3.3/cc1 -quiet -v -D__GNUC__=3
-D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=3 -D__ARM_ARCH_3__ hello.c
-quiet -dumpbase hello.c -mbig-endian -auxbase hello -version -o
/tmp/ccj5XR3N.s
GNU C version 3.3.3 (Debian 20040401) (arm-linux)
compiled by GNU C version 3.3.4 (Debian 1:3.3.4-5).
GGC heuristics: --param ggc-min-expand=97 --param
ggc-min-heapsize=126132
ignoring nonexistent directory "/usr/arm-linux/sys-include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc-lib/arm-linux/3.3.3/include
/usr/arm-linux/include
End of search list.
/usr/arm-linux/bin/as -EB -o /tmp/ccSvvWPs.o /tmp/ccj5XR3N.s
/usr/lib/gcc-lib/arm-linux/3.3.3/collect2 -dynamic-linker\
/lib/ld-linux.so.2 -X -EB -m armelf_linux -p -o h \
/usr/lib/gcc-lib/arm-linux/3.3.3/../../../../arm-linux/lib/crt1.o \
/usr/lib/gcc-lib/arm-linux/3.3.3/../../../../arm-linux/lib/crti.o \
/usr/lib/gcc-lib/arm-linux/3.3.3/crtbegin.o \
-L/usr/lib/gcc-lib/arm-linux/3.3.3 \
-L/usr/lib/gcc-lib/arm-linux/3.3.3/../../../../arm-linux/lib \
/tmp/ccSvvWPs.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh \
/usr/lib/gcc-lib/arm-linux/3.3.3/crtend.o \
/usr/lib/gcc-lib/arm-linux/3.3.3/../../../../arm-linux/lib/crtn.o
/usr/arm-linux/lib/libc.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
Note that in the verbose output, gcc is passing explicit paths to
arm-linux/lib/crt1.o, etc., and -L options that pick up the
little-endian format libraries and startup, etc., files.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17043
More information about the Gcc-bugs
mailing list