Only make compiler warnings fatal with --enable-debug

While in theory I like the idea of compiler warnings always being
fatal.  In practice this causes problems when small harmless errors
cause build failures for end users.  To handle this I've updated
the build system such that -Werror is only used when --enable-debug
is passed to configure.  This is how I always build when developing
so I'll catch all build warnings and end users will not get stuck
by minor issues.
This commit is contained in:
Brian Behlendorf
2010-06-30 17:05:36 -07:00
parent 6801b7154c
commit c950d1480d
9 changed files with 89 additions and 34 deletions
+3 -2
View File
@@ -106,6 +106,7 @@ CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
@@ -227,8 +228,8 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h
AM_LIBTOOLFLAGS = --silent
AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wshadow \
-D__USE_LARGEFILE64
AM_CFLAGS = -Wall -Wshadow -Wstrict-prototypes -fno-strict-aliasing \
-D__USE_LARGEFILE64 ${DEBUG_CFLAGS}
noinst_LTLIBRARIES = libcommon.la
libcommon_la_SOURCES = list.c
EXTRA_DIST = list.h