+2019-12-14 Iain Sandoe <iain@sandoe.co.uk>
+
+ * config/darwin.h (DARWIN_EXTRA_SPECS): Add new
+ bundle spec. (DARWIN_BUNDLE1_SPEC): New.
+ (STARTFILE_SPEC): Use darwin bundle spec.
+ * config/rs6000/darwin.h (DARWIN_BUNDLE1_SPEC): New.
+ (DARWIN_DYLIB1_SPEC): Delete duplicate.
+
2019-12-13 Martin Sebor <msebor@redhat.com>
PR middle-end/91582
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{Zdynamiclib: %(darwin_dylib1) %{fgnu-tm: -lcrttms.o}} \
- %{!Zdynamiclib:%{Zbundle:%{!static: \
- %:version-compare(< 10.6 mmacosx-version-min= -lbundle1.o) \
- %{fgnu-tm: -lcrttms.o}}} \
+ %{!Zdynamiclib:%{Zbundle:%(darwin_bundle1)} \
%{!Zbundle:%{pg:%{static:-lgcrt0.o} \
%{!static:%{object:-lgcrt0.o} \
%{!object:%{preload:-lgcrt0.o} \
{ "darwin_crt1", DARWIN_CRT1_SPEC }, \
{ "darwin_crt2", DARWIN_CRT2_SPEC }, \
{ "darwin_crt3", DARWIN_CRT3_SPEC }, \
- { "darwin_dylib1", DARWIN_DYLIB1_SPEC },
+ { "darwin_dylib1", DARWIN_DYLIB1_SPEC }, \
+ { "darwin_bundle1", DARWIN_BUNDLE1_SPEC },
#define DARWIN_CRT1_SPEC \
"%:version-compare(!> 10.5 mmacosx-version-min= -lcrt1.o) \
"%:version-compare(!> 10.5 mmacosx-version-min= -ldylib1.o) \
%:version-compare(>< 10.5 10.6 mmacosx-version-min= -ldylib1.10.5.o)"
+#define DARWIN_BUNDLE1_SPEC \
+"%{!static:%:version-compare(< 10.6 mmacosx-version-min= -lbundle1.o) \
+ %{fgnu-tm: -lcrttms.o}}"
+
#ifdef HAVE_AS_MMACOSX_VERSION_MIN_OPTION
/* Emit macosx version (but only major). */
#define ASM_MMACOSX_VERSION_MIN_SPEC \
%:version-compare(!> 10.4 mmacosx-version-min= crt3_2.o%s) \
}}"
-/* We need to jam the dylib1 to 10.5 for 10.6 (Rosetta) use. */
+/* As for crt1, we need to force the dylib crt for 10.6. */
#undef DARWIN_DYLIB1_SPEC
#define DARWIN_DYLIB1_SPEC \
"%:version-compare(!> 10.5 mmacosx-version-min= -ldylib1.o) \
%:version-compare(>< 10.5 10.7 mmacosx-version-min= -ldylib1.10.5.o)"
+/* Likewise, the bundle crt. */
+#undef DARWIN_BUNDLE1_SPEC
+#define DARWIN_BUNDLE1_SPEC \
+"%{!static:%:version-compare(< 10.7 mmacosx-version-min= -lbundle1.o) \
+ %{fgnu-tm: -lcrttms.o}}"
+
/* The PPC regs save/restore functions are leaves and could, conceivably
be used by the tm destructor. */
#undef ENDFILE_SPEC
{ "darwin_crt2", DARWIN_CRT2_SPEC }, \
{ "darwin_subarch", DARWIN_SUBARCH_SPEC },
-/* We need to jam the dylib crt to 10.5 for 10.6 (Rosetta) use. */
-#undef DARWIN_DYLIB1_SPEC
-#define DARWIN_DYLIB1_SPEC \
- "%:version-compare(!> 10.5 mmacosx-version-min= -ldylib1.o) \
- %:version-compare(>< 10.5 10.7 mmacosx-version-min= -ldylib1.10.5.o)"
-
/* Output a .machine directive. */
#undef TARGET_ASM_FILE_START
#define TARGET_ASM_FILE_START rs6000_darwin_file_start