aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@openbsd.org>2019-03-10 13:37:12 +0100
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2019-03-11 11:38:31 +0000
commitd952e5ac4d5dee037df80633ceedbad1bfc8eabb (patch)
tree2874730865a0b594920b73d3ca6c8ff08066bb77
parent7bc04996c0d98797be1516643b833f2206e61151 (diff)
downloadmeson-d952e5ac4d5dee037df80633ceedbad1bfc8eabb.zip
meson-d952e5ac4d5dee037df80633ceedbad1bfc8eabb.tar.gz
meson-d952e5ac4d5dee037df80633ceedbad1bfc8eabb.tar.bz2
GnuLikeCompiler: don't set b_lundef by default on OpenBSD
OpenBSD does not link libc into shared libraries by default to avoid binding libraries to specific libc majors. So prevent passing "-Wl,--no-undefined" or "-zdefs" when linking (those options have always suffered false positives on this operating system).
-rw-r--r--mesonbuild/compilers/compilers.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 24dffa6..66604a2 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -1485,8 +1485,10 @@ class GnuLikeCompiler(abc.ABC):
self.compiler_type = compiler_type
self.base_options = ['b_pch', 'b_lto', 'b_pgo', 'b_sanitize', 'b_coverage',
'b_ndebug', 'b_staticpic', 'b_pie']
- if not self.compiler_type.is_osx_compiler and not self.compiler_type.is_windows_compiler:
- self.base_options.append('b_lundef')
+ if (not self.compiler_type.is_osx_compiler and
+ not self.compiler_type.is_windows_compiler and
+ not mesonlib.is_openbsd()):
+ self.base_options.append('b_lundef')
if not self.compiler_type.is_windows_compiler:
self.base_options.append('b_asneeded')
# All GCC-like backends can do assembly