Skip to content

Commit d308f95

Browse files
committed
[script][patch] Import Debian JNI library path patch
1 parent 88df335 commit d308f95

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

scripts/config.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ fi
134134
# EV3
135135
if [ "$JDKPLATFORM" == "ev3" ]; then
136136
SFLT_NEEDED=true
137+
eval "$(dpkg-architecture -s -a armel -A armel)"
137138

138139
# invalid or unset platform
139140
else

scripts/fetch.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ if [ ! -d "$JDKDIR" ]; then
7070
# apply the EV3-specific patches
7171
echo "[FETCH] Patching the source tree"
7272
patch -p1 -i "$SCRIPTDIR/$PATCHVER.patch"
73+
patch -p1 -i "$SCRIPTDIR/libpath.patch"
7374

7475
else
7576
echo "[FETCH] Directory for JDK repository exists, assuming everything has been done already." 2>&1

scripts/libpath.diff

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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()
6+
// 1: ...
7+
// ...
8+
// 7: The default directories, normally /lib and /usr/lib.
9+
-#if defined(AMD64) || (defined(_LP64) && defined(SPARC)) || defined(PPC64) || defined(S390)
10+
- #define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
11+
+#ifdef DEB_MULTIARCH
12+
+#define DEFAULT_LIBPATH "/usr/lib/" DEB_MULTIARCH "/jni" ":/lib/" DEB_MULTIARCH ":/usr/lib/" DEB_MULTIARCH ":/usr/lib/jni:/lib:/usr/lib"
13+
#else
14+
- #define DEFAULT_LIBPATH "/lib:/usr/lib"
15+
+ #define DEFAULT_LIBPATH "/usr/lib/jni:/lib:/usr/lib"
16+
#endif
17+
18+
// 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)

0 commit comments

Comments
 (0)