From 10a560a411728f747c8394599ef95c9c8caa2086 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 19 Dec 2017 15:42:01 -0800 Subject: [PATCH] compilers: fix unittest "16 prebuilt shared" on dragonfly bsd --- mesonbuild/compilers/compilers.py | 5 ++++- mesonbuild/mesonlib.py | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index b14074bae..52dbb56be 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 3b3299637..8793dff77 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?