From: Iain Sandoe Date: Mon, 24 Dec 2018 13:17:28 +0000 (+0000) Subject: Fix PR c++/87380 (ABI breakage) for Darwin. X-Git-Tag: releases/gcc-7.5.0~693 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2e72faf99a63308b63e0605b719157673c5815d;p=thirdparty%2Fgcc.git Fix PR c++/87380 (ABI breakage) for Darwin. 2018-12-24 Iain Sandoe Backport from mainline 2018-12-06 Iain Sandoe PR c++/87380 * config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC) Remove, use the default. * config/rs6000/darwin7.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): New. From-SVN: r267409 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2950768e0077..f208bbcc3b09 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2018-12-24 Iain Sandoe + + Backport from mainline + 2018-12-06 Iain Sandoe + + PR c++/87380 + * config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC) Remove, use the + default. + * config/rs6000/darwin7.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): New. + 2018-12-24 Iain Sandoe Backport from mainline diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index 6792289d1c84..8bb79a445d78 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -504,11 +504,6 @@ extern GTY(()) int darwin_ms_struct; links to, so there's no need for weak-ness for that. */ #define GTHREAD_USE_WEAK 0 -/* The Darwin linker doesn't want coalesced symbols to appear in - a static archive's table of contents. */ -#undef TARGET_WEAK_NOT_IN_ARCHIVE_TOC -#define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 1 - /* On Darwin, we don't (at the time of writing) have linkonce sections with names, so it's safe to make the class data not comdat. */ #define TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT hook_bool_void_false diff --git a/gcc/config/rs6000/darwin7.h b/gcc/config/rs6000/darwin7.h index f5e9f8930308..5146707c6aa5 100644 --- a/gcc/config/rs6000/darwin7.h +++ b/gcc/config/rs6000/darwin7.h @@ -28,5 +28,10 @@ along with GCC; see the file COPYING3. If not see %:version-compare(!< 10.3 mmacosx-version-min= -lmx)\ -lSystem}" +/* This generation of tools (specifically the archive tool) did not + export weak symbols from the TOC. */ +#undef TARGET_WEAK_NOT_IN_ARCHIVE_TOC +#define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 1 + #undef DEF_MIN_OSX_VERSION #define DEF_MIN_OSX_VERSION "10.3.9"