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 /configure.ac | |
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 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 1207f080b1..6d4b0db0ba 100644 --- a/configure.ac +++ b/configure.ac @@ -420,6 +420,10 @@ dnl If gcc, make sure it's at least 2.1 dnl FP_GCC_VERSION +dnl ** look to see if we have a C compiler using an llvm back end. +dnl +FP_CC_LLVM_BACKEND + FPTOOLS_SET_C_LD_FLAGS([target],[CFLAGS],[LDFLAGS],[IGNORE_LINKER_LD_FLAGS],[CPPFLAGS]) FPTOOLS_SET_C_LD_FLAGS([build],[CONF_CC_OPTS_STAGE0],[CONF_GCC_LINKER_OPTS_STAGE0],[CONF_LD_LINKER_OPTS_STAGE0],[CONF_CPP_OPTS_STAGE0]) FPTOOLS_SET_C_LD_FLAGS([target],[CONF_CC_OPTS_STAGE1],[CONF_GCC_LINKER_OPTS_STAGE1],[CONF_LD_LINKER_OPTS_STAGE1],[CONF_CPP_OPTS_STAGE1]) |