diff options
author | Travis Whitaker <pi.boy.travis@gmail.com> | 2020-05-06 04:14:47 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-05-29 13:34:48 -0400 |
commit | 67738db10010fd28a8e997b5c8f83ea591b88a0e (patch) | |
tree | 92e283a33006eca3888019c744f5d1b5ed34cddb /configure.ac | |
parent | f9a513e064bd8a33ad6f8aa5fb8673931507eca1 (diff) | |
download | haskell-67738db10010fd28a8e997b5c8f83ea591b88a0e.tar.gz |
Build a threaded stage 1 if the bootstrapping GHC supports it.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a621814700..bac2cfde5e 100644 --- a/configure.ac +++ b/configure.ac @@ -124,6 +124,9 @@ AC_ARG_VAR(CC_STAGE0, [C compiler command (bootstrap)]) AC_ARG_VAR(LD_STAGE0, [Linker command (bootstrap)]) AC_ARG_VAR(AR_STAGE0, [Archive command (bootstrap)]) +dnl RTS ways supplied by the bootstrapping compiler. +AC_ARG_VAR(RTS_WAYS_STAGE0, [RTS ways]) + if test "$WithGhc" != ""; then FPTOOLS_GHC_VERSION([GhcVersion], [GhcMajVersion], [GhcMinVersion], [GhcPatchLevel])dnl @@ -151,6 +154,17 @@ if test "$WithGhc" != ""; then fi BOOTSTRAPPING_GHC_INFO_FIELD([AR_OPTS_STAGE0],[ar flags]) BOOTSTRAPPING_GHC_INFO_FIELD([ArSupportsAtFile_STAGE0],[ar supports at file]) + BOOTSTRAPPING_GHC_INFO_FIELD([RTS_WAYS_STAGE0],[RTS ways]) + + dnl Check whether or not the bootstrapping GHC has a threaded RTS. This + dnl determines whether or not we can have a threaded stage 1. + dnl See Note [Linking ghc-bin against threaded stage0 RTS] in + dnl hadrian/src/Settings/Packages.hs for details. + if echo ${RTS_WAYS_STAGE0} | grep '.*thr.*' 2>&1 >/dev/null; then + AC_SUBST(GhcThreadedRts, YES) + else + AC_SUBST(GhcThreadedRts, NO) + fi fi dnl ** Must have GHC to build GHC @@ -1454,6 +1468,7 @@ Configure completed successfully. echo "\ Bootstrapping using : $WithGhc which is version : $GhcVersion + with threaded RTS? : $GhcThreadedRts " if test "x$CcLlvmBackend" = "xYES"; then |