8144695: --disable-warnings-as-errors does not work for HotSpot build

Reviewed-by: kbarrett, ihse
This commit is contained in:
Igor Ignatyev 2015-12-17 16:12:58 +03:00
parent a4844cbbc3
commit be21417b06
5 changed files with 12 additions and 7 deletions

View file

@ -256,7 +256,7 @@ endif
# Compiler warnings are treated as errors # Compiler warnings are treated as errors
ifneq ($(COMPILER_WARNINGS_FATAL),false) ifneq ($(COMPILER_WARNINGS_FATAL),false)
WARNINGS_ARE_ERRORS = -Werror WARNINGS_ARE_ERRORS ?= -Werror
endif endif
ifeq ($(USE_CLANG), true) ifeq ($(USE_CLANG), true)

View file

@ -203,7 +203,7 @@ else
endif endif
# Compiler warnings are treated as errors # Compiler warnings are treated as errors
WARNINGS_ARE_ERRORS = -Werror WARNINGS_ARE_ERRORS ?= -Werror
ifeq ($(USE_CLANG), true) ifeq ($(USE_CLANG), true)
# However we need to clean the code up before we can unrestrictedly enable this option with Clang # However we need to clean the code up before we can unrestrictedly enable this option with Clang

View file

@ -72,10 +72,14 @@ ifndef USE_GCC
endif endif
# CFLAGS_WARN holds compiler options to suppress/enable warnings. # CFLAGS_WARN holds compiler options to suppress/enable warnings.
CFLAGS_WARN = +w
# Compiler warnings are treated as errors # Compiler warnings are treated as errors
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
CFLAGS_WARN = +w -errwarn WARNINGS_ARE_ERRORS ?= -xwe
endif endif
CFLAGS_WARN += $(WARNINGS_ARE_ERRORS)
# When using compiler version 5.13 (Solaris Studio 12.4), calls to explicitly # When using compiler version 5.13 (Solaris Studio 12.4), calls to explicitly
# instantiated template functions trigger this warning when +w is active. # instantiated template functions trigger this warning when +w is active.
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 513), 1) ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 513), 1)

View file

@ -117,7 +117,7 @@ endif
# Compiler warnings are treated as errors # Compiler warnings are treated as errors
WARNINGS_ARE_ERRORS = -Werror WARNINGS_ARE_ERRORS ?= -Werror
# Enable these warnings. See 'info gcc' about details on these options # Enable these warnings. See 'info gcc' about details on these options
WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef -Wformat=2 WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef -Wformat=2

View file

@ -145,7 +145,8 @@ endif
CFLAGS += -DDONT_USE_PRECOMPILED_HEADER CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
# Compiler warnings are treated as errors # Compiler warnings are treated as errors
CFLAGS_WARN = -xwe WARNINGS_ARE_ERRORS ?= -xwe
CFLAGS_WARN = $(WARNINGS_ARE_ERRORS)
################################################ ################################################
# Begin current (>=5.9) Forte compiler options # # Begin current (>=5.9) Forte compiler options #