From 6a570afd28bccdb118edde36488ba9834494d6c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 16 Nov 2015 05:58:13 +0100 Subject: Imported Upstream version 2.4.1 --- engine/SCons/Tool/gnulink.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'engine/SCons/Tool/gnulink.py') diff --git a/engine/SCons/Tool/gnulink.py b/engine/SCons/Tool/gnulink.py index 81c0130..1093303 100644 --- a/engine/SCons/Tool/gnulink.py +++ b/engine/SCons/Tool/gnulink.py @@ -31,12 +31,17 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gnulink.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog" +__revision__ = "src/engine/SCons/Tool/gnulink.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" import SCons.Util +import SCons.Tool +import os +import sys +import re import link + def generate(env): """Add Builders and construction variables for gnulink to an Environment.""" link.generate(env) @@ -49,6 +54,14 @@ def generate(env): env['RPATHPREFIX'] = '-Wl,-rpath=' env['RPATHSUFFIX'] = '' env['_RPATH'] = '${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}' + + # OpenBSD doesn't usually use SONAME for libraries + use_soname = not sys.platform.startswith('openbsd') + link._setup_versioned_lib_variables(env, tool = 'gnulink', use_soname = use_soname) + env['LINKCALLBACKS'] = link._versioned_lib_callbacks() + + # For backward-compatiblity with older SCons versions + env['SHLIBVERSIONFLAGS'] = SCons.Util.CLVar('-Wl,-Bsymbolic') def exists(env): # TODO: sync with link.smart_link() to choose a linker -- cgit v1.2.3