aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/patches-openjdk-8/1009-hotspot-handle-format-error-for-GCC-7.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/openjdk/patches-openjdk-8/1009-hotspot-handle-format-error-for-GCC-7.patch')
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/1009-hotspot-handle-format-error-for-GCC-7.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/recipes-core/openjdk/patches-openjdk-8/1009-hotspot-handle-format-error-for-GCC-7.patch b/recipes-core/openjdk/patches-openjdk-8/1009-hotspot-handle-format-error-for-GCC-7.patch
new file mode 100644
index 0000000..ee950cd
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-8/1009-hotspot-handle-format-error-for-GCC-7.patch
@@ -0,0 +1,34 @@
+From d085dcce6f8700fd8ddda475357496ea6da323dc Mon Sep 17 00:00:00 2001
+From: Andreas Obergschwandtner <andreas.obergschwandtner@skidata.com>
+Date: Fri, 21 Sep 2018 10:44:06 +0200
+Subject: [PATCH 1009/1012] hotspot: handle format error for GCC >= 7
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Obergschwandtner <andreas.obergschwandtner@skidata.com>
+Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
+---
+ src/share/vm/adlc/output_c.cpp | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/hotspot/src/share/vm/adlc/output_c.cpp b/hotspot/src/share/vm/adlc/output_c.cpp
+index b3766636d..eba08d2f0 100644
+--- a/hotspot/src/share/vm/adlc/output_c.cpp
++++ b/hotspot/src/share/vm/adlc/output_c.cpp
+@@ -436,9 +436,11 @@ static int pipeline_res_mask_initializer(
+ for (i = maxcycleused; i > 0; i /= 10)
+ cycledigit++;
+
+- int maskdigit = 0;
+- for (i = rescount; i > 0; i /= 10)
++ int maskdigit = 1;
++ for (i = rescount / 10; i > 0; i /= 10)
+ maskdigit++;
++ if (maskdigit > 10)
++ maskdigit = 10;
+
+ static const char* pipeline_use_cycle_mask = "Pipeline_Use_Cycle_Mask";
+ static const char* pipeline_use_element = "Pipeline_Use_Element";
+--
+2.24.1
+