Skip to content

building aarch64-linux-user with clang and --enable-debug fails with undefined reference to kvm_arm_sve_supported

If you build aarch64-linux-user with clang and --enable-debug you get a compile error:

$ mkdir build/clang-debug
$ (cd build/clang-debug/ && ../../configure --target-list=aarch64-linux-user --enable-debug --cc=clang --disable-docs --disable-tools)
[snip configure output]
$ make -C build/clang-debug -j4
[...]
/usr/bin/ld: libqemu-aarch64-linux-user.a.p/target_arm_cpu64.c.o: in function `cpu_arm_set_sve':
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/clang-debug/../../target/arm/cpu64.c:321:(.text+0x1254): undefined reference to `kvm_arm_sve_supported'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This happens on both arm and x86 hosts.

Edited by Peter Maydell
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information