0001-Makefile-disable-stack-protection.patch 1.0 KB

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