during native gcc-4.6 bootstrap the linker reports few warnings on libstdc++-symbols.ver script: (...) /usr/bin/ld: warning: wildcard match appears in both version 'GLIBCXX_3.4' and 'CXXABI_1.3' in script /usr/bin/ld: warning: using 'GLIBCXX_3.4' as version for 'std::basic_stringbuf<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::str() const' which is also named in version 'GLIBCXX_3.4.6' in script /usr/bin/ld: warning: using 'GLIBCXX_3.4' as version for 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_disjunct(char const*) const' which is also named in version 'GLIBCXX_3.4.5' in script /usr/bin/ld: warning: using 'GLIBCXX_3.4' as version for 'std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_M_disjunct(wchar_t const*) const' which is also named in version 'GLIBCXX_3.4.5' in script
I am unable to reproduce this on F16, GNU ld version 2.21.53.0.1-6.fc16 20110716 Copyright 2011 Free Software Foundation, Inc. Can you give me some more information about your ld, and include any special flags used to get the warnings. Thanks.
Created attachment 26687 [details] build log.
(In reply to comment #1) > I am unable to reproduce this on F16, > > GNU ld version 2.21.53.0.1-6.fc16 20110716 > Copyright 2011 Free Software Foundation, Inc. > > Can you give me some more information about your ld, and include any special > flags used to get the warnings. Thanks. you need to use ld-gold for gcc build and configure gcc with --enable-symvers=gnu. the problem is in the libstdc++-v3/config/abi/pre/gnu.ver: grep shows duplicated lines: gnu.ver: _ZNKSs11_M_disjunctEPKc; gnu.ver: _ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw; gnu.ver: _ZNKSs11_M_disjunctEPKc; gnu.ver: _ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw; full build log attached.
confirmed with gcc-trunk and gold as: %ld --version GNU gold (GNU Binutils 2.22.52.20120220) 1.11 Copyright 2011 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) a later version. This program has absolutely no warranty. /mnt/share/bin/H-x86_64-binutils.20120220-gold/bin/ld: warning: wildcard match appears in both version 'GLIBCXX_3.4' and 'CXXABI_1.3' in script /mnt/share/bin/H-x86_64-binutils.20120220-gold/bin/ld: warning: wildcard match appears in both version 'CXXABI_1.3' and 'CXXABI_TM_1' in script /mnt/share/bin/H-x86_64-binutils.20120220-gold/bin/ld: warning: using 'GLIBCXX_3.4' as version for '_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv' which is also named in version 'GLIBCXX_3.4.6' in script /mnt/share/bin/H-x86_64-binutils.20120220-gold/bin/ld: warning: using 'GLIBCXX_3.4' as version for '_ZNKSs11_M_disjunctEPKc' which is also named in version 'GLIBCXX_3.4.5' in script /mnt/share/bin/H-x86_64-binutils.20120220-gold/bin/ld: warning: using 'GLIBCXX_3.4' as version for '_ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw' which is also named in version 'GLIBCXX_3.4.5' in script
Author: bkoz Date: Tue Feb 21 23:46:49 2012 New Revision: 184453 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184453 Log: 2012-02-17 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/50349 * config/abi/pre/gnu.ver: Only one local. * config/abi/pre/gnu-versioned-namespace.ver: Same. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver trunk/libstdc++-v3/config/abi/pre/gnu.ver
Fixed: /mnt/share/bin/H-x86_64-binutils.20120220-gold/bin/ld: warning: wildcard match appears in both version 'GLIBCXX_3.4' and 'CXXABI_1.3' in script /mnt/share/bin/H-x86_64-binutils.20120220-gold/bin/ld: warning: wildcard match appears in both version 'CXXABI_1.3' and 'CXXABI_TM_1' in script With patch. The rest: /mnt/share/bin/H-x86_64-binutils.20120220-gold/bin/ld: warning: using 'GLIBCXX_3.4' as version for '_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv' which is also named in version 'GLIBCXX_3.4.6' in script /mnt/share/bin/H-x86_64-binutils.20120220-gold/bin/ld: warning: using 'GLIBCXX_3.4' as version for '_ZNKSs11_M_disjunctEPKc' which is also named in version 'GLIBCXX_3.4.5' in script /mnt/share/bin/H-x86_64-binutils.20120220-gold/bin/ld: warning: using 'GLIBCXX_3.4' as version for '_ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw' which is also named in version 'GLIBCXX_3.4.5' in script are correct warnings, but the symbols are correct. This is symbol hiding, and gold warns for this but GNU ld does not. Doesn't matter, binary is still the same.