summaryrefslogtreecommitdiff
path: root/libgo/configure
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-10 14:07:44 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-10 14:07:44 +0000
commit84a2471067575918f5ad3038cb135464a5d39317 (patch)
treefeda6ef2eb4bb1b1f94d43d9714629032ff78cf1 /libgo/configure
parentd34430114a1c24c97fdcc37f005576a981ad7d94 (diff)
downloadgcc-84a2471067575918f5ad3038cb135464a5d39317.tar.gz
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')
-rwxr-xr-xlibgo/configure48
1 files changed, 44 insertions, 4 deletions
diff --git a/libgo/configure b/libgo/configure
index a93b0515dd9..6bb35a65728 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -14818,12 +14818,51 @@ $as_echo_n "checking whether setcontext clobbers TLS variables... " >&6; }
if test "${libgo_cv_lib_setcontext_clobbers_tls+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- LIBS_hold="$LIBS"
+ CFLAGS_hold="$CFLAGS"
+CFLAGS="$PTHREAD_CFLAGS"
+LIBS_hold="$LIBS"
LIBS="$LIBS $PTHREAD_LIBS"
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
+$as_echo_n "checking size of void *... " >&6; }
+if test "${ac_cv_sizeof_void_p+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_void_p" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (void *)
+See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_void_p=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
+$as_echo "$ac_cv_sizeof_void_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+_ACEOF
+
+
+as_fn_arith $ac_cv_sizeof_void_p \* 8 && ptr_type_size=$as_val
if test "$cross_compiling" = yes; then :
- 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
else
@@ -14900,6 +14939,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+CFLAGS="$CFLAGS_hold"
LIBS="$LIBS_hold"
fi