diff options
Diffstat (limited to 'community/openjdk11/build.patch')
-rw-r--r-- | community/openjdk11/build.patch | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/community/openjdk11/build.patch b/community/openjdk11/build.patch index 12691fbb65..92ae8ba5e0 100644 --- a/community/openjdk11/build.patch +++ b/community/openjdk11/build.patch @@ -1,3 +1,10 @@ +Author: The portola team at https://openjdk.java.net/projects/portola/ + With modifications by Simon Frankenberger <simon-alpine@fraho.eu> +Upstream: somewhat +Reason: This giant patch makes it possible to compile openjdk with musl libc. + The base was taken from a diff with the portola project and adjusted + for latest musl libc. + --- old/make/ReleaseFile.gmk +++ new/make/ReleaseFile.gmk @@ -53,6 +53,7 @@ @@ -30,7 +37,7 @@ if test $? = 0; then --- old/make/hotspot/lib/CompileJvm.gmk +++ new/make/hotspot/lib/CompileJvm.gmk -@@ -77,6 +77,7 @@ +@@ -79,6 +79,7 @@ -DHOTSPOT_BUILD_USER='"$(USERNAME)"' \ -DHOTSPOT_VM_DISTRO='"$(HOTSPOT_VM_DISTRO)"' \ -DCPU='"$(OPENJDK_TARGET_CPU_VM_VERSION)"' \ @@ -40,7 +47,7 @@ ################################################################################ --- old/make/lib/CoreLibraries.gmk +++ new/make/lib/CoreLibraries.gmk -@@ -241,6 +241,7 @@ +@@ -219,6 +219,7 @@ endif LIBJLI_CFLAGS += $(LIBZ_CFLAGS) @@ -50,7 +57,7 @@ LIBJLI_EXTRA_FILES += \ --- old/src/hotspot/os/linux/os_linux.cpp +++ new/src/hotspot/os/linux/os_linux.cpp -@@ -99,7 +99,6 @@ +@@ -101,7 +101,6 @@ # include <string.h> # include <syscall.h> # include <sys/sysinfo.h> @@ -58,7 +65,7 @@ # include <sys/ipc.h> # include <sys/shm.h> # include <link.h> -@@ -511,6 +510,11 @@ +@@ -594,6 +593,11 @@ // detecting pthread library void os::Linux::libpthread_init() { @@ -70,7 +77,7 @@ // Save glibc and pthread version strings. #if !defined(_CS_GNU_LIBC_VERSION) || \ !defined(_CS_GNU_LIBPTHREAD_VERSION) -@@ -528,6 +532,7 @@ +@@ -611,6 +615,7 @@ str = (char *)malloc(n, mtInternal); confstr(_CS_GNU_LIBPTHREAD_VERSION, str, n); os::Linux::set_libpthread_version(str); @@ -78,7 +85,7 @@ } ///////////////////////////////////////////////////////////////////////////// -@@ -2916,20 +2921,36 @@ +@@ -3053,20 +3058,36 @@ extern "C" JNIEXPORT void numa_warn(int number, char *where, ...) { } extern "C" JNIEXPORT void numa_error(char *where) { } @@ -135,7 +142,7 @@ #define REG_SP REG_RSP --- old/src/hotspot/share/gc/shared/genCollectedHeap.cpp +++ new/src/hotspot/share/gc/shared/genCollectedHeap.cpp -@@ -1147,7 +1147,7 @@ +@@ -1144,7 +1144,7 @@ static ScratchBlock *removeSmallestScratch(ScratchBlock **prev_ptr) { bool first = true; size_t min_size = 0; // "first" makes this conceptually infinite. @@ -146,7 +153,7 @@ assert(*prev_ptr == cur, "just checking"); --- old/src/hotspot/share/runtime/vm_version.cpp +++ new/src/hotspot/share/runtime/vm_version.cpp -@@ -272,7 +272,7 @@ +@@ -284,7 +284,7 @@ #endif #define INTERNAL_VERSION_SUFFIX VM_RELEASE ")" \ @@ -215,7 +222,7 @@ #include <math.h> --- old/src/java.base/unix/native/libjli/java_md_solinux.c +++ new/src/java.base/unix/native/libjli/java_md_solinux.c -@@ -235,6 +235,39 @@ +@@ -236,6 +236,39 @@ char *dmllp = NULL; char *p; /* a utility pointer */ @@ -278,7 +285,7 @@ #include <jvm.h> #include <jni.h> -@@ -786,26 +783,6 @@ +@@ -790,26 +787,6 @@ } return ret; } @@ -359,7 +366,7 @@ void *run_java_overflow (void *p) { JNIEnv *env; jclass class_id; -@@ -254,13 +269,19 @@ +@@ -258,13 +273,19 @@ exit(7); } @@ -380,7 +387,7 @@ pthread_join (thr, NULL); printf("Testing stack guard page behaviour for initial thread\n"); -@@ -273,7 +294,7 @@ +@@ -277,7 +298,7 @@ printf("\nTesting NATIVE_OVERFLOW\n"); printf("Testing stack guard page behaviour for other thread\n"); @@ -391,7 +398,7 @@ printf("Testing stack guard page behaviour for initial thread\n"); --- old/test/jdk/java/lang/ProcessBuilder/Basic.java +++ new/test/jdk/java/lang/ProcessBuilder/Basic.java -@@ -389,8 +389,8 @@ +@@ -396,8 +396,8 @@ if (failed != 0) throw new Error("null PATH"); } else if (action.equals("PATH search algorithm")) { equal(System.getenv("PATH"), "dir1:dir2:"); @@ -402,7 +409,7 @@ String[] cmd = {"prog"}; ProcessBuilder pb1 = new ProcessBuilder(cmd); ProcessBuilder pb2 = new ProcessBuilder(cmd); -@@ -431,13 +431,13 @@ +@@ -438,13 +438,13 @@ checkPermissionDenied(pb); // continue searching if EACCES @@ -418,7 +425,7 @@ equal(run(pb).exitValue(), True.exitValue()); // Check empty PATH component means current directory. -@@ -453,10 +453,10 @@ +@@ -460,10 +460,10 @@ pb.command(command); File prog = new File("./prog"); // "Normal" binaries @@ -431,7 +438,7 @@ equal(run(pb).exitValue(), False.exitValue()); prog.delete(); -@@ -511,12 +511,12 @@ +@@ -518,12 +518,12 @@ new File("dir2/prog").delete(); new File("prog").delete(); new File("dir3").mkdirs(); @@ -448,7 +455,7 @@ equal(run(pb).exitValue(), False.exitValue()); } finally { -@@ -613,6 +613,13 @@ +@@ -620,6 +620,13 @@ new File("/bin/false").exists()); } @@ -462,7 +469,7 @@ static class UnicodeOS { public static boolean is() { return is; } private static final String osName = System.getProperty("os.name"); -@@ -651,6 +658,45 @@ +@@ -658,6 +665,45 @@ } } @@ -508,7 +515,7 @@ static class EnglishUnix { private static final Boolean is = (! Windows.is() && isEnglish("LANG") && isEnglish("LC_ALL")); -@@ -1954,7 +2000,7 @@ +@@ -1961,7 +2007,7 @@ //---------------------------------------------------------------- try { new File("suBdiR").mkdirs(); |