This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: libgcc: Enable TLS for Linux/x86
- From: "H.J. Lu" <hjl at lucon dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 5 Jul 2007 06:29:06 -0700
- Subject: PATCH: libgcc: Enable TLS for Linux/x86
This patch enables TLS for Linux/x86 in libgcc. libbid needs it
for thread-safty. Tested on Linux/x86.
H.J.
----
2007-06-20 H.J. Lu <hongjiu.lu@intel.com>
* config.host (tmake_file): Add t-tls for i[34567]86-*-linux*
and x86_64-*-linux*.
* config/t-tls: New file.
--- libgcc/config.host.tls 2007-06-14 05:12:39.000000000 -0700
+++ libgcc/config.host 2007-06-20 09:40:07.000000000 -0700
@@ -654,3 +654,9 @@ m32c-*-elf*)
exit 1
;;
esac
+
+case ${host} in
+i[34567]86-*-linux* | x86_64-*-linux*)
+ tmake_file="${tmake_file} t-tls"
+ ;;
+esac
--- libgcc/config/t-tls.tls 2007-06-20 09:36:54.000000000 -0700
+++ libgcc/config/t-tls 2007-06-20 09:37:30.000000000 -0700
@@ -0,0 +1,2 @@
+# Use thread-local storage
+gcc_compile_bare += -DUSE_TLS