aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatteo Cypriani <mcy@lm7.fr>2014-09-07 10:47:02 -0400
committerMatteo Cypriani <mcy@lm7.fr>2014-09-07 10:56:03 -0400
commit178275dc0cbb3009728913689b489608c0469bdd (patch)
tree86e5e206077f91e95086344f74c22b9275cdbf7e /lib
parent14745bdeb735d565b7589ba6032abd755267c850 (diff)
downloadtinycc-178275dc0cbb3009728913689b489608c0469bdd.tar.gz
tinycc-178275dc0cbb3009728913689b489608c0469bdd.tar.bz2
Don't build libtcc1 with -fstack-protector-strong
Prevent libtcc1.a to be compiled with -fstack-protector-strong, so that linking with tcc doesn't fail because symbol '__stack_chk_fail_local' is not present in libtcc1.a. This is useful only if the CFLAGS passed from the main Makefile contain this flag.
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile
index e9e12f1..37d4711 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -54,6 +54,10 @@ WIN64_O = $(X86_64_O) crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o
# into shared libraries
PICFLAGS = -fPIC
+# don't compile with -fstack-protector-strong, TCC doesn't handle it
+# correctly
+CFLAGS := $(filter-out -fstack-protector-strong,$(CFLAGS))
+
ifeq "$(TARGET)" "i386-win32"
OBJ = $(addprefix $(DIR)/,$(WIN32_O))
TGT = -DTCC_TARGET_I386 -DTCC_TARGET_PE