This is the mail archive of the gcc-patches@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: [PATCH, regression?] Support --static-libstdc++ with native AIX ld


On Thu, Jan 24, 2013 at 4:18 AM, Michael Haubenwallner
<michael.haubenwallner@salomon.at> wrote:

> Ok, inside the patch file now rather than at the end of the mail text.
> I'm still unsure if the patch should contain a real ChangeLog diff or
> a simple comment, as I doubt the ChangeLog diff would apply smoothly.
>
>> Also, is this really sufficient? I guess you are linking the shared
>> libstdc++ library statically, which is bulky but will work. In the
>> past there have been problems linking libstdc++ statically without
>> explicitly linking libsupc++ as well.
>
> It is not me using --static-libstdc++, but gcc itself when linking xgcc/xg++.
>
> Since switching to C++ inside gcc, it isn't possible to get working gcc/g++
> binaries installed using native ld on AIX without this patch, as these need
> dynamic libstdc++.a from builddir(!). Even after successful build with the
> workaround from PR55105[1], installed binaries break when removing builddir.
>
> Since --disable-build-with-cxx/--disable-build-poststage1-with-cxx [2] aren't
> supported any more too, this really feels like a regression with 4.8.

I build GCC almost daily on AIX and test installation and do not have
this problem.

Are you configuring GCC in a special way? Do you set the installation
directory prefix when you configure?  I build GCC with GCC and have an
older version of GCC (including libstdc++) already installed.

I do not understand why you refer to native ld on AIX and what that
has to do with any problem.

$ dump -H cc1

                        ***Import File Strings***
INDEX  PATH                          BASE                MEMBER
0      /tmp/20130123/prev-powerpc-ibm-aix7.1.0.0/libstdc++-v3/src/.libs:/tmp/20130123/prev-powerpc-ibm-aix7.1.0.0/libstdc++-v3/libsupc++/.libs:/usr/gnu/lib:../zlib:/tmp/20130123/./prev-gcc:/usr/lib:/lib
1                                    libc.a              shr.o
2                                    libgcc_s.a          shr.o
3                                    libmpfr.a           libmpfr.so.4
4                                    libstdc++.a         libstdc++.so.6
5                                    libgmp.a            libgmp.so.3
6                                    libmpc.a            libmpc.so.2

Yes, it refers to the build directory, but it also include
/usr/gnu/lib on the path and a copy of libstdc++.a is in /usr/gnu/lib.
I often re-link the executable and add -Wl,-blibpath: to set a
narrower search path.

With your patch do you configure with any additional options to cause
the libraries to be linked statically?

The values you set in the patch are correct, but something still does
not make sense with the problem.

Thanks, David


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