Skip to content

Commit 01245b2

Browse files
committed
[patch] Create version-specific libpath patches
1 parent 413d2ff commit 01245b2

File tree

5 files changed

+117
-22
lines changed

5 files changed

+117
-22
lines changed

scripts/fetch.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ if [ ! -d "$JDKDIR" ]; then
8585
# apply the EV3-specific patches
8686
echo "[FETCH] Patching the source tree"
8787
patch -p1 -i "$SCRIPTDIR/$PATCHVER.patch"
88-
patch -p1 -i "$SCRIPTDIR/libpath.patch"
88+
# debian library path
89+
patch -p1 -i "$SCRIPTDIR/$PATCHVER_lib.patch"
8990

9091
else
9192
echo "[FETCH] Directory for JDK repository exists, assuming everything has been done already." 2>&1
Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1-
Index: b/src/hotspot/os/linux/os_linux.cpp
2-
===================================================================
3-
--- a/src/hotspot/os/linux/os_linux.cpp
4-
+++ b/src/hotspot/os/linux/os_linux.cpp
5-
@@ -325,10 +325,10 @@ void os::init_system_properties_values()
1+
diff -Naur a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk
2+
--- a/make/hotspot/lib/CompileJvm.gmk 2018-07-17 20:20:05.000000000 +0200
3+
+++ b/make/hotspot/lib/CompileJvm.gmk 2018-10-29 02:02:35.686070122 +0100
4+
@@ -192,6 +192,11 @@
5+
endif
6+
endif
7+
8+
+DEB_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null || true)
9+
+ifneq (,$(DEB_MULTIARCH))
10+
+JVM_CFLAGS += -DDEB_MULTIARCH="\"$(DEB_MULTIARCH)\""
11+
+endif
12+
+
13+
ifeq ($(OPENJDK_TARGET_OS), windows)
14+
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
15+
RC_DESC := 64-Bit$(SPACE)
16+
diff -Naur a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
17+
--- a/src/hotspot/os/linux/os_linux.cpp 2018-07-17 20:20:05.000000000 +0200
18+
+++ b/src/hotspot/os/linux/os_linux.cpp 2018-10-29 02:02:35.682070021 +0100
19+
@@ -326,10 +326,10 @@
620
// 1: ...
721
// ...
822
// 7: The default directories, normally /lib and /usr/lib.
@@ -16,19 +30,3 @@ Index: b/src/hotspot/os/linux/os_linux.cpp
1630
#endif
1731

1832
// Base path of extensions installed on the system.
19-
Index: b/make/hotspot/lib/CompileJvm.gmk
20-
===================================================================
21-
--- a/make/hotspot/lib/CompileJvm.gmk
22-
+++ b/make/hotspot/lib/CompileJvm.gmk
23-
@@ -129,6 +129,11 @@ ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TAR
24-
endif
25-
endif
26-
27-
+DEB_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null || true)
28-
+ifneq (,$(DEB_MULTIARCH))
29-
+JVM_CFLAGS += -DDEB_MULTIARCH="\"$(DEB_MULTIARCH)\""
30-
+endif
31-
+
32-
ifeq ($(OPENJDK_TARGET_OS), windows)
33-
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
34-
RC_DESC := 64-Bit$(SPACE)

scripts/jdk11_lib.patch

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
diff -Naur a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk
2+
--- a/make/hotspot/lib/CompileJvm.gmk 2018-10-27 19:33:58.000000000 +0200
3+
+++ b/make/hotspot/lib/CompileJvm.gmk 2018-10-29 02:01:25.308294530 +0100
4+
@@ -129,6 +129,11 @@
5+
endif
6+
endif
7+
8+
+DEB_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null || true)
9+
+ifneq (,$(DEB_MULTIARCH))
10+
+JVM_CFLAGS += -DDEB_MULTIARCH="\"$(DEB_MULTIARCH)\""
11+
+endif
12+
+
13+
ifeq ($(OPENJDK_TARGET_OS), windows)
14+
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
15+
RC_DESC := 64-Bit$(SPACE)
16+
diff -Naur a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
17+
--- a/src/hotspot/os/linux/os_linux.cpp 2018-10-27 19:33:58.000000000 +0200
18+
+++ b/src/hotspot/os/linux/os_linux.cpp 2018-10-29 02:01:25.304294429 +0100
19+
@@ -325,10 +325,10 @@
20+
// 1: ...
21+
// ...
22+
// 7: The default directories, normally /lib and /usr/lib.
23+
-#if defined(AMD64) || (defined(_LP64) && defined(SPARC)) || defined(PPC64) || defined(S390)
24+
- #define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
25+
+#ifdef DEB_MULTIARCH
26+
+#define DEFAULT_LIBPATH "/usr/lib/" DEB_MULTIARCH "/jni" ":/lib/" DEB_MULTIARCH ":/usr/lib/" DEB_MULTIARCH ":/usr/lib/jni:/lib:/usr/lib"
27+
#else
28+
- #define DEFAULT_LIBPATH "/lib:/usr/lib"
29+
+ #define DEFAULT_LIBPATH "/usr/lib/jni:/lib:/usr/lib"
30+
#endif
31+
32+
// Base path of extensions installed on the system.

scripts/jdk12_lib.patch

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
diff -Naur a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk
2+
--- a/make/hotspot/lib/CompileJvm.gmk 2018-10-27 00:13:12.000000000 +0200
3+
+++ b/make/hotspot/lib/CompileJvm.gmk 2018-10-29 02:00:54.643520553 +0100
4+
@@ -158,6 +158,11 @@
5+
endif
6+
endif
7+
8+
+DEB_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null || true)
9+
+ifneq (,$(DEB_MULTIARCH))
10+
+JVM_CFLAGS += -DDEB_MULTIARCH="\"$(DEB_MULTIARCH)\""
11+
+endif
12+
+
13+
ifeq ($(OPENJDK_TARGET_OS), windows)
14+
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
15+
RC_DESC := 64-Bit$(SPACE)
16+
diff -Naur a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
17+
--- a/src/hotspot/os/linux/os_linux.cpp 2018-10-27 00:13:12.000000000 +0200
18+
+++ b/src/hotspot/os/linux/os_linux.cpp 2018-10-29 02:00:54.643520553 +0100
19+
@@ -323,10 +323,10 @@
20+
// 1: ...
21+
// ...
22+
// 7: The default directories, normally /lib and /usr/lib.
23+
-#if defined(AMD64) || (defined(_LP64) && defined(SPARC)) || defined(PPC64) || defined(S390)
24+
- #define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
25+
+#ifdef DEB_MULTIARCH
26+
+#define DEFAULT_LIBPATH "/usr/lib/" DEB_MULTIARCH "/jni" ":/lib/" DEB_MULTIARCH ":/usr/lib/" DEB_MULTIARCH ":/usr/lib/jni:/lib:/usr/lib"
27+
#else
28+
- #define DEFAULT_LIBPATH "/lib:/usr/lib"
29+
+ #define DEFAULT_LIBPATH "/usr/lib/jni:/lib:/usr/lib"
30+
#endif
31+
32+
// Base path of extensions installed on the system.

scripts/jdk9_lib.patch

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
diff -Naur a/hotspot/make/lib/CompileJvm.gmk b/hotspot/make/lib/CompileJvm.gmk
2+
--- a/hotspot/make/lib/CompileJvm.gmk 2018-10-29 02:12:47.004503606 +0100
3+
+++ b/hotspot/make/lib/CompileJvm.gmk 2018-10-29 02:13:27.085866119 +0100
4+
@@ -187,6 +187,11 @@
5+
endif
6+
endif
7+
8+
+DEB_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null || true)
9+
+ifneq (,$(DEB_MULTIARCH))
10+
+JVM_CFLAGS += -DDEB_MULTIARCH="\"$(DEB_MULTIARCH)\""
11+
+endif
12+
+
13+
ifeq ($(OPENJDK_TARGET_OS), windows)
14+
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
15+
RC_DESC := 64-Bit$(SPACE)
16+
diff -Naur a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp
17+
--- a/hotspot/src/os/linux/vm/os_linux.cpp 2018-10-29 02:12:48.980571322 +0100
18+
+++ b/hotspot/src/os/linux/vm/os_linux.cpp 2018-10-29 02:13:34.850127459 +0100
19+
@@ -288,10 +288,10 @@
20+
// 1: ...
21+
// ...
22+
// 7: The default directories, normally /lib and /usr/lib.
23+
-#if defined(AMD64) || (defined(_LP64) && defined(SPARC)) || defined(PPC64) || defined(S390)
24+
- #define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
25+
+#ifdef DEB_MULTIARCH
26+
+#define DEFAULT_LIBPATH "/usr/lib/" DEB_MULTIARCH "/jni" ":/lib/" DEB_MULTIARCH ":/usr/lib/" DEB_MULTIARCH ":/usr/lib/jni:/lib:/usr/lib"
27+
#else
28+
- #define DEFAULT_LIBPATH "/lib:/usr/lib"
29+
+ #define DEFAULT_LIBPATH "/usr/lib/jni:/lib:/usr/lib"
30+
#endif
31+
32+
// Base path of extensions installed on the system.

0 commit comments

Comments
 (0)