From c33a133704166d602090b0b0d394aa9428e6acd4 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 31 Dec 2022 11:14:51 +0100 Subject: [PATCH] boot/afboot-stm32: disable stack-protector Disable stack-protector to avoid the following build failure: /home/autobuild/autobuild/instance-14/output-1/host/bin/arm-buildroot-linux-gnueabi-ld -T stm32f429.lds --gc-sections -o stm32f469i-disco.elf stm32f469i-disco.o gpio.o mpu.o qspi.o start_kernel.o usart-f4.o /home/autobuild/autobuild/instance-14/output-1/host/bin/arm-buildroot-linux-gnueabi-ld: stm32f469i-disco.o: in function `main': stm32f469i-disco.c:(.text.startup.main+0x3b0): undefined reference to `__stack_chk_guard' /home/autobuild/autobuild/instance-14/output-1/host/bin/arm-buildroot-linux-gnueabi-ld: stm32f469i-disco.c:(.text.startup.main+0x4c0): undefined reference to `__stack_chk_fail' /home/autobuild/autobuild/instance-14/output-1/host/bin/arm-buildroot-linux-gnueabi-ld: stm32f469i-disco.c:(.text.startup.main+0x4ec): undefined reference to `__stack_chk_guard' Fixes: - http://autobuild.buildroot.org/results/fa6ffab24c3998f21034ab24e8d2852cacde08c1 Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- ...003-Makefile-disable-stack-protector.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 boot/afboot-stm32/0003-Makefile-disable-stack-protector.patch diff --git a/boot/afboot-stm32/0003-Makefile-disable-stack-protector.patch b/boot/afboot-stm32/0003-Makefile-disable-stack-protector.patch new file mode 100644 index 0000000000..27a81b45d5 --- /dev/null +++ b/boot/afboot-stm32/0003-Makefile-disable-stack-protector.patch @@ -0,0 +1,36 @@ +From d65b07d6fe438e760fdbc33a8e42650a27d5b417 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 31 Dec 2022 11:09:38 +0100 +Subject: [PATCH] Makefile: disable stack-protector + +Disable stack-protector to avoid the following build failure: + +/home/autobuild/autobuild/instance-14/output-1/host/bin/arm-buildroot-linux-gnueabi-ld -T stm32f429.lds --gc-sections -o stm32f469i-disco.elf stm32f469i-disco.o gpio.o mpu.o qspi.o start_kernel.o usart-f4.o +/home/autobuild/autobuild/instance-14/output-1/host/bin/arm-buildroot-linux-gnueabi-ld: stm32f469i-disco.o: in function `main': +stm32f469i-disco.c:(.text.startup.main+0x3b0): undefined reference to `__stack_chk_guard' +/home/autobuild/autobuild/instance-14/output-1/host/bin/arm-buildroot-linux-gnueabi-ld: stm32f469i-disco.c:(.text.startup.main+0x4c0): undefined reference to `__stack_chk_fail' +/home/autobuild/autobuild/instance-14/output-1/host/bin/arm-buildroot-linux-gnueabi-ld: stm32f469i-disco.c:(.text.startup.main+0x4ec): undefined reference to `__stack_chk_guard' + +Fixes: + - http://autobuild.buildroot.org/results/fa6ffab24c3998f21034ab24e8d2852cacde08c1 + +Signed-off-by: Fabrice Fontaine +--- + Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile b/Makefile +index 8f42be1..8da7a25 100644 +--- a/Makefile ++++ b/Makefile +@@ -14,6 +14,7 @@ CFLAGS := -mthumb -mcpu=cortex-m4 + CFLAGS += -ffunction-sections -fdata-sections + CFLAGS += -Os -std=gnu99 -Wall + CFLAGS += -fno-builtin ++CFLAGS += -fno-stack-protector + LINKERFLAGS := --gc-sections + + obj-y += gpio.o mpu.o qspi.o start_kernel.o +-- +2.35.1 +