Commit 1581f538 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Add configure options for extra-strict warnings + stack protection (both

require gcc 4), tune autogen.des accordingly.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1489 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 7eba2284
......@@ -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
......@@ -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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment