Detect FreeBSD sigaltstack bug with -pthread

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4972 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Jacques Garrigue 2002-07-01 00:12:19 +00:00
parent 9e61326a82
commit 46783f4176
1 changed files with 8 additions and 2 deletions

10
configure vendored
View File

@ -957,11 +957,18 @@ else
debugger=""
fi
# Determine if system stack overflows can be detected
case "$arch,$model,$system" in
i386,*,*)
if ./runtest -DTARGET_$arch -DSYS_$system stackov.c; then
case "$host" in # Check for FreeBSD 4.5 bug
*-*-freebsd*|*-*-openbsd*) check_pthread=yes ;;
*) check_pthread=no ;;
esac
if ./runtest -DTARGET_$arch -DSYS_$system stackov.c \
&& test $check_pthread = no || cclibs="-pthread $cclibs" \
./runtest -DTARGET_$arch -DSYS_$system stackov.c; then
echo "System stack overflow can be detected."
echo "#define HAS_STACK_OVERFLOW_DETECTION" >> s.h
else
@ -970,7 +977,6 @@ case "$arch,$model,$system" in
*)
echo "Cannot detect system stack overflow.";;
esac
# Determine the target architecture for the "num" library
case "$host" in