[Top][All Lists]

[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: Tue, 02 Nov 2004 15:44:20 +0000
User-agent: Mozilla Thunderbird 0.8 (X11/20040913)

Hi Bill,

Bill Moseley wrote:
>     $ grep -- -static src/
>     libtest_LDFLAGS = -static
> (which maybe answers your question if anyone is using -static)

Not really.  See my other post to this thread.

> I'm not using AC_DISABLE_STATIC in configure -- and using
> --enable-static (without listing packages) seems to have no effect.
> So do I have something setup incorrectly?

Nope.  --enable-static is the default unless AC_DISABLE_STATIC is used
in  You could stop building static libraries by passing
--disable-static, or adding AC_DISABLE_STATIC to

--{en,dis}able-static vs AC_{DIS,EN}ABLE_STATIC apply to what kind of
libtool libraries to build, and have no effect on how programs are

> $ ./configure --prefix=$HOME/static LD_FLAGS='-all-static' >/dev/null && make 
> install >/dev/null

just LDFLAGS                           ^^^

> $ ldd $HOME/static/bin/swish-e
> => /usr/lib/ (0x40027000)
> => /lib/tls/ (0x40122000)
> => /usr/lib/ (0x40132000)
> => /home/moseley/static/lib/ 
> (0x40144000)
> => /lib/tls/ (0x4017a000)
> => /lib/tls/ (0x4019d000)
>         /lib/ => /lib/ (0x40000000)
> So, does that mean I'm not passing in a variable to my

If you leave libtest_LDFLAGS = -static and pass LDFLAGS=-all-static, you'll
end up running

   libtool --mode=link -static -all-static ...

In that case, behaviour is undefined, you should pick just one of those options.

>>Does anyone use libtool's -static flag to deliberately link statically
>>against libtool libraries only?  I would have thought that it is far
>>more common to want all-static behaviour.
> I'm not really clear on what you are asking, but I use -static in my
> to always link a little test program with our library
> statically to help with debugging.
> $ ldd libtest
> => /usr/lib/ (0x40027000)
> => /lib/tls/ (0x40039000)
> => /lib/tls/ (0x4005d000)
>         /lib/ => /lib/ (0x40000000)
> So libswish-e is linked statically there.

But would you be unhappy if libtool took -static to be the same as calling
cc -static and/or ld -static to link?

Gary V. Vaughan      ())_.  address@hidden,}
Research Scientist   ( '/
GNU Hacker           / )=
Technical Author   `(_~)_

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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