diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-10 14:07:44 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-10 14:07:44 +0000 |
commit | 84a2471067575918f5ad3038cb135464a5d39317 (patch) | |
tree | feda6ef2eb4bb1b1f94d43d9714629032ff78cf1 /libgo/configure.ac | |
parent | d34430114a1c24c97fdcc37f005576a981ad7d94 (diff) | |
download | ppe42-gcc-84a2471067575918f5ad3038cb135464a5d39317.tar.gz ppe42-gcc-84a2471067575918f5ad3038cb135464a5d39317.zip |
libgo/configure: Fixes for Solaris 8 and cross-compilation.
From Rainer Orth.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184092 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/configure.ac')
-rw-r--r-- | libgo/configure.ac | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libgo/configure.ac b/libgo/configure.ac index 67789032868..9c8478de74f 100644 --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -584,8 +584,12 @@ fi dnl See whether setcontext changes the value of TLS variables. AC_CACHE_CHECK([whether setcontext clobbers TLS variables], [libgo_cv_lib_setcontext_clobbers_tls], -[LIBS_hold="$LIBS" +[CFLAGS_hold="$CFLAGS" +CFLAGS="$PTHREAD_CFLAGS" +LIBS_hold="$LIBS" LIBS="$LIBS $PTHREAD_LIBS" +AC_CHECK_SIZEOF([void *]) +AS_VAR_ARITH([ptr_type_size], [$ac_cv_sizeof_void_p \* 8]) AC_RUN_IFELSE( [AC_LANG_SOURCE([ #include <pthread.h> @@ -650,11 +654,14 @@ main () ])], [libgo_cv_lib_setcontext_clobbers_tls=no], [libgo_cv_lib_setcontext_clobbers_tls=yes], -[case "$target" in - x86_64*-*-solaris2.10) libgo_cv_lib_setcontext_clobbers_tls=yes ;; - *) libgo_cv_lib_setcontext_clobbers_tls=no ;; +[case "$target:$ptr_type_size" in + i?86-*-solaris2.1[[01]]:64 | x86_64*-*-solaris2.1[[01]]:64) + libgo_cv_lib_setcontext_clobbers_tls=yes ;; + *) + libgo_cv_lib_setcontext_clobbers_tls=no ;; esac ]) +CFLAGS="$CFLAGS_hold" LIBS="$LIBS_hold" ]) if test "$libgo_cv_lib_setcontext_clobbers_tls" = "yes"; then |