From: Rainer Orth Date: Tue, 8 Nov 2011 14:58:57 +0000 (+0000) Subject: Fix Solaris/x86 libitm build X-Git-Tag: releases/gcc-4.7.0~2351 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e28a3d8bf261597466be4d9c54a823a0987e78a0;p=thirdparty%2Fgcc.git Fix Solaris/x86 libitm build * 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 --- diff --git a/libitm/config/generic/tls.cc b/libitm/config/generic/tls.cc index 3e82cff0902c..c6421113c86f 100644 --- a/libitm/config/generic/tls.cc +++ b/libitm/config/generic/tls.cc @@ -26,6 +26,10 @@ 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. diff --git a/libitm/config/generic/tls.h b/libitm/config/generic/tls.h index e282e54817b5..6bbdccf2be17 100644 --- a/libitm/config/generic/tls.h +++ b/libitm/config/generic/tls.h @@ -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 diff --git a/libitm/configure.tgt b/libitm/configure.tgt index efc01e095aa2..7d9b7f6c3983 100644 --- a/libitm/configure.tgt +++ b/libitm/configure.tgt @@ -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 "*) ;;