libtool
[Top][All Lists]
Advanced

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

per-deplib static/dynamic flags


From: Ralf Wildenhues
Subject: per-deplib static/dynamic flags
Date: Mon, 30 Jan 2006 22:28:52 +0100
User-agent: Mutt/1.5.9i

The 1.5.20 regression fix for `-static' for programs has made it clear
that per-deplib static/shared flags are desirable for libtool.

I will followup to this mail (to libtool-patches only for size, removing
all Cc:s) with a patch to implement per-deplib flags for programs (for
CVS HEAD) and add comprehensive tests for the static flags.

Notes and open questions:

- The patch depends upon the pending `-static-libtool-libs' patch[1].
  The new tests exercises all the added flags (this is how this patch
  got started).

- I have added the flag names for various systems of which I could grab
  some documentation; the corresponding list is certainly incomplete
  and too broad in some cases; help is much appreciated to refine this.[2]

- Note semantics vary between preferred and forced linking in either
  type.  For now the patch only offers (and chooses) to prefer rather
  than to force one linkage mode, if possible; the documentation should
  allow us to fix this later if desirable.  We could instead also allow
  a kind of fat interface of the form
    -Bprefer-static -Bprefer-dynamic -Bforce-static -Bforce-dynamic -Bdefault

  (the naming is obviously open to improvement)
  and state that we may be able to control this for libtool libraries,
  but for non-libtool ones only on systems with linkers that have this
  functionality.

- Should the corresponding libtool flags be named `-Bstatic' resp.
  `-Bdynamic'?  Those were the most common names I could find, but IMHO
  they are not very self-explanatory for users not used to them.

- All non-libtool uses of per-deplib flags I know of may be prefixed
  with a linker prefix `$wl'.  Should libtool go to the lengths to also
  detect and treat
    ${wl}-Bstatic ${wl}-Bdynamic
  and also these (possibly different!)
    -Wl,-Bstatic -Wl,-Bdynamic
  or even these
    -Wc,-Bstatic -Wc,-Bdynamic
  as identical to the non-prefixed ones?

The latter question is connected to how Makefiles should be written that
deal with both libtool and non-libtool links, and scripts such as GCCs
libtool-ldflags to deal with this.[3]

Apologies for letting other pending items slip a bit for this one. ;-)

Cheers,
Ralf

[1] http://thread.gmane.org/gmane.comp.gnu.libtool.general/7097
[2] http://tkd.kicks-ass.net/GnuLibtoolProject/FeatureRequests/PerDeplibFlags
[3] http://gcc.gnu.org/ml/libstdc++/2005-07/msg00067.html
    http://gcc.gnu.org/ml/libstdc++/2005-12/msg00261.html




reply via email to

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