From d952e5ac4d5dee037df80633ceedbad1bfc8eabb Mon Sep 17 00:00:00 2001 From: Antoine Jacoutot Date: Sun, 10 Mar 2019 13:37:12 +0100 Subject: 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). --- mesonbuild/compilers/compilers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mesonbuild/compilers/compilers.py') 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 -- cgit v1.1