Hi Bernard,

On 9/24/2026 11:18 AM, Bernhard Beschow wrote:

> With this patch I get under Archlinux:
> 
> $ make tests/tcg/x86_64-softmmu-hello.test
> [1/1] Generating tests/tcg/x86_64-softmmu-hello with a custom command
> FAILED: [code=1] tests/tcg/x86_64-softmmu-hello.test
> /usr/bin/x86_64-linux-gnu-gcc qemu/src/tests/tcg/multiarch/system/
> hello.c -o tests/tcg/x86_64-softmmu-hello.test -static -MMD -MF tests/
> tcg/x86_64-softmmu-hello.d -Wall -Werror -O0 -g -fno-strict-aliasing -
> nostdlib -ffreestanding -Wa,--noexecstack -I qemu/src/tests/tcg/x86_64/
> system/../../minilib qemu/src/tests/tcg/x86_64/system/../../minilib/
> printf.c ../src/tests/tcg/x86_64/system/boot.S -Wl,-T ../src/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/ccRh6mPz.o: in function `print_num':
> qemu/src/tests/tcg/x86_64/system/../../minilib/printf.c:45:(.text+0xec):
> undefined reference to `__stack_chk_fail'
> /usr/bin/ld: /tmp/ccRh6mPz.o: in function `ml_printf':
> qemu/src/tests/tcg/x86_64/system/../../minilib/printf.c:136:
> (.text+0x549): undefined reference to `__stack_chk_fail'
> collect2: error: ld returned 1 exit status
> ninja: build stopped: subcommand failed.
> make: *** [Makefile:170: run-ninja] Error 1
> 
> Reverting this patch I'm able to run `make check` successfully again.
> Any idea what might be causing this?
>

Thanks for the report.
Tests were previously compiled with -fno-stack-protector, and it was
unclear which distro/setup required this, so we removed it to find what
requires it. It seems like archlinux is one of them.

I'll re-add the flag by default.

Can you please confirm the command above (x86_64-linux-gcc ...) works
with -fno-stack-protector added?

> Best regards,
> 
> Bernhard
> 

Regards,
Pierrick

Reply via email to