Package: tcc / 0.9.27~git20161217.cd9514ab-3

0003-Disable-stack-protector-in-runtime-library.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 506de045eee57bad9eea1cf50cbe62088f3a5113 Mon Sep 17 00:00:00 2001
From: Thomas Preud'homme <robotux@celest.fr>
Date: Sun, 17 Feb 2013 23:39:08 +0100
Subject: Disable stack protector in runtime library

tcc fails to run when compiled by itself and its runtime library was
built with any variant of -fstack-protector. This is why test3 fails
when libtcc1.a is build with -fstack-protector.

Origin: vendor
Forwarded: no
Last-Update: 2016-12-18
---
 lib/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/Makefile b/lib/Makefile
index e61437ef..79891d4e 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -44,6 +44,7 @@ ARM_O = libtcc1.o armeabi.o alloca-arm.o
 ARM64_O = lib-arm64.o
 WIN32_O = crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o
 
+CFLAGS:=$(filter-out -fstack-protector%,$(CFLAGS))
 # build TCC runtime library to contain PIC code, so it can be linked
 # into shared libraries
 PICFLAGS = -fPIC