libtool
[Top][All Lists]
Advanced

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

Re: Q: Forcing a -Wl,-rpath arg to static lib users


From: Howard Chu
Subject: Re: Q: Forcing a -Wl,-rpath arg to static lib users
Date: Fri, 18 Nov 2022 01:00:06 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 SeaMonkey/2.53.14

Bob Friesenhahn wrote:
> On Wed, 16 Nov 2022, Oleg Smolsky wrote:
>>
>> Leaving it here for posterity. Perhaps someone will do this with a bit more
>> finesse and turn it into a proper feature.
> 
> Are you using libtool as originally distributed by the FSF or are you using a 
> libtool provided by a Linux system package?
> 
> The libtool provided as part of a Linux distribution often hacks libtool so 
> that it does not include full dependency information in the library.la files. 
>  They
> do this in order to avoid "excessive linkage" because they do not want the 
> program/library to retain full linkage details in case the OS changes the 
> libraries.
> 
> Shared libraries often/usually only need to know the libraries that they 
> immediately link with, but static libraries need to know everything, and the 
> library.la
> files are intended to fill that gap.

You can now build static libraries that only need to know as much as dynamic 
libraries need to know,
using GNU binutils. The feature was merged ~2 years ago already and is 
supported by ar, ld, and gold.

https://sourceware.org/pipermail/binutils/2020-December/114536.html

> 
> I am thinking that you may be trying to fix something which should already be 
> working with the original FSF libtool.
> 
> Bob


-- 
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/



reply via email to

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