[Top][All Lists]

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

Re: Understanding -static

From: Peter O'Gorman
Subject: Re: Understanding -static
Date: Mon, 03 Jan 2005 23:02:37 +0000
User-agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)

Hash: SHA1

Akim Demaille wrote:

|> I'm not sure I understand correctly what -static means for
|> programs.  My understanding is that during the build, libraries
|> against which the program is linked are statically linked
|> if there are not installed *now*.  Reading the documentation, it is
|> somewhat unclear to me whether it refers to libraries that
|> are installed or not *now* (the present), or meant to be installed
|> or not (the future).
|> `-static'
|>      If OUTPUT-FILE is a program, then do not link it against any
|>      uninstalled shared libtool libraries.
|> My wondering comes from the fact that the attached tarball (to
|> bootstrap via autoreconf -fvi) does not link statically on Darwin when
|> the
|> top level builds a lib_LTLIBRARIES (*to be installed*, but
|> not
|> yet installed).  It builds, but the resulting binary is incomplete:
|> sulaco% file hw
|> hw: Mach-O executable ppc
|> sulaco% otool -L hw
|> hw:
|>         /usr/local/lib/libhw.0.dylib (compatibility version 1.0.0,
|> current version 1.0.0)

|> (Isn't lilbtool expected to build a wrapper script in such a case?)

Hi Akim,

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. If you
configure with --enable-static then you get a statically linked executable,
but the default in your application is not to build static libs, so it links
against the only available thing the shared lib, yet it thinks it is
building static and makes no wrapper script :(

Perhaps libtool should complain that -static was specified and no static
library was available in this case? How on earth does linux manage this?

It seems that if there is no specific test in libtool for a feature, you can
pretty much guarantee that it does not work on Darwin :(

- --
Peter O'Gorman -
Version: GnuPG v1.2.6 (Darwin)


reply via email to

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