0003-Makefile-allow-the-user-to-disable-stack-protector.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 37e8a6a7e5875e20a8de07fbfbb69912f1964f7d Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Mon, 28 Oct 2019 09:47:49 +0100
  4. Subject: [PATCH] Makefile: allow the user to disable stack protector
  5. Allow the user to disable stack-protector by overriding CFLAGS as it is
  6. not supported by all toolchains.
  7. Fixes:
  8. - http://autobuild.buildroot.net/results/cba1ae830c7a4d1740098fe67aec59b4dc2f9a03
  9. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  10. [Upstream status: https://github.com/smuellerDD/jitterentropy-library/pull/12]
  11. ---
  12. Makefile | 4 ++--
  13. 1 file changed, 2 insertions(+), 2 deletions(-)
  14. diff --git a/Makefile b/Makefile
  15. index 41bc4f7..b0f20e2 100644
  16. --- a/Makefile
  17. +++ b/Makefile
  18. @@ -1,9 +1,9 @@
  19. # Compile Noise Source as user space application
  20. CC ?= gcc
  21. -CFLAGS +=-Wextra -Wall -pedantic -fPIC -O0
  22. #Hardening
  23. -CFLAGS +=-fstack-protector-all -fwrapv --param ssp-buffer-size=4
  24. +CFLAGS ?=-fstack-protector-all --param ssp-buffer-size=4
  25. +CFLAGS +=-Wextra -Wall -pedantic -fPIC -O0 -fwrapv
  26. LDFLAGS +=-Wl,-z,relro,-z,now
  27. # Change as necessary
  28. --
  29. 2.23.0