diff options
| -rw-r--r-- | recipes-core/icedtea/openjdk-7-03b147/icedtea-hotspot-handle-gcc7-format-overflow.patch | 41 | ||||
| -rw-r--r-- | recipes-core/icedtea/openjdk-7-release-03b147.inc | 2 |
2 files changed, 43 insertions, 0 deletions
diff --git a/recipes-core/icedtea/openjdk-7-03b147/icedtea-hotspot-handle-gcc7-format-overflow.patch b/recipes-core/icedtea/openjdk-7-03b147/icedtea-hotspot-handle-gcc7-format-overflow.patch new file mode 100644 index 0000000..27d41dd --- /dev/null +++ b/recipes-core/icedtea/openjdk-7-03b147/icedtea-hotspot-handle-gcc7-format-overflow.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | # HG changeset patch | ||
| 2 | # User Andreas Obergschwandtner <andreas.obergschwandtner@skidata.com> | ||
| 3 | # Date 1534928526 -7200 | ||
| 4 | # Wed Aug 22 11:02:06 2018 +0200 | ||
| 5 | # Node ID 96d06a5c27f84a4d48cff0d927cf377866db894e | ||
| 6 | # Parent a456d0771ba0f6604b172f05f0b594178f7cc49c | ||
| 7 | Handle format-overflow warning for GCC >= 7 | ||
| 8 | |||
| 9 | diff --git openjdk/hotspot/src/share/vm/adlc/output_c.cpp openjdk/hotspot/src/share/vm/adlc/output_c.cpp | ||
| 10 | --- openjdk/hotspot/src/share/vm/adlc/output_c.cpp | ||
| 11 | +++ openjdk/hotspot/src/share/vm/adlc/output_c.cpp | ||
| 12 | @@ -462,9 +462,11 @@ | ||
| 13 | for (i = maxcycleused; i > 0; i /= 10) | ||
| 14 | cycledigit++; | ||
| 15 | |||
| 16 | - int maskdigit = 0; | ||
| 17 | - for (i = rescount; i > 0; i /= 10) | ||
| 18 | + int maskdigit = 1; | ||
| 19 | + for (i = rescount / 10; i > 0; i /= 10) | ||
| 20 | maskdigit++; | ||
| 21 | + if (maskdigit > 10) | ||
| 22 | + maskdigit = 10; | ||
| 23 | |||
| 24 | static const char * pipeline_use_cycle_mask = "Pipeline_Use_Cycle_Mask"; | ||
| 25 | static const char * pipeline_use_element = "Pipeline_Use_Element"; | ||
| 26 | diff --git openjdk/hotspot/src/share/vm/code/dependencies.cpp openjdk/hotspot/src/share/vm/code/dependencies.cpp | ||
| 27 | --- openjdk/hotspot/src/share/vm/code/dependencies.cpp | ||
| 28 | +++ openjdk/hotspot/src/share/vm/code/dependencies.cpp | ||
| 29 | @@ -429,6 +429,12 @@ | ||
| 30 | Dependencies::write_dependency_to(log, dept, nargs, ciargs, witness); | ||
| 31 | } | ||
| 32 | |||
| 33 | +// disable format overflow checking for GCC versions > 7 because the lead to | ||
| 34 | +// a false positive in this case. | ||
| 35 | +// See https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html | ||
| 36 | +#if defined (__GNUC__) && __GNUC__ >= 7 | ||
| 37 | +#pragma GCC diagnostic ignored "-Wformat-overflow" | ||
| 38 | +#endif | ||
| 39 | void Dependencies::write_dependency_to(CompileLog* log, | ||
| 40 | DepType dept, | ||
| 41 | int nargs, ciObject* args[], | ||
diff --git a/recipes-core/icedtea/openjdk-7-release-03b147.inc b/recipes-core/icedtea/openjdk-7-release-03b147.inc index fe18ee5..484f124 100644 --- a/recipes-core/icedtea/openjdk-7-release-03b147.inc +++ b/recipes-core/icedtea/openjdk-7-release-03b147.inc | |||
| @@ -89,6 +89,7 @@ OPENJDK_PATCHES = " \ | |||
| 89 | file://icedtea-x11_extension_cleanup.patch;apply=no \ | 89 | file://icedtea-x11_extension_cleanup.patch;apply=no \ |
| 90 | file://icedtea-CVE-2014-1876-unpack.patch;apply=no \ | 90 | file://icedtea-CVE-2014-1876-unpack.patch;apply=no \ |
| 91 | file://icedtea-jdk-unzip.patch;apply=no \ | 91 | file://icedtea-jdk-unzip.patch;apply=no \ |
| 92 | file://icedtea-hotspot-handle-gcc7-format-overflow.patch;apply=no \ | ||
| 92 | " | 93 | " |
| 93 | 94 | ||
| 94 | OPENJDK_HEADLESS_PATCHES = " \ | 95 | OPENJDK_HEADLESS_PATCHES = " \ |
| @@ -111,6 +112,7 @@ export DISTRIBUTION_PATCHES = " \ | |||
| 111 | patches/icedtea-x11_extension_cleanup.patch \ | 112 | patches/icedtea-x11_extension_cleanup.patch \ |
| 112 | patches/icedtea-CVE-2014-1876-unpack.patch \ | 113 | patches/icedtea-CVE-2014-1876-unpack.patch \ |
| 113 | patches/icedtea-jdk-unzip.patch \ | 114 | patches/icedtea-jdk-unzip.patch \ |
| 115 | patches/icedtea-hotspot-handle-gcc7-format-overflow.patch \ | ||
| 114 | ${CLEAN_X11_DISTRIBUTION_PATCH} \ | 116 | ${CLEAN_X11_DISTRIBUTION_PATCH} \ |
| 115 | " | 117 | " |
| 116 | 118 | ||
