https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69440
Bug ID: 69440 Summary: [6 Regression] Revision 232071 breaks bootstrap on x86_64-w64-mingw32 Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: rai...@emrich-ebersheim.de Target Milestone: --- gcc 6.0 rev. 232071 binutils-2.25.1 fails in stage 1 at linking of libstdc++-6.dll: libtool: link: /opt/devel/SCRATCH/tmp.CBVRJUmhUP/gcc-6.0.0/gcc-6.0.0/./gcc/xgcc -shared-libgcc -B/opt/devel/SCRATCH/tmp.CBVRJUmhUP/gcc-6.0.0/gcc-6.0.0/./gcc -nostdinc++ -L/opt/devel/SCRATCH/tmp.CBVRJUmhUP/gcc-6.0.0/gcc-6.0.0/x86_64-w6 4-mingw32/libstdc++-v3/src -L/opt/devel/SCRATCH/tmp.CBVRJUmhUP/gcc-6.0.0/gcc-6.0.0/x86_64-w64-mingw32/libstdc++-v3/src/.libs -L/opt/devel/SCRATCH/tmp.CBVRJUmhUP/gcc-6.0.0/gcc-6.0.0/x86_64-w64-mingw32/libstdc++-v3/libsupc++/.libs -L/opt /devel/gnu/gcc/MINGW_NT/x86_64-w64-mingw32/mingw-w64-runtime-trunk-svn/gcc-6.0.0/x86_64-w64-mingw32/lib -L/opt/devel/gnu/gcc/MINGW_NT/x86_64-w64-mingw32/mingw-w64-runtime-trunk-svn/gcc-6.0.0/mingw/lib -isystem /opt/devel/gnu/gcc/MINGW_ NT/x86_64-w64-mingw32/mingw-w64-runtime-trunk-svn/gcc-6.0.0/x86_64-w64-mingw32/include -isystem /opt/devel/gnu/gcc/MINGW_NT/x86_64-w64-mingw32/mingw-w64-runtime-trunk-svn/gcc-6.0.0/mingw/include -B/opt/devel/gnu/gcc/MINGW_NT/x86_64-w64-mingw32/mingw-w64-runtime-trunk-svn/gcc-6.0.0/x86_64-w64-mingw32/bin/ -B/opt/devel/gnu/gcc/MINGW_NT/x86_64-w64-mingw32/mingw-w64-runtime-trunk-svn/gcc-6.0.0/x86_64-w64-mingw32/lib/ -isystem /opt/devel/gnu/gcc/MINGW_NT/x86_64-w64-mingw32/mingw-w64-runtime-trunk-svn/gcc-6.0.0/x86_64-w64-mingw32/include -isystem /opt/devel/gnu/gcc/MINGW_NT/x86_64-w64-mingw32/mingw-w64-runtime-trunk-svn/gcc-6.0.0/x86_64-w64-mingw32/sys-include -shared -nostdlib D:/x86_64-w64-trunk/mingw/lib/../lib/dllcrt2.o D:/opt/devel/SCRATCH/tmp.CBVRJUmhUP/gcc-6.0.0/gcc-6.0.0/gcc/crtbegin.o .libs/compatibility.o .libs/compatibility-debug_list.o .libs/compatibility-debug_list-2.o .libs/compatibility-c++0x.o .libs/compatibility-atomic-c++0x.o .libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o .libs/compatibility-condvar.o -Wl,--whole-archive ../libsupc++/.libs/libsupc++convenience.a ../src/c++98/.libs/libc++98convenience.a ../src/c++11/.libs/libc++11convenience.a -Wl,--no-whole-archive -L/opt/devel/SCRATCH/tmp.CBVRJUmhUP/gcc-6.0.0/gcc-6.0.0/x86_64-w64-mingw32/libstdc++-v3/libsupc++/.libs -L/opt/devel/SCRATCH/tmp.CBVRJUmhUP/gcc-6.0.0/gcc-6.0.0/x86_64-w64-mingw32/libstdc++-v3/src -L/opt/devel/SCRATCH/tmp.CBVRJUmhUP/gcc-6.0.0/gcc-6.0.0/x86_64-w64-mingw32/libstdc++-v3/src/.libs -L/opt/devel/gnu/gcc/MINGW_NT/x86_64-w64-mingw32/mingw-w64-runtime-trunk-svn/gcc-6.0.0/x86_64-w64-mingw32/lib -L/opt/devel/gnu/gcc/MINGW_NT/x86_64-w64-mingw32/mingw-w64-runtime-trunk-svn/gcc-6.0.0/mingw/lib -LD:/opt/devel/SCRATCH/tmp.CBVRJUmhUP/gcc-6.0.0/gcc-6.0.0/x86_64-w64-mingw32/libstdc++-v3/src -LD:/opt/devel/SCRATCH/tmp.CBVRJUmhUP/gcc-6.0.0/gcc-6.0.0/x86_64-w64-mingw32/libstdc++-v3/src/.libs -LD:/opt/devel/SCRATCH/tmp.CBVRJUmhUP/gcc-6.0.0/gcc-6.0.0/x86_64-w64-mingw32/libstdc++-v3/libsupc++/.libs -LD:/opt/devel/gnu/gcc/MINGW_NT/x86_64-w64-mingw32/mingw-w64-runtime-trunk-svn/gcc-6.0.0/x86_64-w64-mingw32/lib -LD:/opt/devel/gnu/gcc/MINGW_NT/x86_64-w64-mingw32/mingw-w64-runtime-trunk-svn/gcc-6.0.0/mingw/lib -LD:/opt/devel/SCRATCH/tmp.CBVRJUmhUP/gcc-6.0.0/gcc-6.0.0/gcc -LD:/opt/devel/gnu/gcc/MINGW_NT/x86_64-w64-mingw32/mingw-w64-runtime-trunk-svn/gcc-6.0.0/x86_64-w64-mingw32/bin -LD:/x86_64-w64-trunk/mingw/lib/../lib -LD:/x86_64-w64-trunk/mingw/lib -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt D:/opt/devel/SCRATCH/tmp.CBVRJUmhUP/gcc-6.0.0/gcc-6.0.0/gcc/crtend.o -Wl,-O1 -Wl,--gc-sections -Wl,--version-script=libstdc++-symbols.ver -o .libs/libstdc++-6.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libstdc++.dll.a .libs/compatibility.o: In function `std::istream::ignore(long long)': D:\opt\devel\SCRATCH\tmp.CBVRJUmhUP\gcc-6.0.0\gcc-6.0.0\x86_64-w64-mingw32\libstdc++-v3\src/../../../../../../../../../opt/devel/gnu/src/gcc-mingw-w64/gcc-6.0.0/libstdc++-v3/src/c++98/compatibility.cc:67: undefined reference to `std::istream::sentry::sentry(std::istream&, bool)' .libs/compatibility.o: In function `std::basic_ios<char, std::char_traits<char> >::setstate(std::_Ios_Iostate)': D:/opt/devel/SCRATCH/tmp.CBVRJUmhUP/gcc-6.0.0/gcc-6.0.0/x86_64-w64-mingw32/libstdc++-v3/include/bits/basic_ios.h:158: undefined reference to `std::basic_ios<char, std::char_traits<char> >::clear(std::_Ios_Iostate)' .libs/compatibility.o: In function `std::istream::ignore(long long)': D:\opt\devel\SCRATCH\tmp.CBVRJUmhUP\gcc-6.0.0\gcc-6.0.0\x86_64-w64-mingw32\libstdc++-v3\src/../../../../../../../../../opt/devel/gnu/src/gcc-mingw-w64/gcc-6.0.0/libstdc++-v3/src/c++98/compatibility.cc:64: undefined reference to `std::istream::ignore()' .libs/compatibility.o: In function `std::basic_istream<wchar_t, std::char_traits<wchar_t> >::ignore(long long)': D:\opt\devel\SCRATCH\tmp.CBVRJUmhUP\gcc-6.0.0\gcc-6.0.0\x86_64-w64-mingw32\libstdc++-v3\src/../../../../../../../../../opt/devel/gnu/src/gcc-mingw-w64/gcc-6.0.0/libstdc++-v3/src/c++98/compatibility.cc:139: undefined reference to `std::basic_istream<wchar_t, std::char_traits<wchar_t> >::sentry::sentry(std::basic_istream<wchar_t, std::char_traits<wchar_t> >&, bool)' .libs/compatibility.o: In function `std::basic_ios<wchar_t, std::char_traits<wchar_t> >::setstate(std::_Ios_Iostate)': D:/opt/devel/SCRATCH/tmp.CBVRJUmhUP/gcc-6.0.0/gcc-6.0.0/x86_64-w64-mingw32/libstdc++-v3/include/bits/basic_ios.h:158: undefined reference to `std::basic_ios<wchar_t, std::char_traits<wchar_t> >::clear(std::_Ios_Iostate)' .libs/compatibility.o: In function `std::basic_istream<wchar_t, std::char_traits<wchar_t> >::ignore(long long)': D:\opt\devel\SCRATCH\tmp.CBVRJUmhUP\gcc-6.0.0\gcc-6.0.0\x86_64-w64-mingw32\libstdc++-v3\src/../../../../../../../../../opt/devel/gnu/src/gcc-mingw-w64/gcc-6.0.0/libstdc++-v3/src/c++98/compatibility.cc:136: undefined reference to `std::basic_istream<wchar_t, std::char_traits<wchar_t> >::ignore()' .libs/compatibility.o:compatibility.cc:(.rdata$_ZTIN10__cxxabiv115__forced_unwindE+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info' .libs/compatibility-c++0x.o: In function `message': D:\opt\devel\SCRATCH\tmp.CBVRJUmhUP\gcc-6.0.0\gcc-6.0.0\x86_64-w64-mingw32\libstdc++-v3\src/../../../../../../../../../opt/devel/gnu/src/gcc-mingw-w64/gcc-6.0.0/libstdc++-v3/src/c++11/compatibility-c++0x.cc:210: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)' .libs/compatibility-c++0x.o:compatibility-c++0x.cc:(.rdata$_ZTISt9exception+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info' . . . . hundreds of undefined references! That's caused by revision 232071: PR target/66655 * config/i386/cygming.h (MAKE_DECL_ONE_ONLY): Define to use weak decls if weak support is available. --- trunk/gcc/config/i386/cygming.h 2016/01/04 14:30:50 232055 +++ trunk/gcc/config/i386/cygming.h 2016/01/05 10:57:01 232071 @@ -432,6 +432,11 @@ fputc ('\n', (FILE)); \ } \ while (0) + +/* Use the weak support for ONE_ONLY decls. */ +#undef MAKE_DECL_ONE_ONLY +#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) + #endif /* HAVE_GAS_WEAK */ /* FIXME: SUPPORTS_WEAK && TARGET_HAVE_NAMED_SECTIONS is true,