diff options
-rw-r--r-- | includes/ghc.mk | 5 | ||||
-rw-r--r-- | mk/config.mk.in | 5 | ||||
-rw-r--r-- | mk/project.mk.in | 3 |
3 files changed, 12 insertions, 1 deletions
diff --git a/includes/ghc.mk b/includes/ghc.mk index fb3800165a..04cc4aae07 100644 --- a/includes/ghc.mk +++ b/includes/ghc.mk @@ -85,6 +85,11 @@ ifeq "$(CC_LLVM_BACKEND)" "1" @echo "#define llvm_CC_FLAVOR 1" >> $@ endif # +ifeq "$(CC_CLANG_BACKEND)" "1" + @echo >> $@ + @echo "#define clang_CC_FLAVOR 1" >> $@ +endif +# @echo "#endif /* __GHCAUTOCONF_H__ */" >> $@ @echo "Done." diff --git a/mk/config.mk.in b/mk/config.mk.in index 9a6ab56c3c..a65dc69b57 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -616,7 +616,12 @@ CPP = @CPP@ @CPPFLAGS@ # RAWCPP_FLAGS are the flags to give to cpp (viz, gcc -E) to persuade it to # behave plausibly on Haskell sources. # +# Clang in particular is a bit more annoying, so we suppress some warnings. RAWCPP_FLAGS = -undef -traditional +ifeq "$(CC_CLANG_BACKEND)" "1" +RAWCPP_FLAGS += -Wno-invalid-pp-token +endif + FIND = @FindCmd@ # diff --git a/mk/project.mk.in b/mk/project.mk.in index 004e9b1c15..7b25368b38 100644 --- a/mk/project.mk.in +++ b/mk/project.mk.in @@ -155,4 +155,5 @@ OSTYPE=@OSTYPE@ SOLARIS_BROKEN_SHLD=@SOLARIS_BROKEN_SHLD@ # Do we have a C compiler using an LLVM back end? -CC_LLVM_BACKEND = @CC_LLVM_BACKEND@ +CC_LLVM_BACKEND = @CC_LLVM_BACKEND@ +CC_CLANG_BACKEND = @CC_CLANG_BACKEND@ |