On 9/24/2026 1:20 PM, Pierrick Bouvier wrote:
> Some compilers enable stack protection by default (for instance, on
> archlinux). This produce a compilation error on some of our tests:
> 
> /usr/sbin/x86_64-linux-gnu-gcc tests/tcg/multiarch/system/interrupt.c -o 
> tests/tcg/x86_64-softmmu-interrupt.test -static -MMD -MF 
> tests/tcg/x86_64-softmmu-interrupt.d -Wall -Werror -O0 -g 
> -fno-strict-aliasing -nostdlib -ffreestanding -Wa,--noexecstack -I 
> tests/tcg/x86_64/system/../../minilib 
> tests/tcg/x86_64/system/../../minilib/printf.c 
> ../tests/tcg/x86_64/system/boot.S -Wl,-T ../tests/tcg/x86_64/system/kernel.ld 
> -Wl,-melf_x86_64 -Wl,--no-warn-rwx-segments -Wl,--build-id=none -lgcc
> /usr/bin/ld: /tmp/ccs11W6S.o: in function `print_num':
> tests/tcg/x86_64/system/../../minilib/printf.c:45:(.text+0xec): undefined 
> reference to `__stack_chk_fail'
> /usr/bin/ld: /tmp/ccs11W6S.o: in function `ml_printf':
> tests/tcg/x86_64/system/../../minilib/printf.c:136:(.text+0x549): undefined 
> reference to `__stack_chk_fail'
> collect2: error: ld returned 1 exit status
> 
> This flag has been previously added, but was removed when moving tcg
> tests to meson, with the goal to identify which systems require it.
> https://gitlab.com/qemu-project/qemu/-/commit/580731dcc87eb27a2b0dc20ec331f1ce51864c97
> One of these system is archlinux.
> 
> Thus, disable stack protection by default. It has no impact on tests
> results.
> 
> Signed-off-by: Pierrick Bouvier <[email protected]>
> ---
>  tests/tcg/meson.build | 6 ++++++
>  1 file changed, 6 insertions(+)
> 

This was merged into master (efa3b9d5ac8024078225e1ab434411fdfe53b457).

Regards,
Pierrick

Reply via email to