After 8292591 we run into the following build error on Linux aarch64:
* For target hotspot_variant-server_libjvm_objs_systemMemoryBarrier_linux.o:
/nb/linuxaarch64/jdk/src/hotspot/os/linux/systemMemoryBarrier_linux.cpp:41:4: error: #error define SYS_membarrier for the arch
#error define SYS_membarrier for the arch
^~~~~
/nb/linuxaarch64/jdk/src/hotspot/os/linux/systemMemoryBarrier_linux.cpp: In function 'int membarrier(int, unsigned int, int)':
/nb/linuxaarch64/jdk/src/hotspot/os/linux/systemMemoryBarrier_linux.cpp:63:18: error: 'SYS_membarrier' was not declared in this scope
return syscall(SYS_membarrier, cmd, flags, cpu_id); // cpu_id only on >= 5.10
^~~~~~~~~~~~~~
/nb/linuxaarch64/jdk/src/hotspot/os/linux/systemMemoryBarrier_linux.cpp:63:18: note: suggested alternative: 'membarrier'
return syscall(SYS_membarrier, cmd, flags, cpu_id); // cpu_id only on >= 5.10
^~~~~~~~~~~~~~
membarrier
This could most likely be solved by adding a definition for aarch64 to hotspot/os/linux/systemMemoryBarrier_linux.cpp .
On the mentioned linux aarch64 system (kernel 5.15) SYS_membarrier is :
aarch64-linux-gnu/bits/syscall.h:899:# define SYS_membarrier __NR_membarrier
asm-generic/unistd.h:755:#define __NR_membarrier 283