openjdk-1.8.0/dismiss-warnings-in-GCC-8.X.patch

17 lines
598 B
Diff
Raw Normal View History

2020-05-21 16:49:51 +08:00
diff --git a/hotspot/make/linux/makefiles/adlc.make b/hotspot/make/linux/makefiles/adlc.make
index 92b8b9b3..a24f9184 100644
--- a/hotspot/make/linux/makefiles/adlc.make
+++ b/hotspot/make/linux/makefiles/adlc.make
@@ -64,6 +64,11 @@ CXXFLAGS = $(SYSDEFS) $(INCLUDES)
2020-05-21 16:49:51 +08:00
# Force assertions on.
CXXFLAGS += -DASSERT
+# Introduced in GCC 8.X
+ifneq "$(shell expr \( $(CC_VER_MAJOR) \>= 8 \))" "0"
+ CXXFLAGS += -Wno-error=stringop-overflow=
+endif
2020-05-21 16:49:51 +08:00
+
# CFLAGS_WARN holds compiler options to suppress/enable warnings.
# Compiler warnings are treated as errors
CFLAGS_WARN = $(WARNINGS_ARE_ERRORS)