diff options
author | Dirk Baechle <dl9obn@darc.de> | 2013-09-11 20:44:33 (GMT) |
---|---|---|
committer | Dirk Baechle <dl9obn@darc.de> | 2013-09-11 20:44:33 (GMT) |
commit | 25c535f2e5997defdca96a6e0c35a0143e824982 (patch) | |
tree | e102cdf970a9d8c9e05593c5254b2da3b2572f54 /src/engine/SCons/Tool/__init__.py | |
parent | 328e541f40849c270fc75f0932594d18d2e6340b (diff) | |
download | SCons-25c535f2e5997defdca96a6e0c35a0143e824982.zip SCons-25c535f2e5997defdca96a6e0c35a0143e824982.tar.gz SCons-25c535f2e5997defdca96a6e0c35a0143e824982.tar.bz2 |
- fix for #2916, "Issues with versioned SharedLibrary under OpenBSD"
Diffstat (limited to 'src/engine/SCons/Tool/__init__.py')
-rw-r--r-- | src/engine/SCons/Tool/__init__.py | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index b80d6e4..00413e5 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -257,6 +257,10 @@ def VersionShLibLinkNames(version, libname, env): print "VersionShLibLinkNames: linkname = ",linkname linknames.append(linkname) elif platform == 'posix': + if sys.platform.startswith('openbsd'): + # OpenBSD uses x.y shared library versioning numbering convention + # and doesn't use symlinks to backwards-compatible libraries + return [] # For libfoo.so.x.y.z, linknames libfoo.so libfoo.so.x.y libfoo.so.x suffix_re = re.escape(shlib_suffix + '.' + version) # First linkname has no version number @@ -302,13 +306,17 @@ symlinks for the platform we are on""" if version: # set the shared library link flags if platform == 'posix': - suffix_re = re.escape(shlib_suffix + '.' + version) - (major, age, revision) = version.split(".") - # soname will have only the major version number in it - soname = re.sub(suffix_re, shlib_suffix, libname) + '.' + major - shlink_flags += [ '-Wl,-Bsymbolic', '-Wl,-soname=%s' % soname ] - if Verbose: - print " soname ",soname,", shlink_flags ",shlink_flags + shlink_flags += [ '-Wl,-Bsymbolic' ] + # OpenBSD doesn't usually use SONAME for libraries + if not sys.platform.startswith('openbsd'): + # continue setup of shlink flags for all other POSIX systems + suffix_re = re.escape(shlib_suffix + '.' + version) + (major, age, revision) = version.split(".") + # soname will have only the major version number in it + soname = re.sub(suffix_re, shlib_suffix, libname) + '.' + major + shlink_flags += [ '-Wl,-soname=%s' % soname ] + if Verbose: + print " soname ",soname,", shlink_flags ",shlink_flags elif platform == 'cygwin': shlink_flags += [ '-Wl,-Bsymbolic', '-Wl,--out-implib,${TARGET.base}.a' ] |