diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-01-09 22:08:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-09 22:08:00 +0200 |
commit | dfd368d4054bfe067545112717a5bd21bc37aca7 (patch) | |
tree | 0de531ef07c66ae08e527f24b757a89ec399396f /mesonbuild/compilers/compilers.py | |
parent | de8018a17d9b84b2a57761ad624cc669c4e136a4 (diff) | |
parent | 62fc6e7412ec340b230e604437eb67861553bb91 (diff) | |
download | meson-dfd368d4054bfe067545112717a5bd21bc37aca7.zip meson-dfd368d4054bfe067545112717a5bd21bc37aca7.tar.gz meson-dfd368d4054bfe067545112717a5bd21bc37aca7.tar.bz2 |
Merge pull request #2803 from dcbaker/wip/freebsd-fixes
various BSD fixes
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index b14074b..2602d14 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -855,7 +855,15 @@ class Compiler: paths = padding else: paths = paths + ':' + padding - args = ['-Wl,-rpath,' + paths] + args = [] + if mesonlib.is_dragonflybsd(): + # This argument instructs the compiler to record the value of + # ORIGIN in the .dynamic section of the elf. On Linux this is done + # by default, but is not on dragonfly for some reason. Without this + # $ORIGIN in the runtime path will be undefined and any binaries + # linked against local libraries will fail to resolve them. + 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: |