# HG changeset patch # User andrew # Date 1345649123 -3600 # Node ID c115e0d9e93f0aeb37d10dab60d50a132e115c9a # Parent 72ba91bfdfd3f09d91c12714d0041f157aab1d2c PR1095: Allow -Werror to be turned off. diff -r 72ba91bfdfd3 -r c115e0d9e93f make/linux/makefiles/adlc.make --- a/make/linux/makefiles/adlc.make Mon Aug 06 14:20:29 2012 +0100 +++ b/make/linux/makefiles/adlc.make Wed Aug 22 16:25:23 2012 +0100 @@ -68,7 +68,9 @@ # CFLAGS_WARN holds compiler options to suppress/enable warnings. # Compiler warnings are treated as errors +ifneq ($(COMPILER_WARNINGS_FATAL),false) CFLAGS_WARN = -Werror +endif CFLAGS += $(CFLAGS_WARN) OBJECTNAMES = \ diff -r 72ba91bfdfd3 -r c115e0d9e93f make/linux/makefiles/gcc.make --- a/make/linux/makefiles/gcc.make Mon Aug 06 14:20:29 2012 +0100 +++ b/make/linux/makefiles/gcc.make Wed Aug 22 16:25:23 2012 +0100 @@ -150,7 +150,9 @@ endif # Compiler warnings are treated as errors +ifneq ($(COMPILER_WARNINGS_FATAL),false) WARNINGS_ARE_ERRORS = -Werror +endif # Except for a few acceptable ones # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit diff -r 72ba91bfdfd3 -r c115e0d9e93f make/solaris/makefiles/adlc.make --- a/make/solaris/makefiles/adlc.make Mon Aug 06 14:20:29 2012 +0100 +++ b/make/solaris/makefiles/adlc.make Wed Aug 22 16:25:23 2012 +0100 @@ -75,8 +75,10 @@ # CFLAGS_WARN holds compiler options to suppress/enable warnings. # Compiler warnings are treated as errors -ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) - CFLAGS_WARN = +w -errwarn +ifneq ($(COMPILER_WARNINGS_FATAL),false) + ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) + CFLAGS_WARN = +w -errwarn + endif endif CFLAGS += $(CFLAGS_WARN) diff -r 72ba91bfdfd3 -r c115e0d9e93f make/solaris/makefiles/gcc.make --- a/make/solaris/makefiles/gcc.make Mon Aug 06 14:20:29 2012 +0100 +++ b/make/solaris/makefiles/gcc.make Wed Aug 22 16:25:23 2012 +0100 @@ -112,7 +112,9 @@ # Compiler warnings are treated as errors -WARNINGS_ARE_ERRORS = -Werror +ifneq ($(COMPILER_WARNINGS_FATAL),false) +WARNINGS_ARE_ERRORS = -Werror +endif # Enable these warnings. See 'info gcc' about details on these options ADDITIONAL_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ADDITIONAL_WARNINGS)