about summary refs log tree commit diff homepage
path: root/Makefile.common
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.common')
-rw-r--r--Makefile.common7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile.common b/Makefile.common
index d3fd1e76..7b210118 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -5,6 +5,13 @@ include $(LEVEL)/Makefile.config
 # Include LLVM's Master Makefile config and rules.
 include $(LLVM_OBJ_ROOT)/Makefile.config
 
+# Filters out -fstack-protector-strong which is not understood by clang 3.4 or below
+# yet is present in Makefile.config of some distros such as Debian Jessie
+ifeq ($(shell test $(LLVM_VERSION_MAJOR) -le 3 -a $(LLVM_VERSION_MINOR) -le 4; echo $$?),0)
+  CFLAGS := $(filter-out -fstack-protector-strong,$(CFLAGS))
+  CXXFLAGS := $(filter-out -fstack-protector-strong,$(CXXFLAGS))
+endif
+
 # Assertions should be enabled by default for KLEE (but they can still
 # be disabled by running make with DISABLE_ASSERTIONS=1
 DISABLE_ASSERTIONS := 0