1From 53e34e3bff26fcbb7cc14178fa9fc80e7a73d556 Mon Sep 17 00:00:00 2001
2From: Baruch Siach <baruch@tkos.co.il>
3Date: Tue, 11 Oct 2022 16:34:44 +0300
4Subject: [PATCH] Makefile: disable stack protection
5
6The Buildroot toolchain might enable stack protection by default. That
7breaks linking because ATF does not provide the required __stack_chk
8routines.
9
10The mv-ddr-marvell Makefile provides no way to add custom CFLAGS. Patch
11Makefile to disable stack protection.
12
13Upstream: not applicable; Buildroot specific
14Signed-off-by: Baruch Siach <baruch@tkos.co.il>
15---
16 Makefile | 1 +
17 1 file changed, 1 insertion(+)
18
19diff --git a/Makefile b/Makefile
20index 045284c30cbc..9641354bcf86 100644
21--- a/Makefile
22+++ b/Makefile
23@@ -336,6 +336,7 @@ CFLAGS = -DMV_DDR_ATF -DCONFIG_DDR4
24 CFLAGS += -Wall -Werror -Os -ffreestanding -mlittle-endian -g -gdwarf-2 -nostdinc
25 CFLAGS += -march=armv8-a -fpie
26 CFLAGS += $(call cc_option, --param=min-pagesize=0)
27+CFLAGS += -fno-stack-protector
28
29 # PLATFORM is set in ble/ble.mk
30 ifneq ($(findstring a80x0,$(PLATFORM)),)
31--
322.40.1
33
34