From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5152 invoked by alias); 16 Aug 2004 00:44:35 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 5142 invoked by alias); 16 Aug 2004 00:44:34 -0000 Date: Mon, 16 Aug 2004 00:44:00 -0000 Message-ID: <20040816004434.5141.qmail@sourceware.org> From: "peter at chubb dot wattle dot id dot au" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040816002338.17043.peterc@gelato.unsw.edu.au> References: <20040816002338.17043.peterc@gelato.unsw.edu.au> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/17043] Can't build a compiler that works for big and littleendian targets X-Bugzilla-Reason: CC X-SW-Source: 2004-08/txt/msg01491.txt.bz2 List-Id: ------- 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 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