diff options
author | David M Peixotto <dmp@rice.edu> | 2011-06-28 15:38:32 -0500 |
---|---|---|
committer | David M Peixotto <dmp@rice.edu> | 2011-10-07 16:48:34 -0500 |
commit | 6247b59e5d31de58ee51273916bc44ac2118240a (patch) | |
tree | 10ce216966c64b2e45373cd9ceb45e7d27f3f766 /includes/ghc.mk | |
parent | dba7254566b121408e7167200d0223a531b66e8b (diff) | |
download | haskell-6247b59e5d31de58ee51273916bc44ac2118240a.tar.gz |
Add autoconf support to detect an LLVM-based C compiler
This patch adds support to the autoconf scripts to detect
when we are using a C compiler that uses an LLVM back end.
An LLVM back end does not support all of the extensions use
by GCC, so we need to perform some conditional compilation
in the runtime, particularly for handling thread local
storage and global register variables.
The changes here will set the CC_LLVM_BACKEND in the
autoconf scripts if we detect an llvm-based compiler. We use
this variable to define the llvm_CC_FLAVOR variable that we
can use in the runtime code to conditionally compile for
LLVM.
Diffstat (limited to 'includes/ghc.mk')
-rw-r--r-- | includes/ghc.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/ghc.mk b/includes/ghc.mk index 8d4fd473c0..f000a0494d 100644 --- a/includes/ghc.mk +++ b/includes/ghc.mk @@ -104,6 +104,10 @@ endif @echo "#define $(TargetVendor_CPP)_HOST_VENDOR 1" >> $@ @echo "#define BUILD_VENDOR \"$(HostVendor_CPP)\"" >> $@ @echo "#define HOST_VENDOR \"$(TargetVendor_CPP)\"" >> $@ +ifeq "$(CC_LLVM_BACKEND)" "1" + @echo >> $@ + @echo "#define llvm_CC_FLAVOR 1" >> $@ +endif @echo >> $@ @echo "/* These TARGET macros are for backwards compatibily... DO NOT USE! */" >> $@ @echo "#define TargetPlatform_TYPE $(TargetPlatform_CPP)" >> $@ |