summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2019-10-07 23:06:26 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-10-12 06:32:18 -0400
commitc2290596f10ce732be85503d3ef0f0b50b7e925a (patch)
tree7206d141fd205c0c6fe6a0d54eb30f1171b23f06 /includes
parent166e1c2adf73b69bfbbec81e98a78814a031ddc7 (diff)
downloadhaskell-c2290596f10ce732be85503d3ef0f0b50b7e925a.tar.gz
Simplify Configure in a few ways
- No need to distinguish between gcc-llvm and clang. First of all, gcc-llvm is quite old and surely unmaintained by now. Second of all, none of the code actually care about that distinction! Now, it does make sense to consider C multiple frontends for LLVMs in the form of clang vs clang-cl (same clang, yes, but tweaked interface). But this is better handled in terms of "gccish vs mvscish" and "is LLVM", yielding 4 combinations. Therefore, I don't think it is useful saving the existing code for that. - Get the remaining CC_LLVM_BACKEND, and also TABLES_NEXT_TO_CODE in mk/config.h the normal way, rather than hacking it post-hoc. No point keeping these special cases around for now reason. - Get rid of hand-rolled `die` function and just use `AC_MSG_ERROR`. - Abstract check + flag override for unregisterised and tables next to code. Oh, and as part of the above I also renamed/combined some variables where it felt appropriate. - GccIsClang -> CcLlvmBackend. This is for `AC_SUBST`, like the other Camal case ones. It was never about gcc-llvm, or Apple's renamed clang, to be clear. - llvm_CC_FLAVOR -> CC_LLVM_BACKEND. This is for `AC_DEFINE`, like the other all-caps snake case ones. llvm_CC_FLAVOR was just silly indirection *and* an odd name to boot.
Diffstat (limited to 'includes')
-rw-r--r--includes/Stg.h2
-rw-r--r--includes/ghc.mk17
2 files changed, 1 insertions, 18 deletions
diff --git a/includes/Stg.h b/includes/Stg.h
index 7f1764a944..73de97055f 100644
--- a/includes/Stg.h
+++ b/includes/Stg.h
@@ -61,7 +61,7 @@
# define _DEFAULT_SOURCE
#endif
-#if IN_STG_CODE == 0 || defined(llvm_CC_FLAVOR)
+#if IN_STG_CODE == 0 || defined(CC_LLVM_BACKEND)
// C compilers that use an LLVM back end (clang or llvm-gcc) do not
// correctly support global register variables so we make sure that
// we do not declare them for these compilers.
diff --git a/includes/ghc.mk b/includes/ghc.mk
index eee72128b0..f8da99abb6 100644
--- a/includes/ghc.mk
+++ b/includes/ghc.mk
@@ -114,23 +114,6 @@ $$(includes_$1_H_CONFIG) : mk/config.h mk/config.mk includes/ghc.mk | $$$$(dir $
#
@sed 's,^\([ ]*\)#[ ]*define[ ][ ]*\(PACKAGE_[A-Z]*\)[ ][ ]*".*".*$$$$,\1/* #undef \2 */,' mk/config.h >> $$@
#
-# Tack on some extra config information from the build system
-#
-ifeq "$$(TablesNextToCode)" "YES"
- @echo >> $$@
- @echo "#define TABLES_NEXT_TO_CODE 1" >> $$@
-endif
-#
-ifeq "$$(CC_LLVM_BACKEND)" "1"
- @echo >> $$@
- @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."