From duke at openjdk.org Fri Dec 12 05:56:06 2025 From: duke at openjdk.org (J. Duke) Date: Fri, 12 Dec 2025 05:56:06 GMT Subject: RFR: Merge jdk:master Message-ID: Hi all, this is an _automatically_ generated pull request to notify you that there is 1 commit from the branch `jdk:master`that can **not** be merged into the branch `master`: The following file contains merge conflicts: - src/java.base/macosx/native/libjava/java_props_macosx.c All Committers in this [project](https://openjdk.org/census#mobile) have access to my [personal fork](https://github.com/openjdk-bots/mobile) and can therefore help resolve these merge conflicts (you may want to coordinate who should do this). The following paragraphs will give an example on how to solve these merge conflicts and push the resulting merge commit to this pull request. The below commands should be run in a local clone of your [personal fork](https://wiki.openjdk.org/display/skara#Skara-Personalforks) of the [openjdk/mobile](https://github.com/openjdk/mobile) repository. # Ensure target branch is up to date $ git checkout master $ git pull https://github.com/openjdk/mobile.git master # Fetch and checkout the branch for this pull request $ git fetch https://github.com/openjdk-bots/mobile.git +10:openjdk-bot-10 $ git checkout openjdk-bot-10 # Merge the target branch $ git merge master When you have resolved the conflicts resulting from the `git merge` command above, run the following commands to create a merge commit: $ git add paths/to/files/with/conflicts $ git commit -m 'Merge jdk:master' When you have created the merge commit, run the following command to push the merge commit to this pull request: $ git push https://github.com/openjdk-bots/mobile.git openjdk-bot-10:10 _Note_: if you are using SSH to push commits to GitHub, then change the URL in the above `git push` command accordingly. Thanks, J. Duke ------------- Commit messages: - 8373517: Revert the macos Tahoe specific change done in JDK-8359830 The webrev contains the conflicts with master: - merge conflicts: https://webrevs.openjdk.org/?repo=mobile&pr=41&range=00.conflicts Changes: https://git.openjdk.org/mobile/pull/41/files Stats: 34 lines in 1 file changed: 0 ins; 18 del; 16 mod Patch: https://git.openjdk.org/mobile/pull/41.diff Fetch: git fetch https://git.openjdk.org/mobile.git pull/41/head:pull/41 PR: https://git.openjdk.org/mobile/pull/41 From duke at openjdk.org Mon Dec 22 00:26:17 2025 From: duke at openjdk.org (duke) Date: Mon, 22 Dec 2025 00:26:17 GMT Subject: Withdrawn: 8370659: [mobile] enable static-libs-image for Android In-Reply-To: References: Message-ID: On Sun, 26 Oct 2025 16:10:09 GMT, Johan Vos wrote: > This PR adds the changes required to compile libjvm.a and the classlibs using the latest upstream code. > > Some notes: > > To configure/make, the following configuration is recommended: > > bash ./configure \ > --disable-warnings-as-errors \ > --openjdk-target=aarch64-linux-android \ > --with-boot-jdk=/opt/jdk-25 \ > --with-toolchain-path=/opt/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/bin \ > --with-sysroot=/opt/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/sysroot \ > --with-toolchain-type=clang > > > After configuring the build, run > `make static-libs-image` > > Note that this requires Android NDK 29, which can be downloaded from https://developer.android.com/ndk/downloads > I only tested this using Linux. Mac/Windows builds may or may not work. > > In `make/autoconf/flags-cflags.m4`, the minimum android version is set to 32 (`-target aarch64-linux-android32`). The reason for this is that this version comes with a version of bionic that supports thr_current. This is not strictly needed, but lower versions would require more bionic-specific patches. > > I use `#ifdef __BIONIC__ `and similar in most places where we do "Android" specific checks. The reason for this is that those checks mainly refer to support that is (or isn't) available in Bionic. As such, it is better to compare e.g. bionic with musl and libc unless we are specifically using Android API's > > I can provide a sample with a Makefile that validates the build on a real phone, but I think that is not in scope of this PR. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/mobile/pull/40 From duke at openjdk.org Mon Dec 22 08:14:47 2025 From: duke at openjdk.org (J. Duke) Date: Mon, 22 Dec 2025 08:14:47 GMT Subject: RFR: Merge jdk:master [v2] In-Reply-To: References: Message-ID: > Hi all, > > this is an _automatically_ generated pull request to notify you that there is 1 commit from the branch `jdk:master`that can **not** be merged into the branch `master`: > > The following file contains merge conflicts: > > - src/java.base/macosx/native/libjava/java_props_macosx.c > > All Committers in this [project](https://openjdk.org/census#mobile) have access to my [personal fork](https://github.com/openjdk-bots/mobile) and can therefore help resolve these merge conflicts (you may want to coordinate who should do this). > The following paragraphs will give an example on how to solve these merge conflicts and push the resulting merge commit to this pull request. > The below commands should be run in a local clone of your [personal fork](https://wiki.openjdk.org/display/skara#Skara-Personalforks) of the [openjdk/mobile](https://github.com/openjdk/mobile) repository. > > > # Ensure target branch is up to date > $ git checkout master > $ git pull https://github.com/openjdk/mobile.git master > > # Fetch and checkout the branch for this pull request > $ git fetch https://github.com/openjdk-bots/mobile.git +10:openjdk-bot-10 > $ git checkout openjdk-bot-10 > > # Merge the target branch > $ git merge master > > > When you have resolved the conflicts resulting from the `git merge` command above, run the following commands to create a merge commit: > > > $ git add paths/to/files/with/conflicts > $ git commit -m 'Merge jdk:master' > > > > When you have created the merge commit, run the following command to push the merge commit to this pull request: > > > $ git push https://github.com/openjdk-bots/mobile.git openjdk-bot-10:10 > > > _Note_: if you are using SSH to push commits to GitHub, then change the URL in the above `git push` command accordingly. > > Thanks, > J. Duke J. Duke has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: - Merge jdk:master - 8373517: Revert the macos Tahoe specific change done in JDK-8359830 Reviewed-by: rriggs, bpb ------------- Changes: https://git.openjdk.org/mobile/pull/41/files Webrev: https://webrevs.openjdk.org/?repo=mobile&pr=41&range=01 Stats: 34 lines in 1 file changed: 0 ins; 18 del; 16 mod Patch: https://git.openjdk.org/mobile/pull/41.diff Fetch: git fetch https://git.openjdk.org/mobile.git pull/41/head:pull/41 PR: https://git.openjdk.org/mobile/pull/41 From duke at openjdk.org Mon Dec 22 08:14:49 2025 From: duke at openjdk.org (duke) Date: Mon, 22 Dec 2025 08:14:49 GMT Subject: RFR: Merge jdk:master In-Reply-To: References: Message-ID: On Fri, 12 Dec 2025 05:47:19 GMT, J. Duke wrote: > Hi all, > > this is an _automatically_ generated pull request to notify you that there is 1 commit from the branch `jdk:master`that can **not** be merged into the branch `master`: > > The following file contains merge conflicts: > > - src/java.base/macosx/native/libjava/java_props_macosx.c > > All Committers in this [project](https://openjdk.org/census#mobile) have access to my [personal fork](https://github.com/openjdk-bots/mobile) and can therefore help resolve these merge conflicts (you may want to coordinate who should do this). > The following paragraphs will give an example on how to solve these merge conflicts and push the resulting merge commit to this pull request. > The below commands should be run in a local clone of your [personal fork](https://wiki.openjdk.org/display/skara#Skara-Personalforks) of the [openjdk/mobile](https://github.com/openjdk/mobile) repository. > > > # Ensure target branch is up to date > $ git checkout master > $ git pull https://github.com/openjdk/mobile.git master > > # Fetch and checkout the branch for this pull request > $ git fetch https://github.com/openjdk-bots/mobile.git +10:openjdk-bot-10 > $ git checkout openjdk-bot-10 > > # Merge the target branch > $ git merge master > > > When you have resolved the conflicts resulting from the `git merge` command above, run the following commands to create a merge commit: > > > $ git add paths/to/files/with/conflicts > $ git commit -m 'Merge jdk:master' > > > > When you have created the merge commit, run the following command to push the merge commit to this pull request: > > > $ git push https://github.com/openjdk-bots/mobile.git openjdk-bot-10:10 > > > _Note_: if you are using SSH to push commits to GitHub, then change the URL in the above `git push` command accordingly. > > Thanks, > J. Duke @openjdk[bot] Your change (at version 4269f79ef9fc912e27fdfd989f86710df9e039c9) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/mobile/pull/41#issuecomment-3680960127 From duke at openjdk.org Mon Dec 22 08:27:31 2025 From: duke at openjdk.org (J. Duke) Date: Mon, 22 Dec 2025 08:27:31 GMT Subject: Integrated: Merge jdk:master In-Reply-To: References: Message-ID: On Fri, 12 Dec 2025 05:47:19 GMT, J. Duke wrote: > Hi all, > > this is an _automatically_ generated pull request to notify you that there is 1 commit from the branch `jdk:master`that can **not** be merged into the branch `master`: > > The following file contains merge conflicts: > > - src/java.base/macosx/native/libjava/java_props_macosx.c > > All Committers in this [project](https://openjdk.org/census#mobile) have access to my [personal fork](https://github.com/openjdk-bots/mobile) and can therefore help resolve these merge conflicts (you may want to coordinate who should do this). > The following paragraphs will give an example on how to solve these merge conflicts and push the resulting merge commit to this pull request. > The below commands should be run in a local clone of your [personal fork](https://wiki.openjdk.org/display/skara#Skara-Personalforks) of the [openjdk/mobile](https://github.com/openjdk/mobile) repository. > > > # Ensure target branch is up to date > $ git checkout master > $ git pull https://github.com/openjdk/mobile.git master > > # Fetch and checkout the branch for this pull request > $ git fetch https://github.com/openjdk-bots/mobile.git +10:openjdk-bot-10 > $ git checkout openjdk-bot-10 > > # Merge the target branch > $ git merge master > > > When you have resolved the conflicts resulting from the `git merge` command above, run the following commands to create a merge commit: > > > $ git add paths/to/files/with/conflicts > $ git commit -m 'Merge jdk:master' > > > > When you have created the merge commit, run the following command to push the merge commit to this pull request: > > > $ git push https://github.com/openjdk-bots/mobile.git openjdk-bot-10:10 > > > _Note_: if you are using SSH to push commits to GitHub, then change the URL in the above `git push` command accordingly. > > Thanks, > J. Duke This pull request has now been integrated. Changeset: 327f940f Author: J. Duke Committer: Johan Vos URL: https://git.openjdk.org/mobile/commit/327f940f3e350a554633ebd2f76cdc446552c2c4 Stats: 34 lines in 1 file changed: 0 ins; 18 del; 16 mod Merge ------------- PR: https://git.openjdk.org/mobile/pull/41 From duke at openjdk.org Mon Dec 22 08:32:40 2025 From: duke at openjdk.org (J. Duke) Date: Mon, 22 Dec 2025 08:32:40 GMT Subject: RFR: Merge jdk:master Message-ID: Hi all, this is an _automatically_ generated pull request to notify you that there are 129 commits from the branch `jdk:master`that can **not** be merged into the branch `master`: The following file contains merge conflicts: - src/hotspot/share/services/diagnosticCommand.cpp All Committers in this [project](https://openjdk.org/census#mobile) have access to my [personal fork](https://github.com/openjdk-bots/mobile) and can therefore help resolve these merge conflicts (you may want to coordinate who should do this). The following paragraphs will give an example on how to solve these merge conflicts and push the resulting merge commit to this pull request. The below commands should be run in a local clone of your [personal fork](https://wiki.openjdk.org/display/skara#Skara-Personalforks) of the [openjdk/mobile](https://github.com/openjdk/mobile) repository. # Ensure target branch is up to date $ git checkout master $ git pull https://github.com/openjdk/mobile.git master # Fetch and checkout the branch for this pull request $ git fetch https://github.com/openjdk-bots/mobile.git +11:openjdk-bot-11 $ git checkout openjdk-bot-11 # Merge the target branch $ git merge master When you have resolved the conflicts resulting from the `git merge` command above, run the following commands to create a merge commit: $ git add paths/to/files/with/conflicts $ git commit -m 'Merge jdk:master' When you have created the merge commit, run the following command to push the merge commit to this pull request: $ git push https://github.com/openjdk-bots/mobile.git openjdk-bot-11:11 _Note_: if you are using SSH to push commits to GitHub, then change the URL in the above `git push` command accordingly. Thanks, J. Duke ------------- Commit messages: - 8373876: StackWalkNativeToJava print more output in case of failures - 8346154: [XWayland] Some tests fail intermittently in the CI, but not locally - 8369515: Deadlock between JVMTI and JNI ReleasePrimitiveArrayCritical - 8374078: C2_MacroAssembler::verify_int_in_range has incorrect early return condition - 8373946: Synth ProgressBarUI implementation confuses background painting with border painting - 8373105: Test tools/jpackage/share/AsyncTest.java failed: problem running hdiutil - 8372564: Convert StringDedup to use Atomic - 8373793: TestDynamicStore.java '/manual' disables use of '/timeout' - 8374048: Genshen: Backout fix for missed cancellation notice - 8374052: Use java/util/Calendar in ReplaceCriticalClasses.java test - ... and 119 more: https://git.openjdk.org/mobile/compare/325cdb7f...3579c752 The webrev contains the conflicts with master: - merge conflicts: https://webrevs.openjdk.org/?repo=mobile&pr=42&range=00.conflicts Changes: https://git.openjdk.org/mobile/pull/42/files Stats: 18394 lines in 640 files changed: 11601 ins; 2654 del; 4139 mod Patch: https://git.openjdk.org/mobile/pull/42.diff Fetch: git fetch https://git.openjdk.org/mobile.git pull/42/head:pull/42 PR: https://git.openjdk.org/mobile/pull/42 From duke at openjdk.org Mon Dec 22 09:33:01 2025 From: duke at openjdk.org (J. Duke) Date: Mon, 22 Dec 2025 09:33:01 GMT Subject: RFR: Merge jdk:master [v2] In-Reply-To: References: Message-ID: > Hi all, > > this is an _automatically_ generated pull request to notify you that there are 129 commits from the branch `jdk:master`that can **not** be merged into the branch `master`: > > The following file contains merge conflicts: > > - src/hotspot/share/services/diagnosticCommand.cpp > > All Committers in this [project](https://openjdk.org/census#mobile) have access to my [personal fork](https://github.com/openjdk-bots/mobile) and can therefore help resolve these merge conflicts (you may want to coordinate who should do this). > The following paragraphs will give an example on how to solve these merge conflicts and push the resulting merge commit to this pull request. > The below commands should be run in a local clone of your [personal fork](https://wiki.openjdk.org/display/skara#Skara-Personalforks) of the [openjdk/mobile](https://github.com/openjdk/mobile) repository. > > > # Ensure target branch is up to date > $ git checkout master > $ git pull https://github.com/openjdk/mobile.git master > > # Fetch and checkout the branch for this pull request > $ git fetch https://github.com/openjdk-bots/mobile.git +11:openjdk-bot-11 > $ git checkout openjdk-bot-11 > > # Merge the target branch > $ git merge master > > > When you have resolved the conflicts resulting from the `git merge` command above, run the following commands to create a merge commit: > > > $ git add paths/to/files/with/conflicts > $ git commit -m 'Merge jdk:master' > > > > When you have created the merge commit, run the following command to push the merge commit to this pull request: > > > $ git push https://github.com/openjdk-bots/mobile.git openjdk-bot-11:11 > > > _Note_: if you are using SSH to push commits to GitHub, then change the URL in the above `git push` command accordingly. > > Thanks, > J. Duke J. Duke has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 130 commits: - Merge jdk:master - 8373876: StackWalkNativeToJava print more output in case of failures Reviewed-by: dholmes, mdoerr - 8346154: [XWayland] Some tests fail intermittently in the CI, but not locally Reviewed-by: serb, prr - 8369515: Deadlock between JVMTI and JNI ReleasePrimitiveArrayCritical Co-authored-by: Richard Reingruber Reviewed-by: rrich, fbredberg, pchilanomate - 8374078: C2_MacroAssembler::verify_int_in_range has incorrect early return condition Reviewed-by: kvn, dlong - 8373946: Synth ProgressBarUI implementation confuses background painting with border painting Reviewed-by: prr, kizune, azvegint - 8373105: Test tools/jpackage/share/AsyncTest.java failed: problem running hdiutil Reviewed-by: asemenyuk - 8372564: Convert StringDedup to use Atomic Reviewed-by: tschatzl, aboldtch, iwalulya - 8373793: TestDynamicStore.java '/manual' disables use of '/timeout' Reviewed-by: weijun - 8374048: Genshen: Backout fix for missed cancellation notice Reviewed-by: kdnilsen, ysr - ... and 120 more: https://git.openjdk.org/mobile/compare/327f940f...4aeb9d03 ------------- Changes: https://git.openjdk.org/mobile/pull/42/files Webrev: https://webrevs.openjdk.org/?repo=mobile&pr=42&range=01 Stats: 18394 lines in 640 files changed: 11601 ins; 2654 del; 4139 mod Patch: https://git.openjdk.org/mobile/pull/42.diff Fetch: git fetch https://git.openjdk.org/mobile.git pull/42/head:pull/42 PR: https://git.openjdk.org/mobile/pull/42 From duke at openjdk.org Mon Dec 22 09:38:36 2025 From: duke at openjdk.org (J. Duke) Date: Mon, 22 Dec 2025 09:38:36 GMT Subject: Integrated: Merge jdk:master In-Reply-To: References: Message-ID: On Mon, 22 Dec 2025 08:25:22 GMT, J. Duke wrote: > Hi all, > > this is an _automatically_ generated pull request to notify you that there are 129 commits from the branch `jdk:master`that can **not** be merged into the branch `master`: > > The following file contains merge conflicts: > > - src/hotspot/share/services/diagnosticCommand.cpp > > All Committers in this [project](https://openjdk.org/census#mobile) have access to my [personal fork](https://github.com/openjdk-bots/mobile) and can therefore help resolve these merge conflicts (you may want to coordinate who should do this). > The following paragraphs will give an example on how to solve these merge conflicts and push the resulting merge commit to this pull request. > The below commands should be run in a local clone of your [personal fork](https://wiki.openjdk.org/display/skara#Skara-Personalforks) of the [openjdk/mobile](https://github.com/openjdk/mobile) repository. > > > # Ensure target branch is up to date > $ git checkout master > $ git pull https://github.com/openjdk/mobile.git master > > # Fetch and checkout the branch for this pull request > $ git fetch https://github.com/openjdk-bots/mobile.git +11:openjdk-bot-11 > $ git checkout openjdk-bot-11 > > # Merge the target branch > $ git merge master > > > When you have resolved the conflicts resulting from the `git merge` command above, run the following commands to create a merge commit: > > > $ git add paths/to/files/with/conflicts > $ git commit -m 'Merge jdk:master' > > > > When you have created the merge commit, run the following command to push the merge commit to this pull request: > > > $ git push https://github.com/openjdk-bots/mobile.git openjdk-bot-11:11 > > > _Note_: if you are using SSH to push commits to GitHub, then change the URL in the above `git push` command accordingly. > > Thanks, > J. Duke This pull request has now been integrated. Changeset: 3580ef58 Author: J. Duke Committer: Johan Vos URL: https://git.openjdk.org/mobile/commit/3580ef58f697075af8ab8e71b203f147a39eff1d Stats: 18394 lines in 640 files changed: 11601 ins; 2654 del; 4139 mod Merge ------------- PR: https://git.openjdk.org/mobile/pull/42 From jvos at openjdk.org Mon Dec 22 12:09:57 2025 From: jvos at openjdk.org (Johan Vos) Date: Mon, 22 Dec 2025 12:09:57 GMT Subject: RFR: 8370659: [mobile] enable static-libs-image for Android In-Reply-To: References: Message-ID: On Sun, 26 Oct 2025 16:10:09 GMT, Johan Vos wrote: > This PR adds the changes required to compile libjvm.a and the classlibs using the latest upstream code. > > Some notes: > > To configure/make, the following configuration is recommended: > > bash ./configure \ > --disable-warnings-as-errors \ > --openjdk-target=aarch64-linux-android \ > --with-boot-jdk=/opt/jdk-25 \ > --with-toolchain-path=/opt/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/bin \ > --with-sysroot=/opt/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/sysroot \ > --with-toolchain-type=clang > > > After configuring the build, run > `make static-libs-image` > > Note that this requires Android NDK 29, which can be downloaded from https://developer.android.com/ndk/downloads > I only tested this using Linux. Mac/Windows builds may or may not work. > > In `make/autoconf/flags-cflags.m4`, the minimum android version is set to 32 (`-target aarch64-linux-android32`). The reason for this is that this version comes with a version of bionic that supports thr_current. This is not strictly needed, but lower versions would require more bionic-specific patches. > > I use `#ifdef __BIONIC__ `and similar in most places where we do "Android" specific checks. The reason for this is that those checks mainly refer to support that is (or isn't) available in Bionic. As such, it is better to compare e.g. bionic with musl and libc unless we are specifically using Android API's > > I can provide a sample with a Makefile that validates the build on a real phone, but I think that is not in scope of this PR. Keepalive. Can someone review? ------------- PR Comment: https://git.openjdk.org/mobile/pull/40#issuecomment-3681804805 From johan.vos at gluonhq.com Mon Dec 22 12:22:59 2025 From: johan.vos at gluonhq.com (Johan Vos) Date: Mon, 22 Dec 2025 13:22:59 +0100 Subject: Android PR, please review Message-ID: My PR [1] for supporting Android in the latest OpenJDK mobile code was closed due to 8 weeks of inactivity. I re-opened it, and it would be great if an existing reviewer could review/approve this. Thanks, - Johan [1] https://github.com/openjdk/mobile/pull/40 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jwaters at openjdk.org Mon Dec 22 13:46:34 2025 From: jwaters at openjdk.org (Julian Waters) Date: Mon, 22 Dec 2025 13:46:34 GMT Subject: RFR: 8370659: [mobile] enable static-libs-image for Android In-Reply-To: References: Message-ID: On Sun, 26 Oct 2025 16:10:09 GMT, Johan Vos wrote: > This PR adds the changes required to compile libjvm.a and the classlibs using the latest upstream code. > > Some notes: > > To configure/make, the following configuration is recommended: > > bash ./configure \ > --disable-warnings-as-errors \ > --openjdk-target=aarch64-linux-android \ > --with-boot-jdk=/opt/jdk-25 \ > --with-toolchain-path=/opt/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/bin \ > --with-sysroot=/opt/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/sysroot \ > --with-toolchain-type=clang > > > After configuring the build, run > `make static-libs-image` > > Note that this requires Android NDK 29, which can be downloaded from https://developer.android.com/ndk/downloads > I only tested this using Linux. Mac/Windows builds may or may not work. > > In `make/autoconf/flags-cflags.m4`, the minimum android version is set to 32 (`-target aarch64-linux-android32`). The reason for this is that this version comes with a version of bionic that supports thr_current. This is not strictly needed, but lower versions would require more bionic-specific patches. > > I use `#ifdef __BIONIC__ `and similar in most places where we do "Android" specific checks. The reason for this is that those checks mainly refer to support that is (or isn't) available in Bionic. As such, it is better to compare e.g. bionic with musl and libc unless we are specifically using Android API's > > I can provide a sample with a Makefile that validates the build on a real phone, but I think that is not in scope of this PR. Build changes look ok, apart from some queries. I believe you can use the touch command to keep a Pull Request open nowadays, it's quite a nifty tool to refresh the Pull Request without those keep alive comments :) I'm not a Reviewer, so can't really help with getting this integrated, but something general I've noted is the #ifdef code for __BIONIC__ seems to not have a replacement for Android, it just doesn't include the code it guards on Android, but also doesn't implement it for Android either. So there's functionality in Java that is unimplemented and will simply not work on Android. Also, the build system seems to have "android" properly set in some areas (Like OPENJDK_TARGET_OS) while in others it re-uses "linux", which makes it a bit harder to see what is for Android and what is for Linux. Are both intentional? Otherwise, this seems fine. Just a couple other not-too-serious queries. make/autoconf/flags-cflags.m4 line 73: > 71: > 72: # Debug symbols > 73: if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$OPENJDK_TARGET_OS" = xandroid; then What gcc flags does Android need that can't be done in the clang block? make/autoconf/flags-cflags.m4 line 435: > 433: CFLAGS_OS_DEF_JVM="-D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_" > 434: elif test "x$OPENJDK_TARGET_OS" = xandroid; then > 435: CFLAGS_OS_DEF_JVM="-target aarch64-linux-android32 -DLINUX -D_ALLBSD_SOURCE -DANDROID" Interesting that -target is needed, I thought --openjdk-target would handle that. Admittedly however I'm not very experienced with clang/LLVM, my area of expertise is more related to gcc. src/hotspot/share/utilities/forbiddenFunctions.hpp line 54: > 52: // avoided entirely. > 53: > 54: #if !defined(__BIONIC__) Ugh. I was never a fan of the way forbidden methods were poisoned in HotSpot, looks like the fallout has reached mobile. I'll do what I can to make upstream's implementation of it less painful to work with in the future. ------------- Marked as reviewed by jwaters (no project role). PR Review: https://git.openjdk.org/mobile/pull/40#pullrequestreview-3604112007 PR Comment: https://git.openjdk.org/mobile/pull/40#issuecomment-3682121664 PR Review Comment: https://git.openjdk.org/mobile/pull/40#discussion_r2639905252 PR Review Comment: https://git.openjdk.org/mobile/pull/40#discussion_r2639916019 PR Review Comment: https://git.openjdk.org/mobile/pull/40#discussion_r2639921383 From jvos at openjdk.org Tue Dec 23 10:06:30 2025 From: jvos at openjdk.org (Johan Vos) Date: Tue, 23 Dec 2025 10:06:30 GMT Subject: RFR: 8370659: [mobile] enable static-libs-image for Android In-Reply-To: References: Message-ID: On Sun, 26 Oct 2025 16:10:09 GMT, Johan Vos wrote: > This PR adds the changes required to compile libjvm.a and the classlibs using the latest upstream code. > > Some notes: > > To configure/make, the following configuration is recommended: > > bash ./configure \ > --disable-warnings-as-errors \ > --openjdk-target=aarch64-linux-android \ > --with-boot-jdk=/opt/jdk-25 \ > --with-toolchain-path=/opt/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/bin \ > --with-sysroot=/opt/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/sysroot \ > --with-toolchain-type=clang > > > After configuring the build, run > `make static-libs-image` > > Note that this requires Android NDK 29, which can be downloaded from https://developer.android.com/ndk/downloads > I only tested this using Linux. Mac/Windows builds may or may not work. > > In `make/autoconf/flags-cflags.m4`, the minimum android version is set to 32 (`-target aarch64-linux-android32`). The reason for this is that this version comes with a version of bionic that supports thr_current. This is not strictly needed, but lower versions would require more bionic-specific patches. > > I use `#ifdef __BIONIC__ `and similar in most places where we do "Android" specific checks. The reason for this is that those checks mainly refer to support that is (or isn't) available in Bionic. As such, it is better to compare e.g. bionic with musl and libc unless we are specifically using Android API's > > I can provide a sample with a Makefile that validates the build on a real phone, but I think that is not in scope of this PR. > I believe you can use the touch command to keep a Pull Request open nowadays, it's quite a nifty tool to refresh the Pull Request without those keep alive comments :) > > I'm not a Reviewer, so can't really help with getting this integrated, but something general I've noted is the #ifdef code for **BIONIC** seems to not have a replacement for Android, it just doesn't include the code it guards on Android, but also doesn't implement it for Android either. So there's functionality in Java that is unimplemented and will simply not work on Android. That is true. There are some locations where #ifdef BIONIC is used to guard unneeded code on Android, but there are other locations where it is used to not execute some specific functionality that is not (yet?) working on Android. Some of this code doesn't make sense on Android, where other code probably should be implemented one day when we want to pass the TCK. I see this as part of a gradual approach, where we first want to make sure HelloWorld runs, and then add missing functionality. > Also, the build system seems to have "android" properly set in some areas (Like OPENJDK_TARGET_OS) while in others it re-uses "linux", which makes it a bit harder to see what is for Android and what is for Linux. Are both intentional? Otherwise, this seems fine. Just a couple other not-too-serious queries. Right, that is something I'm not too happy with myself, but I don't see a better solution. In the typical OS systems, we use e.g. macosx, linux, windows, aix as OPENJDK_TARGET_OS and then either unix or windows as OPENJDK_TARGET_OS_TYPE. I believe it's clear that we have to use unix as the OPENJDK_TARGE_OS_TYPE, but I've set the TARGET_OS to Android and not to linux, as there are important differences. However, in some cases we want to leverage a whole part of the linux code, and in that case we claim to be "linux". Ideally, there would be a 3-level system (e.g. Android -> Linux -> Unix) but that would introduce much more complexity. I'm open to suggestions of course. ------------- PR Comment: https://git.openjdk.org/mobile/pull/40#issuecomment-3686025022