This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
AW: AIX link error with g++ 4.4.0
- From: "Fehringer Franz" <Franz dot Fehringer at fja dot com>
- To: <gcc-help at gnu dot org>, <gcc at gnu dot org>
- Date: Wed, 10 Jun 2009 11:26:39 +0200
- Subject: AW: AIX link error with g++ 4.4.0
- References: <3DD4561E58DC6D4690B05037024D58490320DCE9@m-s-app130.global.fjh.com>
_____________________________________________
Von: Fehringer Franz
Gesendet: Mittwoch, 10. Juni 2009 10:55
An: 'gcc-help@gnu.org'; 'gcc@gnu.org'
Betreff: AIX link error with g++ 4.4.0
Hello all,
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
I have a POWER6 with AIX 6.1.2, for the build --disable-shared was used
(i think this is the reason why this error does not show up in regular
shared library builds).
When i invoke g++ with both -v and -save-temps and then invoke the final
collect2 step manually (using cut and paste) the link succeeds.
According to my investigations, the reason for this kind of failure is
* collect2 is executed via execvp in gcc.c resp. pex-unix.c
* the link line (i.e. the collect2 invocation) contains -lstdc++
-lsupc++ since we are in the C++ realm.
* The error now is, that -lstdc++ -lsupc++ is given in the execvp
argument vector as one argument instead two separate arguments.
* As a result the call to resolve_lib_name in collect2.c fails,
since it can handle only one -lxxx per call and not multiple ones.
Should i file a bug report and is there an easy resolution?
Best regards
Franz