summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/darwin.h
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2019-07-10 19:29:56 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-07-10 19:29:56 +0000
commit4b5c5391849dd58f8cf3764b642da95e7e1aaaca (patch)
tree8919b8f05402367612f01a588bf0428c8214aa65 /gcc/config/rs6000/darwin.h
parent2cb7362310288cce61244e39f90fccd75b1c28e1 (diff)
downloadgcc-4b5c5391849dd58f8cf3764b642da95e7e1aaaca.tar.gz
[Darwin, PPC] Collate the system library spec into one expression.
There's no need to redefine this dependent on the target header (that only works in the case that we have self-hosting which is less and less likely for the older system versions). Actually, what we need is for the correct library set to be used based on the SDK(s) that can target the chosen system. gcc/ChangeLog: 2019-07-10 Iain Sandoe <iain@sandoe.co.uk> * config/rs6000/darwin.h (LIB_SPEC): Collate this spec here. * config/rs6000/darwin7.h (LIB_SPEC): Remove. * config/rs6000/darwin8.h (LIB_SPEC): Remove. (DEF_MIN_OSX_VERSION): New. From-SVN: r273369
Diffstat (limited to 'gcc/config/rs6000/darwin.h')
-rw-r--r--gcc/config/rs6000/darwin.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h
index b0b50476970..272cd454189 100644
--- a/gcc/config/rs6000/darwin.h
+++ b/gcc/config/rs6000/darwin.h
@@ -86,6 +86,24 @@ extern int darwin_emit_picsym_stub;
#define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
+/* Machine dependent libraries.
+ Include libmx when targeting Darwin 7.0 and above, but before libSystem,
+ since the functions are actually in libSystem but for 7.x compatibility
+ we want them to be looked for in libmx first.
+ Include libSystemStubs when compiling against 10.3 - 10.5 SDKs (we assume
+ this is the case when targetting these) - but not for 64-bit long double.
+ Don't do either for m64, the library is either a dummy or non-existent.
+*/
+
+#undef LIB_SPEC
+#define LIB_SPEC \
+"%{!static: \
+ %{!m64:%{!mlong-double-64: \
+ %{pg:%:version-compare(>< 10.3 10.5 mmacosx-version-min= -lSystemStubs_profile)} \
+ %{!pg:%:version-compare(>< 10.3 10.5 mmacosx-version-min= -lSystemStubs)} \
+ %:version-compare(>< 10.3 10.4 mmacosx-version-min= -lmx)}} \
+ -lSystem \
+}"
/* We want -fPIC by default, unless we're using -static to compile for
the kernel or some such. The "-faltivec" option should have been