From 896a6d846c9454efde267ca1bd7f3cbb1fbae402 Mon Sep 17 00:00:00 2001 From: Steve Wills Date: Fri, 23 Feb 2018 18:14:59 +0000 Subject: [PATCH] MFH: r459311 Fix build with Clang 6.0. Note it is partially merged from the upstream patches for Linux and GCC 6. https://bugs.openjdk.java.net/browse/JDK-8163032 http://hg.openjdk.java.net/jdk7u/jdk7u/hotspot/rev/e34324d73cd5 http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/rev/9e1264f51bae PR: 225054 Approved by: ports-secteam (implicit) --- .../files/patch-hotspot_make_bsd_makefiles_gcc.make | 10 ++++++++++ .../openjdk7/files/patch-jdk_make_common_Defs-bsd.gmk | 11 +++++++++++ 2 files changed, 21 insertions(+) create mode 100644 java/openjdk7/files/patch-hotspot_make_bsd_makefiles_gcc.make create mode 100644 java/openjdk7/files/patch-jdk_make_common_Defs-bsd.gmk diff --git a/java/openjdk7/files/patch-hotspot_make_bsd_makefiles_gcc.make b/java/openjdk7/files/patch-hotspot_make_bsd_makefiles_gcc.make new file mode 100644 index 000000000000..b91c7f244b85 --- /dev/null +++ b/java/openjdk7/files/patch-hotspot_make_bsd_makefiles_gcc.make @@ -0,0 +1,10 @@ +--- hotspot/make/bsd/makefiles/gcc.make.orig ++++ hotspot/make/bsd/makefiles/gcc.make +@@ -112,6 +112,7 @@ ifeq ($(JVM_VARIANT_ZEROSHARK), true) + CFLAGS += $(LIBFFI_CFLAGS) + CFLAGS += $(LLVM_CFLAGS) + endif ++CFLAGS += -std=gnu++98 + CFLAGS += $(VM_PICFLAG) + CFLAGS += -fno-rtti + CFLAGS += -fno-exceptions diff --git a/java/openjdk7/files/patch-jdk_make_common_Defs-bsd.gmk b/java/openjdk7/files/patch-jdk_make_common_Defs-bsd.gmk new file mode 100644 index 000000000000..ef4d74bd59aa --- /dev/null +++ b/java/openjdk7/files/patch-jdk_make_common_Defs-bsd.gmk @@ -0,0 +1,11 @@ +--- jdk/make/common/Defs-bsd.gmk.orig ++++ jdk/make/common/Defs-bsd.gmk +@@ -274,7 +274,7 @@ CFLAGS_OPT = $(CC_OPT) + CFLAGS_DBG = $(DEBUG_FLAG) + CFLAGS_COMMON += $(CFLAGS_REQUIRED) + +-CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS) ++CXXFLAGS_COMMON = -std=gnu++98 $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS) + CXXFLAGS_OPT = $(CC_OPT) + CXXFLAGS_DBG = $(DEBUG_FLAG) + CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)