Between 20110421 and 20110429, all g++.dg/tree-prof and gcc.dg/{matrix, tree-prof} execution tests started to fail on Solaris 8 and 9, both x86 and SPARC: +FAIL: g++.dg/tree-prof/indir-call-prof-2.C execution, -g -fprofile-generate spawn [open ...] ld.so.1: indir-call-prof-2.x01: fatal: /var/gcc/regression/trunk/9-gcc-gas/build /gcc/testsuite/g++/indir-call-prof-2.x01: object requires TLS, but TLS failed to initialize This obviously happens since profiling now uses TLS under the hood: [5] | 4| 4|TLS |LOCL |0 |9 |__gcov_indirect_call_callee [6] | 0| 4|TLS |LOCL |0 |9 |__gcov_indirect_call_counters So it is caused by this patch: 2011-04-27 Xinliang David Li <davidxl@google.com> * tree-profile.c (init_ic_make_global_vars): Set tls attribute on ic vars. * coverage.c (coverage_end_function): Initialize function_list with zero. Some platforms require special options for TLS, which is handled by dg-add-options tls. It seems that all tests in those directories should be marked dg-require-effective-target tls_runtime dg-add-options tls or rather this should be handled in the .exp files instead. Rainer
Author: ro Date: Tue May 24 14:53:39 2011 New Revision: 174119 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174119 Log: PR gcov-profile/48845 * config/sol2.h (LIB_SPEC): Link TLS support for tree profiling. Modified: trunk/gcc/ChangeLog trunk/gcc/config/sol2.h
Yep.
Fixed both for Solaris and in testsuite.