From 608d1e197188288b54ea443b4a00e966ca0c6c19 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 22 Jun 2025 18:37:05 +0200 Subject: tests: also disable stack protector Similarly to Makefile.am, otherwise when the host compiler enables it by default, we get undefined reference to `__stack_chk_fail_local' --- tests/user-qemu.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/user-qemu.mk b/tests/user-qemu.mk index 8a25bc41..968a5bfc 100644 --- a/tests/user-qemu.mk +++ b/tests/user-qemu.mk @@ -119,6 +119,12 @@ TESTCFLAGS = -static -nostartfiles -nolibc \ -ggdb3 \ -DMIG_EOPNOTSUPP +# The smashing stack protector might be enabled by default, but might emit +# unsuitable code. +if disable_smashing_stack_protector +TESTCFLAGS += \ + -fno-stack-protector +endif TESTSRC_TESTLIB= \ $(srcdir)/tests/syscalls.S \ -- cgit v1.2.3