# HG changeset patch # User andrew # Date 1345649123 -3600 # Node ID b965a723122e4729a5a41ffbac8167e070f6cf3e # Parent 4a73d25caf23aa90aa2c28d7ae60d60c1412fa19 PR1095: Allow -Werror to be turned off. diff -r 4a73d25caf23 -r b965a723122e make/linux/makefiles/adlc.make --- a/make/linux/makefiles/adlc.make Wed May 22 18:20:20 2013 +0100 +++ b/make/linux/makefiles/adlc.make Wed Aug 22 16:25:23 2012 +0100 @@ -61,7 +61,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 4a73d25caf23 -r b965a723122e make/linux/makefiles/gcc.make --- a/make/linux/makefiles/gcc.make Wed May 22 18:20:20 2013 +0100 +++ b/make/linux/makefiles/gcc.make Wed Aug 22 16:25:23 2012 +0100 @@ -143,7 +143,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 4a73d25caf23 -r b965a723122e make/solaris/makefiles/adlc.make --- a/make/solaris/makefiles/adlc.make Wed May 22 18:20:20 2013 +0100 +++ b/make/solaris/makefiles/adlc.make Wed Aug 22 16:25:23 2012 +0100 @@ -68,8 +68,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 4a73d25caf23 -r b965a723122e make/solaris/makefiles/gcc.make --- a/make/solaris/makefiles/gcc.make Wed May 22 18:20:20 2013 +0100 +++ b/make/solaris/makefiles/gcc.make Wed Aug 22 16:25:23 2012 +0100 @@ -113,7 +113,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)