From 4408c2610784bf0ba503ac53b629b748b7bf202f Mon Sep 17 00:00:00 2001 From: Severin Gehwolf Date: Thu, 13 Feb 2020 18:17:41 +0100 Subject: [PATCH] Add patch for JDK-8218811, which fixes a GCC 10 build issue --- java-1.8.0-openjdk.spec | 4 ++++ jdk8218811-perfMemory_linux.patch | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 jdk8218811-perfMemory_linux.patch diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 3297900..fa7bcfa 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -1120,6 +1120,9 @@ Patch400: pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch Patch401: pr3655-toggle_system_crypto_policy.patch # JDK-8219772: EXTRA_CFLAGS not being picked up for assembler files Patch110: jdk8219772-extra_c_cxx_flags_not_picked_for_assembler_source.patch +# JDK-8218811: replace open by os::open in hotspot coding +# This fixes a GCC 10 build issue +Patch111: jdk8218811-perfMemory_linux.patch ############################################# # @@ -1543,6 +1546,7 @@ sh %{SOURCE12} %patch575 %patch577 %patch110 +%patch111 # RPM-only fixes %patch539 diff --git a/jdk8218811-perfMemory_linux.patch b/jdk8218811-perfMemory_linux.patch new file mode 100644 index 0000000..7b3d2f7 --- /dev/null +++ b/jdk8218811-perfMemory_linux.patch @@ -0,0 +1,12 @@ +diff --git openjdk.orig/hotspot/src/os/linux/vm/perfMemory_linux.cpp openjdk/hotspot/src/os/linux/vm/perfMemory_linux.cpp +--- openjdk.orig/hotspot/src/os/linux/vm/perfMemory_linux.cpp ++++ openjdk/hotspot/src/os/linux/vm/perfMemory_linux.cpp +@@ -878,7 +878,7 @@ + + // open the file + int result; +- RESTARTABLE(::open(filename, oflags), result); ++ RESTARTABLE(::open(filename, oflags, 0), result); + if (result == OS_ERR) { + if (errno == ENOENT) { + THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(),