[Top][All Lists]

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

Re: Libtool drops -static from LDFLAGS?

From: Alexandre Oliva
Subject: Re: Libtool drops -static from LDFLAGS?
Date: 11 May 2001 23:58:30 -0300
User-agent: Gnus/5.090002 (Oort Gnus v0.02) XEmacs/21.1 (Cuyahoga Valley)

On May  9, 2001, Ossama Othman <address@hidden> wrote:

> On Tue, May 08, 2001 at 03:55:36PM -0300, Alexandre Oliva wrote:

>> Nope.  -all-static does that.  It's in the libtool manual.  If they
>> ``know what they're doing'', they should know that :-D

> I understand that, but why should a user who downloads a libtoolized
> package have to read the libtool manual, especially since passing in
> gcc's "-static" flag via $LDFLAGS is not an uncommon thing to do.

Libtool abstracts away differences between shared and static
libraries.  If one configured libtool with --disable-static, but the
package happened to link a program using -Wc,-static, linking would
fail on some systems, and work on others, because linkers differ on
whether to error out in case a static library isn't found or proceed
to looking for a shared library if a static one can't be found.  So,
libtool takes the IMHO reasonable approach of doing something safe
with -static, whereas still allowing one to force the issue using

I agree that -static could pass flags to the linker telling it to
prefer static libraries over shared ones, if such an option is
available, but modifying its meaning now so that it could break the
existing code base would be a mistake.

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                  address@hidden,}
CS PhD student at IC-Unicamp        address@hidden,}
Free Software Evangelist    *Please* write to mailing lists, not to me

reply via email to

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