8196985: Disable new warnings from GCC 7.3 in jdk libraries
Reviewed-by: tbell, ihse
This commit is contained in:
parent
b44023eb8d
commit
2f8f0b23cd
@ -82,7 +82,7 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
|
|||||||
CFLAGS_linux := -fPIC, \
|
CFLAGS_linux := -fPIC, \
|
||||||
CFLAGS_solaris := -KPIC, \
|
CFLAGS_solaris := -KPIC, \
|
||||||
CFLAGS_macosx := -fPIC, \
|
CFLAGS_macosx := -fPIC, \
|
||||||
DISABLED_WARNINGS_gcc := unused-result, \
|
DISABLED_WARNINGS_gcc := unused-result implicit-fallthrough, \
|
||||||
MAPFILE := $(UNPACK_MAPFILE),\
|
MAPFILE := $(UNPACK_MAPFILE),\
|
||||||
LDFLAGS := $(UNPACKEXE_ZIPOBJS) \
|
LDFLAGS := $(UNPACKEXE_ZIPOBJS) \
|
||||||
$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
|
$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
|
||||||
|
@ -358,7 +358,8 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
|
|||||||
WARNINGS_AS_ERRORS_xlc := false, \
|
WARNINGS_AS_ERRORS_xlc := false, \
|
||||||
DISABLED_WARNINGS_gcc := type-limits pointer-to-int-cast \
|
DISABLED_WARNINGS_gcc := type-limits pointer-to-int-cast \
|
||||||
unused-result maybe-uninitialized format \
|
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 \
|
DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE \
|
||||||
E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \
|
E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \
|
||||||
MAPFILE := $(TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
|
MAPFILE := $(TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
|
||||||
@ -491,7 +492,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
|
|||||||
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBJAVAJPEG_HEADERS) \
|
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBJAVAJPEG_HEADERS) \
|
||||||
$(LIBJAVA_HEADER_FLAGS) \
|
$(LIBJAVA_HEADER_FLAGS) \
|
||||||
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
|
-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, \
|
MAPFILE := $(TOPDIR)/make/mapfiles/libjpeg/mapfile-vers, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||||
@ -669,7 +670,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
|
|||||||
CFLAGS_windows = -DCC_NOEX, \
|
CFLAGS_windows = -DCC_NOEX, \
|
||||||
WARNINGS_AS_ERRORS_xlc := false, \
|
WARNINGS_AS_ERRORS_xlc := false, \
|
||||||
DISABLED_WARNINGS_gcc := sign-compare int-to-pointer-cast \
|
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 \
|
DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
|
||||||
maybe-uninitialized, \
|
maybe-uninitialized, \
|
||||||
DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
|
DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
|
||||||
@ -943,7 +944,8 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
|||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
|
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
|
||||||
$(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
|
$(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_clang := incompatible-pointer-types, \
|
||||||
DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE \
|
DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE \
|
||||||
E_STATEMENT_NOT_REACHED, \
|
E_STATEMENT_NOT_REACHED, \
|
||||||
|
@ -67,7 +67,7 @@ ifneq ($(OPENJDK_TARGET_OS), macosx)
|
|||||||
CFLAGS_linux_ppc64le := -ffp-contract=off, \
|
CFLAGS_linux_ppc64le := -ffp-contract=off, \
|
||||||
CFLAGS_linux_s390x := -ffp-contract=off, \
|
CFLAGS_linux_s390x := -ffp-contract=off, \
|
||||||
CFLAGS_linux_aarch64 := -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, \
|
DISABLED_WARNINGS_microsoft := 4146 4244 4018, \
|
||||||
ARFLAGS := $(ARFLAGS), \
|
ARFLAGS := $(ARFLAGS), \
|
||||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
|
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
|
||||||
@ -113,6 +113,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
|
|||||||
SRC := $(TOPDIR)/src/java.base/share/native/libverify, \
|
SRC := $(TOPDIR)/src/java.base/share/native/libverify, \
|
||||||
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
|
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||||
|
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
|
||||||
DISABLED_WARNINGS_microsoft := 4244 4267, \
|
DISABLED_WARNINGS_microsoft := 4244 4267, \
|
||||||
MAPFILE := $(TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
|
MAPFILE := $(TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||||
@ -229,6 +230,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
|
|||||||
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
|
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
|
||||||
-I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
|
-I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
|
||||||
CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
|
CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
|
||||||
|
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
|
||||||
MAPFILE := $(TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
|
MAPFILE := $(TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
|
||||||
REORDER := $(BUILD_LIBZIP_REORDER), \
|
REORDER := $(BUILD_LIBZIP_REORDER), \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||||
@ -270,6 +272,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \
|
|||||||
EXCLUDES := $(LIBJIMAGE_EXCLUDES), \
|
EXCLUDES := $(LIBJIMAGE_EXCLUDES), \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
|
CFLAGS := $(CFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
|
||||||
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
|
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
|
||||||
|
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
|
||||||
CFLAGS_unix := -UDEBUG, \
|
CFLAGS_unix := -UDEBUG, \
|
||||||
MAPFILE := $(TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \
|
MAPFILE := $(TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
|
||||||
@ -363,6 +366,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
|
|||||||
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
|
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
|
||||||
OPTIMIZATION := HIGH, \
|
OPTIMIZATION := HIGH, \
|
||||||
CFLAGS := $(LIBJLI_CFLAGS), \
|
CFLAGS := $(LIBJLI_CFLAGS), \
|
||||||
|
DISABLED_WARNINGS_gcc := maybe-uninitialized, \
|
||||||
DISABLED_WARNINGS_solstudio := \
|
DISABLED_WARNINGS_solstudio := \
|
||||||
E_ASM_DISABLES_OPTIMIZATION \
|
E_ASM_DISABLES_OPTIMIZATION \
|
||||||
E_STATEMENT_NOT_REACHED, \
|
E_STATEMENT_NOT_REACHED, \
|
||||||
|
@ -54,7 +54,7 @@ ifeq ($(ENABLE_INTREE_EC), true)
|
|||||||
-DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
|
-DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
|
||||||
CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \
|
CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \
|
||||||
$(BUILD_LIBSUNEC_FLAGS), \
|
$(BUILD_LIBSUNEC_FLAGS), \
|
||||||
DISABLED_WARNINGS_gcc := sign-compare, \
|
DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough, \
|
||||||
DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \
|
DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \
|
||||||
MAPFILE := $(TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \
|
MAPFILE := $(TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
|
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
|
||||||
|
@ -43,6 +43,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
|
|||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
|
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
|
||||||
$(LIBDT_SOCKET_CPPFLAGS), \
|
$(LIBDT_SOCKET_CPPFLAGS), \
|
||||||
|
DISABLED_WARNINGS_gcc := shift-negative-value, \
|
||||||
MAPFILE := $(TOPDIR)/make/mapfiles/libdt_socket/mapfile-vers, \
|
MAPFILE := $(TOPDIR)/make/mapfiles/libdt_socket/mapfile-vers, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||||
|
@ -40,6 +40,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
|
|||||||
-I$(TOPDIR)/src/jdk.pack/share/native/common-unpack \
|
-I$(TOPDIR)/src/jdk.pack/share/native/common-unpack \
|
||||||
$(LIBJAVA_HEADER_FLAGS), \
|
$(LIBJAVA_HEADER_FLAGS), \
|
||||||
CFLAGS_release := -DPRODUCT, \
|
CFLAGS_release := -DPRODUCT, \
|
||||||
|
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
|
||||||
MAPFILE := $(TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
|
MAPFILE := $(TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
|
||||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user