From 9f019825b801223d654c814cc8e987ef803291f8 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Wed, 22 Feb 2023 11:32:42 +0100 Subject: [PATCH] boot/at91dataflashboot: disable stack-protector Disable stack-protector to avoid the following build failure: /home/buildroot/autobuild/instance-1/output-1/host/bin/arm-buildroot-linux-gnueabi-ld -T elf32-littlearm.lds -Ttext 0 -n -o DataflashBoot-1.05.out objs/cstartup_ram.o objs/at45.o objs/com.o objs/dataflash.o objs/div0.o objs/init.o objs/main.o objs/stdio.o objs/asm_isr.o objs/jump.o objs/_udivsi3.o objs/_umodsi3.o objs/led.o /home/buildroot/autobuild/instance-1/output-1/host/bin/arm-buildroot-linux-gnueabi-ld: objs/main.o: in function `main': main.c:(.text.startup+0x834): undefined reference to `__stack_chk_guard' Fixes: - http://autobuild.buildroot.org/results/502c54be4978e628724d72ee2a75d4c5e0a6ace8 Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni (cherry picked from commit d868d09d3a0c0db2c5112964139e5ecae8b1da51) Signed-off-by: Peter Korsgaard --- boot/at91dataflashboot/at91dataflashboot.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/boot/at91dataflashboot/at91dataflashboot.mk b/boot/at91dataflashboot/at91dataflashboot.mk index 0ad8b6fc44..c66f27e343 100644 --- a/boot/at91dataflashboot/at91dataflashboot.mk +++ b/boot/at91dataflashboot/at91dataflashboot.mk @@ -12,7 +12,8 @@ AT91DATAFLASHBOOT_INSTALL_TARGET = NO AT91DATAFLASHBOOT_INSTALL_IMAGES = YES define AT91DATAFLASHBOOT_BUILD_CMDS - make -C $(@D) CROSS_COMPILE=$(TARGET_CROSS) + make -C $(@D) CROSS_COMPILE=$(TARGET_CROSS) \ + CFLAGS="$(TARGET_CFLAGS) -fno-stack-protector" endef define AT91DATAFLASHBOOT_INSTALL_IMAGES_CMDS