8075176: DISABLED_WARNINGS caused C++ compiler flags to get lost

Reviewed-by: erikj, tbell
This commit is contained in:
Magnus Ihse Bursie 2015-03-17 16:01:05 +01:00
parent 207dec2e01
commit 17cc06c77c

View File

@ -392,12 +392,6 @@ define SetupNativeCompilationBody
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release) $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
endif endif
# Pick up disabled warnings, if possible on this platform.
ifneq ($(DISABLE_WARNING_PREFIX),)
$1_EXTRA_CFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)))
$1_EXTRA_CXXFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)))
endif
ifeq ($$($1_DEBUG_SYMBOLS), true) ifeq ($$($1_DEBUG_SYMBOLS), true)
ifeq ($(ENABLE_DEBUG_SYMBOLS), true) ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
ifdef OPENJDK ifdef OPENJDK
@ -415,6 +409,9 @@ define SetupNativeCompilationBody
endif endif
endif endif
# If no C++ flags are explicitly set, default to using the C flags.
# After that, we can set additional C++ flags that should not interfere
# with the mechanism for copying the C flags by default.
ifeq ($$($1_CXXFLAGS),) ifeq ($$($1_CXXFLAGS),)
$1_CXXFLAGS:=$$($1_CFLAGS) $1_CXXFLAGS:=$$($1_CFLAGS)
endif endif
@ -427,6 +424,12 @@ define SetupNativeCompilationBody
$1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER) $1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
endif endif
# Pick up disabled warnings, if possible on this platform.
ifneq ($(DISABLE_WARNING_PREFIX),)
$1_EXTRA_CFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)))
$1_EXTRA_CXXFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)))
endif
ifeq (NONE, $$($1_OPTIMIZATION)) ifeq (NONE, $$($1_OPTIMIZATION))
$1_EXTRA_CFLAGS += $(C_O_FLAG_NONE) $1_EXTRA_CFLAGS += $(C_O_FLAG_NONE)
$1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_NONE) $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_NONE)