aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2020-07-07 19:13:36 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2020-07-07 22:08:52 -0700
commit20d405ec18845a18694e4985701dd89523d6dc73 (patch)
treed40b34c559ef55be5ba566c93036352fe062b264 /mesonbuild/environment.py
parent5b82bb8689b3cb598289f734de21e07a64fa6898 (diff)
downloadmeson-20d405ec18845a18694e4985701dd89523d6dc73.zip
meson-20d405ec18845a18694e4985701dd89523d6dc73.tar.gz
meson-20d405ec18845a18694e4985701dd89523d6dc73.tar.bz2
SolarisDynamicLinker: report ld's version instead of gcc's
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index bf09a88..00922c1 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -930,9 +930,15 @@ class Environment:
cls = GnuBFDDynamicLinker
linker = cls(compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v)
elif 'Solaris' in e or 'Solaris' in o:
+ for line in (o+e).split('\n'):
+ if 'ld: Software Generation Utilities' in line:
+ v = line.split(':')[2].lstrip()
+ break
+ else:
+ v = 'unknown version'
linker = SolarisDynamicLinker(
compiler, for_machine, comp_class.LINKER_PREFIX, override,
- version=search_version(e))
+ version=v)
else:
raise EnvironmentException('Unable to determine dynamic linker')
return linker