]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix Solaris/x86 libitm build
authorRainer Orth <ro@gcc.gnu.org>
Tue, 8 Nov 2011 14:58:57 +0000 (14:58 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Tue, 8 Nov 2011 14:58:57 +0000 (14:58 +0000)
* configure.tgt: Handle i386 like i[456]86.
* config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
take address.
* config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
!HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.

From-SVN: r181163

libitm/config/generic/tls.cc
libitm/config/generic/tls.h
libitm/configure.tgt

index 3e82cff0902c6c7656130a3f67e8647168ddb941..c6421113c86f2a8bd8bd740f1e3a6f3645ee05d7 100644 (file)
 
 namespace GTM HIDDEN {
 
+#if !defined(HAVE_ARCH_GTM_THREAD) || !defined(HAVE_ARCH_GTM_THREAD_DISP)
+__thread gtm_thread_tls _gtm_thr_tls;
+#endif
+
 // Filter out any updates that overlap the libitm stack, as defined by
 // TOP (entry point to library) and BOT (below current function).  This
 // definition should be fine for all stack-grows-down architectures.
index e282e54817b5d4e45a12c19b64930317295763b6..6bbdccf2be17782d87837aecf0dc7d284a8b291d 100644 (file)
@@ -49,7 +49,7 @@ extern __thread gtm_thread_tls _gtm_thr_tls;
 #ifndef HAVE_ARCH_GTM_THREAD
 // If the target does not provide optimized access to the thread-local
 // data, simply access the TLS variable defined above.
-static inline gtm_thread *gtm_thr() { return &_gtm_thr_tls.thr; }
+static inline gtm_thread *gtm_thr() { return _gtm_thr_tls.thr; }
 static inline void set_gtm_thr(gtm_thread *x) { _gtm_thr_tls.thr = x; }
 #endif
 
index efc01e095aa26ccc7e46f5aa42793b7d268668aa..7d9b7f6c398326c24fff328ae68c24e4fa56c009 100644 (file)
@@ -52,7 +52,7 @@ case "${target_cpu}" in
   powerpc*)    ARCH=powerpc ;;
   s390*)       ARCH=s390 ;;
 
-  i[456]86)
+  i[3456]86)
        case " ${CC} ${CFLAGS} " in
          *" -m64 "*)
            ;;