summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-01-15 14:57:08 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-08 10:19:57 -0500
commitbec76733b818b0489ffea0834ab6b1560207577c (patch)
tree556569d2f5144dbfa2c6994c83f733e9c2f17d80 /ghc
parent88bf81aaaf67e9c9bb5b12088ab33accd4a55fb3 (diff)
downloadhaskell-bec76733b818b0489ffea0834ab6b1560207577c.tar.gz
Fix GhcThreaded setting
This adopts a patch from NetBSD's packaging fixing the `GhcThreaded` option of the make build system. In addition we introduce a `ghcThreaded` option in hadrian's `Flavour` type. Also fix Hadrian's treatment of the `Use Threaded` entry in `settings`. Previously it would incorrectly claim `Use Threaded = True` if we were building the `threaded` runtime way. However, this is inconsistent with the `make` build system, which defines it to be whether the `ghc` executable is linked against the threaded runtime. Fixes #17692.
Diffstat (limited to 'ghc')
-rw-r--r--ghc/ghc.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/ghc/ghc.mk b/ghc/ghc.mk
index 3bff2f58c9..8c112a054f 100644
--- a/ghc/ghc.mk
+++ b/ghc/ghc.mk
@@ -61,7 +61,13 @@ ifeq "$(GhcThreaded)" "YES"
# Use threaded RTS with GHCi, so threads don't get blocked at the prompt.
ghc_stage2_MORE_HC_OPTS += -threaded
ghc_stage3_MORE_HC_OPTS += -threaded
+else
+# Opt out from threaded GHC. See ghc-bin.cabal.in
+ghc_stage2_CONFIGURE_OPTS += -f-threaded
+ghc_stage3_CONFIGURE_OPTS += -f-threaded
endif
+# Stage-0 compiler isn't guaranteed to have a threaded RTS.
+ghc_stage1_CONFIGURE_OPTS += -f-threaded
ifeq "$(GhcProfiled)" "YES"
ghc_stage2_PROGRAM_WAY = p