On Wed, 16 Sep 2026 02:59:23 GMT, Daniel Hu <[email protected]> wrote:

> The change removes `$CFLAGS_WARNINGS_ARE_ERRORS` for reasons stated below. 
> `ARG_ARGUMENT` is also removed as it's a no-op and I believe it was 
> unintentionally added.
> 
> The issue is as title describes. When `bash configure` is run with the flags 
> `--enable-aarch64-sve` and `--with-extra-cflags='-Wall'` the following error 
> appears:
> 
> 
> bash configure --enable-aarch64-sve --with-extra-cflags='-Wall'
> ...
> checking for --enable-aarch64-sve... enabled, from command line
> configure: error: Option --enable-aarch64-sve is not available
> configure exiting with result code 1 
> 
> 
> This is problematic as the JDK cannot be built with cflag `-Wall` without 
> disabling aarch64 libsleef SVE features. The only workaround is excluding 
> problematic cflags that fail the `--enable-aarch64-sve` compiler check probe, 
> but that is undesirable.
> 
> Moreover, this is a regression as when building JDK25 these intrinsics from 
> [JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) built fine with 
> `-Wall` as the compiler check did not include the `-Werror` flag or 
> `$CFLAGS_WARNINGS_ARE_ERRORS`. Only after `--enable-aarch64-sve` was added 
> from [JDK-8366777](https://bugs.openjdk.org/browse/JDK-8366777) did this 
> build regression appear as now the SVE compiler check includes `-Werror`
> 
> Testing: with this change, `bash configure --enable-aarch64-sve 
> --with-extra-cflags='-Wall'` no longer errors. Moreover, before when building 
> with `bash configure --with-extra-cflags='-Wall'` the JDKs fail on Graviton3 
> machines on the following jtreg:
> * jtreg:test/hotspot/jtreg/compiler/vectorapi/TestVectorMathLib.java
> * jtreg:test/jdk/jdk/incubator/vector/DoubleVector256Tests.java
> * jtreg:test/jdk/jdk/incubator/vector/DoubleVectorMaxTests.java
> * jtreg:test/jdk/jdk/incubator/vector/FloatVector256Tests.java
> * jtreg:test/jdk/jdk/incubator/vector/FloatVectorMaxTests.java
> * jtreg:test/jdk/jdk/incubator/vector/VectorMathLibraryLocaleTest.java
> 
> With this change, a `bash configure --with-extra-cflags='-Wall'` build passes 
> the previously failing jtreg on a Graviton3 machine.
> 
> An alternative fix could modify the compiler check code to not error under 
> the stricter cflags. But I opted to simply remove the `-Werror` since it 
> wasn't there originally, I don't think it adds anything meaningful to the 
> compiler check, and it's the simplest fix.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

@cost0much 
Your change (at version e29dc6ac87266e60b0c460cc830cd1a6470f994c) is now ready 
to be sponsored by a Committer.

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

PR Comment: https://git.openjdk.org/jdk/pull/32896#issuecomment-5717989574

Reply via email to