Add some missing clang bits to the build system.
authorAustin Seipp <aseipp@pobox.com>
Mon, 17 Jun 2013 09:57:18 +0000 (04:57 -0500)
committerAustin Seipp <aseipp@pobox.com>
Mon, 17 Jun 2013 10:54:33 +0000 (05:54 -0500)
Signed-off-by: Austin Seipp <aseipp@pobox.com>
includes/ghc.mk
mk/config.mk.in
mk/project.mk.in

index fb38001..04cc4aa 100644 (file)
@@ -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."
 
index 9a6ab56..a65dc69 100644 (file)
@@ -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@
 
 #
index 004e9b1..7b25368 100644 (file)
@@ -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@