diff mbox

New std::string implementation

Message ID 20150106110248.GB3134@redhat.com
State New
Headers show

Commit Message

Jonathan Wakely Jan. 6, 2015, 11:02 a.m. UTC
On 06/01/15 10:52 +0100, Rainer Orth wrote:
>Unfortunately, this patch broke Solaris bootstrap with /bin/ld:
>libstdc++.so fails to link with
>
>ld: fatal: libstdc++-symbols.ver-sun: 5383: symbol 'std::locale::name[abi:cxx11]() const': symbol version conflict
>
>l.5383 has
>
>    ##_ZNKSt6locale4nameB5cxx11Ev (glob)
>    _ZNKSt6locale4nameB5cxx11Ev;
>
>i.e.
>
>    # std::locale::name() returning new std::string
>
>in GLIBCXX_3.4.21 vs.
>
>      ##std::locale::[A-Zn-z]* (cxx)
>      _ZNKSt6locale4nameB5cxx11Ev;
>
>in GLIBCXX_3.4.

Drat, I even tried to avoid that conflict, but apparently I thought
the letter that comes after 'n' is 'n'!

Does this fix it?


Hmm, I think the [A-Zo-z] glob depends on the locale's collation
order, maybe it should be just [o-z] since we don't have any symbols
matching std::locale::[A-Z]* anyway. That's something else to clean up
later.

Comments

Rainer Orth Jan. 6, 2015, 12:29 p.m. UTC | #1
Jonathan Wakely <jwakely@redhat.com> writes:

> Drat, I even tried to avoid that conflict, but apparently I thought
> the letter that comes after 'n' is 'n'!
>
> Does this fix it?
>
> --- a/libstdc++-v3/config/abi/pre/gnu.ver
> +++ b/libstdc++-v3/config/abi/pre/gnu.ver
> @@ -118,7 +118,7 @@ GLIBCXX_3.4 {
> #     std::locale::name();
>       std::locale::none*;
>       std::locale::numeric*;
> -      std::locale::[A-Zn-z]*;
> +      std::locale::[A-Zo-z]*;
>       std::locale::_[A-Ha-z]*;
>       std::locale::_Impl::[A-Za-z]*;
> #     std::locale::_Impl::_M_[A-Za-z]*;

it does indeed.

Thanks.
        Rainer
diff mbox

Patch

--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -118,7 +118,7 @@  GLIBCXX_3.4 {
 #     std::locale::name();
       std::locale::none*;
       std::locale::numeric*;
-      std::locale::[A-Zn-z]*;
+      std::locale::[A-Zo-z]*;
       std::locale::_[A-Ha-z]*;
       std::locale::_Impl::[A-Za-z]*;
 #     std::locale::_Impl::_M_[A-Za-z]*;