aboutsummaryrefslogtreecommitdiff
path: root/GNUmakefile.llvm
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-09-14 15:08:07 +0200
committervan Hauser <vh@thc.org>2020-09-14 15:08:07 +0200
commitc5c5570d970bf1e27a97569c3f1eb9cdf4b4700e (patch)
tree822134c966ad78e095c14d2abdba57461f09608d /GNUmakefile.llvm
parent3abace4f54e6768264115726ae1756377b139e6a (diff)
downloadAFLplusplus-c5c5570d970bf1e27a97569c3f1eb9cdf4b4700e.tar.gz
fix if no clang is present
Diffstat (limited to 'GNUmakefile.llvm')
-rw-r--r--GNUmakefile.llvm16
1 files changed, 14 insertions, 2 deletions
diff --git a/GNUmakefile.llvm b/GNUmakefile.llvm
index 4dd0793f..bd5adcb6 100644
--- a/GNUmakefile.llvm
+++ b/GNUmakefile.llvm
@@ -165,12 +165,24 @@ endif
# old. For these we need to use gcc/g++, so if we find REAL_CC and REAL_CXX
# variable we override the compiler variables here
ifneq "$(REAL_CC)" ""
-CC = $(REAL_CC)
+ CC = $(REAL_CC)
endif
ifneq "$(REAL_CXX)" ""
-CXX = $(REAL_CXX)
+ CXX = $(REAL_CXX)
endif
+#
+# Now it can happen that CC points to clang - but there is no clang on the
+# system. Then we fall back to cc
+#
+ifeq "$(shell type $(CC)" ""
+ CC = cc
+endif
+ifeq "$(shell type $(CXX)" ""
+ CXX = c++
+endif
+
+
# After we set CC/CXX we can start makefile magic tests
#ifeq "$(shell echo 'int main() {return 0; }' | $(CC) -x c - -march=native -o .test 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1"