http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53964
--- Comment #7 from Anton Shterenlikht <mexas at bristol dot ac.uk> 2013-01-23 10:14:52 UTC --- a great miracle happened here: # pkg info -xo gcc-4.6 gcc-4.6.4.20121123: lang/gcc46 # I didn't have to do anything extra to get it build. However, I'm getting this error using the new 4.6 compiler to build lapack: gfortran46 -O -Wl,-rpath=/usr/local/lib/gcc46 -fPIC -c LAPACK_version.f -o LAPACK_version.o gfortran46 -Wl,-rpath=/usr/local/lib/gcc46 -fPIC -o testlsame lsame.o lsametst.o /usr/local/lib/gcc46/gcc/sparc64-portbld-freebsd10.0/4.6.4/../../../libgfortran.so: undefined reference to `__emutls_v._ThreadRuneLocale' collect2: ld returned 1 exit status *** [testlsame] Error code 1