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).
@@ -1485,7 +1485,9 @@ 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:
+ 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')
