diff options
-rw-r--r-- | mesonbuild/compilers/compilers.py | 5 | ||||
-rw-r--r-- | mesonbuild/mesonlib.py | 3 |
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? |