AW: AW: AIX link error with g++ 4.4.0

Fehringer Franz Franz.Fehringer@fja.com
Wed Jun 17 08:41:00 GMT 2009


I used Dave Korns patch (with the addition of removing the LIBSTDCXX_STATIC #define in aix.h).
 

-----Ursprüngliche Nachricht-----
Von: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] Im Auftrag von Fehringer Franz
Gesendet: Mittwoch, 17. Juni 2009 10:05
An: David Edelsohn; Dave Korn
Cc: gcc-help@gnu.org; Eric Fernandez; Jørn Amundsen
Betreff: AW: AW: AIX link error with g++ 4.4.0

Hi David,

Thanks for info, should i still file a bug report (i did not find the time so far)?
With AIX 6.1 i do not have the problems you describe below (but on a second thought i do not link statically against libc.a).

Cheers

Franz
 

-----Ursprüngliche Nachricht-----
Von: David Edelsohn [mailto:dje.gcc@gmail.com]
Gesendet: Dienstag, 16. Juni 2009 21:42
An: Dave Korn; Fehringer Franz
Cc: gcc-help@gnu.org; Eric Fernandez; Jørn Amundsen
Betreff: Re: AW: AIX link error with g++ 4.4.0

>>>>> "Fehringer Franz" <Franz.Fehringer@fja.com> writes:
>>
>>> I have exactly the same error like described in 
>>> http://gcc.gnu.org/ml/gcc-help/2009-05/msg00323.html
>>> namely
>>> collect2: library libstdc++ -lsupc++ not found
>
>> The bug is in the way that gcc/gpg++spec.c uses LIBSTDCXX_STATIC, or 
>> possibly in the way that macro is defined in gcc/config/rs6000/aix.h.
>> I don't see a simple fix.

I have applied a fix to GCC mainline that uses LIBSTDCXX_STATIC as an additional library argument when linking statically, solving this problem.  I may backport this to GCC 4.4 if it proves safe.

While this solves the error about libstdc++ -lsupc++, I still receive other errors on AIX 5.3 when linking statically because ld tried to resolve all symbols in libc.a.  AIX 5.3 libc.a contains some references to functions that are not defined elsewhere.  I needed to use -Wl,-berok to generate a working executable.

David



More information about the Gcc-help mailing list