On Mon, 12 Oct 2026 13:19:59 GMT, Erik Joelsson <[email protected]> wrote:

> Something is off here. Why doesn't `*linux*-gnueabihf` fail the same way? 
> `PLATFORM_EXTRACT_VARS_FROM_ABI` handles it, but 
> `PLATFORM_EXTRACT_VARS_FROM_LIBC` does not. It makes sense, since all this 
> `eabi*` stuff is really `ABI`.
> 
> So, how do we get to passing `linux-musleabi*` to 
> `PLATFORM_EXTRACT_VARS_FROM_LIBC`?

I went through the code path:

1. `VAR_LIBC` is set to `gnu`, `default`, or `musl`.
2. It is then copied to `OPENJDK_BUILD_LIBC` and `OPENJDK_TARGET_LIBC` for the 
build and target, respectively.
3. In 
[flags-cflags.m4#L644](https://github.com/benshuai5D/jdk/blob/1c8d8def0e86ab979c1acbf0b241d0e7ddb0be86/make/autoconf/flags-cflags.m4#L644):


OS_CFLAGS="$OS_CFLAGS -DLIBC=$OPENJDK_TARGET_LIBC"
if test "x$OPENJDK_TARGET_LIBC" = xmusl; then
  OS_CFLAGS="$OS_CFLAGS -DMUSL_LIBC"
fi


Only musl gets this special handling, so `default` and `gnu` both take the 
non-musl branches.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/33300#issuecomment-6141410249

Reply via email to