waf: use -Wl,--version-script if available
authorAndrew Tridgell <tridge@samba.org>
Wed, 8 Dec 2010 03:52:43 +0000 (14:52 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 8 Dec 2010 04:26:06 +0000 (05:26 +0100)
commit35134214ae819ad26ec388fa44dd37b24d72d3c4
treeb120834d4e3086d61230fb45b2c74d97da0bd8f5
parentd0c93ba115a942403982011d01c443aa18513fe7
waf: use -Wl,--version-script if available

This enables symbol version on our libraries, if the system supports
it

If the library is a public library, then set the symbol version based
on the major number. If it is a private library then set it based on
the full version number (which will include the git hash if
available).

This ensures that applications using our libraries don't use symbols
from other libraries that they may be linked to. It also ensures we
only use the right version of any private libraries.

Note that the linker ends up generating both a version and unversioned
symbol for all symbols. This means existing users of our public
libraries will continue to work, with symbols resolved to the
unversioned symbol. When applications are re-linked they will bind to
the specific symbol version.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org>
buildtools/wafsamba/samba_deps.py
buildtools/wafsamba/wafsamba.py