diff options
-rw-r--r-- | mesonbuild/compilers/compilers.py | 4 | ||||
-rw-r--r-- | mesonbuild/mesonlib.py | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 02faed2..3d303c8 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -909,10 +909,10 @@ class Compiler: else: paths = paths + ':' + padding args = [] - if mesonlib.is_dragonflybsd(): + if mesonlib.is_dragonflybsd() or mesonlib.is_openbsd(): # 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 + # by default, but is not on dragonfly/openbsd 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') diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index 8a2b67c..2a3b920 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -308,6 +308,9 @@ def is_android(): def is_haiku(): return platform.system().lower() == 'haiku' +def is_openbsd(): + return platform.system().lower() == 'openbsd' + def is_windows(): platname = platform.system().lower() return platname == 'windows' or 'mingw' in platname |