[pushed] Darwin, Simplify headers 0/5 : Move spec for Darwin 10 unwind stub [NFC].

Message ID 263D52BC-1BE4-45BB-A62E-1C05EEBBC4B1@sandoe.co.uk
State New
Headers show
Series
  • [pushed] Darwin, Simplify headers 0/5 : Move spec for Darwin 10 unwind stub [NFC].
Related show

Commit Message

Iain Sandoe Jan. 2, 2021, 8:04 p.m.
Hi,

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.

tested on darwin8, 9, 16, 19, 20, x86_64-linux-gnu
pushed,
thanks
Iain


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.
---
 gcc/config/darwin.h   | 1 +
 gcc/config/darwin10.h | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

-- 
2.24.1

Patch

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