mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 05:17:54 +00:00
Preserve LDFLAGS when checking for stack protector as they may include
rpath settings to allow the stack protector lib to be found. Avoid using existing CFLAGS since we don't want the compiler to optimize away the stack variable.
This commit is contained in:
parent
bdcb83be92
commit
b87ac0f0a2
6
configure
vendored
6
configure
vendored
@ -23926,7 +23926,7 @@ else
|
||||
_CFLAGS="$CFLAGS"
|
||||
_LDFLAGS="$LDFLAGS"
|
||||
CFLAGS="-fstack-protector-strong"
|
||||
LDFLAGS="-fstack-protector-strong"
|
||||
LDFLAGS="$_LDFLAGS -fstack-protector-strong"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
@ -23947,7 +23947,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
else
|
||||
|
||||
CFLAGS="-fstack-protector-all"
|
||||
LDFLAGS="-fstack-protector-all"
|
||||
LDFLAGS="$_LDFLAGS -fstack-protector-all"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
@ -23968,7 +23968,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
|
||||
else
|
||||
|
||||
CFLAGS="-fstack-protector"
|
||||
LDFLAGS="-fstack-protector"
|
||||
LDFLAGS="$_LDFLAGS -fstack-protector"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
|
@ -3985,7 +3985,7 @@ if test "$enable_hardening" != "no"; then
|
||||
_CFLAGS="$CFLAGS"
|
||||
_LDFLAGS="$LDFLAGS"
|
||||
CFLAGS="-fstack-protector-strong"
|
||||
LDFLAGS="-fstack-protector-strong"
|
||||
LDFLAGS="$_LDFLAGS -fstack-protector-strong"
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
|
||||
[[char buf[1024]; buf[1023] = '\0';]])
|
||||
@ -3993,7 +3993,7 @@ if test "$enable_hardening" != "no"; then
|
||||
sudo_cv_var_stack_protector="-fstack-protector-strong"
|
||||
], [
|
||||
CFLAGS="-fstack-protector-all"
|
||||
LDFLAGS="-fstack-protector-all"
|
||||
LDFLAGS="$_LDFLAGS -fstack-protector-all"
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
|
||||
[[char buf[1024]; buf[1023] = '\0';]])
|
||||
@ -4001,7 +4001,7 @@ if test "$enable_hardening" != "no"; then
|
||||
sudo_cv_var_stack_protector="-fstack-protector-all"
|
||||
], [
|
||||
CFLAGS="-fstack-protector"
|
||||
LDFLAGS="-fstack-protector"
|
||||
LDFLAGS="$_LDFLAGS -fstack-protector"
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
|
||||
[[char buf[1024]; buf[1023] = '\0';]])
|
||||
|
Loading…
x
Reference in New Issue
Block a user