From e06f0e6aafda0eb6bb712494c98d2f8060423232 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Thu, 30 May 2019 22:00:25 -0700 Subject: [PATCH] Solaris fixes Fixes #5351 --- mesonbuild/compilers/compilers.py | 2 ++ mesonbuild/environment.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 8ff8f9dfa..ec8879438 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -1979,6 +1979,8 @@ class GnuLikeCompiler(abc.ABC): elif self.compiler_type.is_windows_compiler: # For PE/COFF this is impossible return [] + elif mesonlib.is_sunos(): + return [] else: # GNU ld and LLVM lld return ['-Wl,--allow-shlib-undefined'] diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 1df80ca0d..84a759655 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -1222,6 +1222,8 @@ class Environment: return ArLinker(linker) if p.returncode == 1 and err.startswith('Usage'): # AIX return ArLinker(linker) + if p.returncode == 1 and err.startswith('ar: bad option: --'): # Solaris + return ArLinker(linker) self._handle_exceptions(popen_exceptions, linkers, 'linker') raise EnvironmentException('Unknown static linker "%s"' % ' '.join(linkers))