libtool
[Top][All Lists]
Advanced

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

Re: Building all static


From: Gary V. Vaughan
Subject: Re: Building all static
Date: Wed, 03 Nov 2004 18:26:17 +0000
User-agent: Mozilla Thunderbird 0.8 (X11/20040913)

Hi Peter,

Peter O'Gorman wrote:
> Gary V. Vaughan wrote:
> 
>> Considering Bob's posts about how static linking against system libraries
>> gets you a binary that might stop working if you move it to another
>> similar version, or upgrade your system... and considering that we
>> already
>> extract a list of automatically linked libraries for each compiler incase
>> we want to link with ld:  Why do you want to make -static the same as
>> -all-static?
> 
> I am almost certain that in those cases the system libraries in question
> are not available as shared libs.

Where a system has shared libs at all, libc is invariably one of them.  I'm
with Bob on excluding any libs that the compiler driver adds automatically,
for the reasons above.

> I don't see -all-static doing anything
> at all on platforms where lt_prog_compiler_static is not set.

Indeed.

> I am
> saying that even without this flag libtool can and should look for
> static libraries in favor of shared ones if -static is on the command line.

I see.  Maybe that's the same thing then, albeit a different algorithm.
The problem with doing it that way is this: when libtool encounters a native
(no .la) shared lib and links it, most modern platforms pull in the deplibs
automatically AIUI.  This certainly isn't true of static archives, so we
could breed situations where specifying -static to libtool will break a build
that was perfectly correct when using shared libraries.

As an aside, I notice that lt_prog_compiler_static is not set for branch-2-0
libtool on my darwin machine.  I guess this is a bug, no?

Cheers,
        Gary.
-- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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