0002-Makefile-unconditionally-disable-SSP.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From 6c3b05b74ccd49d8ba246bfef0c2e549b9f2bf7b Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Tue, 29 Oct 2019 16:14:18 +0100
  4. Subject: [PATCH] Makefile: unconditionally disable SSP
  5. Though -nostdlib is passed in $(CFLAGS), -fno-stack-protector must also be
  6. passed to avoid linking errors related to undefined references to
  7. '__stack_chk_guard' and '__stack_chk_fail' if toolchain enforces
  8. -fstack-protector.
  9. Fixes:
  10. - http://autobuild.buildroot.net/results/3a3a21f3c35ea025e9b93e09c2454aed0ad31034
  11. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  12. ---
  13. Makefile | 3 ++-
  14. 1 file changed, 2 insertions(+), 1 deletion(-)
  15. diff --git a/Makefile b/Makefile
  16. index c3ec071..5226006 100644
  17. --- a/Makefile
  18. +++ b/Makefile
  19. @@ -16,7 +16,8 @@ INCLUDES = $(SRCDIR)/include
  20. CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -Wall -Wundef \
  21. -Werror-implicit-function-declaration -Wstrict-prototypes \
  22. -Wdeclaration-after-statement -fno-delete-null-pointer-checks \
  23. - -Wempty-body -fno-strict-overflow -g -I$(INCLUDES) -O2
  24. + -Wempty-body -fno-strict-overflow -fno-stack-protector \
  25. + -g -I$(INCLUDES) -O2
  26. LDFLAGS =-nostartfiles -fno-exceptions -Tfirmware.ld
  27. EXECUTABLE=am335x-pm-firmware.elf
  28. --
  29. 2.23.0