On 12 September 2014 06:40, Jan Hubicka wrote: > Hi, > I went through excercise of running LTO bootstrap with ODR verification on. > There are some typename clashes > I guess we want to fix. I wonder what approach is preferred, do we want to > introduce anonymous > namespaces for those? > /usr/bin/ld.gold.real: warning: using 'GLIBCXX_3.4' as version for > '_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv' which is also named > in version 'GLIBCXX_3.4.6' in script > /usr/bin/ld.gold.real: warning: using 'GLIBCXX_3.4' as version for > '_ZNKSs11_M_disjunctEPKc' which is also named in version 'GLIBCXX_3.4.5' in > script > /usr/bin/ld.gold.real: warning: using 'GLIBCXX_3.4' as version for > '_ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw' which is also named in > version 'GLIBCXX_3.4.5' in script
I think these are caused by two bugs in the libstdc++ linker script. It looks like the duplicates should have been guarded by #ifndef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT (as per the attached patch), but it's too late now and we export the symbols at GLIBCXX_3.4 unconditionally. Applying the patch now would alter the symbol version for the wstringbuf::str() symbol. Maybe we should just remove the duplicates in the later symbol version sections, but I'm not confident enough to do it!
commit bd23198d87a6c04ea55410221f85ed79786b6478 Author: Jonathan Wakely <jwak...@redhat.com> Date: Fri Sep 12 11:27:32 2014 +0100 * config/abi/pre/gnu.ver: Prevent symbols appearing in two versions, to fix warning from gold linker. diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver index 58c90d6..5f96a09 100644 --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver @@ -317,7 +317,10 @@ GLIBCXX_3.4 { _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9]seek*; _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9]set*; _ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; + +#ifndef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT _ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv; +#endif _ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strERKSs; _ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strERKSbIwS1_S2_E; _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9][t-z]*; @@ -864,6 +867,7 @@ GLIBCXX_3.4.4 { GLIBCXX_3.4.5 { +#ifndef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT # std::string _ZNKSs11_M_disjunctEPKc; _ZNKSs15_M_check_lengthE[jmy][jmy]PKc; @@ -888,6 +892,7 @@ GLIBCXX_3.4.5 { _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreE[ilvx]; _ZNSt11char_traitsI[cw]E2eqERK[cw]S2_; +#endif # Those template instantiations weren't exported on Solaris in GCC 4.6 # and aren't necessary for correct operation, so don't emit them now