]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix build warnigns on Darwin, don't try to export construction vtable symbols.
authorIain Sandoe <iain@sandoe.co.uk>
Mon, 24 Dec 2018 13:09:39 +0000 (13:09 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Mon, 24 Dec 2018 13:09:39 +0000 (13:09 +0000)
2018-12-24  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2018-12-06  Iain Sandoe  <iain@sandoe.co.uk>

* scripts/make_exports.pl (check names): Don’t try to export
construction vtable symbols.

From-SVN: r267408

libstdc++-v3/ChangeLog
libstdc++-v3/scripts/make_exports.pl

index b2c06d1d685d1b0588fe0b855f99150cfee97b1b..ca5c9b1b95a306633f09421c9b293da9aaf94721 100644 (file)
@@ -1,3 +1,11 @@
+2018-12-24  Iain Sandoe  <iain@sandoe.co.uk>
+
+       Backport from mainline
+       2018-12-06  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * scripts/make_exports.pl (check names): Don’t try to export
+       construction vtable symbols.
+
 2018-12-24  Iain Sandoe  <iain@sandoe.co.uk>
 
        Backport from mainline
index 7c9e4e31d4f878d2afec23f8abc273cc6f9af14f..93100e17ddfc713508e0145dfe883703ce01e236 100644 (file)
@@ -103,6 +103,14 @@ NAME: while (<NM>) {
     # Ignore undefined and local symbols.
     next if (/^([^ ]+) [Ua-z] /);
 
+    # GCC does not export construction vtables from shared libraries.
+    # However the symbols are marked hidden, for Darwin that makes them
+    # also external "private_extern", which means that they show up in
+    # this list.  When ld64 encounters them it generates a warning that
+    # they cannot be exported, so trim them from the set now.
+    next if (/^construction vtable.*$/);
+    next if (/^__ZTC.*$/);
+
     # $sym is the name of the symbol, $noeh_sym is the same thing with
     # any '.eh' suffix removed.
     die "unknown nm output $_" if (! /^([^ ]+) [A-Z] /);