diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-12-13 13:09:57 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-12-13 13:14:51 +0000 |
commit | 7bf710b5116e6186204edd6a0168202fd8ef0389 (patch) | |
tree | ede938bd171b2fe3a0c9858fdcd7ac070b271969 /libstdc++-v3/scripts | |
parent | 494ebfa7c9aacaeb6ec1fccc47a0e49f31eb2bb8 (diff) | |
download | gcc-7bf710b5116e6186204edd6a0168202fd8ef0389.zip gcc-7bf710b5116e6186204edd6a0168202fd8ef0389.tar.gz gcc-7bf710b5116e6186204edd6a0168202fd8ef0389.tar.bz2 |
libstdc++: Add support for '?' in linker script globs
The scripts/make_exports.pl script used for darwin only replaces '*'
wildcards in globs, it doesn't handle '?'. This means the recent changes
to std::__timepunct exports broke darwin.
Rather than use mangled names in the linker script, this adds support
for '?' to the perl script.
This also removes some unnecessary escaping of the replacement strings
in s// substitutions.
libstdc++-v3/ChangeLog:
* scripts/make_exports.pl: Replace '?' with '.' when turning
a glob into a regex.
Diffstat (limited to 'libstdc++-v3/scripts')
-rw-r--r-- | libstdc++-v3/scripts/make_exports.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libstdc++-v3/scripts/make_exports.pl b/libstdc++-v3/scripts/make_exports.pl index 93100e1..7f4670f 100644 --- a/libstdc++-v3/scripts/make_exports.pl +++ b/libstdc++-v3/scripts/make_exports.pl @@ -52,11 +52,13 @@ while (<F>) { next; } # Catch globs. Note that '{}' is not allowed in globs by this script, - # so only '*' and '[]' are available. + # so only '*' and '?' and '[]' are available. if (/^[ \t]*([^ \t;{}#]+);?[ \t]*$/) { my $ptn = $1; # Turn the glob into a regex by replacing '*' with '.*'. - $ptn =~ s/\*/\.\*/g; + $ptn =~ s/\*/.*/g; + # And replacing '?' with '.'. + $ptn =~ s/\?/./g; push @$glob,$ptn; next; } |