/* 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. */
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"