aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/darwin.h
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-12-30 17:59:42 +0000
committerIain Sandoe <iain@sandoe.co.uk>2021-01-02 19:56:19 +0000
commit896607741f1ea98fc8a35e58e76d67248f6e6211 (patch)
treed3fb3e34eebb64ada8f2dda78dd06c6bdb45a5f8 /gcc/config/darwin.h
parent1dfeaca014fae0f129e1408a3e8df992892c8fed (diff)
downloadgcc-896607741f1ea98fc8a35e58e76d67248f6e6211.zip
gcc-896607741f1ea98fc8a35e58e76d67248f6e6211.tar.gz
gcc-896607741f1ea98fc8a35e58e76d67248f6e6211.tar.bz2
Darwin, Simplify headers 1/5 : Move LINK_GCC_C_SEQUENCE_SPEC [NFC].
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. gcc/ChangeLog: * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Move from here... * config/darwin.h (LINK_GCC_C_SEQUENCE_SPEC): ... to here.
Diffstat (limited to 'gcc/config/darwin.h')
-rw-r--r--gcc/config/darwin.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index a3b4394..524a9c9 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. */