[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Understanding -static
From: |
Alexandre Oliva |
Subject: |
Re: Understanding -static |
Date: |
29 Jan 2005 22:18:06 -0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
On Jan 5, 2005, Akim Demaille <address@hidden> wrote:
> Le 4 janv. 05, à 00:02, Peter O'Gorman a écrit :
>> I have no idea what is supposed to happen in this situation. You have
>> specified that static libraries should not be built and also asked that
>> executables be statically linked against not-yet-installed libraries.
> Right.
Note quite. -static, for libtool, doesn't mean `reject any dynamic
libraries', it just means `prefer static libraries over dynamic
ones'. Yes, it's different from what compilers and linkers have done
for -static historically, but it was deemed more useful to implement
it this way. If you really, really, absolutely need a static
executable, use -all-static. This should get the link to fail should
a library only be available in dynamic form, or the system reject
static binaries altogether.
> Right. But linking statically a dynamic library doesn't sound
> absurd to me (but I may be naive here).
It sounds absurd to me, FWIW :-)
> At least, it works fine on GNU/Linux.
Are you sure?
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer address@hidden, gcc.gnu.org}
Free Software Evangelist address@hidden, gnu.org}