gcc fails to build MPFR 3.1.0 on sparc. You can get a full build log from: http://bugs.debian.org/644552 This new release of MPFR introduces TLS support. The build is successful when building withouth TLS support, or when using -O0 instead of -O3. When trying version 4.4.6 (Debian 4.4.6-11) the same tests fail. When building with version 4.5.3 (Debian 4.5.3-9) the same tests fail except for tsqrt which passes correctly.
We need a testcase.
Most likely related to bug 50691.
Investigating.
Ugh, annoying linker relaxation bug. The compiler correctly generates: add %l7, %l3, %l3, %tgd_add(__gmpfr_flags) [...] call __tls_get_addr, %tgd_call(__gmpfr_flags) mov %l3, %o0 ld [%o0], %g1 but the linker turns this into: 0x00014d14 <+504>: add %g7, %o0, %o0 0x00014d18 <+508>: mov %l3, %o0 0x00014d1c <+512>: ld [ %o0 ], %g1 so segfault on the load. Filed as http://sourceware.org/bugzilla/show_bug.cgi?id=13301 for the linker. Should we put a workaround in the compiler?
I would suggest against a gcc workaround, let's just fix binutils. I have posted a fix to the binutils list for testing.
> I would suggest against a gcc workaround, let's just fix binutils. > I have posted a fix to the binutils list for testing. OK, I don't have a strong opinion. What do the Debian folks think about it?
The problem will be fixed in the upcoming binutils 2.22 release.