[commit: ghc] master: Add some missing clang bits to the build system. (8f2f7a0)

Austin Seipp mad.one at gmail.com
Mon Jun 17 12:56:46 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

https://github.com/ghc/ghc/commit/8f2f7a094deb8e77560697181636234f1590f485

>---------------------------------------------------------------

commit 8f2f7a094deb8e77560697181636234f1590f485
Author: Austin Seipp <aseipp at pobox.com>
Date:   Mon Jun 17 04:57:18 2013 -0500

    Add some missing clang bits to the build system.
    
    Signed-off-by: Austin Seipp <aseipp at pobox.com>

>---------------------------------------------------------------

 includes/ghc.mk  | 5 +++++
 mk/config.mk.in  | 5 +++++
 mk/project.mk.in | 3 ++-
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/includes/ghc.mk b/includes/ghc.mk
index fb38001..04cc4aa 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 9a6ab56..a65dc69 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 004e9b1..7b25368 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@





More information about the ghc-commits mailing list