Hi, after http://gcc.gnu.org/ml/gcc-patches/2011-04/msg02139.html profiling uses TLS support where available. This breaks on SPARC/Solaris 8 and 9 (at least) because the associated libraries aren't linked in.
Tested on SPARC/Solaris 8 and SPARC64/Solaris 9 (the Solaris 10 machine isn't in very good shape right now), OK for the mainline? 2011-05-22 Eric Botcazou <ebotca...@adacore.com> * config/sol2.h (LIB_SPEC): Link TLS support for profiling. -- Eric Botcazou
Index: config/sol2.h =================================================================== --- config/sol2.h (revision 174027) +++ config/sol2.h (working copy) @@ -136,6 +136,8 @@ along with GCC; see the file COPYING3. %{!symbolic:\ %{pthreads|pthread:" \ LIB_THREAD_LDFLAGS_SPEC " -lpthread " LIB_TLS_SPEC "} \ + %{fprofile-arcs|fprofile-generate*|coverage:" \ + LIB_THREAD_LDFLAGS_SPEC " " LIB_TLS_SPEC "} \ %{p|pg:-ldl} -lc}" #undef ENDFILE_SPEC