aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-15 14:11:02 -0800
committerNirbheek Chauhan <nirbheek@centricular.com>2022-11-21 15:43:52 +0530
commit686d77bf97526729b8528abafe8926336d02e376 (patch)
treee74cb11447ba2a592ff54bc156666a082f1079f9
parent245ed38409c873061b3fc0a146602900d5f583f4 (diff)
downloadmeson-686d77bf97526729b8528abafe8926336d02e376.zip
meson-686d77bf97526729b8528abafe8926336d02e376.tar.gz
meson-686d77bf97526729b8528abafe8926336d02e376.tar.bz2
linkers: Don't build thin archives on illumos or Solaris
The system linkers don't support this particular GNU extension on these OS'es, so don't build them there. Based on an OpenIndiana patch created by @alarcher. Closes #9882.
-rw-r--r--mesonbuild/linkers/linkers.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/linkers/linkers.py b/mesonbuild/linkers/linkers.py
index 27ccef3..ee7d009 100644
--- a/mesonbuild/linkers/linkers.py
+++ b/mesonbuild/linkers/linkers.py
@@ -208,8 +208,12 @@ class ArLinker(ArLikeLinker):
return self.can_rsp
def get_std_link_args(self, env: 'Environment', is_thin: bool) -> T.List[str]:
- # FIXME: osx ld rejects this: "file built for unknown-unsupported file format"
- if is_thin and not env.machines[self.for_machine].is_darwin():
+ # Thin archives are a GNU extension not supported by the system linkers
+ # on Mac OS X, Solaris, or illumos, so don't build them on those OSes.
+ # OS X ld rejects with: "file built for unknown-unsupported file format"
+ # illumos/Solaris ld rejects with: "unknown file type"
+ if is_thin and not env.machines[self.for_machine].is_darwin() \
+ and not env.machines[self.for_machine].is_sunos():
return self.std_thin_args
else:
return self.std_args