From: Iain Sandoe Date: Wed, 30 Dec 2020 16:56:12 +0000 (+0000) Subject: Darwin, Simplify headers 0/5 : Move spec for Darwin 10 unwind stub [NFC]. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1dfeaca014fae0f129e1408a3e8df992892c8fed;p=gcc.git Darwin, Simplify headers 0/5 : Move spec for Darwin 10 unwind stub [NFC]. The darwinN.h headers were (presumably) introduced to allow specs to be adjusted when there was no mmacosx-version-min handling, or that was considered unreliable. We have version-specific specs for the values that have configuration data, and the version is set in the driver (so may be considered reliably present). Some of the 'darwinN.h' content has become dead code, and the reminder is either conditionalised on version information (or is setting values used as fall-backs in cross-compilations). With the changes needed for Darwin20 / macOS 11 the 'darwnN.h' headers are now too unwieldy to be useful - so this series moves the relevant specs definitons to the common 'darwin.h' header and then finally uses the config.gcc script to supply the fall-back defaults for cross- compilations. We can then delete all but the main header, since the darwinN.h are unused. This change moves a spec from darwin10.h to the main darwin.h target header. gcc/ChangeLog: * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Move the spec for the Darwin10 unwinder stub from here ... * config/darwin.h (LINK_COMMAND_SPEC_A): ... to here. --- diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index 93e7796e850..a3b439487e8 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -230,6 +230,7 @@ extern GTY(()) int darwin_ms_struct; %{%:sanitize(address): -lasan } \ %{%:sanitize(undefined): -lubsan } \ %(link_ssp) \ + %:version-compare(>< 10.6 10.7 mmacosx-version-min= -ld10-uwfef.o) \ %(link_gcc_c_sequence) \ }}}\ %{!nostdlib:%{!r:%{!nostartfiles:%E}}} %{T*} %{F*} "\ diff --git a/gcc/config/darwin10.h b/gcc/config/darwin10.h index d1a33a3017e..f1395954453 100644 --- a/gcc/config/darwin10.h +++ b/gcc/config/darwin10.h @@ -24,7 +24,6 @@ along with GCC; see the file COPYING3. If not see #define LINK_GCC_C_SEQUENCE_SPEC \ "%{!static:%{!static-libgcc: \ %:version-compare(>= 10.6 mmacosx-version-min= -lSystem) } } \ - %{!nostdlib:%:version-compare(>< 10.6 10.7 mmacosx-version-min= -ld10-uwfef.o)} \ %G %{!nolibc:%L}" #undef DEF_MIN_OSX_VERSION