src/hotspot/os/linux/systemMemoryBarrier_linux.cpp:65:18: error: 'SYS_membarrier' was not declared in this scope
return syscall(SYS_membarrier, cmd, flags, cpu_id); // cpu_id only on >= 5.10
^~~~~~~~~~~~~~
We need to add a SYS_membarrier definition in systemMemoryBarrier_linux.cpp for x86 as well:
#ifndef SYS_membarrier
#if defined(AMD64)
#define SYS_membarrier 324
#elif defined(PPC64)
#define SYS_membarrier 365
#elif defined(AARCH64)
#define SYS_membarrier 283
#elif defined(ALPHA)
#define SYS_membarrier 517
#else
#error define SYS_membarrier for the arch
#endif
#endif // SYS_membarrier