1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 18:15:18 -07:00

Use -fno-stack-check as an alternative to -ffreestanding

This commit is contained in:
Frank Denis 2019-09-17 15:43:25 +02:00
parent 78bb279b6c
commit 146ce11b11
2 changed files with 7 additions and 7 deletions

10
configure vendored
View File

@ -7517,15 +7517,15 @@ if ac_fn_c_try_compile "$LINENO"; then :
$as_echo "yes" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Using unsupported Xcode version" >&5
$as_echo "$as_me: WARNING: Using unsupported Xcode version" >&2;}
as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$CFLAGS -ffreestanding" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $CFLAGS -ffreestanding" >&5
$as_echo_n "checking whether C compiler accepts $CFLAGS -ffreestanding... " >&6; }
as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$CFLAGS -fno-stack-check" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $CFLAGS -fno-stack-check" >&5
$as_echo_n "checking whether C compiler accepts $CFLAGS -fno-stack-check... " >&6; }
if eval \${$as_CACHEVAR+:} false; then :
$as_echo_n "(cached) " >&6
else
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS $CFLAGS -ffreestanding"
CFLAGS="$CFLAGS $CFLAGS -fno-stack-check"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
@ -7550,7 +7550,7 @@ eval ac_res=\$$as_CACHEVAR
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
CFLAGS="$CFLAGS -ffreestanding"
CFLAGS="$CFLAGS -fno-stack-check"
else
:
fi

View File

@ -295,8 +295,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
]])],
[AC_MSG_RESULT(yes)
AC_MSG_WARN([Using unsupported Xcode version])
AX_CHECK_COMPILE_FLAG([$CFLAGS -ffreestanding],
[CFLAGS="$CFLAGS -ffreestanding"])
AX_CHECK_COMPILE_FLAG([$CFLAGS -fno-stack-check],
[CFLAGS="$CFLAGS -fno-stack-check"])
],
[AC_MSG_RESULT(no)
])