diff options
Diffstat (limited to 'package/sudo/0003-Preserve-LDFLAGS-when-checking-for-stack-protector.patch')
-rw-r--r-- | package/sudo/0003-Preserve-LDFLAGS-when-checking-for-stack-protector.patch | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/package/sudo/0003-Preserve-LDFLAGS-when-checking-for-stack-protector.patch b/package/sudo/0003-Preserve-LDFLAGS-when-checking-for-stack-protector.patch new file mode 100644 index 0000000000..6ba3bb37c4 --- /dev/null +++ b/package/sudo/0003-Preserve-LDFLAGS-when-checking-for-stack-protector.patch @@ -0,0 +1,81 @@ +Preserve LDFLAGS when checking for stack protector as they may include +rpath settings to allow the stack protector lib to be found. Avoidusing +existing CFLAGS since we don't want the compiler to optimize away the +stack variable. + +Backported from upstream: + http://www.sudo.ws/repos/sudo/rev/e6bc59225c06 + +Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> + +# HG changeset patch +# User Todd C. Miller <Todd.Miller@courtesan.com> +# Date 1446149181 21600 +# Node ID e6bc59225c06c5d45580197519a73e3feea14cbd +# Parent 4ade5d1249f483c4dd6c579c70b327791094afe8 +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. + +diff -r 4ade5d1249f4 -r e6bc59225c06 configure +--- a/configure Thu Oct 29 10:51:09 2015 -0600 ++++ b/configure Thu Oct 29 14:06:21 2015 -0600 +@@ -23926,7 +23926,7 @@ + _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 @@ + 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 @@ + else + + CFLAGS="-fstack-protector" +- LDFLAGS="-fstack-protector" ++ LDFLAGS="$_LDFLAGS -fstack-protector" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +diff -r 4ade5d1249f4 -r e6bc59225c06 configure.ac +--- a/configure.ac Thu Oct 29 10:51:09 2015 -0600 ++++ b/configure.ac Thu Oct 29 14:06:21 2015 -0600 +@@ -3985,7 +3985,7 @@ + _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 @@ + 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 @@ + 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';]]) + |