]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Darwin - fix PR c++/87380
authoriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Dec 2018 20:09:26 +0000 (20:09 +0000)
committeriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Dec 2018 20:09:26 +0000 (20:09 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266866 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/darwin.h
gcc/config/rs6000/darwin7.h

index 52393571a761b83983225bf4d19ddf991975e9de..61bf5dedb6bbf50b8c68bab1e308fed75ccb39db 100644 (file)
@@ -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
index 87f610259c0119c11aeabe5aabd67511b080c0c5..de6810b354a1f1908a49de9459517092cd5db2ff 100644 (file)
@@ -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
index d35b65d699ec72d0bb9ec96d53fd24cb50f38944..85ea18e53e036f3e8d5873ae56fad59822aee45c 100644 (file)
@@ -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"