On Wed, 10 Sep 2025 09:38:59 GMT, SendaoYan <[email protected]> wrote:

>> Hi all,
>> 
>> Build jdk on linux-aarch64 with older assembler version(as 2.30) will report 
>> compilation failre, shows as 
>> [JDK-8366777](https://bugs.openjdk.org/browse/JDK-8366777).
>> 
>> This PR add the expression `svfloat64_t a() {}` to makefile which will 
>> trigger the compilation during configure stage. After this PR, at configure 
>> stage will check the gcc and assember support `-march=armv8-a+sve` or not 
>> more comprehensive.
>> 
>> Testing:
>> - [x] On linux-aarch64 gcc12.3.1 as2.37, configure set SVE_CFLAGS as 
>> '-march=armv8-a+sve'
>> - [x] On linux-aarch64 gcc10.3.0 as2.30, configure set SVE_CFLAGS as empty
>> 
>> 
>> The compilation fails demo as below:
>> 
>> 
>> # cat sve.c 
>> #include <arm_sve.h>
>> svfloat64_t a() {}
>> # gcc -march=armv8-a+sve sve.c 
>> /tmp/ccVOzMzb.s: Assembler messages:
>> /tmp/ccVOzMzb.s:6: Error: unknown pseudo-op: `.variant_pcs'
>
> SendaoYan has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Include the prefix argument when calling FLAGS_COMPILER_CHECK_ARGUMENTS

I agree, that seems much better. That way it is also trivial to fix the `auto` 
case, which I believe is broken now -- the point is that with auto, we should 
turn on the flag if it is possible, otherwise we should turn off it. Not having 
the functionality is not an error nor should it print a warning -- just 
information that the functionality is not present, so it is turned off.

This test should be done *before* UTIL_ARG_ENABLE, and the result of whether 
the functionality is present or not should be passed as true/false in the 
AVAILABLE argument to UTIL_ARG_ENABLE. 

I would recommend you to have a look at how ENABLE_FULL_DOCS is setup in 
jdk-options.m4. I think this test should be handled in a similar way.

If the test is simple (I don't think it is in this case), it can also be 
inlined as a "lambda" with CHECK_AVAILABLE. (For that, see for instance how 
UBSAN_ENABLED is setup).

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

PR Comment: https://git.openjdk.org/jdk/pull/27073#issuecomment-3275233238

Reply via email to