https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70503
--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Jonathan Wakely from comment #4) > Fixed on trunk so far. The testcase probably needs some special handling due to -static, it fails on Fedora 23 with: spawn -ignore SIGHUP /ssd/uros/gcc-build/./gcc/xg++ -shared-libgcc -B/ssd/uros/gcc-build/./gcc -nostdinc++ -L/ssd/uros/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/ssd/uros/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/ssd/uros/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/usr/local/x86_64-pc-linux-gnu/bin/ -B/usr/local/x86_64-pc-linux-gnu/lib/ -isystem /usr/local/x86_64-pc-linux-gnu/include -isystem /usr/local/x86_64-pc-linux-gnu/sys-include -B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libstdc++-v3/src/.libs -D_GLIBCXX_ASSERT -fmessage-length=0 -ffunction-sections -fdata-sections -g -O2 -D_GNU_SOURCE -DLOCALEDIR="." -nostdinc++ -I/ssd/uros/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/ssd/uros/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/home/uros/gcc-svn/trunk/libstdc++-v3/libsupc++ -I/home/uros/gcc-svn/trunk/libstdc++-v3/include/backward -I/home/uros/gcc-svn/trunk/libstdc++-v3/testsuite/util /home/uros/gcc-svn/trunk/libstdc++-v3/testsuite/30_threads/thread/70503.cc -std=gnu++11 -static -fno-diagnostics-show-caret -fdiagnostics-color=never ./libtestc++.a -Wl,--gc-sections -L/ssd/uros/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src/filesystem/.libs -lm -o ./70503.exe /usr/bin/ld: cannot find -lm /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status compiler exited with status 1 output is: /usr/bin/ld: cannot find -lm /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status FAIL: 30_threads/thread/70503.cc (test for errors, line 30) FAIL: 30_threads/thread/70503.cc (test for errors, line 31) FAIL: 30_threads/thread/70503.cc (test for excess errors) Excess errors: /usr/bin/ld: cannot find -lm /usr/bin/ld: cannot find -lc and: spawn -ignore SIGHUP /ssd/uros/gcc-build/./gcc/xg++ -shared-libgcc -B/ssd/uros/gcc-build/./gcc -nostdinc++ -L/ssd/uros/gcc-build/x86_64-pc-linux-gnu/32/libstdc++-v3/src -L/ssd/uros/gcc-build/x86_64-pc-linux-gnu/32/libstdc++-v3/src/.libs -L/ssd/uros/gcc-build/x86_64-pc-linux-gnu/32/libstdc++-v3/libsupc++/.libs -B/usr/local/x86_64-pc-linux-gnu/bin/ -B/usr/local/x86_64-pc-linux-gnu/lib/ -isystem /usr/local/x86_64-pc-linux-gnu/include -isystem /usr/local/x86_64-pc-linux-gnu/sys-include -m32 -B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/32/libstdc++-v3/src/.libs -D_GLIBCXX_ASSERT -fmessage-length=0 -ffunction-sections -fdata-sections -g -O2 -D_GNU_SOURCE -DLOCALEDIR="." -nostdinc++ -I/ssd/uros/gcc-build/x86_64-pc-linux-gnu/32/libstdc++-v3/include/x86_64-pc-linux-gnu -I/ssd/uros/gcc-build/x86_64-pc-linux-gnu/32/libstdc++-v3/include -I/home/uros/gcc-svn/trunk/libstdc++-v3/libsupc++ -I/home/uros/gcc-svn/trunk/libstdc++-v3/include/backward -I/home/uros/gcc-svn/trunk/libstdc++-v3/testsuite/util /home/uros/gcc-svn/trunk/libstdc++-v3/testsuite/30_threads/thread/70503.cc -m32 -std=gnu++11 -static -fno-diagnostics-show-caret -fdiagnostics-color=never ./libtestc++.a -Wl,--gc-sections -L/ssd/uros/gcc-build/x86_64-pc-linux-gnu/32/libstdc++-v3/src/filesystem/.libs -lm -o ./70503.exe /usr/bin/ld: cannot find -lm /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status compiler exited with status 1 output is: /usr/bin/ld: cannot find -lm /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status FAIL: 30_threads/thread/70503.cc (test for errors, line 30) FAIL: 30_threads/thread/70503.cc (test for errors, line 31)