forked from SynoCommunity/spksrc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Debian patches and hotspot target build
- Loading branch information
1 parent
0d7d78a
commit 79c239d
Showing
32 changed files
with
1,997 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
cross/java-17-openjdk/patches/002.hotspot-mips-align.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/src/hotspot/cpu/zero/zeroInterpreter_zero.cpp | ||
+++ b/src/hotspot/cpu/zero/zeroInterpreter_zero.cpp | ||
@@ -418,7 +418,7 @@ int ZeroInterpreter::native_entry(Method | ||
ThreadStateTransition::transition_from_java(thread, _thread_in_native); | ||
|
||
// Make the call | ||
- intptr_t result[4 - LogBytesPerWord]; | ||
+ intptr_t result[4 - LogBytesPerWord] __attribute__((__aligned__(__alignof__(double)))); | ||
ffi_call(handler->cif(), (void (*)()) function, result, arguments); | ||
|
||
// Change the thread state back to _thread_in_Java and ensure it |
12 changes: 12 additions & 0 deletions
12
cross/java-17-openjdk/patches/003.icc_loading_with_symlink.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- a/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java | ||
+++ b/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java | ||
@@ -1327,9 +1327,6 @@ public class ICC_Profile implements Seri | ||
dir = st.nextToken(); | ||
fullPath = dir + File.separatorChar + fileName; | ||
f = new File(fullPath); | ||
- if (!isChildOf(f, dir)) { | ||
- f = null; | ||
- } | ||
} | ||
} | ||
|
12 changes: 12 additions & 0 deletions
12
cross/java-17-openjdk/patches/004.icedtea-override-redirect-compiz.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Index: b/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java | ||
=================================================================== | ||
--- a/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java | ||
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java | ||
@@ -1260,6 +1260,7 @@ class XWindowPeer extends XPanelPeer imp | ||
|
||
boolean isOverrideRedirect() { | ||
return XWM.getWMID() == XWM.OPENLOOK_WM || | ||
+ XWM.getWMID() == XWM.COMPIZ_WM || | ||
Window.Type.POPUP.equals(getWindowType()); | ||
} | ||
|
54 changes: 54 additions & 0 deletions
54
cross/java-17-openjdk/patches/005.libpcsclite-dlopen.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- a/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java | ||
+++ b/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java | ||
@@ -46,6 +46,7 @@ class PlatformPCSC { | ||
|
||
private final static String PROP_NAME = "sun.security.smartcardio.library"; | ||
|
||
+ private final static String LIB0 = "libpcsclite.so.1"; | ||
private final static String LIB1 = "/usr/$LIBISA/libpcsclite.so"; | ||
private final static String LIB2 = "/usr/local/$LIBISA/libpcsclite.so"; | ||
private final static String PCSC_FRAMEWORK = "/System/Library/Frameworks/PCSC.framework/Versions/Current/PCSC"; | ||
@@ -98,40 +99,9 @@ class PlatformPCSC { | ||
if (lib.length() != 0) { | ||
return lib; | ||
} | ||
- lib = expand(LIB1); | ||
- if (new File(lib).isFile()) { | ||
- // if LIB1 exists, use that | ||
- return lib; | ||
- } | ||
- lib = expand(LIB2); | ||
- if (new File(lib).isFile()) { | ||
- // if LIB2 exists, use that | ||
- return lib; | ||
- } | ||
- | ||
- // As of macos 11, framework libraries have been removed from the file | ||
- // system, but in such a way that they can still be dlopen()ed, even | ||
- // though they can no longer be open()ed. | ||
- // | ||
- // https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-release-notes | ||
- // | ||
- // """New in macOS Big Sur 11.0.1, the system ships with a built-in | ||
- // dynamic linker cache of all system-provided libraries. As part of | ||
- // this change, copies of dynamic libraries are no longer present on | ||
- // the filesystem. Code that attempts to check for dynamic library | ||
- // presence by looking for a file at a path or enumerating a directory | ||
- // will fail. Instead, check for library presence by attempting to | ||
- // dlopen() the path, which will correctly check for the library in the | ||
- // cache.""" | ||
- // | ||
- // The directory structure remains otherwise intact, so check for | ||
- // existence of the containing directory instead of the file. | ||
- lib = PCSC_FRAMEWORK; | ||
- if (new File(lib).getParentFile().isDirectory()) { | ||
- // if PCSC.framework exists, use that | ||
- return lib; | ||
- } | ||
- throw new IOException("No PC/SC library found on this system"); | ||
+ // let dlopen do the work | ||
+ lib = LIB0; | ||
+ return lib; | ||
} | ||
|
||
private static native void initialize(String libraryName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- a/src/java.base/share/native/libjli/java.c | ||
+++ b/src/java.base/share/native/libjli/java.c | ||
@@ -1997,7 +1997,7 @@ | ||
ReadKnownVMs(const char *jvmCfgName, jboolean speculative) | ||
{ | ||
FILE *jvmCfg; | ||
- char line[MAXPATHLEN+20]; | ||
+ char line[MAXPATHLEN+30]; | ||
int cnt = 0; | ||
int lineno = 0; | ||
jlong start = 0, end = 0; | ||
@@ -2012,6 +2012,11 @@ | ||
|
||
jvmCfg = fopen(jvmCfgName, "r"); | ||
if (jvmCfg == NULL) { | ||
+ char cfgName[strlen(jvmCfgName)+10]; | ||
+ sprintf(cfgName, "%s-default", jvmCfgName); | ||
+ jvmCfg = fopen(cfgName, "r"); | ||
+ } | ||
+ if (jvmCfg == NULL) { | ||
if (!speculative) { | ||
JLI_ReportErrorMessage(CFG_ERROR6, jvmCfgName); | ||
exit(1); |
11 changes: 11 additions & 0 deletions
11
cross/java-17-openjdk/patches/007.workaround_expand_exec_shield_cs_limit.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp | ||
+++ b/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp | ||
@@ -651,7 +651,7 @@ | ||
* updates (JDK-8023956). | ||
*/ | ||
void os::workaround_expand_exec_shield_cs_limit() { | ||
-#if defined(IA32) | ||
+#if defined(IA32) && !defined(ZERO) | ||
assert(Linux::initial_thread_stack_bottom() != NULL, "sanity"); | ||
size_t page_size = os::vm_page_size(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# DP: fixes an uninitialized memory issue in adlc | ||
--- a/src/hotspot/share/adlc/formsopt.cpp | ||
+++ b/src/hotspot/share/adlc/formsopt.cpp | ||
@@ -436,6 +436,10 @@ | ||
//==============================Frame Handling================================= | ||
//------------------------------FrameForm-------------------------------------- | ||
FrameForm::FrameForm() { | ||
+ _sync_stack_slots = NULL; | ||
+ _inline_cache_reg = NULL; | ||
+ _interpreter_frame_pointer_reg = NULL; | ||
+ _cisc_spilling_operand_name = NULL; | ||
_frame_pointer = NULL; | ||
_c_frame_pointer = NULL; | ||
_alignment = NULL; | ||
@@ -444,7 +448,6 @@ | ||
_varargs_C_out_slots_killed = NULL; | ||
_return_value = NULL; | ||
_c_return_value = NULL; | ||
- _interpreter_frame_pointer_reg = NULL; | ||
} | ||
|
||
FrameForm::~FrameForm() { |
72 changes: 72 additions & 0 deletions
72
cross/java-17-openjdk/patches/009.multiple-pkcs11-library-init.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# HG changeset patch | ||
# User andrew | ||
# Date 1352129932 0 | ||
# Node ID e9c857dcb964dbfa5eef3a3590244cb4d999cf7a | ||
# Parent 1406789608b76d0906881979335d685855f44190 | ||
Allow multiple PKCS11 library initialisation to be a non-critical error. | ||
|
||
--- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java | ||
+++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java | ||
@@ -52,6 +52,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 | ||
@@ -1023,6 +1024,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:"); | ||
} | ||
--- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java | ||
+++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java | ||
@@ -179,26 +179,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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- a/make/autoconf/flags-cflags.m4 | ||
+++ b/make/autoconf/flags-cflags.m4 | ||
@@ -735,6 +735,9 @@ | ||
fi | ||
elif test "x$FLAGS_CPU" = xs390x; then | ||
$1_CFLAGS_CPU="-mbackchain -march=z10" | ||
+ if test "x$VENDOR_FLAGS_CPU" != x; then | ||
+ $1_CFLAGS_CPU="-mbackchain $VENDOR_FLAGS_CPU" | ||
+ fi | ||
fi | ||
|
||
if test "x$FLAGS_CPU_ARCH" != xarm && test "x$FLAGS_CPU_ARCH" != xppc; then |
Oops, something went wrong.