Open
Description
I'm trying to build full LLVM 13 toolchain within Amazon Linux 2 ARM64 docker and compilation of LLDB fails with:
/home/build/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp:63:28: error: variable has incomplete type 'struct user_sve_header'
struct user_sve_header sve_header;
^
/home/build/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp:63:12: note: forward declaration of 'user_sve_header'
struct user_sve_header sve_header;
^
/home/build/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp:376:13: error: use of undeclared identifier 'sve_vl_valid'
if (sve_vl_valid(vg_value * 8)) {
^
/home/build/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp:562:10: error: use of undeclared identifier 'sve_vl_valid'
if (!sve_vl_valid(m_sve_header.vl)) {
^
/home/build/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp:930:11: error: use of undeclared identifier 'sve_vl_valid'
if (sve_vl_valid(m_sve_header.vl))
^
4 errors generated.
I've discovered that a similar issue has been also discovered in spack and the underlying problem is that Amazon Linux 2 is running on Kernel 4.14 which does not provide user_sve_header
that has been added to kernel 4.15.
The main question is why does LLDB need a kernel with SVE support on non-SVE CPU? Should we add support for building the LLDB without SVE support?