summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2013-03-05 21:53:18 +1100
committerErik de Castro Lopo <erikd@mega-nerd.com>2013-03-06 07:39:24 +1100
commit05609d5b4b02e87c17c01a0ebb9fc2e05b799d90 (patch)
treee932b29586bf90f3a2c940ac0bae25b84d6f3be7 /configure.ac
parent9d057c7179b1a4acb26ea28972038cfcf0be17fe (diff)
downloadflac-05609d5b4b02e87c17c01a0ebb9fc2e05b799d90.tar.gz
configure.ac : Add hardening compile options.
Extra compile options are detected at configure time with new XIPH_ADD_*FLAGS m4 macros. Options enabled include -Wextra, -D_FORTIFY_SOURCE=2 and stack protection.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ac35de22..b99f4027 100644
--- a/configure.ac
+++ b/configure.ac
@@ -356,6 +356,10 @@ fi
XIPH_GCC_VERSION
+XIPH_ADD_CFLAGS([-Wextra])
+XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
+XIPH_ADD_CFLAGS([-fstack-protector --param ssp-buffer-size=4])
+
if test x$ac_cv_c_compiler_gnu = xyes ; then
if test x$enable_gcc_werror = "xyes" ; then
CFLAGS="-Wall -Wextra -Werror $CFLAGS"