Spotted while looking into <http://gcc.gnu.org/ml/gcc-patches/2011-11/msg02001.html> (and yes, I fixed the ChangeLog typo before commit) and also mentioned at <http://gcc.gnu.org/ml/gcc/2011-11/msg00406.html>.
Emulating TLS has nothing to do with exception-handling, nor is there something that might throw while calling one of its functions, so no need to pass -fexceptions and thus lower optimizations (which happens at least for targets with delayed-slots) or carry around exception tables. Tested cross to cris-elf, no regressions. Ok to commit? libgcc: * Makefile.in (LIB2ADD): Add $(srcdir)/emutls.c. (LIB2ADDEH, LIB2ADDEHSTATIC, LIB2ADDEHSHARED) Index: Makefile.in =================================================================== --- Makefile.in (revision 181531) +++ Makefile.in (working copy) @@ -392,11 +392,7 @@ vis_hide = gen-hide-list = echo > \$@ endif -LIB2ADD += enable-execute-stack.c - -LIB2ADDEH += $(srcdir)/emutls.c -LIB2ADDEHSTATIC += $(srcdir)/emutls.c -LIB2ADDEHSHARED += $(srcdir)/emutls.c +LIB2ADD += enable-execute-stack.c $(srcdir)/emutls.c # Library members defined in libgcc2.c. lib2funcs = _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _cmpdi2 _ucmpdi2 \ brgds, H-P