aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Frankenberger <simon@fraho.eu>2020-11-10 19:53:58 +0100
committerMilan P. Stanić <mps@arvanta.net>2020-12-03 22:06:07 +0000
commit2b5a03e8893abfc7aabba2bbabb5574035c6042d (patch)
tree26bdf98597b814f0466ef1c2f61ddb25802eee5f
parent39a770c14786c887c44b4bc48174071a7531ec15 (diff)
downloadaports-2b5a03e8893abfc7aabba2bbabb5574035c6042d.tar.gz
aports-2b5a03e8893abfc7aabba2bbabb5574035c6042d.tar.bz2
aports-2b5a03e8893abfc7aabba2bbabb5574035c6042d.tar.xz
community/openjdk14: unify patches
-rw-r--r--testing/openjdk14/APKBUILD16
-rw-r--r--testing/openjdk14/Alpine_Bug_10126.java2
-rw-r--r--testing/openjdk14/JDK-8245051.patch72
-rw-r--r--testing/openjdk14/aarch64.patch7
-rw-r--r--testing/openjdk14/build.patch13
-rw-r--r--testing/openjdk14/fix-bootjdk-check.patch4
-rw-r--r--testing/openjdk14/gcc10-compilation-fix.patch108
-rw-r--r--testing/openjdk14/ppc64le.patch12
8 files changed, 219 insertions, 15 deletions
diff --git a/testing/openjdk14/APKBUILD b/testing/openjdk14/APKBUILD
index 00098ba34d..d776a545d2 100644
--- a/testing/openjdk14/APKBUILD
+++ b/testing/openjdk14/APKBUILD
@@ -3,7 +3,7 @@
pkgname=openjdk14
pkgver=14.0.2_p12
_pkgver=${pkgver%_p*}-ga
-pkgrel=0
+pkgrel=1
pkgdesc="Oracle OpenJDK 14"
url="https://hg.openjdk.java.net/jdk-updates/jdk14u"
arch="all !x86 !armhf !armv7 !mips !mips64" # oracle dropped support for 32 bit
@@ -47,6 +47,8 @@ source="jdk-$_pkgver.tar.gz::https://github.com/openjdk/jdk14u/archive/jdk-$_pkg
aarch64.patch
ppc64le.patch
fix-bootjdk-check.patch
+ gcc10-compilation-fix.patch
+ JDK-8245051.patch
HelloWorld.java
TestECDSA.java
@@ -282,11 +284,13 @@ _jdk() {
}
sha512sums="e76b7908e7b1375029564d39386c86b640fcb61c7152bdda7249a6455516792830f17e987c98790ae5983087b928be6f5d572b8b10f3e2318d2d993f5f22ed62 jdk-14.0.2-ga.tar.gz
-f6935b7ec3a9245329dff11b26aa8e7367b3fbece11803e9aef17ed7ff4ab7c8a4aa31efda624ff9f80947240f2842ba50ccefa38593c38b8ba739fc2c00db62 build.patch
-79f0c799ceb75e2d797942de895cb3e6d853def39f5145886796864f38d240ceab3bc09f04c6703fc73ced4827d07a316049976c9ec660986372097d4eed79f4 aarch64.patch
-5950cce461bc4c6b0fe45ee3d1bca8d1cb6f227800aa694c3b9a9c094d3fc17e27ae6c15d15d14f7964237ef027a886ab25d6338a871e3472744a99ebde16017 ppc64le.patch
-e54c69db6e97c9d7057275f6749565a748f42dadb397b2f3975d99608c4037ad93c84cf828c7e2955b1b4f1899dcc25069c8c6d675f1e963adf3f1223a47d56c fix-bootjdk-check.patch
+c2da2d73f47c71768028a31282438389ef4f06d0985b8c4d769487745bd14ce65fbb430a2f420eb6dba8af7a69927f0e8cba285c7e0b17bde234357792534ba7 build.patch
+f7fd94b04740e2a3f966577a5c02f7d6db38ef0ab3ef7b3183cd3ba3d8ff7304e3151fba03a4bcbb9f82f380a723d7823794e168ebf9f2fa8d5e7a9dbc895ce9 aarch64.patch
+a02b35842c71ee5513d24e82b4edcda4943af6aaa54188775d2a36e9e70d35d16823df92df6390ceee222a1a7661ac6116e6edaf5c67bfe239efb15eb6457f57 ppc64le.patch
+a916200ffdd4e4be0233fa020a30f4b0aabb92dc1956ce75e4372afc6fb22cad8333770d5381086e91c1ed4159a9620a37de3e5b175c8f025ec9040ad016fce2 fix-bootjdk-check.patch
+32dbebd5d2f6741e9917af89ec86308dbd766dfb24ddee6f42bfe8b68a4d82c5dd886a061147c3aab75c8092b30c93aec49737458716c7af8900d5d73dfb0567 gcc10-compilation-fix.patch
+0254dae7aef9bd6c4e19ac3c31f0b7bf8f818ead8858b1cd4e29e4572a5b0932de1ba498ba2c60a03dce77da235fdad23e7a4be5bea298bba3951752d313d1b4 JDK-8245051.patch
d1767dddd8e0956e25c0f77ed45c6fc86a1191bae1704a6dc33be490fd20eaa50461fe5c2a3349512059d555651e2eb41437dd3c1096c351e8ee68b4534a2579 HelloWorld.java
27e91edef89d26c0c5b9a813e2045f8d2b348745a506ae37b34b660fa7093da9a4e0e676ea41dc4a5c901bce02e5304d95e90f68d6c99cbf461b2da40a7a9853 TestECDSA.java
b02dff8d549f88317bb4c741a9e269e8d59eef990197d085388fc49c7423a4eb9367dbe1e02bffb10e7862f5980301eb58d4494e177d0e8f60af6b05c7fbbe60 TestCryptoLevel.java
-fadd06c034614a25537246dfd66a4645c2a4c673f16b5d3e8abdd89c81baf04bd2797b26b0e589ec11ee08b90783b232a6d06c72589d211a5e10b8638a627911 Alpine_Bug_10126.java"
+cc466f64fcc8762cf6e3c1f5739be6425209b27aa58acff4e7eb126003d61fa18266f0e79e57e9d84224654010185ab45dc0a8043543dea227258458a00a1eb1 Alpine_Bug_10126.java"
diff --git a/testing/openjdk14/Alpine_Bug_10126.java b/testing/openjdk14/Alpine_Bug_10126.java
index 76574a1509..a381c9ed70 100644
--- a/testing/openjdk14/Alpine_Bug_10126.java
+++ b/testing/openjdk14/Alpine_Bug_10126.java
@@ -1,6 +1,6 @@
public class Alpine_Bug_10126 {
public static void main(String[] args) throws Exception {
- try (java.net.Socket sock = javax.net.ssl.SSLSocketFactory.getDefault().createSocket("bugs.alpinelinux.org", 443);
+ try (java.net.Socket sock = javax.net.ssl.SSLSocketFactory.getDefault().createSocket("gitlab.alpinelinux.org", 443);
java.io.InputStream in = sock.getInputStream();
java.io.OutputStream out = sock.getOutputStream()) {
out.write("GET / HTTP/1.0\n\nHost: gitlab.alpinelinux.org\n\nConnection: close\n\n\n\n".getBytes());
diff --git a/testing/openjdk14/JDK-8245051.patch b/testing/openjdk14/JDK-8245051.patch
new file mode 100644
index 0000000000..c4d10fb883
--- /dev/null
+++ b/testing/openjdk14/JDK-8245051.patch
@@ -0,0 +1,72 @@
+From 612c38cdc92a3e169fe83846920407d50263044a Mon Sep 17 00:00:00 2001
+From: Xin Liu <xliu@openjdk.org>
+Date: Wed, 20 May 2020 11:29:11 -0700
+Subject: [PATCH] 8245051: c1 is broken if it is compiled by gcc without
+ -fno-lifetime-dse
+
+Initialize BlockBegin block id in constructor rather than operator new
+
+Reviewed-by: kbarrett, thartmann
+---
+ src/hotspot/share/c1/c1_Instruction.hpp | 7 ++-----
+ src/hotspot/share/c1/c1_ValueMap.cpp | 1 +
+ 2 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/src/hotspot/share/c1/c1_Instruction.hpp b/src/hotspot/share/c1/c1_Instruction.hpp
+index 09644580f2a..9716d4d00ec 100644
+--- a/src/hotspot/share/c1/c1_Instruction.hpp
++++ b/src/hotspot/share/c1/c1_Instruction.hpp
+@@ -303,7 +303,6 @@ class Instruction: public CompilationResourceObj {
+ XHandlers* _exception_handlers; // Flat list of exception handlers covering this instruction
+
+ friend class UseCountComputer;
+- friend class BlockBegin;
+
+ void update_exception_state(ValueStack* state);
+
+@@ -349,7 +348,6 @@ class Instruction: public CompilationResourceObj {
+ void* operator new(size_t size) throw() {
+ Compilation* c = Compilation::current();
+ void* res = c->arena()->Amalloc(size);
+- ((Instruction*)res)->_id = c->get_next_id();
+ return res;
+ }
+
+@@ -410,7 +408,7 @@ class Instruction: public CompilationResourceObj {
+
+ // creation
+ Instruction(ValueType* type, ValueStack* state_before = NULL, bool type_is_constant = false)
+- :
++ : _id(Compilation::current()->get_next_id()),
+ #ifndef PRODUCT
+ _printable_bci(-99),
+ #endif
+@@ -1649,8 +1647,6 @@ LEAF(BlockBegin, StateSplit)
+ void* operator new(size_t size) throw() {
+ Compilation* c = Compilation::current();
+ void* res = c->arena()->Amalloc(size);
+- ((BlockBegin*)res)->_id = c->get_next_id();
+- ((BlockBegin*)res)->_block_id = c->get_next_block_id();
+ return res;
+ }
+
+@@ -1662,6 +1658,7 @@ LEAF(BlockBegin, StateSplit)
+ // creation
+ BlockBegin(int bci)
+ : StateSplit(illegalType)
++ , _block_id(Compilation::current()->get_next_block_id())
+ , _bci(bci)
+ , _depth_first_number(-1)
+ , _linear_scan_number(-1)
+diff --git a/src/hotspot/share/c1/c1_ValueMap.cpp b/src/hotspot/share/c1/c1_ValueMap.cpp
+index 88ee5fe72b7..016ea3c99c0 100644
+--- a/src/hotspot/share/c1/c1_ValueMap.cpp
++++ b/src/hotspot/share/c1/c1_ValueMap.cpp
+@@ -488,6 +488,7 @@ GlobalValueNumbering::GlobalValueNumbering(IR* ir)
+ : _compilation(ir->compilation())
+ , _current_map(NULL)
+ , _value_maps(ir->linear_scan_order()->length(), ir->linear_scan_order()->length(), NULL)
++ , _has_substitutions(false)
+ {
+ TRACE_VALUE_NUMBERING(tty->print_cr("****** start of global value numbering"));
+
diff --git a/testing/openjdk14/aarch64.patch b/testing/openjdk14/aarch64.patch
index ef66adc001..3f088dd9cc 100644
--- a/testing/openjdk14/aarch64.patch
+++ b/testing/openjdk14/aarch64.patch
@@ -1,4 +1,9 @@
-The header is not present with musl and including is not needed
+Subject: Remove fpu_control.h include
+Upstream: No
+Author: Simon Frankenberger <simon-alpine@fraho.eu>
+
+The header is not present with musl and including it results in build error.
+It's not needed anyways.
--- old/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp
+++ new/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp
diff --git a/testing/openjdk14/build.patch b/testing/openjdk14/build.patch
index df4a9143f1..48c65d1c87 100644
--- a/testing/openjdk14/build.patch
+++ b/testing/openjdk14/build.patch
@@ -1,5 +1,10 @@
-This patch contains mainly code from the portola project.
-Adopted, enhanced and fixed so that it actually compiles with alpine.
+Subject: Fix compilation issues with musl libc
+Upstream: No
+Author: The portola team at https://openjdk.java.net/projects/portola/
+ With modifications by Simon Frankenberger <simon-alpine@fraho.eu>
+
+This giant patch makes it possible to compile openjdk with musl libc.
+The base was taken from a diff with the portola project and adjusted for latest musl libc.
--- old/make/ReleaseFile.gmk
+++ new/make/ReleaseFile.gmk
@@ -331,7 +336,7 @@ Adopted, enhanced and fixed so that it actually compiles with alpine.
void *run_java_overflow (void *p) {
JNIEnv *env;
jclass class_id;
-@@ -254,13 +269,19 @@
+@@ -258,13 +273,19 @@
exit(7);
}
@@ -352,7 +357,7 @@ Adopted, enhanced and fixed so that it actually compiles with alpine.
pthread_join (thr, NULL);
printf("Testing stack guard page behaviour for initial thread\n");
-@@ -273,7 +294,7 @@
+@@ -277,7 +298,7 @@
printf("\nTesting NATIVE_OVERFLOW\n");
printf("Testing stack guard page behaviour for other thread\n");
diff --git a/testing/openjdk14/fix-bootjdk-check.patch b/testing/openjdk14/fix-bootjdk-check.patch
index c9d91f9d2a..9f62757546 100644
--- a/testing/openjdk14/fix-bootjdk-check.patch
+++ b/testing/openjdk14/fix-bootjdk-check.patch
@@ -1,3 +1,7 @@
+Subject: Fix detection of bootjdk on configure
+Upstream: No
+Author: Simon Frankenberger <simon-alpine@fraho.eu>
+
The alpine builders print out a warning about sched_getaffinity() not working.
This causes the version check for the boot jdk to fail.
Patch the command to determine the version number to ignore any errors and warnings.
diff --git a/testing/openjdk14/gcc10-compilation-fix.patch b/testing/openjdk14/gcc10-compilation-fix.patch
new file mode 100644
index 0000000000..d3f9e1bb8a
--- /dev/null
+++ b/testing/openjdk14/gcc10-compilation-fix.patch
@@ -0,0 +1,108 @@
+Subject: Fix build error with gcc >= 10.0
+Upstream: Yes
+Upstream-Url: https://bugs.openjdk.java.net/browse/JDK-8235903
+Author: Simon Frankenberger <simon-alpine@fraho.eu>
+
+This is a backport of the fixes to make it compile with gcc10 again.
+
+--- old/src/java.base/unix/native/libjava/childproc.c
++++ new/src/java.base/unix/native/libjava/childproc.c
+@@ -34,6 +34,7 @@
+
+ #include "childproc.h"
+
++const char * const *parentPathv;
+
+ ssize_t
+ restartableWrite(int fd, const void *buf, size_t count)
+--- old/src/java.base/unix/native/libjava/childproc.h
++++ new/src/java.base/unix/native/libjava/childproc.h
+@@ -126,7 +126,7 @@
+ * The cached and split version of the JDK's effective PATH.
+ * (We don't support putenv("PATH=...") in native code)
+ */
+-const char * const *parentPathv;
++extern const char * const *parentPathv;
+
+ ssize_t restartableWrite(int fd, const void *buf, size_t count);
+ int restartableDup2(int fd_from, int fd_to);
+--- old/src/java.security.jgss/share/native/libj2gss/NativeFunc.c
++++ new/src/java.security.jgss/share/native/libj2gss/NativeFunc.c
+@@ -27,6 +27,9 @@
+ #include <stdlib.h>
+ #include "NativeFunc.h"
+
++/* global GSS function table */
++GSS_FUNCTION_TABLE_PTR ftab;
++
+ /* standard GSS method names (ordering is from mapfile) */
+ static const char RELEASE_NAME[] = "gss_release_name";
+ static const char IMPORT_NAME[] = "gss_import_name";
+--- old/src/java.security.jgss/share/native/libj2gss/NativeFunc.h
++++ new/src/java.security.jgss/share/native/libj2gss/NativeFunc.h
+@@ -277,6 +277,6 @@
+ typedef GSS_FUNCTION_TABLE *GSS_FUNCTION_TABLE_PTR;
+
+ /* global GSS function table */
+-GSS_FUNCTION_TABLE_PTR ftab;
++extern GSS_FUNCTION_TABLE_PTR ftab;
+
+ #endif
+--- /dev/null
++++ new/src/jdk.sctp/unix/native/libsctp/Sctp.c
+@@ -0,0 +1,34 @@
++/*
++ * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++#include "Sctp.h"
++
++sctp_getladdrs_func* nio_sctp_getladdrs;
++sctp_freeladdrs_func* nio_sctp_freeladdrs;
++sctp_getpaddrs_func* nio_sctp_getpaddrs;
++sctp_freepaddrs_func* nio_sctp_freepaddrs;
++sctp_bindx_func* nio_sctp_bindx;
++sctp_peeloff_func* nio_sctp_peeloff;
++
+--- old/src/jdk.sctp/unix/native/libsctp/Sctp.h
++++ new/src/jdk.sctp/unix/native/libsctp/Sctp.h
+@@ -322,12 +322,12 @@
+
+ #endif /* __linux__ */
+
+-sctp_getladdrs_func* nio_sctp_getladdrs;
+-sctp_freeladdrs_func* nio_sctp_freeladdrs;
+-sctp_getpaddrs_func* nio_sctp_getpaddrs;
+-sctp_freepaddrs_func* nio_sctp_freepaddrs;
+-sctp_bindx_func* nio_sctp_bindx;
+-sctp_peeloff_func* nio_sctp_peeloff;
++extern sctp_getladdrs_func* nio_sctp_getladdrs;
++extern sctp_freeladdrs_func* nio_sctp_freeladdrs;
++extern sctp_getpaddrs_func* nio_sctp_getpaddrs;
++extern sctp_freepaddrs_func* nio_sctp_freepaddrs;
++extern sctp_bindx_func* nio_sctp_bindx;
++extern sctp_peeloff_func* nio_sctp_peeloff;
+
+ jboolean loadSocketExtensionFuncs(JNIEnv* env);
+
diff --git a/testing/openjdk14/ppc64le.patch b/testing/openjdk14/ppc64le.patch
index 1ef007cb48..91e6f39718 100644
--- a/testing/openjdk14/ppc64le.patch
+++ b/testing/openjdk14/ppc64le.patch
@@ -1,5 +1,11 @@
-The ucontext_t-Type is somewhat different with musl libc.
-Add some precompiler conditions to use the right fields from the struct.
+Subject: Fix compilation with different ucontext_t on musl
+Upstream: No
+Author: Simon Frankenberger <simon-alpine@fraho.eu>
+
+The machine state registers have to be accessed differently when
+running on musl libc. This patch fix this by replacing
+"uc_mcontext.regs->grp" with "uc_mcontext.gp_regs"
+and accessing the named fields (like "->nip") by the array index constants.
--- old/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp
+++ new/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp
@@ -230,7 +236,7 @@ Add some precompiler conditions to use the right fields from the struct.
@@ -70,7 +79,11 @@
if (!Method::is_valid_method(m)) return false;
if (!Metaspace::contains(m->constMethod())) return false;
-
+
+#if defined(__GLIBC__) || defined(__UCLIBC__)
uint64_t reg_bcp = uc->uc_mcontext.regs->gpr[14/*R14_bcp*/];
+#else // Musl