This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, regression?] Support --static-libstdc++ with native AIX ld
On Fri, Jan 25, 2013 at 8:55 AM, Michael Haubenwallner
<michael.haubenwallner@salomon.at> wrote:
> Hmm - which "oslevel -s" do you use?
>
> Here I've tried on 7100-01-05-1228.
> Also available are 5300-08-09-1013 and 6100-07-05-1228.
I used to bootstrap on AIX 5.3. I now bootstrap on AIX 7.1 and I try
AIX 6.1 occasionally.
> In case you do have an AIX 5.2 or older, or some other AIX TechLevel that does
> not use LD_LIBRARY_PATH for whatever reason, to trigger the same problem this
> patch to toplevel configure should work I guess:
>
> --- a/configure
> +++ b/configure
> @@ -6978,6 +6978,7 @@ rm -f conftest*
>
> # Decide which environment variable is used to find dynamic libraries.
> case "${host}" in
> + *-*-aix*) RPATH_ENVVAR=LIBPATH ;;
> *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
> *-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
> *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
>
> Actually, I'm wondering why this shouldn't go in anyway for consistency across platforms.
As you wrote, AIX 5.3 and above support LD_LIBRARY_PATH. Most AIX 4
and AIX 5.1/5.2 users are not replacing their open source toolchain.
> For gcc:
> * $CONFIG_SHELL configure --prefix=/does/not/exist/yet --with-{gmp,mpfr,mpc}=/prereq \
> --enable--languages=c,c++ --disable-werror --disable-nls
> * gmake bootstrap
>
> But unlike you, I do not use --with-boot-ldflags.
I will try without boot-ldflags and with your patch.
> Feels like this is because of --with-boot-ldflags=-L/usr/gnu/lib only, or because
> of gmp,mpfr,mpc being found there.
>
>> I often re-link the executable and add -Wl,-blibpath: to set a
>> narrower search path.
>
> Do you do run these re-link steps manually?
Yes, I edit the Makefile to insert -Wl,-blibpath: and re-link. I don't
build and install a production version of GCC that often.
> All things considered, simply feels like your AIX doesn't listen to LD_LIBRARY_PATH.
I think this has to do with boot-ldflags.
Again, I think the values you set in your patch are correct. I simply
want to make sure it doesn't break anything.
Thanks, David