Hello community, here is the log from the commit of package java-16-openjdk for openSUSE:Factory checked in at 2020-12-04 21:28:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/java-16-openjdk (Old) and /work/SRC/openSUSE:Factory/.java-16-openjdk.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "java-16-openjdk" Fri Dec 4 21:28:07 2020 rev:1 rq:852049 version:16.0.0.0~26 Changes: -------- New Changes file: --- /dev/null 2020-11-18 17:46:03.679371574 +0100 +++ /work/SRC/openSUSE:Factory/.java-16-openjdk.new.5913/java-16-openjdk.changes 2020-12-04 21:28:09.222096050 +0100 @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Mon Nov 30 08:31:25 UTC 2020 - Fridrich Strba <fst...@suse.com> + +- Initial packaging of OpenJDK tag jdk-16+26 as java-16-openjdk + technology preview New: ---- 0001-8256486-Linux-Windows-x86-builds-broken-after-JDK-82.patch 0001-8256986-PPC64-C2-crashes-when-accessing-nonexisting-.patch PStack-808293.patch TestCryptoLevel.java TestECDSA.java _constraints activation-JAF-1_2_0.tar.gz activation-module.patch adlc-parser.patch alternative-tzdb_dat.patch annotation-module.patch config.guess config.sub disable-doclint-by-default.patch fix_armv6_build.patch icedtea-sound-1.0.1-jdk9.patch icedtea-sound-1.0.1.tar.xz icedtea-sound-soundproperties.patch implicit-pointer-decl.patch java-16-openjdk.changes java-16-openjdk.spec java-atk-wrapper-0.33.2.tar.xz java-atk-wrapper-security.patch javax.annotation-1.3.2.tar.gz javax.xml.soap-1.4.0.tar.gz jaw-jdk10.patch jaw-misc.patch jaw-nogtk.patch jax-ws-spec-2.4.0.tar.gz jaxb-istack-commons-3.0.7-RELEASE.tar.gz jaxb-spec-2.4.0.tar.gz jaxb-v2-2.3.1.tar.gz jconsole.desktop.in jdk-16+26.tar.gz loadAssistiveTechnologies.patch memory-limits.patch metro-fi-1.2.15-RELEASE.tar.gz metro-stax-ex-1.8.tar.gz multiple-pkcs11-library-init.patch nss.cfg ppc_stack_overflow_fix.patch s390-java-opts.patch s390-size_t.patch system-pcsclite.patch systemtap-tapset.tar.xz zero-ranges.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ java-16-openjdk.spec ++++++ ++++ 1406 lines (skipped) ++++++ 0001-8256486-Linux-Windows-x86-builds-broken-after-JDK-82.patch ++++++ From 7c73fff34d987c3071a884ac0f74709c8f6dc01f Mon Sep 17 00:00:00 2001 From: Jorn Vernee <jver...@openjdk.org> Date: Wed, 25 Nov 2020 18:09:22 +0000 Subject: [PATCH] 8256486: Linux/Windows-x86 builds broken after JDK-8254231 Reviewed-by: shade --- src/hotspot/cpu/x86/assembler_x86.cpp | 38 +++++++++---------- src/hotspot/cpu/x86/macroAssembler_x86.cpp | 16 ++++---- src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp | 8 ++++ .../cpu/x86/universalNativeInvoker_x86_32.cpp | 34 +++++++++++++++++ ....cpp => universalNativeInvoker_x86_64.cpp} | 0 .../cpu/x86/universalUpcallHandler_x86_32.cpp | 30 +++++++++++++++ ....cpp => universalUpcallHandler_x86_64.cpp} | 0 src/hotspot/cpu/x86/x86_32.ad | 5 +++ .../share/prims/universalUpcallHandler.cpp | 16 ++++---- .../share/prims/universalUpcallHandler.hpp | 4 +- .../windows/native/libjava/jni_util_md.c | 2 +- .../jdk/incubator/foreign/libUpcallsJNI.c | 7 ++-- 12 files changed, 120 insertions(+), 40 deletions(-) create mode 100644 src/hotspot/cpu/x86/universalNativeInvoker_x86_32.cpp rename src/hotspot/cpu/x86/{universalNativeInvoker_x86.cpp => universalNativeInvoker_x86_64.cpp} (100%) create mode 100644 src/hotspot/cpu/x86/universalUpcallHandler_x86_32.cpp rename src/hotspot/cpu/x86/{universalUpcallHandler_x86.cpp => universalUpcallHandler_x86_64.cpp} (100%) diff --git a/src/hotspot/cpu/x86/assembler_x86.cpp b/src/hotspot/cpu/x86/assembler_x86.cpp index d538a2dbfe6..1d30c95b8ee 100644 --- a/src/hotspot/cpu/x86/assembler_x86.cpp +++ b/src/hotspot/cpu/x86/assembler_x86.cpp @@ -8040,6 +8040,25 @@ void Assembler::vzeroupper_uncached() { } } +void Assembler::fld_x(Address adr) { + InstructionMark im(this); + emit_int8((unsigned char)0xDB); + emit_operand32(rbp, adr); +} + +void Assembler::fstp_x(Address adr) { + InstructionMark im(this); + emit_int8((unsigned char)0xDB); + emit_operand32(rdi, adr); +} + +void Assembler::emit_operand32(Register reg, Address adr) { + assert(reg->encoding() < 8, "no extended registers"); + assert(!adr.base_needs_rex() && !adr.index_needs_rex(), "no extended registers"); + emit_operand(reg, adr._base, adr._index, adr._scale, adr._disp, + adr._rspec); +} + #ifndef _LP64 // 32bit only pieces of the assembler @@ -9860,25 +9879,6 @@ void Assembler::decq(Address dst) { emit_operand(rcx, dst); } -void Assembler::fld_x(Address adr) { - InstructionMark im(this); - emit_int8((unsigned char)0xDB); - emit_operand32(rbp, adr); -} - -void Assembler::fstp_x(Address adr) { - InstructionMark im(this); - emit_int8((unsigned char)0xDB); - emit_operand32(rdi, adr); -} - -void Assembler::emit_operand32(Register reg, Address adr) { - assert(reg->encoding() < 8, "no extended registers"); - assert(!adr.base_needs_rex() && !adr.index_needs_rex(), "no extended registers"); - emit_operand(reg, adr._base, adr._index, adr._scale, adr._disp, - adr._rspec); -} - void Assembler::fxrstor(Address src) { emit_int24(get_prefixq(src), 0x0F, (unsigned char)0xAE); emit_operand(as_Register(1), src); diff --git a/src/hotspot/cpu/x86/macroAssembler_x86.cpp b/src/hotspot/cpu/x86/macroAssembler_x86.cpp index 29605af4488..e26d9cd50f6 100644 --- a/src/hotspot/cpu/x86/macroAssembler_x86.cpp +++ b/src/hotspot/cpu/x86/macroAssembler_x86.cpp @@ -745,6 +745,10 @@ void MacroAssembler::pushptr(AddressLiteral src) { } } +void MacroAssembler::reset_last_Java_frame(bool clear_fp) { + reset_last_Java_frame(r15_thread, clear_fp); +} + void MacroAssembler::set_last_Java_frame(Register last_java_sp, Register last_java_fp, address last_java_pc) { @@ -2713,25 +2717,21 @@ void MacroAssembler::push_IU_state() { pusha(); } -void MacroAssembler::reset_last_Java_frame(bool clear_fp) { - reset_last_Java_frame(r15_thread, clear_fp); -} - void MacroAssembler::reset_last_Java_frame(Register java_thread, bool clear_fp) { // determine java_thread register if (!java_thread->is_valid()) { java_thread = rdi; get_thread(java_thread); } // we must set sp to zero to clear frame - movslq(Address(java_thread, JavaThread::last_Java_sp_offset()), NULL_WORD); + movptr(Address(java_thread, JavaThread::last_Java_sp_offset()), NULL_WORD); // must clear fp, so that compiled frames are not confused; it is // possible that we need it only for debugging if (clear_fp) { - movslq(Address(java_thread, JavaThread::last_Java_fp_offset()), NULL_WORD); + movptr(Address(java_thread, JavaThread::last_Java_fp_offset()), NULL_WORD); } // Always clear the pc because it could have been set by make_walkable() - movslq(Address(java_thread, JavaThread::last_Java_pc_offset()), NULL_WORD); - movslq(Address(java_thread, JavaThread::saved_rbp_address_offset()), NULL_WORD); + movptr(Address(java_thread, JavaThread::last_Java_pc_offset()), NULL_WORD); + movptr(Address(java_thread, JavaThread::saved_rbp_address_offset()), NULL_WORD); vzeroupper(); } diff --git a/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp b/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp index fd6c7ab5f70..4aaad790bba 100644 --- a/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp +++ b/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp @@ -2985,3 +2985,11 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const cha // frame_size_words or bytes?? return RuntimeStub::new_runtime_stub(name, &buffer, frame_complete, frame_size_words, oop_maps, true); } + +BufferBlob* SharedRuntime::make_native_invoker(address call_target, + int shadow_space_bytes, + const GrowableArray<VMReg>& input_registers, + const GrowableArray<VMReg>& output_registers) { + ShouldNotCallThis(); + return nullptr; +} diff --git a/src/hotspot/cpu/x86/universalNativeInvoker_x86_32.cpp b/src/hotspot/cpu/x86/universalNativeInvoker_x86_32.cpp new file mode 100644 index 00000000000..d3443107b72 --- /dev/null +++ b/src/hotspot/cpu/x86/universalNativeInvoker_x86_32.cpp @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020, 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. + * + * 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 "precompiled.hpp" +#include "prims/universalNativeInvoker.hpp" + +void ProgrammableInvoker::Generator::generate() { + Unimplemented(); +} + +address ProgrammableInvoker::generate_adapter(jobject jabi, jobject jlayout) { + Unimplemented(); + return nullptr; +} diff --git a/src/hotspot/cpu/x86/universalNativeInvoker_x86.cpp b/src/hotspot/cpu/x86/universalNativeInvoker_x86_64.cpp similarity index 100% rename from src/hotspot/cpu/x86/universalNativeInvoker_x86.cpp rename to src/hotspot/cpu/x86/universalNativeInvoker_x86_64.cpp diff --git a/src/hotspot/cpu/x86/universalUpcallHandler_x86_32.cpp b/src/hotspot/cpu/x86/universalUpcallHandler_x86_32.cpp new file mode 100644 index 00000000000..966ab750db0 --- /dev/null +++ b/src/hotspot/cpu/x86/universalUpcallHandler_x86_32.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020, 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. + * + * 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 "precompiled.hpp" +#include "prims/universalUpcallHandler.hpp" + +address ProgrammableUpcallHandler::generate_upcall_stub(jobject rec, jobject jabi, jobject jlayout) { + Unimplemented(); + return nullptr; +} diff --git a/src/hotspot/cpu/x86/universalUpcallHandler_x86.cpp b/src/hotspot/cpu/x86/universalUpcallHandler_x86_64.cpp similarity index 100% rename from src/hotspot/cpu/x86/universalUpcallHandler_x86.cpp rename to src/hotspot/cpu/x86/universalUpcallHandler_x86_64.cpp diff --git a/src/hotspot/cpu/x86/x86_32.ad b/src/hotspot/cpu/x86/x86_32.ad index e6b947e1c8f..f7a4e149251 100644 --- a/src/hotspot/cpu/x86/x86_32.ad +++ b/src/hotspot/cpu/x86/x86_32.ad @@ -311,6 +311,11 @@ int MachCallRuntimeNode::ret_addr_offset() { return sizeof_FFree_Float_Stack_All + 5 + pre_call_resets_size(); } +int MachCallNativeNode::ret_addr_offset() { + ShouldNotCallThis(); + return -1; +} + // // Compute padding required for nodes which need alignment // diff --git a/src/hotspot/share/prims/universalUpcallHandler.cpp b/src/hotspot/share/prims/universalUpcallHandler.cpp index 33ba631e616..9eff9f53c3f 100644 --- a/src/hotspot/share/prims/universalUpcallHandler.cpp +++ b/src/hotspot/share/prims/universalUpcallHandler.cpp @@ -33,34 +33,34 @@ extern struct JavaVM_ main_vm; -JNI_ENTRY(void, ProgrammableUpcallHandler::upcall_helper(JNIEnv* env, jobject rec, address buff)) +void ProgrammableUpcallHandler::upcall_helper(JavaThread* thread, jobject rec, address buff) { + JavaThread* THREAD = thread; + ThreadInVMfromNative tiv(THREAD); const UpcallMethod& upcall_method = instance().upcall_method; - ResourceMark rm(thread); + ResourceMark rm(THREAD); JavaValue result(T_VOID); JavaCallArguments args(2); // long = 2 slots args.push_jobject(rec); args.push_long((jlong) buff); - JavaCalls::call_static(&result, upcall_method.klass, upcall_method.name, upcall_method.sig, &args, thread); -JNI_END + JavaCalls::call_static(&result, upcall_method.klass, upcall_method.name, upcall_method.sig, &args, CATCH); +} void ProgrammableUpcallHandler::attach_thread_and_do_upcall(jobject rec, address buff) { Thread* thread = Thread::current_or_null(); bool should_detach = false; - JNIEnv* p_env = nullptr; if (thread == nullptr) { JavaVM_ *vm = (JavaVM *)(&main_vm); + JNIEnv* p_env = nullptr; // unused jint result = vm->functions->AttachCurrentThread(vm, (void**) &p_env, nullptr); guarantee(result == JNI_OK, "Could not attach thread for upcall. JNI error code: %d", result); should_detach = true; thread = Thread::current(); - } else { - p_env = thread->as_Java_thread()->jni_environment(); } - upcall_helper(p_env, rec, buff); + upcall_helper(thread->as_Java_thread(), rec, buff); if (should_detach) { JavaVM_ *vm = (JavaVM *)(&main_vm); diff --git a/src/hotspot/share/prims/universalUpcallHandler.hpp b/src/hotspot/share/prims/universalUpcallHandler.hpp index cbef1d8eb3b..6af2e405d63 100644 --- a/src/hotspot/share/prims/universalUpcallHandler.hpp +++ b/src/hotspot/share/prims/universalUpcallHandler.hpp @@ -27,6 +27,8 @@ #include "asm/codeBuffer.hpp" #include "prims/foreign_globals.hpp" +class JavaThread; + class ProgrammableUpcallHandler { private: static constexpr CodeBuffer::csize_t upcall_stub_size = 1024; @@ -41,7 +43,7 @@ private: static const ProgrammableUpcallHandler& instance(); - static void upcall_helper(JNIEnv* env, jobject rec, address buff); + static void upcall_helper(JavaThread* thread, jobject rec, address buff); static void attach_thread_and_do_upcall(jobject rec, address buff); public: static address generate_upcall_stub(jobject rec, jobject abi, jobject buffer_layout); diff --git a/src/java.base/windows/native/libjava/jni_util_md.c b/src/java.base/windows/native/libjava/jni_util_md.c index 47c5e5ebc01..a4186286e7a 100644 --- a/src/java.base/windows/native/libjava/jni_util_md.c +++ b/src/java.base/windows/native/libjava/jni_util_md.c @@ -49,7 +49,7 @@ void* findEntryInProcess(const char* name) { // first come, first served if (EnumProcessModules(hProcess, hMods, sizeof(hMods), &cbNeeded)) { - for (int i = 0; i < (cbNeeded / sizeof(HMODULE)); i++) { + for (size_t i = 0; i < (cbNeeded / sizeof(HMODULE)); i++) { HMODULE mod = hMods[i]; FARPROC proc = GetProcAddress(mod, name); if(proc != NULL) { diff --git a/test/micro/org/openjdk/bench/jdk/incubator/foreign/libUpcallsJNI.c b/test/micro/org/openjdk/bench/jdk/incubator/foreign/libUpcallsJNI.c index 8a4e16268a5..bf946891578 100644 --- a/test/micro/org/openjdk/bench/jdk/incubator/foreign/libUpcallsJNI.c +++ b/test/micro/org/openjdk/bench/jdk/incubator/foreign/libUpcallsJNI.c @@ -22,6 +22,7 @@ */ #include <jni.h> #include <stdlib.h> +#include "jlong.h" void blank(void (*cb)(void)) { cb(); @@ -67,17 +68,17 @@ JNIEXPORT jlong JNICALL Java_org_openjdk_bench_jdk_incubator_foreign_Upcalls_mak (*env)->ReleaseStringUTFChars(env, methodName, methodNameC); (*env)->ReleaseStringUTFChars(env, descriptor, descriptorC); - return (jlong) cb; + return ptr_to_jlong(cb); } JNIEXPORT void JNICALL Java_org_openjdk_bench_jdk_incubator_foreign_Upcalls_blank (JNIEnv *env, jclass cls, jlong cb) { - JNICB jniCb = (JNICB) cb; + JNICB jniCb = jlong_to_ptr(cb); (*env)->CallStaticVoidMethod(env, jniCb->holder, jniCb->mid); } JNIEXPORT jint JNICALL Java_org_openjdk_bench_jdk_incubator_foreign_Upcalls_identity (JNIEnv *env, jclass cls, jint x, jlong cb) { - JNICB jniCb = (JNICB) cb; + JNICB jniCb = jlong_to_ptr(cb); return (*env)->CallStaticIntMethod(env, jniCb->holder, jniCb->mid, x); } -- 2.29.2 ++++++ 0001-8256986-PPC64-C2-crashes-when-accessing-nonexisting-.patch ++++++ From d51e2ab219ad50ffd3646d6cca227e3d71f05c55 Mon Sep 17 00:00:00 2001 From: Martin Doerr <mdo...@openjdk.org> Date: Fri, 27 Nov 2020 15:43:52 +0000 Subject: [PATCH] 8256986: [PPC64] C2 crashes when accessing nonexisting jvms of CallLeafDirectNode Reviewed-by: clanger --- src/hotspot/cpu/ppc/ppc.ad | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/hotspot/cpu/ppc/ppc.ad b/src/hotspot/cpu/ppc/ppc.ad index f9f5852a0a9..339242195f5 100644 --- a/src/hotspot/cpu/ppc/ppc.ad +++ b/src/hotspot/cpu/ppc/ppc.ad @@ -1115,11 +1115,17 @@ int MachCallDynamicJavaNode::ret_addr_offset() { } int MachCallRuntimeNode::ret_addr_offset() { + if (rule() == CallRuntimeDirect_rule) { + // CallRuntimeDirectNode uses call_c. #if defined(ABI_ELFv2) - return 28; + return 28; #else - return 40; + return 40; #endif + } + assert(rule() == CallLeafDirect_rule, "unexpected node with rule %u", rule()); + // CallLeafDirectNode uses bl. + return 4; } int MachCallNativeNode::ret_addr_offset() { @@ -3578,6 +3584,7 @@ encode %{ call->_tf = _tf; call->_entry_point = _entry_point; call->_cnt = _cnt; + call->_guaranteed_safepoint = true; call->_oop_map = _oop_map; call->_jvms = _jvms; call->_jvmadj = _jvmadj; @@ -3778,6 +3785,7 @@ encode %{ call->_tf = _tf; call->_entry_point = _entry_point; call->_cnt = _cnt; + call->_guaranteed_safepoint = false; call->_oop_map = _oop_map; guarantee(!_jvms, "You must clone the jvms and adapt the offsets by fix_jvms()."); call->_jvms = NULL; @@ -3785,7 +3793,6 @@ encode %{ call->_in_rms = _in_rms; call->_nesting = _nesting; - // New call needs all inputs of old call. // Req... for (uint i = 0; i < req(); ++i) { -- 2.29.2 ++++++ PStack-808293.patch ++++++ --- jdk10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/PStack.java 2016-01-21 19:16:09.000000000 +0100 +++ jdk10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/PStack.java 2016-01-29 15:49:47.815913736 +0100 @@ -88,7 +89,8 @@ if (jthread != null) { jthread.printThreadInfoOn(out); } - while (f != null) { + int maxStack = 256; + while (f != null && maxStack-- > 0) { ClosestSymbol sym = f.closestSymbolToPC(); Address pc = f.pc(); out.print(pc + "\t"); @@ -158,10 +160,19 @@ } } } + Address oldPC = f.pc(); + Address oldFP = f.localVariableBase(); f = f.sender(th); + if (f != null + && oldPC.equals(f.pc()) + && oldFP.equals(f.localVariableBase())) { + // We didn't make any progress + f = null; + } } } catch (Exception exp) { - exp.printStackTrace(); + // exp.printStackTrace(); + out.println("bad stack: " + exp); // continue, may be we can do a better job for other threads } if (concurrentLocks) { ++++++ TestCryptoLevel.java ++++++ /* TestCryptoLevel -- Ensure unlimited crypto policy is in use. Copyright (C) 2012 Red Hat, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.InvocationTargetException; import java.security.Permission; import java.security.PermissionCollection; public class TestCryptoLevel { public static void main(String[] args) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InvocationTargetException { Class<?> cls = null; Method def = null, exempt = null; try { cls = Class.forName("javax.crypto.JceSecurity"); } catch (ClassNotFoundException ex) { System.err.println("Running a non-Sun JDK."); System.exit(0); } try { def = cls.getDeclaredMethod("getDefaultPolicy"); exempt = cls.getDeclaredMethod("getExemptPolicy"); } catch (NoSuchMethodException ex) { System.err.println("Running IcedTea with the original crypto patch."); System.exit(0); } def.setAccessible(true); exempt.setAccessible(true); PermissionCollection defPerms = (PermissionCollection) def.invoke(null); PermissionCollection exemptPerms = (PermissionCollection) exempt.invoke(null); Class<?> apCls = Class.forName("javax.crypto.CryptoAllPermission"); Field apField = apCls.getDeclaredField("INSTANCE"); apField.setAccessible(true); Permission allPerms = (Permission) apField.get(null); if (defPerms.implies(allPerms) && (exemptPerms == null || exemptPerms.implies(allPerms))) { System.err.println("Running with the unlimited policy."); System.exit(0); } else { System.err.println("WARNING: Running with a restricted crypto policy."); System.exit(-1); } } } ++++++ TestECDSA.java ++++++ /* TestECDSA -- Ensure ECDSA signatures are working. Copyright (C) 2016 Red Hat, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ import java.math.BigInteger; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.Signature; /** * @test */ public class TestECDSA { public static void main(String[] args) throws Exception { KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC"); KeyPair key = keyGen.generateKeyPair(); byte[] data = "This is a string to sign".getBytes("UTF-8"); Signature dsa = Signature.getInstance("NONEwithECDSA"); dsa.initSign(key.getPrivate()); dsa.update(data); byte[] sig = dsa.sign(); System.out.println("Signature: " + new BigInteger(1, sig).toString(16)); Signature dsaCheck = Signature.getInstance("NONEwithECDSA"); dsaCheck.initVerify(key.getPublic()); dsaCheck.update(data); boolean success = dsaCheck.verify(sig); if (!success) { throw new RuntimeException("Test failed. Signature verification error"); } System.out.println("Test passed."); } } ++++++ _constraints ++++++ <constraints> <hardware> <physicalmemory> <size unit="M">4096</size> </physicalmemory> <disk> <size unit="G">20</size> </disk> </hardware> </constraints> ++++++ activation-module.patch ++++++ --- activation-JAF-1_2_0/activation/src/main/java/module-info.java 1970-01-01 01:00:00.000000000 +0100 +++ activation-JAF-1_2_0/activation/src/main/java/module-info.java 2018-07-13 21:56:33.025843992 +0200 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2014, 2017, 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. + */ + +/** + * Defines the JavaBeans Activation Framework (JAF) API. + * + * <p> This module is upgradeable. + * + * @moduleGraph + * @since 9 + */ +module java.activation { + requires java.logging; + requires java.desktop; + + requires transitive java.datatransfer; + + exports javax.activation; +} + ++++++ adlc-parser.patch ++++++ --- jdk10/src/hotspot/share/adlc/formsopt.cpp 2014-07-03 21:56:12.000000000 +0200 +++ jdk10/src/hotspot/share/adlc/formsopt.cpp 2014-07-14 11:43:21.900408570 +0200 @@ -347,6 +347,7 @@ _return_value = NULL; _c_return_value = NULL; _interpreter_frame_pointer_reg = NULL; + _cisc_spilling_operand_name = NULL; } FrameForm::~FrameForm() { ++++++ alternative-tzdb_dat.patch ++++++ --- a/src/java.base/share/classes/java/time/zone/TzdbZoneRulesProvider.java Thu Jun 28 17:49:13 2018 -0700 +++ b/src/java.base/share/classes/java/time/zone/TzdbZoneRulesProvider.java Fri Jun 29 08:23:40 2018 +0200 @@ -74,6 +74,7 @@ import java.util.List; import java.util.Map; import java.util.NavigableMap; +import java.util.Properties; import java.util.Set; import java.util.TreeMap; import java.util.concurrent.ConcurrentHashMap; @@ -106,7 +107,14 @@ */ public TzdbZoneRulesProvider() { try { - String libDir = StaticProperty.javaHome() + File.separator + "lib"; + final String homeDir = StaticProperty.javaHome(); + if (homeDir == null) { + throw new Error("java.home is not set"); + } + String libDir = homeDir + File.separator + "lib"; + String otherDir = getZoneInfoDir(homeDir); + if (otherDir != null) + libDir = otherDir; try (DataInputStream dis = new DataInputStream( new BufferedInputStream(new FileInputStream( new File(libDir, "tzdb.dat"))))) { @@ -117,6 +125,28 @@ } } + private static String getZoneInfoDir(final String homeDir) { + try { + File f = new File(homeDir + File.separator + "conf" + + File.separator + "tz.properties"); + if (!f.exists()) + return null; + BufferedInputStream bin = new BufferedInputStream(new FileInputStream(f)); + Properties props = new Properties(); + props.load(bin); + bin.close(); + String dir = props.getProperty("sun.zoneinfo.dir"); + if (dir == null) + return null; + File tzdbdat = new File(dir, "tzdb.dat"); + if (tzdbdat.exists()) + return dir; + return null; + } catch (Exception x) { + return null; + } + } + @Override protected Set<String> provideZoneIds() { return new HashSet<>(regionIds); --- a/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java Thu Jun 28 17:49:13 2018 -0700 +++ b/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java Fri Jun 29 08:23:40 2018 +0200 @@ -45,6 +45,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.Properties; import java.util.SimpleTimeZone; import java.util.concurrent.ConcurrentHashMap; import java.util.zip.CRC32; @@ -251,7 +252,15 @@ AccessController.doPrivileged(new PrivilegedAction<Void>() { public Void run() { try { - String libDir = StaticProperty.javaHome() + File.separator + "lib"; + final String homeDir = StaticProperty.javaHome(); + if (homeDir == null) { + throw new Error("java.home is not set"); + } + String libDir = homeDir + File.separator + "lib"; + String otherDir = getZoneInfoDir(homeDir); + if (otherDir != null) + libDir = otherDir; + try (DataInputStream dis = new DataInputStream( new BufferedInputStream(new FileInputStream( new File(libDir, "tzdb.dat"))))) { @@ -265,6 +274,28 @@ }); } + private static String getZoneInfoDir(final String homeDir) { + try { + File f = new File(homeDir + File.separator + "conf" + + File.separator + "tz.properties"); + if (!f.exists()) + return null; + BufferedInputStream bin = new BufferedInputStream(new FileInputStream(f)); + Properties props = new Properties(); + props.load(bin); + bin.close(); + String dir = props.getProperty("sun.zoneinfo.dir"); + if (dir == null) + return null; + File tzdbdat = new File(dir, "tzdb.dat"); + if (tzdbdat.exists()) + return dir; + return null; + } catch (Exception x) { + return null; + } + } + private static void addOldMapping() { for (String[] alias : oldMappings) { aliases.put(alias[0], alias[1]); ++++++ annotation-module.patch ++++++ 2018-07-14 20:40 diff -ulEbwB /dev/null javax.annotation-1.3.2/src/main/java/module-info.java Page 1 --- /dev/null 2018-07-14 10:01:53.274827758 +0200 +++ javax.annotation-1.3.2/src/main/java/module-info.java 2018-07-14 20:37:45.336213151 +0200 @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2014, 2017, 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. + */ + +/** + * Defines a subset of the Common Annotations API to support programs running + * on the Java SE Platform. + */ +module java.annotation { + exports javax.annotation; +} + ++++++ config.guess ++++++ ++++ 1460 lines (skipped) ++++++ config.sub ++++++ ++++ 1836 lines (skipped) ++++++ disable-doclint-by-default.patch ++++++ --- jdk15/test/langtools/jdk/javadoc/tool/doclint/DocLintTest.java 2020-03-11 22:25:18.000000000 +0100 +++ jdk15/test/langtools/jdk/javadoc/tool/doclint/DocLintTest.java 2020-03-17 19:11:23.870026518 +0100 @@ -147,12 +147,12 @@ files = List.of(new TestJFO("Test.java", code)); test(List.of(htmlVersion), - Main.Result.ERROR, - EnumSet.of(Message.DL_ERR9A, Message.DL_WRN12A)); + Main.Result.OK, + EnumSet.of(Message.JD_WRN10, Message.JD_WRN13)); test(List.of(htmlVersion, rawDiags), - Main.Result.ERROR, - EnumSet.of(Message.DL_ERR9, Message.DL_WRN12)); + Main.Result.OK, + EnumSet.of(Message.JD_WRN10, Message.JD_WRN13)); // test(List.of("-Xdoclint:none"), // Main.Result.OK, @@ -183,8 +183,8 @@ EnumSet.of(Message.DL_WRN12)); test(List.of(htmlVersion, rawDiags, "-private"), - Main.Result.ERROR, - EnumSet.of(Message.DL_ERR6, Message.DL_ERR9, Message.DL_WRN12)); + Main.Result.OK, + EnumSet.of(Message.JD_WRN10, Message.JD_WRN13)); test(List.of(htmlVersion, rawDiags, "-Xdoclint:missing,syntax", "-private"), Main.Result.ERROR, ++++++ fix_armv6_build.patch ++++++ --- src/hotspot/cpu/arm/stubGenerator_arm.cpp.orig 2018-05-03 03:36:49.000000000 +0200 +++ src/hotspot/cpu/arm/stubGenerator_arm.cpp 2018-05-07 17:55:16.692263547 +0200 @@ -755,7 +755,9 @@ class StubGenerator: public StubCodeGene __ clrex(); // FIXME: safe to remove? __ bx(LR); } else { - __ stop("Atomic load(jlong) unsupported on this platform"); + //__ stop("Atomic load(jlong) unsupported on this platform"); + // Workaround for armv6 built on multi core machines + __ ldmia(src, RegisterSet(result_lo, result_hi)); __ bx(LR); } @@ -787,7 +789,9 @@ class StubGenerator: public StubCodeGene __ b(retry, eq); __ bx(LR); } else { - __ stop("Atomic store(jlong) unsupported on this platform"); + //__ stop("Atomic store(jlong) unsupported on this platform"); + // Workaround for armv6 built on multi core machines + __ stmia(dest, RegisterSet(newval_lo, newval_hi)); __ bx(LR); } ++++++ icedtea-sound-1.0.1-jdk9.patch ++++++ --- icedtea-sound-1.0.1/Makefile.am Fri Jul 18 23:46:15 2014 +0100 +++ icedtea-sound-1.0.1/Makefile.am Thu Nov 02 13:16:38 2017 +0100 @@ -28,7 +28,6 @@ ICEDTEA_SOUND_JAVA_GENDIR = $(abs_top_builddir)/src/java # Build directories -RUNTIME = $(SYSTEM_JDK_DIR)/jre/lib/rt.jar ICEDTEA_SOUND_BUILDDIR = $(abs_top_builddir)/build ICEDTEA_SOUND_NATIVE_BUILDDIR = $(ICEDTEA_SOUND_BUILDDIR)/native ICEDTEA_SOUND_NATIVE_OBJECTS = \ @@ -38,6 +37,7 @@ # Files # Must use relative paths so as not to break make distcheck ICEDTEA_SOUND_JAVA_SRCS = $(top_srcdir)/src/java/org/classpath/icedtea/*/*.java \ + $(top_srcdir)/src/java/module-info.java \ $(top_builddir)/src/java/org/classpath/icedtea/Config.java ICEDTEA_SOUND_SRCS = $(ICEDTEA_SOUND_JAVA_SRCS) \ $(top_srcdir)/src/java/META-INF/services/javax.sound.sampled.spi.MixerProvider \ @@ -51,10 +51,15 @@ EXTRA_DIST = $(ICEDTEA_SOUND_SRCS) # Flags -IT_LANGUAGE_SOURCE_VERSION=6 -IT_CLASS_TARGET_VERSION=6 +IT_LANGUAGE_SOURCE_VERSION=10 +IT_CLASS_TARGET_VERSION=10 IT_JAVAC_SETTINGS=-g -encoding utf-8 $(JAVACFLAGS) $(MEMORY_LIMIT) $(PREFER_SOURCE) IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION) +if ENABLE_WARNINGS +IT_JAVACFLAGS+=-Xlint +else +IT_JAVACFLAGS+=-nowarn +endif IT_CFLAGS=$(CFLAGS) $(ARCHFLAG) LDFLAGS+=-Xlinker -z -Xlinker defs if ENABLE_DOCS @@ -62,7 +67,7 @@ JAVADOC_OPTS=-use -keywords -encoding UTF-8 -splitIndex \ -bottom '<font size="-1"> <a href="http://icedtea.classpath.org/bugzilla">Submit a bug or feature</a></font>' if JAVADOC_SUPPORTS_J_OPTIONS -JAVADOC_MEM_OPTS=-J-Xmx1024m -J-Xms128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m +JAVADOC_MEM_OPTS=-J-Xmx1024m -J-Xms128m endif endif @@ -80,8 +85,7 @@ install-exec-local: $(ICEDTEA_SOUND_NATIVE_BUILDDIR)/$(TARGET_NAME) ${mkinstalldirs} $(DESTDIR)$(libdir) ${INSTALL_PROGRAM} $(ICEDTEA_SOUND_NATIVE_BUILDDIR)/$(TARGET_NAME) \ - $(DESTDIR)$(libdir)/$(LIBRARY_NAME) - ln -sf $(LIBRARY_NAME) $(DESTDIR)$(libdir)/$(TARGET_NAME) + $(DESTDIR)$(libdir)/ install-data-local: stamps/icedtea-sound-jar.stamp stamps/docs.stamp ${mkinstalldirs} $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/ @@ -112,9 +116,8 @@ touch $@ stamps/icedtea-sound-class.stamp: - mkdir -p $(ICEDTEA_SOUND_CLASS_DIR) - $(abs_top_builddir)/javac $(IT_JAVACFLAGS) -d $(ICEDTEA_SOUND_CLASS_DIR) \ - -bootclasspath $(RUNTIME) $(ICEDTEA_SOUND_JAVA_SRCS) + mkdir -p $(ICEDTEA_SOUND_CLASS_DIR) $(ICEDTEA_SOUND_NATIVE_BUILDDIR) + $(JAVAC) $(IT_JAVACFLAGS) -h $(ICEDTEA_SOUND_NATIVE_BUILDDIR) -d $(ICEDTEA_SOUND_CLASS_DIR) $(ICEDTEA_SOUND_JAVA_SRCS) cp -r $(ICEDTEA_SOUND_JAVA_SRCDIR)/META-INF $(ICEDTEA_SOUND_CLASS_DIR) chmod -R ug+w $(ICEDTEA_SOUND_CLASS_DIR)/META-INF mkdir -p stamps @@ -125,24 +128,7 @@ mkdir -p stamps touch $@ -stamps/icedtea-sound-headers.stamp: stamps/icedtea-sound-class.stamp - mkdir -p $(ICEDTEA_SOUND_NATIVE_BUILDDIR) - $(JAVAH) -d $(ICEDTEA_SOUND_NATIVE_BUILDDIR) -classpath $(ICEDTEA_SOUND_CLASS_DIR) \ - -J-Xbootclasspath/p:$(ICEDTEA_SOUND_CLASS_DIR) org.classpath.icedtea.pulseaudio.EventLoop ; \ - $(JAVAH) -d $(ICEDTEA_SOUND_NATIVE_BUILDDIR) -classpath $(ICEDTEA_SOUND_CLASS_DIR) \ - -J-Xbootclasspath/p:$(ICEDTEA_SOUND_CLASS_DIR) org.classpath.icedtea.pulseaudio.Stream ; \ - $(JAVAH) -d $(ICEDTEA_SOUND_NATIVE_BUILDDIR) -classpath $(ICEDTEA_SOUND_CLASS_DIR) \ - -J-Xbootclasspath/p:$(ICEDTEA_SOUND_CLASS_DIR) org.classpath.icedtea.pulseaudio.Operation; \ - $(JAVAH) -d $(ICEDTEA_SOUND_NATIVE_BUILDDIR) -classpath $(ICEDTEA_SOUND_CLASS_DIR) \ - -J-Xbootclasspath/p:$(ICEDTEA_SOUND_CLASS_DIR) org.classpath.icedtea.pulseaudio.PulseAudioSourcePort ; \ - $(JAVAH) -d $(ICEDTEA_SOUND_NATIVE_BUILDDIR) -classpath $(ICEDTEA_SOUND_CLASS_DIR) \ - -J-Xbootclasspath/p:$(ICEDTEA_SOUND_CLASS_DIR) org.classpath.icedtea.pulseaudio.PulseAudioTargetPort ; \ - $(JAVAH) -d $(ICEDTEA_SOUND_NATIVE_BUILDDIR) -classpath $(ICEDTEA_SOUND_CLASS_DIR) \ - -J-Xbootclasspath/p:$(ICEDTEA_SOUND_CLASS_DIR) org.classpath.icedtea.pulseaudio.ContextEvent - mkdir -p stamps - touch $@ - -$(ICEDTEA_SOUND_NATIVE_BUILDDIR)/%.o: $(ICEDTEA_SOUND_NATIVE_SRCDIR)/%.c stamps/icedtea-sound-headers.stamp +$(ICEDTEA_SOUND_NATIVE_BUILDDIR)/%.o: $(ICEDTEA_SOUND_NATIVE_SRCDIR)/%.c stamps/icedtea-sound-class.stamp $(CC) $(IT_CFLAGS) -fPIC -I$(SYSTEM_JDK_DIR)/include/linux -I$(SYSTEM_JDK_DIR)/include \ -I$(ICEDTEA_SOUND_NATIVE_BUILDDIR) -o $@ -c $< --- icedtea-sound-1.0.1/acinclude.m4 Fri Jul 18 23:46:15 2014 +0100 +++ icedtea-sound-1.0.1/acinclude.m4 Thu Nov 02 13:16:38 2017 +0100 @@ -129,63 +129,16 @@ AC_DEFUN([IT_FIND_COMPILER], [ AC_REQUIRE([IT_FIND_JAVA]) - AC_REQUIRE([IT_FIND_ECJ_JAR]) IT_FIND_JAVAC - IT_FIND_ECJ - IT_USING_ECJ - if test "x${ECJ_JAR}" = "xno"; then - if test "x${JAVAC}" = "x"; then - AC_MSG_ERROR("No compiler or ecj JAR file was found.") - fi + if test "x${JAVAC}" = "x"; then + AC_MSG_ERROR("No compiler found.") fi - AC_SUBST(ECJ) AC_SUBST(JAVAC) ]) -AC_DEFUN_ONCE([IT_FIND_ECJ], -[ - ECJ_DEFAULT=/usr/bin/ecj - AC_MSG_CHECKING([if an ecj binary was specified]) - AC_ARG_WITH([ecj], - [AS_HELP_STRING(--with-ecj,bytecode compilation with ecj)], - [ - if test "x${withval}" = "xyes"; then - ECJ=no - else - ECJ="${withval}" - fi - ], - [ - ECJ=no - ]) - AC_MSG_RESULT(${ECJ}) - if test "x${ECJ}" = "xno"; then - ECJ=${ECJ_DEFAULT} - fi - AC_MSG_CHECKING([if $ECJ is a valid executable file]) - if test -x "${ECJ}" && test -f "${ECJ}"; then - AC_MSG_RESULT([yes]) - else - ECJ="" - AC_PATH_PROG(ECJ, "ecj") - if test -z "${ECJ}"; then - AC_PATH_PROG(ECJ, "ecj-3.1") - fi - if test -z "${ECJ}"; then - AC_PATH_PROG(ECJ, "ecj-3.2") - fi - if test -z "${ECJ}"; then - AC_PATH_PROG(ECJ, "ecj-3.3") - fi - if test -z "${ECJ}"; then - AC_PATH_PROG(ECJ, "ecj-3.4") - fi - fi -]) - AC_DEFUN_ONCE([IT_FIND_JAVAC], [ AC_REQUIRE([IT_CHECK_FOR_JDK]) @@ -260,74 +213,6 @@ AC_SUBST(JAVA) ]) -AC_DEFUN_ONCE([IT_FIND_ECJ_JAR], -[ - AC_MSG_CHECKING([for an ecj JAR file]) - AC_ARG_WITH([ecj-jar], - [AS_HELP_STRING([--with-ecj-jar[[=PATH]]],specify location of an ECJ JAR file)], - [ - if test -f "${withval}"; then - ECJ_JAR="${withval}" - fi - ], - [ - ECJ_JAR= - ]) - if test -z "${ECJ_JAR}"; then - for jar in /usr/share/java/eclipse-ecj.jar \ - /usr/share/java/ecj.jar \ - /usr/share/eclipse-ecj-3.{2,3,4,5}/lib/ecj.jar; do - if test -e $jar; then - ECJ_JAR=$jar - break - fi - done - if test -z "${ECJ_JAR}"; then - ECJ_JAR=no - fi - fi - AC_MSG_RESULT(${ECJ_JAR}) - AC_SUBST(ECJ_JAR) -]) - -AC_DEFUN_ONCE([IT_FIND_JAVAH], -[ - AC_REQUIRE([IT_CHECK_FOR_JDK]) - JAVAH_DEFAULT=${SYSTEM_JDK_DIR}/bin/javah - AC_MSG_CHECKING([if a javah executable is specified]) - AC_ARG_WITH([javah], - [AS_HELP_STRING([--with-javah[[=PATH]]],specify location of javah)], - [ - if test "x${withval}" = "xyes"; then - JAVAH=no - else - JAVAH="${withval}" - fi - ], - [ - JAVAH=no - ]) - AC_MSG_RESULT(${JAVAH}) - if test "x${JAVAH}" == "xno"; then - JAVAH=${JAVAH_DEFAULT} - fi - AC_MSG_CHECKING([if $JAVAH is a valid executable file]) - if test -x "${JAVAH}" && test -f "${JAVAH}"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - JAVAH="" - AC_PATH_PROG(JAVAH, "javah") - if test -z "${JAVAH}"; then - AC_PATH_PROG(JAVAH, "gjavah") - fi - if test -z "${JAVAH}"; then - AC_MSG_ERROR("A Java header generator was not found.") - fi - fi - AC_SUBST(JAVAH) -]) - AC_DEFUN_ONCE([IT_FIND_JAR], [ AC_REQUIRE([IT_CHECK_FOR_JDK]) @@ -457,7 +342,7 @@ [ AC_MSG_CHECKING([for a JDK home directory]) AC_ARG_WITH([jdk-home], - [AS_HELP_STRING([--with-jdk-home[[=PATH]]], + [AS_HELP_STRING([--with-jdk-home[[=PATH]]], [jdk home directory (default is first predefined JDK found)])], [ if test "x${withval}" = xyes @@ -474,50 +359,28 @@ SYSTEM_JDK_DIR= ]) if test -z "${SYSTEM_JDK_DIR}"; then - AC_MSG_RESULT([not specified]) - if test "x${enable_bootstrap}" = "xyes"; then - BOOTSTRAP_VMS="/usr/lib/jvm/java-gcj /usr/lib/jvm/gcj-jdk /usr/lib/jvm/cacao"; - fi - ICEDTEA6_VMS="/usr/lib/jvm/icedtea-6 /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk - /usr/lib/jvm/java-1.6.0-openjdk.x86_64 /usr/lib64/jvm/java-1.6.0-openjdk - /usr/lib/jvm/java-1.6.0" - ICEDTEA7_VMS="/usr/lib/jvm/icedtea-7 /usr/lib/jvm/icedtea7 /usr/lib/jvm/java-1.7.0-openjdk - /usr/lib/jvm/java-1.7.0-openjdk.x86_64 /usr/lib64/jvm/java-1.7.0-openjdk - /usr/lib/jvm/java-1.7.0 /usr/lib/jvm/java-7-openjdk" - for dir in ${BOOTSTRAP_VMS} ${ICEDTEA7_VMS} ${ICEDTEA6_VMS} \ - /usr/lib/jvm/java-openjdk /usr/lib/jvm/openjdk /usr/lib/jvm/java-icedtea \ - /etc/alternatives/java_sdk_openjdk ; do - AC_MSG_CHECKING([for ${dir}]); + for dir in /etc/alternatives/java_sdk \ + /usr/lib/jvm/java-1.9.0-openjdk \ + /usr/lib64/jvm/java-1.9.0-openjdk \ + /usr/lib/jvm/icedtea9 \ + /usr/lib64/jvm/icedtea9 \ + /usr/lib/jvm/java-10-openjdk \ + /usr/lib64/jvm/java-10-openjdk ; do if test -d $dir; then - SYSTEM_JDK_DIR=$dir ; - AC_MSG_RESULT([found]) ; - break ; - else - AC_MSG_RESULT([not found]) ; + SYSTEM_JDK_DIR=$dir + break fi done - else - AC_MSG_RESULT(${SYSTEM_JDK_DIR}) fi if ! test -d "${SYSTEM_JDK_DIR}"; then - AC_MSG_ERROR("A JDK home directory could not be found.") + AC_MSG_ERROR("A JDK home directory could not be found. ${SYSTEM_JDK_DIR}") + else + READ=`readlink -f ${SYSTEM_JDK_DIR}` + AC_MSG_RESULT(${SYSTEM_JDK_DIR} (link to ${READ})) fi AC_SUBST(SYSTEM_JDK_DIR) ]) -AC_DEFUN([IT_USING_ECJ],[ -AC_CACHE_CHECK([if we are using ecj as javac], it_cv_ecj, [ -if $JAVAC -version 2>&1| grep '^Eclipse' >&AS_MESSAGE_LOG_FD ; then - it_cv_ecj=yes; -else - it_cv_ecj=no; -fi -]) -USING_ECJ=$it_cv_ecj -AC_SUBST(USING_ECJ) -AC_PROVIDE([$0])dnl -]) - dnl check that javac and java work AC_DEFUN_ONCE([IT_CHECK_JAVA_AND_JAVAC_WORK],[ AC_REQUIRE([IT_FIND_JAVA]) @@ -538,7 +401,7 @@ } }] EOF - if $JAVAC -cp . $JAVACFLAGS -source 5 -target 5 $CLASS >&AS_MESSAGE_LOG_FD 2>&1; then + if $JAVAC -cp . $JAVACFLAGS -source 10 -target 10 $CLASS >&AS_MESSAGE_LOG_FD 2>&1; then if $JAVA -classpath . $BYTECODE >&AS_MESSAGE_LOG_FD 2>&1; then it_cv_jdk_works=yes; else @@ -560,7 +423,7 @@ [ AC_MSG_CHECKING(whether to enable Java compiler warnings) AC_ARG_ENABLE([warnings], - [AS_HELP_STRING(--enable-warnings,produce warnings from javac/ecj [[default=no]])], + [AS_HELP_STRING(--enable-warnings,produce warnings from javac [[default=no]])], [ ENABLE_WARNINGS="${enableval}" ], @@ -570,5 +433,4 @@ AC_MSG_RESULT(${ENABLE_WARNINGS}) AM_CONDITIONAL(ENABLE_WARNINGS, test x"${ENABLE_WARNINGS}" = "xyes") - AC_SUBST(ENABLE_WARNINGS) ]) --- icedtea-sound-1.0.1/configure.ac Fri Jul 18 23:46:15 2014 +0100 +++ icedtea-sound-1.0.1/configure.ac Thu Nov 02 13:16:38 2017 +0100 @@ -43,10 +43,8 @@ IT_FIND_TOOL([ZIP], [zip]) IT_CHECK_JAVA_AND_JAVAC_WORK -IT_FIND_JAVAH IT_FIND_JAR IT_FIND_JAVADOC -AC_CONFIG_FILES([javac], [chmod +x javac]) IT_CHECK_ENABLE_WARNINGS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ icedtea-sound-1.0.1/src/java/module-info.java Thu Nov 02 13:16:38 2017 +0100 @@ -0,0 +1,6 @@ +module icedtea.sound { + exports org.classpath.icedtea.pulseaudio; + requires java.desktop; + provides javax.sound.sampled.spi.MixerProvider + with org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider; +} ++++++ icedtea-sound-soundproperties.patch ++++++ --- jdk10/src/java.desktop/share/conf/sound.properties 2008-08-28 04:15:18.000000000 -0400 +++ jdk10/src/java.desktop/share/conf/sound.properties 2008-10-03 16:59:21.000000000 -0400 @@ -37,3 +37,13 @@ # Specify the default Receiver by provider and name: # javax.sound.midi.Receiver=com.sun.media.sound.MidiProvider#SunMIDI1 # + +# javax.sound.sampled.Clip=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider +# javax.sound.sampled.Port=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider +# javax.sound.sampled.SourceDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider +# javax.sound.sampled.TargetDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider + +javax.sound.sampled.Clip=com.sun.media.sound.DirectAudioDeviceProvider +javax.sound.sampled.Port=com.sun.media.sound.PortMixerProvider +javax.sound.sampled.SourceDataLine=com.sun.media.sound.DirectAudioDeviceProvider +javax.sound.sampled.TargetDataLine=com.sun.media.sound.DirectAudioDeviceProvider ++++++ implicit-pointer-decl.patch ++++++ --- jdk10/src/java.instrument/share/native/libinstrument/JarFacade.c 2014-10-02 10:59:00.105666221 +0200 +++ jdk10/src/java.instrument/share/native/libinstrument/JarFacade.c 2014-10-02 11:59:03.355452975 +0200 @@ -23,6 +23,7 @@ * questions. */ +#include <ctype.h> #include <string.h> #include <stdlib.h> ++++++ java-atk-wrapper-security.patch ++++++ --- jdk10/src/java.base/share/conf/security/java.security 2017-01-23 23:56:02.000000000 +0100 +++ jdk10/src/java.base/share/conf/security/java.security 2017-01-27 08:41:10.551819770 +0100 @@ -304,6 +304,8 @@ # package.access=sun.misc.,\ sun.reflect.,\ + org.GNOME.Accessibility.,\ + org.GNOME.Bonobo.,\ # # List of comma-separated packages that start with or equal this string @@ -316,6 +318,8 @@ # package.definition=sun.misc.,\ sun.reflect.,\ + org.GNOME.Accessibility.,\ + org.GNOME.Bonobo.,\ # # Determines whether this properties file can be appended to ++++++ jaw-jdk10.patch ++++++ --- java-atk-wrapper-0.33.2/configure.ac 2017-11-06 13:37:11.504756491 +0100 +++ java-atk-wrapper-0.33.2/configure.ac 2017-11-06 13:37:47.224756626 +0100 @@ -64,7 +64,7 @@ # java wrapper AM_CONDITIONAL(USER, test `whoami` = "root") -JAVA_REQUIRED=1.7.0 +JAVA_REQUIRED=9.0.0 JAVA_ERROR_MESSAGE="Java $JAVA_REQUIRED or later is required to build java-access-bridge" AC_ARG_VAR([JAVA_HOME],[Java Runtime Environment location]) @@ -170,6 +170,8 @@ wrapper/org/GNOME/Makefile wrapper/org/GNOME/Accessibility/Makefile wrapper/org/GNOME/Accessibility/AtkWrapper.java + wrapper/META-INF/Makefile + wrapper/META-INF/services/Makefile ]) AC_OUTPUT --- java-atk-wrapper-0.33.2/wrapper/Makefile.am 2017-11-06 13:37:11.504756491 +0100 +++ java-atk-wrapper-0.33.2/wrapper/Makefile.am 2017-11-06 13:47:48.648845631 +0100 @@ -1,4 +1,4 @@ -SUBDIRS=org +SUBDIRS=org META-INF JARFILES=java-atk-wrapper.jar ALL_CLASSES=org/GNOME/Accessibility/*.class DEP_CLASSES=$(wildcard $(ALL_CLASSES)) @@ -14,10 +14,13 @@ java_atk_wrapper_DATA = $(JARFILES) properties_DATA = accessibility.properties EXTRA_DIST = $(properties_DATA) \ - manifest.txt + manifest.txt module-info.java -$(JARFILES) : $(DEP_CLASSES) - $(JAR) cfm $(JARFILES) manifest.txt org/GNOME/Accessibility/*.class +module-info.class : $(srcdir)/module-info.java + $(JAVAC) -cp $(top_builddir)/wrapper -sourcepath $(top_srcdir)/wrapper:$(top_builddir)/wrapper $(JAVACFLAGS) -d $(top_builddir)/wrapper $< + +$(JARFILES) : $(DEP_CLASSES) module-info.class + $(JAR) cfm $(JARFILES) manifest.txt org/GNOME/Accessibility/*.class module-info.class META-INF/services/javax.accessibility.AccessibilityProvider all-local : $(DATA) $(JARFILES) --- java-atk-wrapper-0.33.2/wrapper/META-INF/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ java-atk-wrapper-0.33.2/wrapper/META-INF/Makefile.am 2017-11-06 13:37:47.224756626 +0100 @@ -0,0 +1 @@ +SUBDIRS=services --- java-atk-wrapper-0.33.2/wrapper/META-INF/services/javax.accessibility.AccessibilityProvider 1970-01-01 01:00:00.000000000 +0100 +++ java-atk-wrapper-0.33.2/wrapper/META-INF/services/javax.accessibility.AccessibilityProvider 2017-11-06 13:37:47.224756626 +0100 @@ -0,0 +1 @@ +org.GNOME.Accessibility.AtkProvider --- java-atk-wrapper-0.33.2/wrapper/META-INF/services/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ java-atk-wrapper-0.33.2/wrapper/META-INF/services/Makefile.am 2017-11-06 13:37:47.224756626 +0100 @@ -0,0 +1 @@ +EXTRA_DIST = javax.accessibility.AccessibilityProvider --- java-atk-wrapper-0.33.2/wrapper/module-info.java 1970-01-01 01:00:00.000000000 +0100 +++ java-atk-wrapper-0.33.2/wrapper/module-info.java 2017-11-06 13:42:08.850466481 +0100 @@ -0,0 +1,6 @@ +module atk.wrapper { + exports org.GNOME.Accessibility; + requires java.desktop; + provides javax.accessibility.AccessibilityProvider + with org.GNOME.Accessibility.AtkProvider; +} --- java-atk-wrapper-0.33.2/wrapper/org/GNOME/Accessibility/AtkProvider.java 1970-01-01 01:00:00.000000000 +0100 +++ java-atk-wrapper-0.33.2/wrapper/org/GNOME/Accessibility/AtkProvider.java 2017-11-06 13:37:47.224756626 +0100 @@ -0,0 +1,38 @@ +/* + * Java ATK Wrapper for GNOME + * Copyright (C) 2017 Oracle and/or its affiliates. + * Copyright (C) 2017 Fridrich Strba <fridrich.st...@bluewin.ch> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +package org.GNOME.Accessibility; + +import javax.accessibility.AccessibilityProvider; + +public final class AtkProvider extends AccessibilityProvider { + private final String name = "org.GNOME.Accessibility.AtkWrapper"; + + public AtkProvider() {} + + public String getName() { + return name; + } + + public void activate() { + new AtkWrapper(); + } + +} --- java-atk-wrapper-0.33.2/wrapper/org/GNOME/Accessibility/Makefile.am 2015-06-30 23:56:32.000000000 +0200 +++ java-atk-wrapper-0.33.2/wrapper/org/GNOME/Accessibility/Makefile.am 2017-10-26 17:42:11.472221491 +0200 @@ -10,7 +10,7 @@ sed -e "s;\@XPROP\@;${XPROP};g" \ < $< >$@ -%.class : %.java +%.class : %.java AtkWrapper.java CLASSPATH=$(top_srcdir)/wrapper $(JAVAC) $(JAVACFLAGS) -d $(top_builddir)/wrapper $< clean-local: ++++++ jaw-misc.patch ++++++ --- java-atk-wrapper-0.33.2/configure.ac 2015-07-07 13:52:28.000000000 +0200 +++ java-atk-wrapper-0.33.2/configure.ac 2017-11-06 17:00:37.366413136 +0100 @@ -46,7 +46,6 @@ glib-2.0 >= 2.32.0 gthread-2.0 gdk-2.0 - gdk-3.0 gobject-2.0 ]) AC_SUBST(JAW_LIBS) @@ -64,7 +63,7 @@ # java wrapper AM_CONDITIONAL(USER, test `whoami` = "root") -JAVA_REQUIRED=1.6 +JAVA_REQUIRED=1.7.0 JAVA_ERROR_MESSAGE="Java $JAVA_REQUIRED or later is required to build java-access-bridge" AC_ARG_VAR([JAVA_HOME],[Java Runtime Environment location]) @@ -98,12 +98,6 @@ if test -z "$JAVAC"; then fi AC_SUBST(JAVAC) -AC_PATH_PROG(JAVAH,javah,,${JAVA_PATH}) -if test -z "$JAVAH"; then - AC_MSG_ERROR([$JAVA_ERROR_MESSAGE]) -fi -AC_SUBST(JAVAH) - AC_SUBST(JAVACFLAGS) AC_PATH_PROG(JAR,jar,,${JAVA_PATH}) @@ -125,7 +124,7 @@ if test "x$GCC" = xyes; then - JAW_CFLAGS=$JAW_CFLAGS $CFLAGS + JAW_CFLAGS="$JAW_CFLAGS $CFLAGS" else AC_MSG_ERROR("You should compile with GCC") fi @@ -169,6 +168,7 @@ wrapper/org/Makefile wrapper/org/GNOME/Makefile wrapper/org/GNOME/Accessibility/Makefile + wrapper/org/GNOME/Accessibility/AtkWrapper.java ]) AC_OUTPUT --- java-atk-wrapper-0.33.2/wrapper/Makefile.am 2015-07-01 02:19:15.000000000 +0200 +++ java-atk-wrapper-0.33.2/wrapper/Makefile.am 2017-11-06 17:00:07.962413025 +0100 @@ -13,7 +13,8 @@ java_atk_wrapper_DATA = $(JARFILES) properties_DATA = accessibility.properties -EXTRA_DIST = $(properties_DATA) +EXTRA_DIST = $(properties_DATA) \ + manifest.txt $(JARFILES) : $(DEP_CLASSES) $(JAR) cfm $(JARFILES) manifest.txt org/GNOME/Accessibility/*.class --- java-atk-wrapper-0.33.2/wrapper/manifest.txt 1970-01-01 01:00:00.000000000 +0100 +++ java-atk-wrapper-0.33.2/wrapper/manifest.txt 2017-10-26 15:25:02.159429001 +0200 @@ -0,0 +1,2 @@ +Main-Class: org.GNOME.Accessibility.AtkWrapper + ++++++ jaw-nogtk.patch ++++++ --- java-atk-wrapper-0.33.2/configure.ac 2018-08-21 13:51:47.158216451 +0200 +++ java-atk-wrapper-0.33.2/configure.ac 2018-08-21 13:52:22.122434818 +0200 @@ -45,7 +45,6 @@ dbus-1 glib-2.0 >= 2.32.0 gthread-2.0 - gdk-2.0 gobject-2.0 ]) AC_SUBST(JAW_LIBS) --- java-atk-wrapper-0.33.2/jni/src/AtkWrapper.c 2015-07-02 15:18:08.000000000 +0200 +++ java-atk-wrapper-0.33.2/jni/src/AtkWrapper.c 2018-08-21 13:53:20.206797576 +0200 @@ -23,9 +23,6 @@ #include <stdlib.h> #include <glib.h> #include <atk-bridge.h> -#include <gdk/gdk.h> -#include <gdk/gdkx.h> -#include <gtk/gtk.h> #include <X11/Xlib.h> #include "jawutil.h" #include "jawimpl.h" @@ -258,7 +255,7 @@ { jobject global_ac = (*jniEnv)->NewGlobalRef(jniEnv, jAccContext); CallbackPara *para = alloc_callback_para(global_ac); - gdk_threads_add_idle(focus_notify_handler, para); + g_idle_add(focus_notify_handler, para); } static gboolean @@ -336,7 +333,7 @@ jobject global_ac = (*jniEnv)->NewGlobalRef(jniEnv, jAccContext); CallbackPara *para = alloc_callback_para(global_ac); para->is_toplevel = (jIsToplevel == JNI_TRUE) ? TRUE : FALSE; - gdk_threads_add_idle(window_open_handler, para); + g_idle_add(window_open_handler, para); } static gboolean @@ -413,7 +410,7 @@ jobject global_ac = (*jniEnv)->NewGlobalRef(jniEnv, jAccContext); CallbackPara *para = alloc_callback_para(global_ac); para->is_toplevel = (jIsToplevel == JNI_TRUE) ? TRUE : FALSE; - gdk_threads_add_idle(window_close_handler, para); + g_idle_add(window_close_handler, para); } static gboolean @@ -462,7 +459,7 @@ { jobject global_ac = (*jniEnv)->NewGlobalRef(jniEnv, jAccContext); CallbackPara *para = alloc_callback_para(global_ac); - gdk_threads_add_idle(window_minimize_handler, para); + g_idle_add(window_minimize_handler, para); } static gboolean @@ -511,7 +508,7 @@ { jobject global_ac = (*jniEnv)->NewGlobalRef(jniEnv, jAccContext); CallbackPara *para = alloc_callback_para(global_ac ); - gdk_threads_add_idle(window_maximize_handler, para); + g_idle_add(window_maximize_handler, para); } static gboolean @@ -561,7 +558,7 @@ jobject global_ac = (*jniEnv)->NewGlobalRef(jniEnv, jAccContext); CallbackPara *para = alloc_callback_para(global_ac); - gdk_threads_add_idle(window_restore_handler, para); + g_idle_add(window_restore_handler, para); } static gboolean @@ -609,7 +606,7 @@ jobject global_ac = (*jniEnv)->NewGlobalRef(jniEnv, jAccContext); CallbackPara *para = alloc_callback_para(global_ac); - gdk_threads_add_idle(window_activate_handler, para); + g_idle_add(window_activate_handler, para); } static gboolean @@ -659,7 +656,7 @@ jobject global_ac = (*jniEnv)->NewGlobalRef(jniEnv, jAccContext); CallbackPara *para = alloc_callback_para(global_ac); - gdk_threads_add_idle(window_deactivate_handler, para); + g_idle_add(window_deactivate_handler, para); } static gboolean @@ -710,7 +707,7 @@ jobject global_ac = (*jniEnv)->NewGlobalRef(jniEnv, jAccContext); CallbackPara *para = alloc_callback_para(global_ac); - gdk_threads_add_idle(window_state_change_handler, para); + g_idle_add(window_state_change_handler, para); } static gchar @@ -1047,7 +1044,7 @@ CallbackPara *para = alloc_callback_para(global_ac); para->signal_id = (gint)id; para->args = global_args; - gdk_threads_add_idle(signal_emit_handler, para); + g_idle_add(signal_emit_handler, para); } static gboolean @@ -1106,7 +1103,7 @@ } else { para->state_value = FALSE; } - gdk_threads_add_idle(object_state_change_handler, para); + g_idle_add(object_state_change_handler, para); } static gboolean @@ -1163,7 +1160,7 @@ { jobject global_ac = (*jniEnv)->NewGlobalRef(jniEnv, jAccContext); CallbackPara *para = alloc_callback_para(global_ac); - gdk_threads_add_idle(component_added_handler, para); + g_idle_add(component_added_handler, para); } static gboolean @@ -1222,7 +1219,7 @@ { jobject global_ac = (*jniEnv)->NewGlobalRef(jniEnv, jAccContext); CallbackPara *para = alloc_callback_para(global_ac); - gdk_threads_add_idle(component_removed_handler, para); + g_idle_add(component_removed_handler, para); } static gboolean @@ -1340,7 +1337,7 @@ { jboolean key_consumed; jobject global_key_event = (*jniEnv)->NewGlobalRef(jniEnv, jAtkKeyEvent); - gdk_threads_add_idle(key_dispatch_handler, (gpointer)global_key_event); + g_idle_add(key_dispatch_handler, (gpointer)global_key_event); if(jaw_debug) printf("key_dispatch_result saved = %d\n ", key_dispatch_result); ++++++ jconsole.desktop.in ++++++ [Desktop Entry] Name=OpenJDK @VERSION@ Monitoring & Management Console GenericName=OpenJDK Monitoring & Management Console Comment=Monitor and manage OpenJDK applications Exec=@JAVA_HOME@/bin/jconsole Icon=java Terminal=false Type=Application StartupWMClass=sun-tools-jconsole-JConsole Categories=Development;Profiling; Version=1.0 ++++++ loadAssistiveTechnologies.patch ++++++ --- openjdk/src/java.desktop/share/classes/java/awt/Toolkit.java +++ openjdk/src/java.desktop/share/classes/java/awt/Toolkit.java @@ -594,9 +594,13 @@ !(toolkit instanceof HeadlessToolkit)) { toolkit = new HeadlessToolkit(toolkit); } if (!GraphicsEnvironment.isHeadless()) { - loadAssistiveTechnologies(); + try { + loadAssistiveTechnologies(); + } catch (AWTError error) { + // ignore silently + } } } return toolkit; } ++++++ memory-limits.patch ++++++ --- jdk11/src/hotspot/share/gc/shared/gc_globals.hpp 2018-04-20 08:14:25.796265133 +0200 +++ jdk11/src/hotspot/share/gc/shared/gc_globals.hpp 2018-04-20 08:15:53.656690011 +0200 @@ -640,7 +640,7 @@ "Initial heap size (in bytes); zero means use ergonomics") \ constraint(InitialHeapSizeConstraintFunc,AfterErgo) \ \ - product(size_t, MaxHeapSize, ScaleForWordSize(96*M), \ + product(size_t, MaxHeapSize, ScaleForWordSize(512*M), \ "Maximum heap size (in bytes)") \ constraint(MaxHeapSizeConstraintFunc,AfterErgo) \ \ ++++++ multiple-pkcs11-library-init.patch ++++++ --- jdk10/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java 2016-12-20 23:13:34.000000000 +0100 +++ jdk10/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java 2016-12-22 11:45:10.418651583 +0100 @@ -51,6 +51,7 @@ static final int ERR_HALT = 1; static final int ERR_IGNORE_ALL = 2; static final int ERR_IGNORE_LIB = 3; + static final int ERR_IGNORE_MULTI_INIT = 4; // same as allowSingleThreadedModules but controlled via a system property // and applied to all providers. if set to false, no SunPKCS11 instances @@ -992,6 +993,8 @@ handleStartupErrors = ERR_IGNORE_LIB; } else if (val.equals("halt")) { handleStartupErrors = ERR_HALT; + } else if (val.equals("ignoreMultipleInitialisation")) { + handleStartupErrors = ERR_IGNORE_MULTI_INIT; } else { throw excToken("Invalid value for handleStartupErrors:"); } --- jdk10/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java 2016-12-20 23:13:34.000000000 +0100 +++ jdk10/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java 2016-12-22 11:45:10.418651583 +0100 @@ -174,26 +174,37 @@ String nssLibraryDirectory = config.getNssLibraryDirectory(); String nssSecmodDirectory = config.getNssSecmodDirectory(); boolean nssOptimizeSpace = config.getNssOptimizeSpace(); + int errorHandling = config.getHandleStartupErrors(); if (secmod.isInitialized()) { if (nssSecmodDirectory != null) { String s = secmod.getConfigDir(); if ((s != null) && (s.equals(nssSecmodDirectory) == false)) { - throw new ProviderException("Secmod directory " - + nssSecmodDirectory - + " invalid, NSS already initialized with " - + s); + String msg = "Secmod directory " + nssSecmodDirectory + + " invalid, NSS already initialized with " + s; + if (errorHandling == Config.ERR_IGNORE_MULTI_INIT || + errorHandling == Config.ERR_IGNORE_ALL) { + throw new UnsupportedOperationException(msg); + } else { + throw new ProviderException(msg); + } } } if (nssLibraryDirectory != null) { String s = secmod.getLibDir(); if ((s != null) && (s.equals(nssLibraryDirectory) == false)) { - throw new ProviderException("NSS library directory " + String msg = "NSS library directory " + nssLibraryDirectory + " invalid, NSS already initialized with " - + s); + + s; + if (errorHandling == Config.ERR_IGNORE_MULTI_INIT || + errorHandling == Config.ERR_IGNORE_ALL) { + throw new UnsupportedOperationException(msg); + } else { + throw new ProviderException(msg); + } } } } else { ++++++ nss.cfg ++++++ name = NSS nssLibraryDirectory = nssDbMode = noDb attributes = compatibility ++++++ ppc_stack_overflow_fix.patch ++++++ --- jdk16/src/hotspot/cpu/zero/stack_zero.hpp 2016-12-27 22:00:30.000000000 +0100 +++ jdk16/src/hotspot/cpu/zero/stack_zero.hpp 2017-01-09 08:35:53.221098668 +0100 @@ -96,7 +96,7 @@ int shadow_pages_size() const { return _shadow_pages_size; } - int abi_stack_available(Thread *thread) const; + ssize_t abi_stack_available(Thread *thread) const; public: void overflow_check(int required_words, TRAPS); --- jdk16/src/hotspot/cpu/zero/stack_zero.inline.hpp 2016-12-27 22:00:30.000000000 +0100 +++ jdk16/src/hotspot/cpu/zero/stack_zero.inline.hpp 2017-01-09 08:35:53.221098668 +0100 @@ -47,11 +47,11 @@ // This method returns the amount of ABI stack available for us // to use under normal circumstances. Note that the returned // value can be negative. -inline int ZeroStack::abi_stack_available(Thread *thread) const { +inline ssize_t ZeroStack::abi_stack_available(Thread *thread) const { assert(Thread::current() == thread, "should run in the same thread"); - int stack_used = thread->stack_base() - (address) &stack_used + ssize_t stack_used = thread->stack_base() - (address) &stack_used + (StackOverflow::stack_guard_zone_size() + StackOverflow::stack_shadow_zone_size()); - int stack_free = thread->stack_size() - stack_used; + ssize_t stack_free = thread->stack_size() - stack_used; return stack_free; } ++++++ s390-java-opts.patch ++++++ --- jdk9/make/autoconf/boot-jdk.m4 2017-01-23 20:49:50.000000000 +0100 +++ jdk9/make/autoconf/boot-jdk.m4 2017-02-02 07:37:15.384455529 +0100 @@ -360,11 +360,11 @@ AC_MSG_CHECKING([flags for boot jdk java command for big workloads]) # Starting amount of heap memory. - ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA]) - BOOTCYCLE_JVM_ARGS_BIG=-Xms64M + ADD_JVM_ARG_IF_OK([-Xms256M],boot_jdk_jvmargs_big,[$JAVA]) + BOOTCYCLE_JVM_ARGS_BIG=-Xms256M # Maximum amount of heap memory and stack size. - JVM_HEAP_LIMIT_32="1024" + JVM_HEAP_LIMIT_32="768" # Running a 64 bit JVM allows for and requires a bigger heap JVM_HEAP_LIMIT_64="1600" STACK_SIZE_32=768 @@ -417,8 +417,8 @@ # Use serial gc for small short lived tools if possible ADD_JVM_ARG_IF_OK([-XX:+UseSerialGC],boot_jdk_jvmargs_small,[$JAVA]) - ADD_JVM_ARG_IF_OK([-Xms32M],boot_jdk_jvmargs_small,[$JAVA]) - ADD_JVM_ARG_IF_OK([-Xmx512M],boot_jdk_jvmargs_small,[$JAVA]) + ADD_JVM_ARG_IF_OK([-Xms256M],boot_jdk_jvmargs_small,[$JAVA]) + ADD_JVM_ARG_IF_OK([-Xmx768M],boot_jdk_jvmargs_small,[$JAVA]) ADD_JVM_ARG_IF_OK([-XX:TieredStopAtLevel=1],boot_jdk_jvmargs_small,[$JAVA]) AC_MSG_RESULT([$boot_jdk_jvmargs_small]) ++++++ s390-size_t.patch ++++++ --- jdk10/src/share/vm/code/codeCache.cpp 2017-01-13 00:41:16.000000000 +0100 +++ jdk10/src/share/vm/code/codeCache.cpp 2017-01-25 10:28:19.880008325 +0100 @@ -403,7 +403,7 @@ add_heap(heap); // Reserve Space - size_t size_initial = MIN2(InitialCodeCacheSize, rs.size()); + size_t size_initial = MIN2((size_t)InitialCodeCacheSize, rs.size()); size_initial = round_to(size_initial, os::vm_page_size()); if (!heap->reserve(rs, size_initial, CodeCacheSegmentSize)) { vm_exit_during_initialization("Could not reserve enough space for code cache"); --- jdk10/src/share/vm/gc/cms/compactibleFreeListSpace.cpp 2017-01-13 00:41:16.000000000 +0100 +++ jdk10/src/share/vm/gc/cms/compactibleFreeListSpace.cpp 2017-01-25 10:28:19.880008325 +0100 @@ -2506,7 +2506,7 @@ // size_t multiple = (size_t) (_num_blocks[word_sz]/(((double)CMSOldPLABToleranceFactor)*CMSOldPLABNumRefills*n_blks)); n_blks += CMSOldPLABReactivityFactor*multiple*n_blks; - n_blks = MIN2(n_blks, CMSOldPLABMax); + n_blks = MIN2(n_blks, (size_t)CMSOldPLABMax); } assert(n_blks > 0, "Error"); _cfls->par_get_chunk_of_blocks(word_sz, n_blks, fl); --- jdk10/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp 2017-01-13 00:41:16.000000000 +0100 +++ jdk10/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp 2017-01-25 10:28:19.884008234 +0100 @@ -753,7 +753,7 @@ if (free_percentage < desired_free_percentage) { size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage)); assert(desired_capacity >= capacity(), "invalid expansion size"); - size_t expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes); + size_t expand_bytes = MAX2(desired_capacity - capacity(), (size_t)MinHeapDeltaBytes); Log(gc) log; if (log.is_trace()) { size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage)); @@ -5510,7 +5510,7 @@ HeapWord* curAddr = _markBitMap.startWord(); while (curAddr < _markBitMap.endWord()) { size_t remaining = pointer_delta(_markBitMap.endWord(), curAddr); - MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining)); + MemRegion chunk(curAddr, MIN2((size_t)CMSBitMapYieldQuantum, remaining)); _markBitMap.clear_large_range(chunk); if (ConcurrentMarkSweepThread::should_yield() && !foregroundGCIsActive() && @@ -5791,7 +5791,7 @@ return; } // Double capacity if possible - size_t new_capacity = MIN2(_capacity*2, MarkStackSizeMax); + size_t new_capacity = MIN2(_capacity*2, (size_t)MarkStackSizeMax); // Do not give up existing stack until we have managed to // get the double capacity that we desired. ReservedSpace rs(ReservedSpace::allocation_align_size_up( --- jdk10/src/share/vm/gc/cms/parNewGeneration.cpp 2017-01-13 00:41:16.000000000 +0100 +++ jdk10/src/share/vm/gc/cms/parNewGeneration.cpp 2017-01-25 10:28:19.884008234 +0100 @@ -197,7 +197,7 @@ const size_t num_overflow_elems = of_stack->size(); const size_t space_available = queue->max_elems() - queue->size(); const size_t num_take_elems = MIN3(space_available / 4, - ParGCDesiredObjsFromOverflowList, + (size_t)ParGCDesiredObjsFromOverflowList, num_overflow_elems); // Transfer the most recent num_take_elems from the overflow // stack to our work queue. --- jdk10/src/share/vm/gc/g1/g1CollectedHeap.cpp 2017-01-13 00:41:16.000000000 +0100 +++ jdk10/src/share/vm/gc/g1/g1CollectedHeap.cpp 2017-01-25 10:28:19.884008234 +0100 @@ -1595,7 +1595,7 @@ _verifier->verify_region_sets_optional(); - size_t expand_bytes = MAX2(word_size * HeapWordSize, MinHeapDeltaBytes); + size_t expand_bytes = MAX2(word_size * HeapWordSize, (size_t)MinHeapDeltaBytes); log_debug(gc, ergo, heap)("Attempt heap expansion (allocation request failed). Allocation request: " SIZE_FORMAT "B", word_size * HeapWordSize); --- jdk10/src/share/vm/gc/g1/g1ConcurrentMark.cpp 2017-01-13 00:41:16.000000000 +0100 +++ jdk10/src/share/vm/gc/g1/g1ConcurrentMark.cpp 2017-01-25 10:28:19.884008234 +0100 @@ -2458,7 +2458,7 @@ // of things to do) or totally (at the very end). size_t target_size; if (partially) { - target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize); + target_size = MIN2((size_t)_task_queue->max_elems()/3, (size_t)GCDrainStackTargetSize); } else { target_size = 0; } --- jdk10/src/share/vm/gc/g1/g1ConcurrentMarkObjArrayProcessor.cpp 2017-01-13 00:41:16.000000000 +0100 +++ jdk10/src/share/vm/gc/g1/g1ConcurrentMarkObjArrayProcessor.cpp 2017-01-25 10:30:27.289082074 +0100 @@ -41,7 +41,7 @@ } size_t G1CMObjArrayProcessor::process_array_slice(objArrayOop obj, HeapWord* start_from, size_t remaining) { - size_t words_to_scan = MIN2(remaining, ObjArrayMarkingStride); + size_t words_to_scan = MIN2(remaining, (size_t)ObjArrayMarkingStride); if (remaining > ObjArrayMarkingStride) { push_array_slice(start_from + ObjArrayMarkingStride); --- jdk10/src/share/vm/gc/g1/g1PageBasedVirtualSpace.hpp 2017-01-13 00:41:16.000000000 +0100 +++ jdk10/src/share/vm/gc/g1/g1PageBasedVirtualSpace.hpp 2017-01-25 10:28:19.884008234 +0100 @@ -91,7 +91,7 @@ void pretouch_internal(size_t start_page, size_t end_page); // Returns the index of the page which contains the given address. - uintptr_t addr_to_page_index(char* addr) const; + size_t addr_to_page_index(char* addr) const; // Returns the address of the given page index. char* page_start(size_t index) const; --- jdk10/src/share/vm/gc/parallel/psCompactionManager.inline.hpp 2017-01-13 00:41:16.000000000 +0100 +++ jdk10/src/share/vm/gc/parallel/psCompactionManager.inline.hpp 2017-01-25 10:28:19.888008143 +0100 @@ -119,7 +119,7 @@ const size_t beg_index = size_t(index); assert(beg_index < len || len == 0, "index too large"); - const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride); + const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride); const size_t end_index = beg_index + stride; T* const base = (T*)obj->base(); T* const beg = base + beg_index; --- jdk10/src/share/vm/gc/parallel/psParallelCompact.cpp 2017-01-13 00:41:16.000000000 +0100 +++ jdk10/src/share/vm/gc/parallel/psParallelCompact.cpp 2017-01-25 10:28:19.888008143 +0100 @@ -905,8 +905,8 @@ void PSParallelCompact::initialize_dead_wood_limiter() { const size_t max = 100; - _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0; - _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0; + _dwl_mean = double(MIN2((size_t)ParallelOldDeadWoodLimiterMean, max)) / 100.0; + _dwl_std_dev = double(MIN2((size_t)ParallelOldDeadWoodLimiterStdDev, max)) / 100.0; _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev); DEBUG_ONLY(_dwl_initialized = true;) _dwl_adjustment = normal_distribution(1.0); --- jdk10/src/share/vm/gc/shared/collectorPolicy.cpp 2017-01-13 00:41:16.000000000 +0100 +++ jdk10/src/share/vm/gc/shared/collectorPolicy.cpp 2017-01-25 10:28:19.888008143 +0100 @@ -450,7 +450,7 @@ // yield a size that is too small) and bound it by MaxNewSize above. // Ergonomics plays here by previously calculating the desired // NewSize and MaxNewSize. - _max_young_size = MIN2(MAX2(_max_young_size, _initial_young_size), MaxNewSize); + _max_young_size = MIN2(MAX2(_max_young_size, _initial_young_size), (size_t)MaxNewSize); } // Given the maximum young size, determine the initial and @@ -480,7 +480,7 @@ // NewSize as the floor, because if NewRatio is overly large, the resulting // size can be too small. _initial_young_size = - MIN2(_max_young_size, MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize)); + MIN2(_max_young_size, MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), (size_t)NewSize)); } } --- jdk10/src/share/vm/gc/shared/plab.cpp 2017-01-13 00:41:16.000000000 +0100 +++ jdk10/src/share/vm/gc/shared/plab.cpp 2017-01-25 10:28:19.888008143 +0100 @@ -32,7 +32,7 @@ size_t PLAB::min_size() { // Make sure that we return something that is larger than AlignmentReserve - return align_object_size(MAX2(MinTLABSize / HeapWordSize, (uintx)oopDesc::header_size())) + AlignmentReserve; + return align_object_size(MAX2(MinTLABSize / HeapWordSize, (size_t)oopDesc::header_size())) + AlignmentReserve; } size_t PLAB::max_size() { --- jdk10/src/share/vm/memory/metaspace.cpp 2017-01-13 00:41:16.000000000 +0100 +++ jdk10/src/share/vm/memory/metaspace.cpp 2017-01-25 10:28:19.888008143 +0100 @@ -1542,7 +1542,7 @@ void MetaspaceGC::post_initialize() { // Reset the high-water mark once the VM initialization is done. - _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), MetaspaceSize); + _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), (size_t)MetaspaceSize); } bool MetaspaceGC::can_expand(size_t word_size, bool is_class) { @@ -1602,7 +1602,7 @@ (size_t)MIN2(min_tmp, double(max_uintx)); // Don't shrink less than the initial generation size minimum_desired_capacity = MAX2(minimum_desired_capacity, - MetaspaceSize); + (size_t)MetaspaceSize); log_trace(gc, metaspace)("MetaspaceGC::compute_new_size: "); log_trace(gc, metaspace)(" minimum_free_percentage: %6.2f maximum_used_percentage: %6.2f", @@ -1648,7 +1648,7 @@ const double max_tmp = used_after_gc / minimum_used_percentage; size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx)); maximum_desired_capacity = MAX2(maximum_desired_capacity, - MetaspaceSize); + (size_t)MetaspaceSize); log_trace(gc, metaspace)(" maximum_free_percentage: %6.2f minimum_used_percentage: %6.2f", maximum_free_percentage, minimum_used_percentage); log_trace(gc, metaspace)(" minimum_desired_capacity: %6.1fKB maximum_desired_capacity: %6.1fKB", @@ -3352,7 +3352,7 @@ // on the medium chunk list. The next chunk will be small and progress // from there. This size calculated by -version. _first_class_chunk_word_size = MIN2((size_t)MediumChunk*6, - (CompressedClassSpaceSize/BytesPerWord)*2); + (size_t)(CompressedClassSpaceSize/BytesPerWord)*2); _first_class_chunk_word_size = align_word_size_up(_first_class_chunk_word_size); // Arbitrarily set the initial virtual space to a multiple // of the boot class loader size. --- jdk10/src/share/vm/prims/whitebox.cpp 2017-01-13 00:41:16.000000000 +0100 +++ jdk10/src/share/vm/prims/whitebox.cpp 2017-01-25 10:28:19.888008143 +0100 @@ -1017,7 +1017,7 @@ WB_END WB_ENTRY(jobject, WB_GetSizeTVMFlag(JNIEnv* env, jobject o, jstring name)) - uintx result; + size_t result; if (GetVMFlag <size_t> (thread, env, name, &result, &CommandLineFlags::size_tAt)) { ThreadToNativeFromVM ttnfv(thread); // can't be in VM when we call JNI return longBox(thread, env, result); --- jdk10/src/share/vm/runtime/arguments.cpp 2017-01-13 00:41:16.000000000 +0100 +++ jdk10/src/share/vm/runtime/arguments.cpp 2017-01-25 10:28:19.892008051 +0100 @@ -1488,7 +1488,7 @@ // Increase the code cache size - tiered compiles a lot more. if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) { FLAG_SET_ERGO(uintx, ReservedCodeCacheSize, - MIN2(CODE_CACHE_DEFAULT_LIMIT, ReservedCodeCacheSize * 5)); + MIN2(CODE_CACHE_DEFAULT_LIMIT, (size_t)(ReservedCodeCacheSize * 5))); } // Enable SegmentedCodeCache if TieredCompilation is enabled and ReservedCodeCacheSize >= 240M if (FLAG_IS_DEFAULT(SegmentedCodeCache) && ReservedCodeCacheSize >= 240*M) { --- jdk10/src/share/vm/runtime/arguments.hpp 2017-01-13 00:41:16.000000000 +0100 +++ jdk10/src/share/vm/runtime/arguments.hpp 2017-01-25 10:28:19.892008051 +0100 @@ -416,7 +416,7 @@ // Value of the conservative maximum heap alignment needed static size_t _conservative_max_heap_alignment; - static uintx _min_heap_size; + static size_t _min_heap_size; // -Xrun arguments static AgentLibraryList _libraryList; ++++++ system-pcsclite.patch ++++++ --- jdk15/make/autoconf/lib-bundled.m4 2020-05-07 13:35:09.825368428 +0200 +++ jdk15/make/autoconf/lib-bundled.m4 2020-05-07 13:37:41.358280752 +0200 @@ -41,6 +41,7 @@ LIB_SETUP_ZLIB LIB_SETUP_LCMS LIB_SETUP_HARFBUZZ + LIB_SETUP_PCSCLITE ]) ################################################################################ @@ -304,3 +305,41 @@ AC_SUBST(HARFBUZZ_CFLAGS) AC_SUBST(HARFBUZZ_LIBS) ]) + +################################################################################ +# Setup pcsclite +################################################################################ +AC_DEFUN_ONCE([LIB_SETUP_PCSCLITE], +[ + AC_ARG_WITH(pcsclite, [AS_HELP_STRING([--with-pcsclite], + [use pcsclite from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) + + AC_MSG_CHECKING([for which pcsclite to use]) + + # default is bundled + DEFAULT_PCSCLITE=bundled + # if user didn't specify, use DEFAULT_PCSCLITE + if test "x${with_pcsclite}" = "x"; then + with_libpng=${DEFAULT_PCSCLITE} + fi + + if test "x${with_pcsclite}" = "xbundled"; then + USE_EXTERNAL_PCSCLITE=false + AC_MSG_RESULT([bundled]) + elif test "x${with_pcsclite}" = "xsystem"; then + PKG_CHECK_MODULES(PCSCLITE, libpcsclite, + [ PCSCLITE_FOUND=yes ], + [ PCSCLITE_FOUND=no ]) + if test "x${PCSCLITE_FOUND}" = "xyes"; then + USE_EXTERNAL_PCSCLITE=true + AC_MSG_RESULT([system]) + else + AC_MSG_RESULT([system not found]) + AC_MSG_ERROR([--with-pcsclite=system specified, but no pcsclite found!]) + fi + else + AC_MSG_ERROR([Invalid value of --with-pcsclite: ${with_pcsclite}, use 'system' or 'bundled']) + fi + + AC_SUBST(USE_EXTERNAL_PCSCLITE) +]) --- jdk15/make/autoconf/spec.gmk.in 2020-05-07 13:35:09.825368428 +0200 +++ jdk15/make/autoconf/spec.gmk.in 2020-05-07 13:37:41.358280752 +0200 @@ -769,6 +769,7 @@ ENABLE_AOT:=@ENABLE_AOT@ USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@ USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@ +USE_EXTERNAL_LIBPCSCLITE:=@USE_EXTERNAL_LIBPCSCLITE@ USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@ LIBZ_CFLAGS:=@LIBZ_CFLAGS@ LIBZ_LIBS:=@LIBZ_LIBS@ --- jdk15/make/modules/java.smartcardio/Lib.gmk 2020-05-07 13:35:09.933369079 +0200 +++ jdk15/make/modules/java.smartcardio/Lib.gmk 2020-05-07 13:40:06.651155470 +0200 @@ -30,12 +30,12 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJ2PCSC, \ NAME := j2pcsc, \ CFLAGS := $(CFLAGS_JDKLIB), \ - CFLAGS_unix := -D__sun_jdk, \ - EXTRA_HEADER_DIRS := libj2pcsc/MUSCLE, \ + CFLAGS_unix := -D__sun_jdk -DUSE_SYSTEM_LIBPCSCLITE, \ + EXTRA_HEADER_DIRS := /usr/include/PCSC, \ OPTIMIZATION := LOW, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ - LIBS_unix := $(LIBDL), \ + LIBS_unix := -lpcsclite $(LIBDL), \ LIBS_windows := winscard.lib, \ )) --- jdk15/src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.c 2020-05-07 13:35:10.301371295 +0200 +++ jdk15/src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.c 2020-05-07 13:37:55.482365786 +0200 @@ -36,6 +36,7 @@ #include "pcsc_md.h" +#ifndef USE_SYSTEM_LIBPCSCLITE void *hModule; FPTR_SCardEstablishContext scardEstablishContext; FPTR_SCardConnect scardConnect; @@ -47,6 +48,7 @@ FPTR_SCardBeginTransaction scardBeginTransaction; FPTR_SCardEndTransaction scardEndTransaction; FPTR_SCardControl scardControl; +#endif /* * Throws a Java Exception by name @@ -75,6 +77,7 @@ throwByName(env, "java/io/IOException", msg); } +#ifndef USE_SYSTEM_LIBPCSCLITE void *findFunction(JNIEnv *env, void *hModule, char *functionName) { void *fAddress = dlsym(hModule, functionName); if (fAddress == NULL) { @@ -85,9 +88,11 @@ } return fAddress; } +#endif JNIEXPORT void JNICALL Java_sun_security_smartcardio_PlatformPCSC_initialize (JNIEnv *env, jclass thisClass, jstring jLibName) { +#ifndef USE_SYSTEM_LIBPCSCLITE const char *libName = (*env)->GetStringUTFChars(env, jLibName, NULL); if (libName == NULL) { throwNullPointerException(env, "PCSC library name is null"); @@ -141,4 +146,5 @@ #else scardControl = (FPTR_SCardControl) findFunction(env, hModule, "SCardControl132"); #endif // __APPLE__ +#endif } --- jdk15/src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.h 2020-05-07 13:35:10.301371295 +0200 +++ jdk15/src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.h 2020-05-07 13:37:55.482365786 +0200 @@ -23,6 +23,8 @@ * questions. */ +#ifndef USE_SYSTEM_LIBPCSCLITE + typedef LONG (*FPTR_SCardEstablishContext)(DWORD dwScope, LPCVOID pvReserved1, LPCVOID pvReserved2, @@ -111,3 +113,41 @@ extern FPTR_SCardBeginTransaction scardBeginTransaction; extern FPTR_SCardEndTransaction scardEndTransaction; extern FPTR_SCardControl scardControl; + +#else + +#define CALL_SCardEstablishContext(dwScope, pvReserved1, pvReserved2, phContext) \ + (SCardEstablishContext(dwScope, pvReserved1, pvReserved2, phContext)) + +#define CALL_SCardConnect(hContext, szReader, dwSharedMode, dwPreferredProtocols, phCard, pdwActiveProtocols) \ + (SCardConnect(hContext, szReader, dwSharedMode, dwPreferredProtocols, phCard, pdwActiveProtocols)) + +#define CALL_SCardDisconnect(hCard, dwDisposition) \ + (SCardDisconnect(hCard, dwDisposition)) + +#define CALL_SCardStatus(hCard, mszReaderNames, pcchReaderLen, pdwState, pdwProtocol, pbAtr, pcbAtrLen) \ + (SCardStatus(hCard, mszReaderNames, pcchReaderLen, pdwState, pdwProtocol, pbAtr, pcbAtrLen)) + +#define CALL_SCardGetStatusChange(hContext, dwTimeout, rgReaderStates, cReaders) \ + (SCardGetStatusChange(hContext, dwTimeout, rgReaderStates, cReaders)) + +#define CALL_SCardTransmit(hCard, pioSendPci, pbSendBuffer, cbSendLength, \ + pioRecvPci, pbRecvBuffer, pcbRecvLength) \ + (SCardTransmit(hCard, pioSendPci, pbSendBuffer, cbSendLength, \ + pioRecvPci, pbRecvBuffer, pcbRecvLength)) + +#define CALL_SCardListReaders(hContext, mszGroups, mszReaders, pcchReaders) \ + (SCardListReaders(hContext, mszGroups, mszReaders, pcchReaders)) + +#define CALL_SCardBeginTransaction(hCard) \ + (SCardBeginTransaction(hCard)) + +#define CALL_SCardEndTransaction(hCard, dwDisposition) \ + (SCardEndTransaction(hCard, dwDisposition)) + +#define CALL_SCardControl(hCard, dwControlCode, pbSendBuffer, cbSendLength, \ + pbRecvBuffer, pcbRecvLength, lpBytesReturned) \ + (SCardControl(hCard, dwControlCode, pbSendBuffer, cbSendLength, \ + pbRecvBuffer, pcbRecvLength, lpBytesReturned)) + +#endif ++++++ zero-ranges.patch ++++++ --- jdk10/src/hotspot/cpu/zero/globals_zero.hpp 2016-01-21 19:16:09.000000000 +0100 +++ jdk10/src/hotspot/cpu/zero/globals_zero.hpp 2016-01-29 15:52:57.611610069 +0100 @@ -50,9 +50,9 @@ #define DEFAULT_STACK_SHADOW_PAGES (5 LP64_ONLY(+1) DEBUG_ONLY(+3)) #define DEFAULT_STACK_RESERVED_PAGES (0) -#define MIN_STACK_YELLOW_PAGES DEFAULT_STACK_YELLOW_PAGES -#define MIN_STACK_RED_PAGES DEFAULT_STACK_RED_PAGES -#define MIN_STACK_SHADOW_PAGES DEFAULT_STACK_SHADOW_PAGES +#define MIN_STACK_YELLOW_PAGES 1 +#define MIN_STACK_RED_PAGES 1 +#define MIN_STACK_SHADOW_PAGES 1 #define MIN_STACK_RESERVED_PAGES (0) define_pd_global(intx, StackYellowPages, DEFAULT_STACK_YELLOW_PAGES); _______________________________________________ openSUSE Commits mailing list -- commit@lists.opensuse.org To unsubscribe, email commit-le...@lists.opensuse.org List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/commit@lists.opensuse.org