aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/darwin.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/darwin.h')
-rw-r--r--gcc/config/darwin.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 0c8f2769abe..29a24ddc6d6 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -359,8 +359,8 @@ extern GTY(()) int darwin_ms_struct;
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
- "%{Zdynamiclib: %(darwin_dylib1) } \
- %{!Zdynamiclib:%{Zbundle:%{!static:-lbundle1.o}} \
+ "%{Zdynamiclib: %(darwin_dylib1) %{fgnu-tm: -lcrttms.o}} \
+ %{!Zdynamiclib:%{Zbundle:%{!static:-lbundle1.o %{fgnu-tm: -lcrttms.o}}} \
%{!Zbundle:%{pg:%{static:-lgcrt0.o} \
%{!static:%{object:-lgcrt0.o} \
%{!object:%{preload:-lgcrt0.o} \
@@ -372,10 +372,8 @@ extern GTY(()) int darwin_ms_struct;
%(darwin_crt2)}}}}}} \
%{shared-libgcc:%:version-compare(< 10.5 mmacosx-version-min= crt3.o%s)}"
-/* The native Darwin linker doesn't necessarily place files in the order
- that they're specified on the link line. Thus, it is pointless
- to put anything in ENDFILE_SPEC. */
-/* #define ENDFILE_SPEC "" */
+/* We want a destructor last in the list. */
+#define ENDFILE_SPEC "%{fgnu-tm: -lcrttme.o}"
#define DARWIN_EXTRA_SPECS \
{ "darwin_crt1", DARWIN_CRT1_SPEC }, \
@@ -388,13 +386,19 @@ extern GTY(()) int darwin_ms_struct;
#define DARWIN_CRT1_SPEC \
"%:version-compare(!> 10.5 mmacosx-version-min= -lcrt1.o) \
- %:version-compare(>= 10.5 mmacosx-version-min= -lcrt1.10.5.o)"
+ %:version-compare(>= 10.5 mmacosx-version-min= -lcrt1.10.5.o) \
+ %{fgnu-tm: -lcrttms.o}"
/* Default Darwin ASM_SPEC, very simple. */
#define ASM_SPEC "-arch %(darwin_arch) \
%{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL} \
%{static}"
+/* Default ASM_DEBUG_SPEC. Darwin's as cannot currently produce dwarf
+ debugging data. */
+
+#define ASM_DEBUG_SPEC "%{g*:%{!g0:%{!gdwarf*:--gstabs}}}"
+
/* We still allow output of STABS. */
#define DBX_DEBUGGING_INFO 1
@@ -692,6 +696,10 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS];
#define TARGET_ASM_UNIQUE_SECTION darwin_unique_section
#undef TARGET_ASM_FUNCTION_RODATA_SECTION
#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
+
+#undef TARGET_ASM_TM_CLONE_TABLE_SECTION
+#define TARGET_ASM_TM_CLONE_TABLE_SECTION darwin_tm_clone_table_section
+
#undef TARGET_ASM_RELOC_RW_MASK
#define TARGET_ASM_RELOC_RW_MASK machopic_reloc_rw_mask