0002-Disable-stack-protector-in-runtime-library.patch 819 B

1234567891011121314151617181920212223242526272829
  1. From 782f9a4a8e801b2077f1775a85cc5950bdd6acdf Mon Sep 17 00:00:00 2001
  2. From: Thomas Preud'homme <robotux@celest.fr>
  3. Date: Sun, 17 Feb 2013 23:39:08 +0100
  4. Subject: Disable stack protector in runtime library
  5. tcc fails to run when compiled by itself and its runtime library was
  6. built with any variant of -fstack-protector. This is why test3 fails
  7. when libtcc1.a is build with -fstack-protector.
  8. Origin: vendor
  9. Forwarded: no
  10. Last-Update: 2018-02-24
  11. ---
  12. lib/Makefile | 1 +
  13. 1 file changed, 1 insertion(+)
  14. diff --git a/lib/Makefile b/lib/Makefile
  15. index bc57be7f..2fad34a6 100644
  16. --- a/lib/Makefile
  17. +++ b/lib/Makefile
  18. @@ -24,6 +24,7 @@ arm-libtcc1-usegcc ?= no
  19. #x86_64-libtcc1-usegcc=yes
  20. #i386-libtcc1-usegcc=yes
  21. +CFLAGS:=$(CFLAGS) -fno-stack-protector
  22. ifeq "$($(T)-libtcc1-usegcc)" "yes"
  23. XCC = $(CC)
  24. XAR = $(AR)