]> err.no Git - varnish/commitdiff
Add configure options for extra-strict warnings + stack protection (both
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 4 Jun 2007 14:42:55 +0000 (14:42 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 4 Jun 2007 14:42:55 +0000 (14:42 +0000)
require gcc 4), tune autogen.des accordingly.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1489 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/autogen.des
varnish-cache/configure.ac

index 7a1ae2a9d4963bfca23055ad95b500289438518a..c2cceff664259b83ace5ccbd852249c75b845300 100755 (executable)
@@ -5,12 +5,16 @@
 
 set -ex
 
-./autogen.sh
+. ./autogen.sh
+
+# autoconf prior to 2.62 has issues with zsh 4.2 and newer
+export CONFIG_SHELL=/bin/sh
 
-CONFIG_SHELL=/bin/sh \
 ./configure \
     --enable-developer-warnings \
     --enable-debugging-symbols \
     --enable-dependency-tracking \
+    --enable-extra-developer-warnings \
+    --enable-stack-protector \
     --enable-werror \
     --prefix=/opt/varnish
index ef7cca94d8627c7ffd33af611f5278d5dbd95c54..dbf6d9c69dab7368eed25d0f3b85e793bc5e4c98 100644 (file)
@@ -108,8 +108,8 @@ AC_CHECK_FUNCS([poll])
 # This corresponds to FreeBSD's WARNS level 6
 DEVELOPER_CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat"
 
-# Turn off warnings for two issues which occur frequently in our code
-#DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wextra -Wno-missing-field-initializers -Wno-sign-compare"
+# Additional flags for GCC 4
+EXTRA_DEVELOPER_CFLAGS="-Wextra -Wno-missing-field-initializers -Wno-sign-compare"
 
 AC_ARG_ENABLE(developer-warnings,
        AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]),
@@ -117,6 +117,12 @@ AC_ARG_ENABLE(developer-warnings,
 AC_ARG_ENABLE(debugging-symbols,
        AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]),
        CFLAGS="${CFLAGS} -O0 -g -fno-inline")
+AC_ARG_ENABLE(extra-developer-warnings,
+       AS_HELP_STRING([--enable-extra-developer-warnings],[enable even stricter warnings (default is NO)]),
+       CFLAGS="${CFLAGS} ${EXTRA_DEVELOPER_CFLAGS}")
+AC_ARG_ENABLE(stack-protector,
+       AS_HELP_STRING([--enable-stack-protector],[enable stack protector (default is NO)]),
+       CFLAGS="${CFLAGS} -fstack-protector-all")
 AC_ARG_ENABLE(werror,
        AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]),
        CFLAGS="${CFLAGS} -Werror")