One thing to note: -march=rva23u64 may not imply zifencei in current
GCC/binutils profile expansion. If the package or runtime contains
inline assembly using fence.i, this can fail to assemble.

For example, when building OpenJDK 25 on riscv64, HotSpot failed at 
orderAccess_linux_riscv.hpp. The source contains:
```
__asm__ volatile("fence.i" : : : "memory");
```
and the build failed with:
```
Assembler messages:
src/hotspot/os_cpu/linux_riscv/orderAccess_linux_riscv.hpp:74:
Error: unrecognized opcode `fence.i', extension `zifencei' required

gmake[3]: *** [lib/CompileJvm.gmk:178:
.../hotspot/variant-server/libjvm/objs/barrierSetNMethod.o] Error 1

ERROR: Build failed for target 'images'
```

So we may need to handle zifencei explicitly. One option is to include
zifencei in the distro baseline, for example by using
-march=rva23u64_zifencei or by expanding the RVA23U64 baseline manually
and adding zifencei.

Another option is to keep the default baseline as rva23u64, but require
packages that contain inline assembly using fence.i to specify an
appropriate -march, for example -march=rva23u64_zifencei, in their
package-specific build flags.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2152642

Title:
  RVA23 configuration in debian/rules2

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-16/+bug/2152642/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to