Solaris fixes

Fixes #5351
pull/5484/head
Kurtis Rader 6 years ago committed by Jussi Pakkanen
parent 15ab1f64f9
commit e06f0e6aaf
  1. 2
      mesonbuild/compilers/compilers.py
  2. 2
      mesonbuild/environment.py

@ -1979,6 +1979,8 @@ class GnuLikeCompiler(abc.ABC):
elif self.compiler_type.is_windows_compiler: elif self.compiler_type.is_windows_compiler:
# For PE/COFF this is impossible # For PE/COFF this is impossible
return [] return []
elif mesonlib.is_sunos():
return []
else: else:
# GNU ld and LLVM lld # GNU ld and LLVM lld
return ['-Wl,--allow-shlib-undefined'] return ['-Wl,--allow-shlib-undefined']

@ -1222,6 +1222,8 @@ class Environment:
return ArLinker(linker) return ArLinker(linker)
if p.returncode == 1 and err.startswith('Usage'): # AIX if p.returncode == 1 and err.startswith('Usage'): # AIX
return ArLinker(linker) return ArLinker(linker)
if p.returncode == 1 and err.startswith('ar: bad option: --'): # Solaris
return ArLinker(linker)
self._handle_exceptions(popen_exceptions, linkers, 'linker') self._handle_exceptions(popen_exceptions, linkers, 'linker')
raise EnvironmentException('Unknown static linker "%s"' % ' '.join(linkers)) raise EnvironmentException('Unknown static linker "%s"' % ' '.join(linkers))

Loading…
Cancel
Save