This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: AW: AIX link error with g++ 4.4.0
- From: Ian Lance Taylor <iant at google dot com>
- To: "Fehringer Franz" <Franz dot Fehringer at fja dot com>
- Cc: <gcc-help at gnu dot org>, <gcc at gnu dot org>
- Date: Wed, 10 Jun 2009 08:31:32 -0700
- Subject: Re: AW: AIX link error with g++ 4.4.0
- References: <3DD4561E58DC6D4690B05037024D58490320DCE9@m-s-app130.global.fjh.com> <3DD4561E58DC6D4690B05037024D58490320DCEB@m-s-app130.global.fjh.com>
"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
> 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?
Please never send e-mail to both gcc-help@gcc.gnu.org and
gcc@gcc.gnu.org. This message is only appropriate for
gcc-help@gcc.gnu.org. Thanks.
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. Please do file a bug, per
http://gcc.gnu.org/bugs.html. Thanks.
Ian