[PATCH] fix PR43553 with use of GCC_CHECK_EMUTLS
Jack Howarth
howarth@bromo.med.uc.edu
Mon Mar 29 00:13:00 GMT 2010
Alternative fix for PR43553 which uses the GCC_CHECK_EMUTLS
macro from config/tls.m4 to determine if emulated TLS is in use
and sets set_use_emutls appropriately. I've verified on x86_64
Fedora 10 linux with this patch that -DHAVE_CC_TLS -DUSE_TLS
is still used in the libgcc build while on x86_64 darwin10
the desired -DHAVE_CC_TLS -DUSE_EMUTLS is used.
Bootstrapped and regression tested on x86_64-apple-darwin10.
Okay for gcc trunk?
Jack
2010-03-28 Jack Howarth <howarth@bromo.med.uc.edu>
PR43553
* Makefile.in (INTERNAL_CFLAGS): Add @set_use_emutls@.
* configure.ac: Use GCC_CHECK_EMUTLS to see if emulated TLS
is used and substitute set_use_emutls.
* configure: Regenerated.
Index: libgcc/Makefile.in
===================================================================
--- libgcc/Makefile.in (revision 157785)
+++ libgcc/Makefile.in (working copy)
@@ -226,7 +226,7 @@
# will usually contain -g, so for the moment CFLAGS goes first. We must
# include CFLAGS - that's where multilib options live.
INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
- $(INCLUDES) @set_have_cc_tls@
+ $(INCLUDES) @set_have_cc_tls@ @set_use_emutls@
MULTIDIR := $(shell $(CC) $(CFLAGS) -print-multi-directory)
MULTIOSDIR := $(shell $(CC) $(CFLAGS) -print-multi-os-directory)
Index: libgcc/configure.ac
===================================================================
--- libgcc/configure.ac (revision 157785)
+++ libgcc/configure.ac (working copy)
@@ -238,6 +238,14 @@
fi
AC_SUBST(set_have_cc_tls)
+# See if we have emulated thread-local storage.
+GCC_CHECK_EMUTLS
+set_use_emutls=
+if test "$enable_tls $gcc_cv_use_emutls" = "yes yes"; then
+ set_use_emutls="-DUSE_EMUTLS"
+fi
+AC_SUBST(set_use_emutls)
+
# Conditionalize the makefile for this target machine.
tmake_file_=
for f in ${tmake_file}
More information about the Gcc-patches
mailing list