summaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/patches-openjdk-8/1008-hotspot-handle-format-error-for-GCC-7.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/openjdk/patches-openjdk-8/1008-hotspot-handle-format-error-for-GCC-7.patch')
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/1008-hotspot-handle-format-error-for-GCC-7.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/recipes-core/openjdk/patches-openjdk-8/1008-hotspot-handle-format-error-for-GCC-7.patch b/recipes-core/openjdk/patches-openjdk-8/1008-hotspot-handle-format-error-for-GCC-7.patch
new file mode 100644
index 0000000..e077c53
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-8/1008-hotspot-handle-format-error-for-GCC-7.patch
@@ -0,0 +1,32 @@
1From bb394ba055197ef7c7e27b436dd92f5a86305019 Mon Sep 17 00:00:00 2001
2From: Andreas Obergschwandtner <andreas.obergschwandtner@skidata.com>
3Date: Fri, 21 Sep 2018 10:44:06 +0200
4Subject: [PATCH] hotspot: handle format error for GCC >= 7
5
6Upstream-Status: Pending
7
8Signed-off-by: Andreas Obergschwandtner <andreas.obergschwandtner@skidata.com>
9Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
10
11---
12 hotspot/src/share/vm/adlc/output_c.cpp | 6 ++++--
13 1 file changed, 4 insertions(+), 2 deletions(-)
14
15diff --git a/hotspot/src/share/vm/adlc/output_c.cpp b/hotspot/src/share/vm/adlc/output_c.cpp
16index 19916904..889b785c 100644
17--- a/hotspot/src/share/vm/adlc/output_c.cpp
18+++ b/hotspot/src/share/vm/adlc/output_c.cpp
19@@ -419,9 +419,11 @@ static int pipeline_res_mask_initializer(
20 for (i = maxcycleused; i > 0; i /= 10)
21 cycledigit++;
22
23- int maskdigit = 0;
24- for (i = rescount; i > 0; i /= 10)
25+ int maskdigit = 1;
26+ for (i = rescount / 10; i > 0; i /= 10)
27 maskdigit++;
28+ if (maskdigit > 10)
29+ maskdigit = 10;
30
31 static const char* pipeline_use_cycle_mask = "Pipeline_Use_Cycle_Mask";
32 static const char* pipeline_use_element = "Pipeline_Use_Element";