这是indexloc提供的服务,不要输入任何密码
Skip to content

fix(main/openjdk): Build jsound and regerate patchset #25152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From 85913fabd90c355e9e5887ab01d026539e0d1e4e Mon Sep 17 00:00:00 2001
From cb10ccc87c6a1b082214cf808157dfb88c2e7cba Mon Sep 17 00:00:00 2001
From: Henrik Grimler <grimler@termux.dev>
Date: Sun, 31 Mar 2024 16:31:48 +0200
Subject: [PATCH 01/37] libinet: include netinet/in.h for android builds
Subject: [PATCH 01/41] libinet: include netinet/in.h for android builds

---
src/java.base/unix/native/libnet/net_util_md.h | 3 +++
1 file changed, 3 insertions(+)

diff --git a/src/java.base/unix/native/libnet/net_util_md.h b/src/java.base/unix/native/libnet/net_util_md.h
index 902cf9673..e74b6265b 100644
index 68835987b64..986892f209a 100644
--- a/src/java.base/unix/native/libnet/net_util_md.h
+++ b/src/java.base/unix/native/libnet/net_util_md.h
@@ -26,6 +26,9 @@
Expand All @@ -22,5 +22,5 @@ index 902cf9673..e74b6265b 100644
#include <poll.h>
#include <sys/socket.h>
--
2.45.2
2.50.1

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From 5398fe8adfa82d34f801f7861968ca2d6495fdc4 Mon Sep 17 00:00:00 2001
From 3250d39d75058736f8a0e27460cbd1358629b0af Mon Sep 17 00:00:00 2001
From: Duy Tran Khanh <40482367+khanhduytran0@users.noreply.github.com>
Date: Sun, 6 Jun 2021 20:11:11 +0700
Subject: [PATCH] os_linux: add android checks and fixes
Subject: [PATCH 02/41] os_linux: add android checks and fixes

---
src/hotspot/os/linux/os_linux.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
index ae0c73dcb711..e8e66887cd5a 100644
index 7c951cee51c..0a96aef438f 100644
--- a/src/hotspot/os/linux/os_linux.cpp
+++ b/src/hotspot/os/linux/os_linux.cpp
@@ -132,7 +132,7 @@
@@ -135,7 +135,7 @@
// for timer info max values which include all bits
#define ALL_64_BITS CONST64(0xFFFFFFFFFFFFFFFF)

Expand All @@ -20,15 +20,15 @@ index ae0c73dcb711..e8e66887cd5a 100644
// dlvsym is not a part of POSIX
// and musl libc doesn't implement it.
static void *dlvsym(void *handle,
@@ -515,6 +515,7 @@ extern "C" void breakpoint() {
@@ -518,6 +518,7 @@ extern "C" void breakpoint() {
// detecting pthread library

void os::Linux::libpthread_init() {
+#ifndef __ANDROID__
// Save glibc and pthread version strings.
#if !defined(_CS_GNU_LIBC_VERSION) || \
!defined(_CS_GNU_LIBPTHREAD_VERSION)
@@ -539,6 +540,9 @@ void os::Linux::libpthread_init() {
@@ -542,6 +543,9 @@ void os::Linux::libpthread_init() {
confstr(_CS_GNU_LIBPTHREAD_VERSION, str, n);
os::Linux::set_libpthread_version(str);
#endif
Expand All @@ -39,5 +39,5 @@ index ae0c73dcb711..e8e66887cd5a 100644

/////////////////////////////////////////////////////////////////////////////
--
2.44.0
2.50.1

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From b04c40ca7b8a3c6cb29d9e0e965ec592148327a2 Mon Sep 17 00:00:00 2001
From 52f07eb0a8759a654f0edc6ee28713aebef62e76 Mon Sep 17 00:00:00 2001
From: Duy Tran Khanh <40482367+khanhduytran0@users.noreply.github.com>
Date: Mon, 7 Jun 2021 06:27:26 +0700
Subject: [PATCH] Define sys gettid on arm and aarch64
Subject: [PATCH 03/41] Define sys gettid on arm and aarch64

---
src/hotspot/os/linux/os_linux.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
index e8e66887cd5a..08b27d2dbe22 100644
index 0a96aef438f..2c0d3b78eee 100644
--- a/src/hotspot/os/linux/os_linux.cpp
+++ b/src/hotspot/os/linux/os_linux.cpp
@@ -322,11 +322,11 @@ bool os::have_special_privileges() {
@@ -319,11 +319,11 @@ bool os::have_special_privileges() {


#ifndef SYS_gettid
Expand All @@ -25,7 +25,7 @@ index e8e66887cd5a..08b27d2dbe22 100644
#define SYS_gettid 224
#else
#ifdef __amd64__
@@ -334,6 +334,8 @@ bool os::have_special_privileges() {
@@ -331,6 +331,8 @@ bool os::have_special_privileges() {
#else
#ifdef __sparc__
#define SYS_gettid 143
Expand All @@ -35,5 +35,5 @@ index e8e66887cd5a..08b27d2dbe22 100644
#error define gettid for the arch
#endif
--
2.44.0
2.50.1

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From 2e669f0d90683894bc153351cae0ca20f83770dc Mon Sep 17 00:00:00 2001
From d0fbee557152c1e80c8ed0de5b7e46d5fd5ef8c9 Mon Sep 17 00:00:00 2001
From: Duy Tran Khanh <40482367+khanhduytran0@users.noreply.github.com>
Date: Mon, 7 Jun 2021 08:05:09 +0700
Subject: [PATCH] Disable posix print uptime (overridden by linux!)
Subject: [PATCH 04/41] Disable posix print uptime (overridden by linux!)

---
src/hotspot/os/posix/os_posix.cpp | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/src/hotspot/os/posix/os_posix.cpp b/src/hotspot/os/posix/os_posix.cpp
index ae058dd345b8..ea99a3755b9a 100644
index 1561f50fba7..844a3b2d5f9 100644
--- a/src/hotspot/os/posix/os_posix.cpp
+++ b/src/hotspot/os/posix/os_posix.cpp
@@ -65,7 +65,9 @@
@@ -67,7 +67,9 @@
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
Expand All @@ -21,15 +21,15 @@ index ae058dd345b8..ea99a3755b9a 100644

#ifdef __APPLE__
#include <crt_externs.h>
@@ -418,6 +420,7 @@ void os::Posix::print_load_average(outputStream* st) {
@@ -440,6 +442,7 @@ void os::Posix::print_load_average(outputStream* st) {
// unfortunately it does not work on macOS and Linux because the utx chain has no entry
// for reboot at least on my test machines
void os::Posix::print_uptime_info(outputStream* st) {
+#ifndef __ANDROID__
int bootsec = -1;
int currsec = time(NULL);
struct utmpx* ent;
@@ -432,6 +435,7 @@ void os::Posix::print_uptime_info(outputStream* st) {
@@ -454,6 +457,7 @@ void os::Posix::print_uptime_info(outputStream* st) {
if (bootsec != -1) {
os::print_dhm(st, "OS uptime:", (long) (currsec-bootsec));
}
Expand All @@ -38,5 +38,5 @@ index ae058dd345b8..ea99a3755b9a 100644

static void print_rlimit(outputStream* st, const char* msg,
--
2.44.0
2.50.1

Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
From 0e8ecf28408a9efae19ae58b63821c8fffb8792f Mon Sep 17 00:00:00 2001
From efc25729a65746fcfa206a82196c90a6031df8f5 Mon Sep 17 00:00:00 2001
From: Henrik Grimler <grimler@termux.dev>
Date: Fri, 3 Feb 2023 11:09:10 +0100
Subject: [PATCH] Link against system libiconv
Subject: [PATCH 05/41] Link against system libiconv

---
make/modules/java.instrument/Lib.gmk | 2 +-
make/modules/jdk.jdwp.agent/Lib.gmk | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/make/modules/java.instrument/Lib.gmk b/make/modules/java.instrument/Lib.gmk
index 3996ad213864..727f312da92a 100644
index 3996ad21386..727f312da92 100644
--- a/make/modules/java.instrument/Lib.gmk
+++ b/make/modules/java.instrument/Lib.gmk
@@ -49,7 +49,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBINSTRUMENT, \
Expand All @@ -22,10 +22,10 @@ index 3996ad213864..727f312da92a 100644
LIBS_macosx := -ljli -liconv -framework Cocoa -framework Security \
-framework ApplicationServices, \
diff --git a/make/modules/jdk.jdwp.agent/Lib.gmk b/make/modules/jdk.jdwp.agent/Lib.gmk
index aef358c14bd5..fbc1750bc58a 100644
index 0a041fed9c8..9db8c4e5487 100644
--- a/make/modules/jdk.jdwp.agent/Lib.gmk
+++ b/make/modules/jdk.jdwp.agent/Lib.gmk
@@ -61,7 +61,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJDWP, \
@@ -62,7 +62,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJDWP, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(JDKLIB_LIBS), \
Expand All @@ -35,5 +35,5 @@ index aef358c14bd5..fbc1750bc58a 100644
LIBS_aix := -liconv, \
))
--
2.44.0
2.50.1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From ccce9502c1a3460f02d1edd101097fa54582f83d Mon Sep 17 00:00:00 2001
From f764c59c37204af097f7f9b040cdda2caeda82ae Mon Sep 17 00:00:00 2001
From: Duy Tran Khanh <40482367+khanhduytran0@users.noreply.github.com>
Date: Thu, 10 Jun 2021 08:45:16 +0700
Subject: [PATCH] aarch64_get_thread_helper() -> Thread::current()
Subject: [PATCH 06/41] aarch64_get_thread_helper() -> Thread::current()

Can't build for Android:

Expand All @@ -13,7 +13,7 @@ clang90++: error: linker command failed with exit code 1 (use -v to see invocati
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.hpp b/src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.hpp
index 5a1f273c5486..88b6750dbff2 100644
index 5a1f273c548..88b6750dbff 100644
--- a/src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.hpp
+++ b/src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.hpp
@@ -47,6 +47,13 @@ private:
Expand All @@ -32,5 +32,5 @@ index 5a1f273c5486..88b6750dbff2 100644

#endif // OS_CPU_LINUX_AARCH64_THREAD_LINUX_AARCH64_HPP
--
2.44.0
2.50.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 572fd2a295de4237374166ee10773fcb412802c9 Mon Sep 17 00:00:00 2001
From d1f6eff24470ab1c5c70bacea042e9d78a2ef6aa Mon Sep 17 00:00:00 2001
From: Duy Tran Khanh <40482367+khanhduytran0@users.noreply.github.com>
Date: Thu, 10 Jun 2021 08:46:35 +0700
Subject: [PATCH] Remove aarch64_get_thread_helper()
Subject: [PATCH 07/41] Remove aarch64_get_thread_helper()

See commit 6f407090fda1 ("aarch64_get_thread_helper() ->
Thread::current()") for more details.
Expand All @@ -10,7 +10,7 @@ Thread::current()") for more details.
1 file changed, 2 insertions(+)

diff --git a/src/hotspot/os_cpu/linux_aarch64/threadLS_linux_aarch64.S b/src/hotspot/os_cpu/linux_aarch64/threadLS_linux_aarch64.S
index f541844b9d6d..dd83b3723304 100644
index f541844b9d6..dd83b372330 100644
--- a/src/hotspot/os_cpu/linux_aarch64/threadLS_linux_aarch64.S
+++ b/src/hotspot/os_cpu/linux_aarch64/threadLS_linux_aarch64.S
@@ -19,6 +19,7 @@
Expand All @@ -27,5 +27,5 @@ index f541844b9d6d..dd83b3723304 100644
.size _ZN10JavaThread25aarch64_get_thread_helperEv, .-_ZN10JavaThread25aarch64_get_thread_helperEv
+#endif
--
2.44.0
2.50.1

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From 13a958a7686ad1a813f5b2f56b11351db64d2d98 Mon Sep 17 00:00:00 2001
From 97a9008bd6710cb48c51afdb2788f6283a7d905c Mon Sep 17 00:00:00 2001
From: Duy Tran Khanh <40482367+khanhduytran0@users.noreply.github.com>
Date: Thu, 10 Jun 2021 09:36:26 +0700
Subject: [PATCH 09/37] Use Android's strerror_r()
Subject: [PATCH 08/41] Use Android's strerror_r()

---
src/java.base/unix/native/libjava/jni_util_md.c | 7 -------
1 file changed, 7 deletions(-)

diff --git a/src/java.base/unix/native/libjava/jni_util_md.c b/src/java.base/unix/native/libjava/jni_util_md.c
index 32b477aa7..06d5501a8 100644
index 460503cd794..335637b0a11 100644
--- a/src/java.base/unix/native/libjava/jni_util_md.c
+++ b/src/java.base/unix/native/libjava/jni_util_md.c
@@ -31,13 +31,6 @@
Expand All @@ -26,5 +26,5 @@ index 32b477aa7..06d5501a8 100644
static void *procHandle = NULL;
if (procHandle != NULL) {
--
2.45.2
2.50.1

Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
From abb21f4753cbfb0a1639180eab2c0f48b93d06ee Mon Sep 17 00:00:00 2001
From 9c13a7933750d370c3804e995aa286eebceb705b Mon Sep 17 00:00:00 2001
From: Duy Tran Khanh <40482367+khanhduytran0@users.noreply.github.com>
Date: Thu, 10 Jun 2021 16:42:56 +0700
Subject: [PATCH] Use utimensat on android
Subject: [PATCH 09/41] Use utimensat on android

---
.../native/libnio/fs/UnixNativeDispatcher.c | 22 ++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c b/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c
index 9df8be1e62c2..3b886283778b 100644
index 7bc14a0da97..f9c1b5516ee 100644
--- a/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c
+++ b/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c
@@ -140,6 +140,7 @@ typedef int fstatat64_func(int, const char *, struct stat64 *, int);
@@ -245,6 +245,7 @@ typedef int fstatat64_func(int, const char *, struct stat64 *, int);
typedef int unlinkat_func(int, const char*, int);
typedef int renameat_func(int, const char*, int, const char*);
typedef int futimesat_func(int, const char *, const struct timeval *);
+typedef int utimensat_func(int, const char *, const struct timespec *, int flags);
typedef int futimens_func(int, const struct timespec *);
typedef int lutimes_func(const char *, const struct timeval *);
typedef DIR* fdopendir_func(int);
@@ -149,6 +150,7 @@ static fstatat64_func* my_fstatat64_func = NULL;
@@ -258,6 +259,7 @@ static fstatat64_func* my_fstatat64_func = NULL;
static unlinkat_func* my_unlinkat_func = NULL;
static renameat_func* my_renameat_func = NULL;
static futimesat_func* my_futimesat_func = NULL;
+static utimensat_func* my_utimensat_func = NULL;
static futimens_func* my_futimens_func = NULL;
static lutimes_func* my_lutimes_func = NULL;
static fdopendir_func* my_fdopendir_func = NULL;
@@ -272,6 +274,9 @@ Java_sun_nio_fs_UnixNativeDispatcher_init(JNIEnv* env, jclass this)
@@ -395,6 +397,9 @@ Java_sun_nio_fs_UnixNativeDispatcher_init(JNIEnv* env, jclass this)
#ifndef _ALLBSD_SOURCE
my_futimesat_func = (futimesat_func*) dlsym(RTLD_DEFAULT, "futimesat");
my_lutimes_func = (lutimes_func*) dlsym(RTLD_DEFAULT, "lutimes");
Expand All @@ -37,7 +37,7 @@ index 9df8be1e62c2..3b886283778b 100644
#endif
my_futimens_func = (futimens_func*) dlsym(RTLD_DEFAULT, "futimens");
#if defined(_AIX)
@@ -292,7 +297,7 @@ Java_sun_nio_fs_UnixNativeDispatcher_init(JNIEnv* env, jclass this)
@@ -415,7 +420,7 @@ Java_sun_nio_fs_UnixNativeDispatcher_init(JNIEnv* env, jclass this)
capabilities |= sun_nio_fs_UnixNativeDispatcher_SUPPORTS_FUTIMES;
capabilities |= sun_nio_fs_UnixNativeDispatcher_SUPPORTS_LUTIMES;
#else
Expand All @@ -46,7 +46,7 @@ index 9df8be1e62c2..3b886283778b 100644
capabilities |= sun_nio_fs_UnixNativeDispatcher_SUPPORTS_FUTIMES;
if (my_lutimes_func != NULL)
capabilities |= sun_nio_fs_UnixNativeDispatcher_SUPPORTS_LUTIMES;
@@ -304,7 +309,7 @@ Java_sun_nio_fs_UnixNativeDispatcher_init(JNIEnv* env, jclass this)
@@ -427,7 +432,7 @@ Java_sun_nio_fs_UnixNativeDispatcher_init(JNIEnv* env, jclass this)

if (my_openat64_func != NULL && my_fstatat64_func != NULL &&
my_unlinkat_func != NULL && my_renameat_func != NULL &&
Expand All @@ -55,7 +55,7 @@ index 9df8be1e62c2..3b886283778b 100644
{
capabilities |= sun_nio_fs_UnixNativeDispatcher_SUPPORTS_OPENAT;
}
@@ -697,14 +702,21 @@ Java_sun_nio_fs_UnixNativeDispatcher_futimes(JNIEnv* env, jclass this, jint file
@@ -959,14 +964,21 @@ Java_sun_nio_fs_UnixNativeDispatcher_futimes(JNIEnv* env, jclass this, jint file
times[1].tv_sec = modificationTime / 1000000;
times[1].tv_usec = modificationTime % 1000000;

Expand All @@ -81,5 +81,5 @@ index 9df8be1e62c2..3b886283778b 100644
if (err == -1) {
throwUnixException(env, errno);
--
2.44.0
2.50.1

Loading