Define _FORTIFY_SOURCE only on linux-gnu
This commit is contained in:
parent
46afa6c3a9
commit
b69159b5f8
8
configure
vendored
8
configure
vendored
@ -6903,6 +6903,8 @@ if test $ac_cv_defined___wasi__ != "no"; then :
|
|||||||
WASI="yes"
|
WASI="yes"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
case $host_os in #(
|
||||||
|
linux-gnu) :
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to add -D_FORTIFY_SOURCE=2 to CPPFLAGS" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to add -D_FORTIFY_SOURCE=2 to CPPFLAGS" >&5
|
||||||
$as_echo_n "checking whether to add -D_FORTIFY_SOURCE=2 to CPPFLAGS... " >&6; }
|
$as_echo_n "checking whether to add -D_FORTIFY_SOURCE=2 to CPPFLAGS... " >&6; }
|
||||||
@ -6962,7 +6964,10 @@ $as_echo "no" >&6; }
|
|||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
;; #(
|
||||||
|
*) :
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fvisibility=hidden" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fvisibility=hidden" >&5
|
||||||
$as_echo_n "checking whether C compiler accepts -fvisibility=hidden... " >&6; }
|
$as_echo_n "checking whether C compiler accepts -fvisibility=hidden... " >&6; }
|
||||||
@ -7042,7 +7047,6 @@ else
|
|||||||
:
|
:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS -U_FORTIFY_SOURCE"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -217,14 +217,13 @@ AC_C_VARARRAYS
|
|||||||
|
|
||||||
AC_CHECK_DEFINE([__wasi__], [WASI="yes"], [])
|
AC_CHECK_DEFINE([__wasi__], [WASI="yes"], [])
|
||||||
|
|
||||||
AX_ADD_FORTIFY_SOURCE
|
AS_CASE([$host_os], [linux-gnu], [AX_ADD_FORTIFY_SOURCE], [ ])
|
||||||
|
|
||||||
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],
|
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],
|
||||||
[CFLAGS="$CFLAGS -fvisibility=hidden"])
|
[CFLAGS="$CFLAGS -fvisibility=hidden"])
|
||||||
|
|
||||||
AS_CASE([$host_os], [cygwin*|mingw*|msys|pw32*|cegcc*], [ ], [
|
AS_CASE([$host_os], [cygwin*|mingw*|msys|pw32*|cegcc*], [ ], [
|
||||||
AX_CHECK_COMPILE_FLAG([-fPIC], [CFLAGS="$CFLAGS -fPIC"])
|
AX_CHECK_COMPILE_FLAG([-fPIC], [CFLAGS="$CFLAGS -fPIC"])
|
||||||
CPPFLAGS="$CPPFLAGS -U_FORTIFY_SOURCE"
|
|
||||||
])
|
])
|
||||||
|
|
||||||
AS_IF([test "$enable_pie" != "no"],[
|
AS_IF([test "$enable_pie" != "no"],[
|
||||||
|
Loading…
Reference in New Issue
Block a user