From 1c8e8b259d18b3692811243ca7e4b95ade2a8095 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Mon, 19 Jul 2021 19:09:05 +0200 Subject: arch/riscv: Avoid gcc11 replacing memset implementation with memset call SBI comes with its own memset implementation (under a slightly different name) that gcc11 "helpfully" tries to replace with a call to memset(). Since we don't provide a memset, the linker isn't happy, so prevent gcc from doing that. Change-Id: I3459a519d46a123f873306000b8b2261bd64e0c3 Signed-off-by: Patrick Georgi Reviewed-on: https://review.coreboot.org/c/coreboot/+/56429 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber Reviewed-by: Angel Pons --- src/arch/riscv/Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/arch') diff --git a/src/arch/riscv/Makefile.inc b/src/arch/riscv/Makefile.inc index cd94692c02..272768d025 100644 --- a/src/arch/riscv/Makefile.inc +++ b/src/arch/riscv/Makefile.inc @@ -171,7 +171,7 @@ $(OPENSBI_TARGET): $(obj)/config.h | $(OPENSBI_SOURCE) mkdir -p $(OPENSBI_BUILD) $(MAKE) \ -C "$(OPENSBI_SOURCE)" \ - CC="$(CC_ramstage)" \ + CC="$(CC_ramstage) -fno-builtin" \ LD="$(LD_ramstage)" \ OBJCOPY="$(OBJCOPY_ramstage)" \ AR="$(AR_ramstage)" \ -- cgit v1.2.3