qemu-e2k/tests/tcg/minilib/Makefile.target
Akihiko Odaki 580731dcc8 tests/tcg: Add -fno-stack-protector
A build of GCC 13.2 will have stack protector enabled by default if it
was configured with --enable-default-ssp option. For such a compiler,
it is necessary to explicitly disable stack protector when linking
without standard libraries.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20230731091042.139159-3-akihiko.odaki@daynix.com>
[AJB: fix comment string typo]
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20231029145033.592566-3-alex.bennee@linaro.org>
2023-10-31 13:28:19 +00:00

22 lines
660 B
Makefile

#
# System test minilib objects
#
# The system tests are very constrained in terms of the library they
# support but we are not savages. We provide a few helpful routines
# that can be shared with the tests for basic I/O.
#
# They assume each arch has provided a putc function.
#
SYSTEM_MINILIB_SRC=$(SRC_PATH)/tests/tcg/minilib
MINILIB_SRCS=$(wildcard $(SYSTEM_MINILIB_SRC)/*.c)
MINILIB_OBJS=$(patsubst $(SYSTEM_MINILIB_SRC)/%.c, %.o, $(MINILIB_SRCS))
MINILIB_CFLAGS+=-nostdlib -fno-stack-protector -ggdb -O0
MINILIB_INC=-isystem $(SYSTEM_MINILIB_SRC)
.PRECIOUS: $(MINILIB_OBJS)
%.o: $(SYSTEM_MINILIB_SRC)/%.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@