1From 25fc567ba8a0cd199e48bfa82863247d953784ea Mon Sep 17 00:00:00 2001 2From: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3Date: Sun, 30 Aug 2020 20:59:29 +0200 4Subject: [PATCH] Makefile: add -fno-builtin 5 6Build with gcc 10 fails on: 7 8/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': 9/srv/storage/autobuild/run/instance-2/output-1/build/am33x-cm3-11107db2f1e9e58ee75d4fe9cc38423c9a6e4365/src/foundation/startup.c:177: undefined reference to `memcpy' 10 11This is due to the fact that gcc 10 replaces the following statement by 12a memcpy call: 13 14*puldest++ = *pulsrc++; 15 16To fix this build failure, add -fno-builtin 17 18Fixes: 19 - http://autobuild.buildroot.org/results/a991e6efa012df518ff1bb35017ad2c96c8feedc 20 21Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 22--- 23 Makefile | 2 +- 24 1 file changed, 1 insertion(+), 1 deletion(-) 25 26diff --git a/Makefile b/Makefile 27index fe3d844..fa24d4b 100644 28--- a/Makefile 29+++ b/Makefile 30@@ -17,7 +17,7 @@ CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -Wall -Wundef \ 31 -Werror-implicit-function-declaration -Wstrict-prototypes \ 32 -Wdeclaration-after-statement -fno-delete-null-pointer-checks \ 33 -Wempty-body -fno-strict-overflow -fno-stack-protector \ 34- -fno-pie -g -I$(INCLUDES) -O2 35+ -fno-pie -fno-builtin -g -I$(INCLUDES) -O2 36 LDFLAGS =-nostartfiles -fno-exceptions -Tfirmware.ld 37 38 EXECUTABLE=am335x-pm-firmware.elf 39-- 402.28.0 41 42