RFR: 8366777: Build fails unknown pseudo-op with old AS on linux-aarch64 [v18]

Magnus Ihse Bursie ihse at openjdk.org
Fri Sep 12 14:53:56 UTC 2025


On Fri, 12 Sep 2025 13:44:04 GMT, SendaoYan <syan at openjdk.org> 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 three additional commits since the last revision:
> 
>  - Call AC_MSG_RESULT([$AVAILABLE]) inside AC_COMPILE_IFELSE
>  - Use CC directly
>  - Move comment from called to macro definition

make/autoconf/flags-other.m4 line 120:

> 118:     DESC: [Use SVE when compiling libsleef],
> 119:     AVAILABLE: false,
> 120:     CHECK_AVAILABLE: [

You are not supposed to both provide AVAILABLE and CHECK_AVAILABLE. Also, if you do setup CHECK_AVAILABLE you should always provide a value to the AVAILABLE variable; now you don't have an else clause for the cpu and toolchain tests. Also, CHECK_AVAILABLE was designed for small and simple tests; this is so long it becames hard to read.

Instead I suggest the following:
Start by setting AARCH64_SVE_AVAILABLE to false. Then do the code that is currently in the CHECK_AVAILABLE block, but replace the assignment to AVAILABLE with an assignment to AARCH64_SVE_AVAILABLE. (Where it is true, since you defaulted it to false you can skip that line).

Then, finally, you can do like this:

 UTIL_ARG_ENABLE(NAME: aarch64-sve, DEFAULT: auto,
    RESULT: AARCH64_SVE_ENABLED,
    DESC: [Use SVE when compiling libsleef],
    AVAILABLE: $AARCH64_SVE_AVAILABLE)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27073#discussion_r2344488195


More information about the build-dev mailing list