bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Cc: "CHIGOT, CLEMENT" <clement.chigot@atos.net>
Subject: Re: [PATCH] m4: fix --disable-rpath for AIX
Date: Mon, 17 Feb 2020 03:22:06 +0100	[thread overview]
Message-ID: <2576252.vWEZT3b3oR@omega> (raw)
In-Reply-To: <DB7PR02MB4075C4CE66BCB28F811E6E60EA190@DB7PR02MB4075.eurprd02.prod.outlook.com>

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	other threads:[~2020-02-17  2:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 15:38 [PATCH] m4: fix --disable-rpath for AIX CHIGOT, CLEMENT
2020-02-17  2:22 ` Bruno Haible [this message]
2020-02-17  9:40   ` CHIGOT, CLEMENT

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2576252.vWEZT3b3oR@omega \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=clement.chigot@atos.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).