diff --git a/extra/java8-openjdk/JDK-8074312-hotspot.patch b/extra/java8-openjdk/JDK-8074312-hotspot.patch new file mode 100644 index 000000000..a4e3f607f --- /dev/null +++ b/extra/java8-openjdk/JDK-8074312-hotspot.patch @@ -0,0 +1,12 @@ +diff -r 61edd5c7412e make/linux/Makefile +--- a/make/linux/Makefile Mon Mar 02 18:12:06 2015 +0000 ++++ b/make/linux/Makefile Tue Mar 03 15:58:13 2015 +0100 +@@ -233,7 +233,7 @@ + # Solaris 2.5.1, 2.6). + # Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok. + +-SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 3% ++SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 3% 4% + OS_VERSION := $(shell uname -r) + EMPTY_IF_NOT_SUPPORTED = $(filter $(SUPPORTED_OS_VERSION),$(OS_VERSION)) + diff --git a/extra/java8-openjdk/JVM_fastdebug_build_compiled_with_GCC_5_asserts_with_widen_increases.patch b/extra/java8-openjdk/JVM_fastdebug_build_compiled_with_GCC_5_asserts_with_widen_increases.patch new file mode 100644 index 000000000..f6bd4ae98 --- /dev/null +++ b/extra/java8-openjdk/JVM_fastdebug_build_compiled_with_GCC_5_asserts_with_widen_increases.patch @@ -0,0 +1,46 @@ + +# HG changeset patch +# User sgehwolf +# Date 1430335428 25200 +# Node ID 2a55e4998f0d28c7003a8a0f43d2c7602d89f54b +# Parent cd8fe1a9205aedb6b5a1fc16e664412e48aee565 +8078666: JVM fastdebug build compiled with GCC 5 asserts with "widen increases" +Summary: do the math on the unsigned type where overflows are well defined +Reviewed-by: kvn, aph + +diff -r cd8fe1a9205a -r 2a55e4998f0d src/share/vm/opto/type.cpp +--- a/src/share/vm/opto/type.cpp Wed Jun 10 20:15:29 2015 -0400 ++++ b/src/share/vm/opto/type.cpp Wed Apr 29 12:23:48 2015 -0700 +@@ -1180,11 +1180,11 @@ + // Certain normalizations keep us sane when comparing types. + // The 'SMALLINT' covers constants and also CC and its relatives. + if (lo <= hi) { +- if ((juint)(hi - lo) <= SMALLINT) w = Type::WidenMin; +- if ((juint)(hi - lo) >= max_juint) w = Type::WidenMax; // TypeInt::INT ++ if (((juint)hi - lo) <= SMALLINT) w = Type::WidenMin; ++ if (((juint)hi - lo) >= max_juint) w = Type::WidenMax; // TypeInt::INT + } else { +- if ((juint)(lo - hi) <= SMALLINT) w = Type::WidenMin; +- if ((juint)(lo - hi) >= max_juint) w = Type::WidenMin; // dual TypeInt::INT ++ if (((juint)lo - hi) <= SMALLINT) w = Type::WidenMin; ++ if (((juint)lo - hi) >= max_juint) w = Type::WidenMin; // dual TypeInt::INT + } + return w; + } +@@ -1438,11 +1438,11 @@ + // Certain normalizations keep us sane when comparing types. + // The 'SMALLINT' covers constants. + if (lo <= hi) { +- if ((julong)(hi - lo) <= SMALLINT) w = Type::WidenMin; +- if ((julong)(hi - lo) >= max_julong) w = Type::WidenMax; // TypeLong::LONG ++ if (((julong)hi - lo) <= SMALLINT) w = Type::WidenMin; ++ if (((julong)hi - lo) >= max_julong) w = Type::WidenMax; // TypeLong::LONG + } else { +- if ((julong)(lo - hi) <= SMALLINT) w = Type::WidenMin; +- if ((julong)(lo - hi) >= max_julong) w = Type::WidenMin; // dual TypeLong::LONG ++ if (((julong)lo - hi) <= SMALLINT) w = Type::WidenMin; ++ if (((julong)lo - hi) >= max_julong) w = Type::WidenMin; // dual TypeLong::LONG + } + return w; + } + diff --git a/extra/java8-openjdk/PKGBUILD b/extra/java8-openjdk/PKGBUILD index 6c57bdfb1..eb6ab3316 100644 --- a/extra/java8-openjdk/PKGBUILD +++ b/extra/java8-openjdk/PKGBUILD @@ -13,6 +13,7 @@ # - adjust doc package to use linux-${_DOC_ARCH}-normal-zero-release instead of normal-server-release # - patch for zero +# Package 'openjfx' must be updated when this one is pkgname=('jre8-openjdk-headless' 'jre8-openjdk' 'jdk8-openjdk' 'openjdk8-src' 'openjdk8-doc') pkgbase=java8-openjdk _java_ver=8 @@ -37,7 +38,10 @@ source=(jdk8u-${_repo_ver}.tar.gz::${_url_src}/archive/${_repo_ver}.tar.gz jaxp-${_repo_ver}.tar.gz::${_url_src}/jaxp/archive/${_repo_ver}.tar.gz langtools-${_repo_ver}.tar.gz::${_url_src}/langtools/archive/${_repo_ver}.tar.gz nashorn-${_repo_ver}.tar.gz::${_url_src}/nashorn/archive/${_repo_ver}.tar.gz - zero-interpreter-fix.patch) + JDK-8074312-hotspot.patch + JVM_fastdebug_build_compiled_with_GCC_5_asserts_with_widen_increases.patch + zero-interpreter-fix.patch + rhbz1206656_fix_current_stack_pointer.patch) sha256sums=('02eab2b937ed83c4505e93f58ad0b84a4e1a69e6d0baa4d041ec09ed98f18c2d' '00d783dda3a7d87eb55a72febe7666c4b3297616ef3f11bbd679a05f19a81825' @@ -47,7 +51,10 @@ sha256sums=('02eab2b937ed83c4505e93f58ad0b84a4e1a69e6d0baa4d041ec09ed98f18c2d' '5d6faf6c726392212659cebd93fdbf89a11b86bab60f5b220493d9d8e7ff0686' '3171ec4dbd96747eeb876a8fd3caf1e1e52da3dc91b63308193c914a5501d6e4' 'ffdd0446fce7b624f2cdc80297b99eecfdf30adfee39d3b8832a78c1dc202636' - 'ed2968406c6b05e7438a0ed7cb2b6041ddce369cbcedff11fd7563c8350e0e67') + '95fbd155806cac22de9e6df6f4f92ae79530f86d63cea1deaf98e607953e0b50' + '8df4d5d78753ebc5bc425fd1c8fe788106ac8b9d3155feb162a748a96c81cc05' + 'ed2968406c6b05e7438a0ed7cb2b6041ddce369cbcedff11fd7563c8350e0e67' + '85d396e1663514390e73b0b072a5f93c51ca6e324ee0a08aa2ace599e3df83bf') case "${CARCH}" in 'x86_64') _JARCH=amd64 ; _DOC_ARCH=x86_64 ;; @@ -72,8 +79,15 @@ prepare() { ln -s ../${subrepo}-${_repo_ver} ${subrepo} done - cd ../hotspot-${_repo_ver} + cd "${srcdir}/hotspot-${_repo_ver}" + # https://bugs.openjdk.java.net/browse/JDK-8074312 + patch -p1 < "${srcdir}"/JDK-8074312-hotspot.patch + # https://bugs.archlinux.org/task/45386 + # https://bugs.openjdk.java.net/browse/JDK-8078666 + patch -p1 < "${srcdir}"/JVM_fastdebug_build_compiled_with_GCC_5_asserts_with_widen_increases.patch + patch -p2 -i ../zero-interpreter-fix.patch + patch -p2 -i ../rhbz1206656_fix_current_stack_pointer.patch } build() { @@ -201,7 +215,8 @@ package_jre8-openjdk() { depends=("jre8-openjdk-headless=${pkgver}-${pkgrel}" 'xdg-utils' 'hicolor-icon-theme') optdepends=('icedtea-web: web browser plugin + Java Web Start' 'alsa-lib: for basic sound support' - 'gtk2: for the Gtk+ look and feel - desktop usage') + 'gtk2: for the Gtk+ look and feel - desktop usage' + 'java-openjfx: for JavaFX GUI components support') # TODO when adding IcedTea: 'giflib: for gif format support' # TODO when adding IcedTea: 'libpulse: for advanced sound support' provides=('java-runtime=8' 'java-runtime-openjdk=8') diff --git a/extra/java8-openjdk/rhbz1206656_fix_current_stack_pointer.patch b/extra/java8-openjdk/rhbz1206656_fix_current_stack_pointer.patch new file mode 100644 index 000000000..dbefaefc4 --- /dev/null +++ b/extra/java8-openjdk/rhbz1206656_fix_current_stack_pointer.patch @@ -0,0 +1,14 @@ +diff --git a/src/os_cpu/linux_zero/vm/os_linux_zero.cpp b/src/os_cpu/linux_zero/vm/os_linux_zero.cpp +--- jdk8/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp ++++ jdk8/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp +@@ -55,8 +55,8 @@ + #include "utilities/vmError.hpp" + + address os::current_stack_pointer() { +- address dummy = (address) &dummy; +- return dummy; ++ // return the address of the current function ++ return (address)__builtin_frame_address(0); + } + + frame os::get_sender_for_C_frame(frame* fr) {