FTBFS: Building for RISC-V with --disable-tcg fails
## Host environment - Operating system: Ubuntu 26.04 - OS/kernel version: 6.18.3 - Architecture: riscv64, RVA23U64, SpacemiT K3 - QEMU flavor: riscv64-softmmu - QEMU version: HEAD, ee7eb612be8f ## Build failure Building fails with ``` ./configure --prefix=/usr/local --enable-kvm --disable-tcg --target-list="riscv64-softmmu" make ``` with ``` :: ../target/riscv/csr.c:2134:21: error: implicit declaration of function ‘cpu_unwind_state_data’ [-Werror=implicit-function-declaration] :: 2134 | if (ra == 0 || !cpu_unwind_state_data(env_cpu(env), ra, data)) { :: | ^~~~~~~~~~~~~~~~~~~~~ :: ../target/riscv/csr.c:2119:21: error: nested extern declaration of ‘cpu_unwind_state_data’ [-Werror=nested-externs] ``` ## Analysis The function declaration in include/exec/cpu-common.h is guarded by ``` #ifdef CONFIG_TCG ``` which makes sense as the implementation is in accel/tcg/translate.all. Target i386 uses ``` #ifdef CONFIG_TCG #else qemu_build_not_reached(); #endif ``` to guard the use of cpu_unwind_state_data(). Such a guard is missing for the RISC-V target.
issue