aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/scripts
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2018-12-06 19:42:21 +0000
committerIain Sandoe <iains@gcc.gnu.org>2018-12-06 19:42:21 +0000
commitc438ab79bf28a354599dc6c460b2b662f555175b (patch)
tree84a3cfdfdccfec699559017b85349b9553fe7860 /libstdc++-v3/scripts
parent881e947ebd7a09e9620d1c3ccbc123eec43871dc (diff)
downloadgcc-c438ab79bf28a354599dc6c460b2b662f555175b.zip
gcc-c438ab79bf28a354599dc6c460b2b662f555175b.tar.gz
gcc-c438ab79bf28a354599dc6c460b2b662f555175b.tar.bz2
Darwin fix libstdc++ build warnings.
GCC does not export construction vtable symbols from shared libraries. The symbols are marked hidden in the objects; for Darwin that makes them also external (“private_extern” is Darwin’s hidden) which means that they show up in the list of possible symbols for export from libstdc++, and there are sufficiently relaxed match conditions that they reach the exports list. When Darwin’s static linker encounters them it generates a warning that they cannot be exported. This patch prunes them from the list of symbols to be considered, thus eliminating the warnings. No functional Change inended to the library exports. 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: r266864
Diffstat (limited to 'libstdc++-v3/scripts')
-rw-r--r--libstdc++-v3/scripts/make_exports.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/libstdc++-v3/scripts/make_exports.pl b/libstdc++-v3/scripts/make_exports.pl
index 7c9e4e3..93100e1 100644
--- a/libstdc++-v3/scripts/make_exports.pl
+++ b/libstdc++-v3/scripts/make_exports.pl
@@ -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] /);