From aadce50146ccd30bc1e630f953471c3961793519 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 6 Nov 2009 07:04:26 +0000 Subject: -Wextra is only understood by GCC 3.4.6 or later. It is a more descriptive synonym for -W. Use -W instead which is understood by all common versions of GCC (i.e. GCC 2.95 supports it, which is the oldest GCC version we have to support) Additionally, conditionalise our -Werror usage on whether we're building for BeOS/Haiku. On these platforms, the standard library headers result in warnings. GCC 2 is quite happy to build this code on other platforms, so shouldn't be the trigger for dropping -Werror (even if BeOS is the only target where GCC2 is likely to be used). svn path=/trunk/libparserutils/; revision=9669 --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2a9bb31..87a6320 100644 --- a/Makefile +++ b/Makefile @@ -10,11 +10,12 @@ include build/makefiles/Makefile.tools TESTRUNNER := $(PERL) build/testtools/testrunner.pl # Toolchain flags -WARNFLAGS := -Wall -Wundef -Wpointer-arith -Wcast-align \ +WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \ -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \ -Wmissing-declarations -Wnested-externs -pedantic -ifneq ($(GCCVER),2) - WARNFLAGS := $(WARNFLAGS) -Wextra -Werror +# BeOS/Haiku standard library headers create warnings. +ifneq ($(TARGET),beos) + WARNFLAGS := $(WARNFLAGS) -Werror endif CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \ -- cgit v1.2.3