aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2018-12-06 20:09:26 +0000
committerIain Sandoe <iains@gcc.gnu.org>2018-12-06 20:09:26 +0000
commit6e00bd6eb238f106101e32ce5c76b4b3ab8e26cc (patch)
treecb1b7ac9c9b663786c048e87d805e55faf1334af
parent89a249f2ecbdfe856dab2cd82f913a93c88ecbfe (diff)
downloadgcc-6e00bd6eb238f106101e32ce5c76b4b3ab8e26cc.zip
gcc-6e00bd6eb238f106101e32ce5c76b4b3ab8e26cc.tar.gz
gcc-6e00bd6eb238f106101e32ce5c76b4b3ab8e26cc.tar.bz2
Darwin - fix PR c++/87380
This is [intentionally] broken C++ ABI, that was catering for a tool problem that existed in a very old Darwin toolchain. The issue is not present after Darwin7 (using default system tools) so confine the fix to that revision or earlier. 2018-12-06 Iain Sandoe <iain@sandoe.co.uk> 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: r266866
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/darwin.h5
-rw-r--r--gcc/config/rs6000/darwin7.h5
3 files changed, 12 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5239357..61bf5de 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
+
+ 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-06 Vladimir Makarov <vmakarov@redhat.com>
PR target/88282
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 87f6102..de6810b 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -511,11 +511,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 d35b65d..85ea18e 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"