8196985: Disable new warnings from GCC 7.3 in jdk libraries

Reviewed-by: tbell, ihse
This commit is contained in:
Erik Joelsson 2018-02-08 12:01:32 -08:00
parent b44023eb8d
commit 2f8f0b23cd
6 changed files with 15 additions and 7 deletions

View File

@ -82,7 +82,7 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
CFLAGS_linux := -fPIC, \
CFLAGS_solaris := -KPIC, \
CFLAGS_macosx := -fPIC, \
DISABLED_WARNINGS_gcc := unused-result, \
DISABLED_WARNINGS_gcc := unused-result implicit-fallthrough, \
MAPFILE := $(UNPACK_MAPFILE),\
LDFLAGS := $(UNPACKEXE_ZIPOBJS) \
$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \

View File

@ -358,7 +358,8 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
WARNINGS_AS_ERRORS_xlc := false, \
DISABLED_WARNINGS_gcc := type-limits pointer-to-int-cast \
unused-result maybe-uninitialized format \
format-security int-to-pointer-cast parentheses, \
format-security int-to-pointer-cast parentheses \
implicit-fallthrough, \
DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE \
E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \
MAPFILE := $(TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
@ -491,7 +492,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBJAVAJPEG_HEADERS) \
$(LIBJAVA_HEADER_FLAGS) \
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
DISABLED_WARNINGS_gcc := clobbered, \
DISABLED_WARNINGS_gcc := clobbered implicit-fallthrough shift-negative-value, \
MAPFILE := $(TOPDIR)/make/mapfiles/libjpeg/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@ -669,7 +670,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
CFLAGS_windows = -DCC_NOEX, \
WARNINGS_AS_ERRORS_xlc := false, \
DISABLED_WARNINGS_gcc := sign-compare int-to-pointer-cast \
type-limits missing-field-initializers, \
type-limits missing-field-initializers implicit-fallthrough, \
DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
maybe-uninitialized, \
DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
@ -943,7 +944,8 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
OPTIMIZATION := LOW, \
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
$(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
DISABLED_WARNINGS_gcc := sign-compare type-limits unused-result maybe-uninitialized shift-negative-value, \
DISABLED_WARNINGS_gcc := sign-compare type-limits unused-result \
maybe-uninitialized shift-negative-value implicit-fallthrough, \
DISABLED_WARNINGS_clang := incompatible-pointer-types, \
DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE \
E_STATEMENT_NOT_REACHED, \

View File

@ -67,7 +67,7 @@ ifneq ($(OPENJDK_TARGET_OS), macosx)
CFLAGS_linux_ppc64le := -ffp-contract=off, \
CFLAGS_linux_s390x := -ffp-contract=off, \
CFLAGS_linux_aarch64 := -ffp-contract=off, \
DISABLED_WARNINGS_gcc := sign-compare, \
DISABLED_WARNINGS_gcc := sign-compare misleading-indentation, \
DISABLED_WARNINGS_microsoft := 4146 4244 4018, \
ARFLAGS := $(ARFLAGS), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
@ -113,6 +113,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
SRC := $(TOPDIR)/src/java.base/share/native/libverify, \
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB), \
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
DISABLED_WARNINGS_microsoft := 4244 4267, \
MAPFILE := $(TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
@ -229,6 +230,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
-I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
MAPFILE := $(TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
REORDER := $(BUILD_LIBZIP_REORDER), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
@ -270,6 +272,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \
EXCLUDES := $(LIBJIMAGE_EXCLUDES), \
CFLAGS := $(CFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
CFLAGS_unix := -UDEBUG, \
MAPFILE := $(TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
@ -363,6 +366,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
OPTIMIZATION := HIGH, \
CFLAGS := $(LIBJLI_CFLAGS), \
DISABLED_WARNINGS_gcc := maybe-uninitialized, \
DISABLED_WARNINGS_solstudio := \
E_ASM_DISABLES_OPTIMIZATION \
E_STATEMENT_NOT_REACHED, \

View File

@ -54,7 +54,7 @@ ifeq ($(ENABLE_INTREE_EC), true)
-DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \
$(BUILD_LIBSUNEC_FLAGS), \
DISABLED_WARNINGS_gcc := sign-compare, \
DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough, \
DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \
MAPFILE := $(TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \

View File

@ -43,6 +43,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
$(LIBDT_SOCKET_CPPFLAGS), \
DISABLED_WARNINGS_gcc := shift-negative-value, \
MAPFILE := $(TOPDIR)/make/mapfiles/libdt_socket/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \

View File

@ -40,6 +40,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
-I$(TOPDIR)/src/jdk.pack/share/native/common-unpack \
$(LIBJAVA_HEADER_FLAGS), \
CFLAGS_release := -DPRODUCT, \
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
MAPFILE := $(TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \