Mercurial > hg > openjdk > icedtea > jdk7 > hotspot
changeset 3606:c115e0d9e93f
PR1095: Allow -Werror to be turned off.
author | andrew |
---|---|
date | Wed, 22 Aug 2012 16:25:23 +0100 |
parents | 72ba91bfdfd3 |
children | a14247f5e52e |
files | make/linux/makefiles/adlc.make make/linux/makefiles/gcc.make make/solaris/makefiles/adlc.make make/solaris/makefiles/gcc.make |
diffstat | 4 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 = \
--- 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
--- 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)
--- 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)