aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-12-19 15:42:01 -0800
committerDylan Baker <dylan@pnwbakers.com>2018-01-06 13:49:34 -0800
commit10a560a411728f747c8394599ef95c9c8caa2086 (patch)
treeb3570401de504ff39c6e68908f95941852e8e864
parent3b8e65911c3ec8dd03cc1efd1250efa5aaf98f5e (diff)
downloadmeson-10a560a411728f747c8394599ef95c9c8caa2086.zip
meson-10a560a411728f747c8394599ef95c9c8caa2086.tar.gz
meson-10a560a411728f747c8394599ef95c9c8caa2086.tar.bz2
compilers: fix unittest "16 prebuilt shared" on dragonfly bsd
-rw-r--r--mesonbuild/compilers/compilers.py5
-rw-r--r--mesonbuild/mesonlib.py3
2 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index b14074b..52dbb56 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -855,7 +855,10 @@ class Compiler:
paths = padding
else:
paths = paths + ':' + padding
- args = ['-Wl,-rpath,' + paths]
+ args = []
+ if mesonlib.is_dragonflybsd():
+ args.append('-Wl,-z,origin')
+ args.append('-Wl,-rpath,' + paths)
if get_compiler_is_linuxlike(self):
# Rpaths to use while linking must be absolute. These are not
# written to the binary. Needed only with GNU ld:
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py
index 3b32996..8793dff 100644
--- a/mesonbuild/mesonlib.py
+++ b/mesonbuild/mesonlib.py
@@ -285,6 +285,9 @@ def is_cygwin():
def is_debianlike():
return os.path.isfile('/etc/debian_version')
+def is_dragonflybsd():
+ return platform.system().lower() == 'dragonfly'
+
def for_windows(is_cross, env):
"""
Host machine is windows?