public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/17043] New: Can't build a compiler that works for big and littleendian targets
@ 2004-08-16  0:23 peterc at gelato dot unsw dot edu dot au
  2004-08-16  0:26 ` [Bug target/17043] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: peterc at gelato dot unsw dot edu dot au @ 2004-08-16  0:23 UTC (permalink / raw)
  To: gcc-bugs

arm-linux-gcc --mbigendian -c
creates the correct format .o files, but when the linker is called by
arm-linux-gcc, the little-endian version of libgcc is always used.
Moreover, the big-endian version of libgcc isn't built by default,

I suspect that collect2 needs to be passed different linker scripts depending on
whether the target is big or little-endian, and needs to provide different paths
to the different libgcc.a  There's probably some specs-file magic to do this.

-- 
           Summary: Can't build a compiler that works for big and
                    littleendian targets
           Product: gcc
           Version: 3.3.4
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: driver
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: peterc at gelato dot unsw dot edu dot au
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: ia64-linux
  GCC host triplet: ia64-unknown-linux
GCC target triplet: arm-linux-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17043


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/17043] Can't build a compiler that works for big and littleendian targets
  2004-08-16  0:23 [Bug driver/17043] New: Can't build a compiler that works for big and littleendian targets peterc at gelato dot unsw dot edu dot au
@ 2004-08-16  0:26 ` pinskia at gcc dot gnu dot org
  2004-08-16  0:44 ` peter at chubb dot wattle dot id dot au
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-16  0:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-16 00:26 -------
I think you have to pass -mbigendian when linking also.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|driver                      |target


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17043


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/17043] Can't build a compiler that works for big and littleendian targets
  2004-08-16  0:23 [Bug driver/17043] New: Can't build a compiler that works for big and littleendian targets peterc at gelato dot unsw dot edu dot au
  2004-08-16  0:26 ` [Bug target/17043] " pinskia at gcc dot gnu dot org
@ 2004-08-16  0:44 ` peter at chubb dot wattle dot id dot au
  2004-08-16  4:22 ` NitinY at KPITCummins dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: peter at chubb dot wattle dot id dot au @ 2004-08-16  0:44 UTC (permalink / raw)
  To: gcc-bugs


------- 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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/17043] Can't build a compiler that works for big and littleendian targets
  2004-08-16  0:23 [Bug driver/17043] New: Can't build a compiler that works for big and littleendian targets peterc at gelato dot unsw dot edu dot au
  2004-08-16  0:26 ` [Bug target/17043] " pinskia at gcc dot gnu dot org
  2004-08-16  0:44 ` peter at chubb dot wattle dot id dot au
@ 2004-08-16  4:22 ` NitinY at KPITCummins dot com
  2004-08-16 23:20 ` wilson at specifixinc dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: NitinY at KPITCummins dot com @ 2004-08-16  4:22 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nitins2 at kpitcummins dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17043


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/17043] Can't build a compiler that works for big and littleendian targets
  2004-08-16  0:23 [Bug driver/17043] New: Can't build a compiler that works for big and littleendian targets peterc at gelato dot unsw dot edu dot au
                   ` (2 preceding siblings ...)
  2004-08-16  4:22 ` NitinY at KPITCummins dot com
@ 2004-08-16 23:20 ` wilson at specifixinc dot com
  2004-10-02  4:24 ` pinskia at gcc dot gnu dot org
  2004-10-03 17:55 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: wilson at specifixinc dot com @ 2004-08-16 23:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From wilson at specifixinc dot com  2004-08-16 23:20 -------
Subject: Re:  New: Can't build a compiler that works for
 big and littleendian targets

peterc at gelato dot unsw dot edu dot au wrote:
> arm-linux-gcc --mbigendian -c

Normally linux targets aren't bi-endian.  A little-endian kernel won't 
run big-endian code and vice versa, so there is little point in making 
them bi-endian.  And if the native compiler isn't bi-endian, then a 
cross compiler won't be either.  You may have to do a litting porting 
work if you really need this.

There is also the question of whether you have bi-endian system 
libraries, and if so, how they are organized.  Also, I'd recommend 
against use of --prefix=/usr for a cross compiler, and I'd suggest using 
--sysroot= to specify where the target libraries and header files are.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17043


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/17043] Can't build a compiler that works for big and littleendian targets
  2004-08-16  0:23 [Bug driver/17043] New: Can't build a compiler that works for big and littleendian targets peterc at gelato dot unsw dot edu dot au
                   ` (3 preceding siblings ...)
  2004-08-16 23:20 ` wilson at specifixinc dot com
@ 2004-10-02  4:24 ` pinskia at gcc dot gnu dot org
  2004-10-03 17:55 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-02  4:24 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|ia64-linux                  |
   GCC host triplet|ia64-unknown-linux          |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17043


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/17043] Can't build a compiler that works for big and littleendian targets
  2004-08-16  0:23 [Bug driver/17043] New: Can't build a compiler that works for big and littleendian targets peterc at gelato dot unsw dot edu dot au
                   ` (4 preceding siblings ...)
  2004-10-02  4:24 ` pinskia at gcc dot gnu dot org
@ 2004-10-03 17:55 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-03 17:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-03 17:55 -------
So close this as invlaid.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17043


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-10-03 17:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-16  0:23 [Bug driver/17043] New: Can't build a compiler that works for big and littleendian targets peterc at gelato dot unsw dot edu dot au
2004-08-16  0:26 ` [Bug target/17043] " pinskia at gcc dot gnu dot org
2004-08-16  0:44 ` peter at chubb dot wattle dot id dot au
2004-08-16  4:22 ` NitinY at KPITCummins dot com
2004-08-16 23:20 ` wilson at specifixinc dot com
2004-10-02  4:24 ` pinskia at gcc dot gnu dot org
2004-10-03 17:55 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).