Summary: | [4.2 Regression] almost all libstdc++ tests fail | ||
---|---|---|---|
Product: | gcc | Reporter: | Andrew Pinski <pinskia> |
Component: | libstdc++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bkoz, gcc-bugs, hjl.tools, sje |
Priority: | P3 | Keywords: | link-failure |
Version: | 4.2.0 | ||
Target Milestone: | 4.2.0 | ||
Host: | Target: | x86_64-unknown-linux-gnu | |
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | ||
Attachments: | correct configure test |
Description
Andrew Pinski
2006-01-15 17:21:32 UTC
Oh and also on powerpc64-linux-gnu: http://gcc.gnu.org/ml/gcc-testresults/2006-01/msg00755.html This worked with rev 109555. I know what's going on, I saw this with stock binutils 2.16.1 on x86-linux. See: http://gcc.gnu.org/ml/libstdc++/2006-01/msg00051.html And, there is also another issue with --gc-sections, this one: http://gcc.gnu.org/ml/libstdc++/2006-01/msg00077.html which other people are also seeing. Really, I think we have to renounce to the idea, for the time being. I'm on it. This patch should be a step to fixing this. Created attachment 10655 [details]
correct configure test
The patch doesn't work on Linux/ia64. --gc-sections is ignored on Linux/ia64: [hjl@gnu-12 tmp]$ gcc -Wl,--gc-sections x.c /usr/local/bin/ld: Warning: gc-sections option ignored I got many /usr/local/bin/ld: Warning: gc-sections option ignored^M output is: /usr/local/bin/ld: Warning: gc-sections option ignored^M FAIL: 17_intro/header_cassert.cc (test for excess errors) Excess errors: paolo I can reproduce this on x86/linux with binutils 2.16.1 === libstdc++ Summary === # of expected passes 3837 # of unexpected failures 134 # of unexpected successes 1 # of expected failures 12 Subject: Bug 25797 Author: hjl Date: Thu Jan 19 22:36:41 2006 New Revision: 109985 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109985 Log: 2006-01-19 H.J. Lu <hongjiu.lu@intel.com> PR libstdc++/25797 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Remove -Werror from CFLAGS. Check if linker really supports --gc-sections. * configure: Regenerated. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/acinclude.m4 trunk/libstdc++-v3/configure H.J, are you seeing this kind of additional symptom with binutils-2.16.1: FAIL: 21_strings/basic_string/cons/char/6.cc (test for excess errors) Excess errors: /mnt/hd/bld/H-x86-binutils-2.16.1/bin/ld: testsuite_abi.o(.text._ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20forward_iterator_tag[char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag)]+0x8b): unresolvable relocation against symbol `std::__throw_logic_error(char const*)@@GLIBCXX_3.4' /mnt/hd/bld/H-x86-binutils-2.16.1/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status I don't understand how to test for this "unresolvable relocation against symbol" stuff... I see this bug report about this error in another context: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22185 I've tried to narrow this down. Indeed, if the compile line for the above error removes -Wl,--gc-sections, the link is fine. So, it appears as if it does do something different. To make a small case, (ie, so we can then make an autoconf test...). I tried to make a two part test, where you take one file, use all the relevant flags, and make a shared object, which you then compile with some more flags to create an executable. However, I cannot reproduce it. Any insights? This seems like more your area. My other thought is to just black-list --gc-sections for binutils pre 2.16.2. It's not a great solution, but I think it will work. If there is no better idea by tomorrow this is what I'll check in. -benjamin Binutils 2.16.1 is too old. There are so many bug fixes since it was released. People can try the current Linux binutils at http://www.kernel.org/pub/linux/devel/binutils/ or get the binutils from CVS. Fixed. |