[Top][All Lists]

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

Re: libtool 1.4.2 on Darwin -- namespace support on the command-line

From: Benjamin Reed
Subject: Re: libtool 1.4.2 on Darwin -- namespace support on the command-line
Date: 10 Oct 2002 11:24:49 -0400

On Thu, 2002-10-10 at 11:11, Boehne, Robert wrote:

> A similar case is the use of $ORIGIN/ in a hardcoded
> library path.  Not many OS's support it, and anyone
> who depends on it would limit the possible supported
> platform list down to only those that do.

Ahh, I see what you're saying.  No, that's not what I meant.

> If Libtool supports this feature, anything that used
> it would only link on Darwin (AFAICT), and that is
> a very Bad Thing(tm).  If your Darwin-specific package
> uses Libtool, and requires this library namespace
> feature, you shouldn't be using Libtool anyway.
> Libtool isn't intended to wrap every OS specific feature,
> it is intended to be a universal subset of linker
> features that is common to any OS (or implemented
> in Libtool itself).
> I wouldn't be inclined to accept a patch that simply
> turned on this flag on Darwin when linking, but I would
> be inclined to accept a patch that supported library
> namespaces on every (or at leat most) platform known
> to Libtool.  The problem with that is technical, I don't
> think it would be possible to do that.  So I simply
> suggest your efforts be concentrated elsewhere.

This is what I was trying to say.  You would have a libtool command-line
that would be like:

  libtool --mode=link --namespace=flat gcc blah blah blah

...and on darwin, it would create a link line like:

  gcc -flat_namespace -undefined suppress blah blah blah

...and on all other platforms (which don't, as far as I'm aware, have a
flat/twolevel namespace), it would create a line like:

  gcc blah blah blah

i.e., the namespace flag would only apply to darwin, and wouldn't affect
linking on any other platforms (unless some other platform was to
implement library/symbol lookups in the way darwin does, in which case
they would need to set whatever flags they need for namespace support).

--namespace=foo would be implemented as something like:

case $namespace_arg in
    case $host_os in
        lt_flags_namespace="-flat_namespace -undefined suppress"
    case $host_os in

consider that pseudocode, I don't understand libtool's naming
conventions enough to say how it would look, but you get the general

This would make it safe to send the namespace flag upstream to
developers whose packages are not darwin-linker-safe, and it would not
break any other platforms then.

Does that make sense?  Is this something that jives with how libtool
does things?

reply via email to

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