From http://gcc.gnu.org/ml/gcc-testresults/2006-03/msg00084.html there are === libmudflap tests === Running target unix FAIL: libmudflap.c++/pass41-frag.cxx (test for excess errors) WARNING: libmudflap.c++/pass41-frag.cxx compilation failed to produce executable FAIL: libmudflap.c++/pass41-frag.cxx (-O) (test for excess errors) WARNING: libmudflap.c++/pass41-frag.cxx (-O) compilation failed to produce executable FAIL: libmudflap.c++/pass41-frag.cxx (-O2) (test for excess errors) WARNING: libmudflap.c++/pass41-frag.cxx (-O2) compilation failed to produce executable FAIL: libmudflap.c++/pass41-frag.cxx (-O3) (test for excess errors) WARNING: libmudflap.c++/pass41-frag.cxx (-O3) compilation failed to produce executable FAIL: ctors-12 linkage FAIL: ctors-21 linkage WARNING: program timed out. FAIL: ctors-12 execution WARNING: program timed out. FAIL: ctors-21 execution FAIL: ctors-12 linkage -static FAIL: ctors-21 linkage -static WARNING: program timed out. FAIL: ctors-12 execution -static WARNING: program timed out. FAIL: ctors-21 execution -static FAIL: ctors-12 linkage -O2 FAIL: ctors-21 linkage -O2 WARNING: program timed out. FAIL: ctors-12 execution -O2 WARNING: program timed out. FAIL: ctors-21 execution -O2 FAIL: ctors-12 linkage -O3 FAIL: ctors-21 linkage -O3 WARNING: program timed out. FAIL: ctors-12 execution -O3 WARNING: program timed out. FAIL: ctors-21 execution -O3 But Linux/x86 and Linux/x86-64 have no problems. The error message looks like pass41-frag.o: In function `global constructors keyed to 0_main':/net/gnu-13/export/gnu/src/gcc-4.1-blended/gcc/libmudflap/testsuite/libmudflap.c++/pass41-frag.cxx:13: undefined reference to `std::ios_base::_S_local_word_size' :/net/gnu-13/export/gnu/src/gcc-4.1-blended/gcc/libmudflap/testsuite/libmudflap.c++/pass41-frag.cxx:13: undefined reference to `std::ios_base::_S_local_word_size' :/net/gnu-13/export/gnu/src/gcc-4.1-blended/gcc/libmudflap/testsuite/libmudflap.c++/pass41-frag.cxx:13: undefined reference to `std::__ios_flags::_S_trunc' :/net/gnu-13/export/gnu/src/gcc-4.1-blended/gcc/libmudflap/testsuite/libmudflap.c++/pass41-frag.cxx:13: undefined reference to `std::__ios_flags::_S_trunc' :/net/gnu-13/export/gnu/src/gcc-4.1-blended/gcc/libmudflap/testsuite/libmudflap.c++/pass41-frag.cxx:13: undefined reference to `std::__ios_flags::_S_out' ... Those undefined symbols are from things like: struct __ios_flags { typedef short __int_type; static const __int_type _S_boolalpha = 0x0001; static const __int_type _S_dec = 0x0002; static const __int_type _S_fixed = 0x0004; ... Mudflap generates .mii addl r35 = @ltoffx(_ZNSt11__ios_flags12_S_boolalphaE#), r1 addl r38 = @ltoffx(.LC72), r1 ;; nop 0 .mmb ld8.mov r35 = [r35], _ZNSt11__ios_flags12_S_boolalphaE# ld8.mov r38 = [r38], .LC72 br.call.sptk.many b0 = __mf_register# I don't see why it should even bother. This problem doesn't exist in 4.2. Does anyone know which patch fixes it?
One thing is that if libmudflap generates references to std::ios_base::_S_local_word_size and they are not in libstdc++, then libstdc++ is broken as this would be invalid C++.
std::ios_base::_S_local_word_size is in libstdc++.so. But it is marked as local via linker version script. It is true for x86, x86-64 and ia64.
Subject: Re: [4.1]: libmudflap failures on ia64 On Mar 5, 2006, at 1:00 PM, hjl at lucon dot org wrote: > > > ------- Comment #2 from hjl at lucon dot org 2006-03-05 18:00 ------- > std::ios_base::_S_local_word_size is in libstdc++.so. But it is marked > as > local via linker version script. It is true for x86, x86-64 and ia64. There is a bug in libstdc++ then.
Reduced testcase: #include <iostream> struct a : std::ios_base { static const int*f; }; const int *a::f = & std::ios_base::_S_local_word_size; int main(void) { return *a::f; }
I would like to know why the original problem doesn't exist in 4.2. Because, in general, we don't want to export _S_local_word_size, only an implementation detail. In other terms, strictly speaking, the reduced testcase is invalid.
Created attachment 10973 [details] Removal of _S_local_word_size
In yet other terms: I could easily apply the attached, without affecting the functionality of the library and binary compatibility. No, we don't want to export that symbol and the real reason of the link failure on those targets must be investigated first.
Working on it.
Subject: Bug 26532 Author: paolo Date: Mon Mar 6 18:06:47 2006 New Revision: 111789 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111789 Log: 2006-03-06 Paolo Carlini <pcarlini@suse.de> PR target/26532 * config/io/c_io_stdio.h (struct __ios_flags): Remove. * include/bits/ios_base.h: Adjust consistently. (ios_base::_S_local_word_size): Change to an anonymous enum. * src/ios.cc: Do not define static const data of __ios_flags, likewise for ios_base::_S_local_word_size. * include/bits/locale_classes.h (locale::_S_categories_size): Change to an anonymous enum. * src/locale.cc: Don't define. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/config/io/c_io_stdio.h trunk/libstdc++-v3/include/bits/ios_base.h trunk/libstdc++-v3/include/bits/locale_classes.h trunk/libstdc++-v3/src/ios.cc trunk/libstdc++-v3/src/locale.cc
Subject: Bug 26532 Author: paolo Date: Sun Mar 12 16:56:08 2006 New Revision: 111979 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111979 Log: 2006-03-12 Paolo Carlini <pcarlini@suse.de> PR target/26532 * config/io/c_io_stdio.h (struct __ios_flags): Remove. * include/bits/ios_base.h: Adjust consistently. (ios_base::_S_local_word_size): Change to an anonymous enum. * src/ios.cc: Do not define static const data of __ios_flags, likewise for ios_base::_S_local_word_size. * include/bits/locale_classes.h (locale::_S_categories_size): Change to an anonymous enum. * src/locale.cc: Don't define. Modified: branches/gcc-4_1-branch/libstdc++-v3/ChangeLog branches/gcc-4_1-branch/libstdc++-v3/config/io/c_io_stdio.h branches/gcc-4_1-branch/libstdc++-v3/include/bits/ios_base.h branches/gcc-4_1-branch/libstdc++-v3/include/bits/locale_classes.h branches/gcc-4_1-branch/libstdc++-v3/src/ios.cc branches/gcc-4_1-branch/libstdc++-v3/src/locale.cc
Fixed for 4.1.1.