RFR: 8348327: Incorrect march flag when building libsleef/vector_math_neon.c
Mikael Vidstedt
mikael at openjdk.org
Thu Jan 23 00:11:22 UTC 2025
[JDK-8312425](https://bugs.openjdk.org/browse/JDK-8312425) started building the libsleef library with `$(SVE_CFLAGS)` on aarch64. That variable expands to `-march=armv8-a+sve` if the compiler supports it.
The flag should only be applied to the `vector_math_sve.c` file. Applying it to the whole library means it also gets applied to `vector_math_neon.c`, and the compiler (e.g. GCC) may select SVE instructions when generating code for it. When running the resulting JDK on a CPU which does not support SVE that will lead to an illegal instruction/`SIGILL`.
Testing:
* Manually verified that `vector_math_neon.c` does *not* get built with `-march=armv8-a+sve` and that `vector_math_sve.c` (still) does get built with that flag.
* tier1-5 (in progress)
-------------
Commit messages:
- 8348327: Incorrect march flag when building libsleef/vector_math_neon.c
Changes: https://git.openjdk.org/jdk/pull/23245/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23245&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8348327
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/23245.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23245/head:pull/23245
PR: https://git.openjdk.org/jdk/pull/23245
More information about the build-dev
mailing list