This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]