Mailing List Archive

r1489 - trunk/varnish-cache
Author: des
Date: 2007-06-04 16:42:55 +0200 (Mon, 04 Jun 2007)
New Revision: 1489

Modified:
trunk/varnish-cache/autogen.des
trunk/varnish-cache/configure.ac
Log:
Add configure options for extra-strict warnings + stack protection (both
require gcc 4), tune autogen.des accordingly.


Modified: trunk/varnish-cache/autogen.des
===================================================================
--- trunk/varnish-cache/autogen.des 2007-06-04 08:46:39 UTC (rev 1488)
+++ trunk/varnish-cache/autogen.des 2007-06-04 14:42:55 UTC (rev 1489)
@@ -5,12 +5,16 @@

set -ex

-./autogen.sh
+. ./autogen.sh

-CONFIG_SHELL=/bin/sh \
+# autoconf prior to 2.62 has issues with zsh 4.2 and newer
+export 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

Modified: trunk/varnish-cache/configure.ac
===================================================================
--- trunk/varnish-cache/configure.ac 2007-06-04 08:46:39 UTC (rev 1488)
+++ trunk/varnish-cache/configure.ac 2007-06-04 14:42:55 UTC (rev 1489)
@@ -108,8 +108,8 @@
# 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(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")
r1489 - trunk/varnish-cache [ In reply to ]
In message <20070604144255.A29C11EC855 at projects.linpro.no>, des at projects.linpro
.no writes:
>Author: des
>Date: 2007-06-04 16:42:55 +0200 (Mon, 04 Jun 2007)
>New Revision: 1489
>
>Modified:
> trunk/varnish-cache/autogen.des
> trunk/varnish-cache/configure.ac
>Log:
>Add configure options for extra-strict warnings + stack protection (both
>require gcc 4), tune autogen.des accordingly.

Good move.

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.