From bce00a9036fb0fc4d7735cd2c386b4932b915d97 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 16 Dec 2025 15:09:15 +0100 Subject: [PATCH] Makefile: add -fno-builtin Build with gcc 10 fails on: /srv/storage/autobuild/run/instance-2/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: src/foundation/startup.o: in function `reset_handler': /srv/storage/autobuild/run/instance-2/output-1/build/am33x-cm3-11107db2f1e9e58ee75d4fe9cc38423c9a6e4365/src/foundation/startup.c:177: undefined reference to `memcpy' This is due to the fact that gcc 10 replaces the following statement by a memcpy call: *puldest++ = *pulsrc++; To fix this build failure, add -fno-builtin Fixes: - http://autobuild.buildroot.org/results/a991e6efa012df518ff1bb35017ad2c96c8feedc Upstream: N/A Buildroot specific Signed-off-by: Fabrice Fontaine Signed-off-by: Kory Maincent --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9146a8b6a7da..b4869c494593 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -ffreestanding -Wall -W -Werror-implicit-function-declaration -Wstrict-prototypes \ -Wdeclaration-after-statement -fno-delete-null-pointer-checks \ -Wempty-body -fno-strict-overflow -fno-stack-protector \ - -fno-pie -g -I$(INCLUDES) -O2 -MD + -fno-pie -fno-builtin -g -I$(INCLUDES) -O2 -MD LDFLAGS =-nostartfiles -fno-exceptions -Tfirmware.ld EXECUTABLE=am335x-pm-firmware.elf -- 2.43.0