[Bug libstdc++/38384] fails to build cross gcc for target hppa64-hp-hpux11.00 in libstdc++/libmath

dave at hiauly1 dot hia dot nrc dot ca gcc-bugzilla@gcc.gnu.org
Mon Jan 19 13:38:00 GMT 2009



------- Comment #38 from dave at hiauly1 dot hia dot nrc dot ca  2009-01-19 13:38 -------
Subject: Re:  fails to build cross gcc for target hppa64-hp-hpux11.00 in
libstdc++/libmath

> There are some strange symptoms.
> 
> I tried to build a simple "Hello, World!" application in 4 variants.
> 1. C source using gcc
> 2. C source using gcc, static linking
> 3. C++ source using g++
> 4. C++ source using g++, static linking
> 
> I will create attachments containing the compile logs.
> 
> 1. Compilation ok, excecution on the target system ok, but ldd on the target
> system gives:
> ldd: "hello" is not a shared executable.
> 
> 2. Compilation ok,  execution on the target system gives:
> ./hello: cannot execute binary file
> 
> 3. Linking fails!
> 
> 4. Compilation ok, execution on the target system gives:
> ./hello: cannot execute binary file
> 
> Any idea?

Use file, chatr, ldd and readelf commands to check file type and ELF
information.  Compare with native application.

GNU ld doesn't create "static" executables (known problem).  It
can only create dynamic executables.  Typically, problems in launching
dynamic executables are debugged by running the dynamic linker under
gdb.  This is hard here because the dynamic linker is proprietary.

3 is probably a binutils bug.  I haven't tried a native build
using GNU ld for some time.  It used to be good enough to do what
you want.

Dave


-- 


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



More information about the Gcc-bugs mailing list