[vlc-commits] configure.ac: Allow stack protection to be disabled

Hugo Beauzée-Luyssen git at videolan.org
Tue Mar 20 14:53:05 CET 2018


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Mar 20 14:04:06 2018 +0100| [db019b328e43a34be703de153300c35a55b89796] | committer: Hugo Beauzée-Luyssen

configure.ac: Allow stack protection to be disabled

Because some platforms might not support it
Default configuration is unchanged: an optimized build will still have
stack protection enabled.
--enable-ssp --disable-optimizations will have SSP disabled

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=db019b328e43a34be703de153300c35a55b89796
---

 configure.ac | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/configure.ac b/configure.ac
index 52a2eb48a1..df44f425d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1123,6 +1123,14 @@ AH_BOTTOM([
     AS_IF([test "${ac_cv_c_omit_frame_pointer}" = "no"], [VLC_RESTORE_FLAGS])
   ])
 
+])
+
+AC_ARG_ENABLE(ssp, [
+  AS_HELP_STRING([--disable-ssp],
+  [disable stack smashing protection (default enabled for optimized builds)])
+],,[enable_ssp="yes"])
+
+AS_IF([test "${enable_ssp}" != "no" -a "${enable_optimizations}" != "no"], [
   VLC_SAVE_FLAGS
   AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong])
   AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong], [CXXFLAGS])



More information about the vlc-commits mailing list