Re: [PATCH 05/12] ltmain.in: Don't encode RATHS which match default linker paths

Roumen Petrov <[email protected]> Tue, 16 Jan 2024 22:05:30 +0200
Newsgroups gmane.comp.gnu.libtool.patches
Message-ID <[email protected]>
Hi All

Information below is not enough to understand details.

Richard Purdie wrote:
> On Mon, 2024-01-15 at 20:10 -0500, Mike Frysinger wrote:
>> On 25 Oct 2021 15:33, Richard Purdie wrote:
>>> We don't want to add RPATHS which match default linker search paths, they're
>>> a waste of space. This patch filters libtools list of paths to encoode and
>>> removes the ones we don't need.

Libtool try to avoid search path used by run-time loader.
Note FSF version! Debian patched is know to be broken since decades.

There is a way to adapt old releases on Unix/Linux like build systems.
This is autoconf cache variable . I cannot remember exact name by is like lt_cv..dl....search...path... (1)

If I remember well libtool release 2.4.7  adds configuration variable that allows default search path (2) to be set.


In my cross-builds scripts I use model (1) to exclude not only path passed to libtool with --with-sysroot argument but additional path.


>> how are you defining "linker" ?  are you talking about the runtime linker
>> (i.e. ld.so) or the build time linker (i.e. `ld`) ?
> I meant the runtime linker/loader ld.so.
>
>> the commit message also doesn't really explain in concrete details the
>> scenario you're running into.
> We were seeing binaries with RPATHS like /usr/lib in them which
> basically doesn't do anything useful since it is a default for ld.so.
> We were therefore trying to remove those to improve the efficiency of
> the binaries slightly.
>
> Cheers,
>
> Richard

Regards,
Roumen Petrov