Detect FreeBSD sigaltstack bug with -pthread
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4972 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
9e61326a82
commit
46783f4176
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue