[pushed] Darwin, Simplify headers 1/5 : Move LINK_GCC_C_SEQUENCE_SPEC [NFC].

Message ID D24B14D2-4752-48FE-854E-74F9ADF2E693@sandoe.co.uk
State Superseded
Headers show
Series
  • [pushed] Darwin, Simplify headers 1/5 : Move LINK_GCC_C_SEQUENCE_SPEC [NFC].
Related show

Commit Message

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

There is no need to make the LINK_GCC_C_SEQUENCE_SPEC conditional on
configuration parameters, it is adequately conditionalized on the
macosx-version-min.

tested as per part 0,
pushed to master
Iain

gcc/ChangeLog:

	* config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Move from
	here...
	* config/darwin.h (LINK_GCC_C_SEQUENCE_SPEC): ... to here.
---
 gcc/config/darwin.h   | 10 +++++++---
 gcc/config/darwin10.h |  8 --------
 2 files changed, 7 insertions(+), 11 deletions(-)

-- 
2.24.1

Patch

diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index a3b439487e8..524a9c9e170 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -260,10 +260,14 @@  extern GTY(()) int darwin_ms_struct;
 /* Tell collect2 to run dsymutil for us as necessary.  */
 #define COLLECT_RUN_DSYMUTIL 1
 
-/* We only want one instance of %G, since libSystem (Darwin's -lc) does not depend
-   on libgcc.  */
+/* Fix PR47558 by linking against libSystem ahead of libgcc. See also
+   PR 80556 and the fallout from this.  */
+
 #undef  LINK_GCC_C_SEQUENCE_SPEC
-#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L}"
+#define LINK_GCC_C_SEQUENCE_SPEC \
+"%{!static:%{!static-libgcc: \
+    %:version-compare(>= 10.6 mmacosx-version-min= -lSystem) } } \
+  %G %{!nolibc:%L}"
 
 /* ld64 supports a sysroot, it just has a different name and there's no easy
    way to check for it at config time.  */
diff --git a/gcc/config/darwin10.h b/gcc/config/darwin10.h
index f1395954453..88b1fd061bb 100644
--- a/gcc/config/darwin10.h
+++ b/gcc/config/darwin10.h
@@ -18,14 +18,6 @@  You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-/* Fix PR47558 by linking against libSystem ahead of libgcc_ext. */
-
-#undef  LINK_GCC_C_SEQUENCE_SPEC
-#define LINK_GCC_C_SEQUENCE_SPEC \
-"%{!static:%{!static-libgcc: \
-    %:version-compare(>= 10.6 mmacosx-version-min= -lSystem) } } \
-  %G %{!nolibc:%L}"
-
 #undef DEF_MIN_OSX_VERSION
 #define DEF_MIN_OSX_VERSION "10.6"