bug-libtool
[Top][All Lists]
Advanced

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

Re: --whole-archive doesn't work on OSX


From: Peter O'Gorman
Subject: Re: --whole-archive doesn't work on OSX
Date: Mon, 14 Aug 2006 23:39:56 -0500


On Aug 14, 2006, at 11:26 PM, Andrew Miller wrote:

Peter O'Gorman wrote:

On Aug 3, 2006, at 10:01 AM, Andrew Miller wrote:

...
However, the documentation seems to imply that the behaviour of whole-archive should happen on all platforms, for all convenience libraries.

e.g.
— Variable: *whole_archive_flag_spec*

Compiler flag to generate shared objects from convenience archives.

If whole_archive_flag_spec is empty, as it is on darwin for more recent versions of libtool then the convenience archive will be unpacked using lipo/ar and the objects will be added to the link line.
I haven't been able to reproduce this behaviour when building binaries for either libtool-1.5.22 or current CVS libtool (although it does unpack the archive when building installable libraries from convenience libraries).

For binaries, convenience archives are treated as normal libraries and are linked as normal, when building shared libraries, they are extracted, as you note.

Whether this is in itself a bug is debatable, and quite likely has already been debated on this, or the general libtool list. I suggest that you stop using convenience archives in this case and use ordinary objects instead. I believe, but haven't tried, using the - dlopen flag to point to the libraries that the executable will dlopen will also cause the required symbols to be included in the executable (because they will be referenced in the generated object containing the libraries symbols).

Hope this helps,
Peter



reply via email to

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