Hi, compiling tramp3d with -fwhole-program leads to: /home/jh/gcc-install/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../lib64/libstdc++.a(sstream-inst.o): In function `std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const': /home/jh/trunk/build5/x86_64-unknown-linux-gnu/libstdc++-v3/include/sstream:129: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&)' /home/jh/trunk/build5/x86_64-unknown-linux-gnu/libstdc++-v3/include/sstream:127: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&)' /home/jh/trunk/build5/x86_64-unknown-linux-gnu/libstdc++-v3/include/sstream:129: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&)' /home/jh/trunk/build5/x86_64-unknown-linux-gnu/libstdc++-v3/include/sstream:127: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&)' /home/jh/trunk/build5/x86_64-unknown-linux-gnu/libstdc++-v3/include/sstream:129: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&)' /home/jh/gcc-install/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../lib64/libstdc++.a(sstream-inst.o):/home/jh/trunk/build5/x86_64-unknown-linux-gnu/libstdc++-v3/include/sstream:127: more undefined references to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&)' follow
I suppose this is because normally tramp3d exports the function as comdat and as a result of -fwhole-program we bring it local (since we know address is not taken and making it local enable more optimization) while libstdc++ reference the function but does not provide COMDAT version of it. I think this is not valid, or is this C++ ABI feature? -- Summary: libstdc++ seems to miss std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*>(char*, char*, std::allocator<char> const&) Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hubicka at gcc dot gnu dot org GCC host triplet: x86_64-linux GCC target triplet: x86_64-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42035