bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] m4: fix --disable-rpath for AIX


From: Bruno Haible
Subject: Re: [PATCH] m4: fix --disable-rpath for AIX
Date: Mon, 17 Feb 2020 03:22:06 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; )

Hi Clement,

> Currently, --disable-rpath will add directly $found_so to the compilation
> line. However, on AIX, this will result on the path being hardcoded in
> the built binaries.
> The only way to avoid hardcoded paths without using linker flags (like
> -Wl,-bnoipath) is to add -l$name.

Can you tell on which package and on which AIX version this patch has an
effect?

I tried it with GNU gettext 0.20.1 on AIX 7.1, with gcc and with
--disable-rpath, and found that the generated executables have the same
directories hardcoded as without your patch.

$ gmake ngettext
/bin/sh ../libtool  --tag=CC   --mode=link gcc 
-DINSTALLDIR=\"/home/haible/prefix32-norpath/bin\" -g -O2  
-L/home/haible/prefix32-norpath/lib -o ngettext ngettext-ngettext.o 
../gnulib-lib/libgrt.a ../intl/libintl.la -liconv -pthread -liconv  
libtool: link: gcc -DINSTALLDIR=\"/home/haible/prefix32-norpath/bin\" -g -O2 -o 
.libs/ngettext ngettext-ngettext.o -pthread  
-L/home/haible/prefix32-norpath/lib ../gnulib-lib/libgrt.a -L../intl/.libs 
-lintl -L/opt/freeware/lib -liconv -pthread 
-Wl,-blibpath:/home/haible/prefix32-norpath/lib:/opt/freeware/lib:/home/haible/prefix32-norpath/lib:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.1:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.1/../../..:/usr/lib:/lib

You can see that the Makefile does not pass abolute library names to 'libtool',
and nevertheless 'libtool' sets the libpath property as shown.

I fear that making --disable-rpath work on AIX is a much harder endeavor...

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]