summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Tool/gnulink.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Tool/gnulink.py')
-rw-r--r--src/engine/SCons/Tool/gnulink.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/engine/SCons/Tool/gnulink.py b/src/engine/SCons/Tool/gnulink.py
index 81c0130..1093303 100644
--- a/src/engine/SCons/Tool/gnulink.py
+++ b/src/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