summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-08-19 09:41:12 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-09-07 08:03:03 -0400
commit81975ef375de07a0ea5a69596b2077d7f5959182 (patch)
tree4f83ffaf128c48a95f43f63b261c5ff0aa6db9fb /rts
parentf72aa31d36f4fbab0258cae1c94ac0cc24682ab9 (diff)
downloadhaskell-81975ef375de07a0ea5a69596b2077d7f5959182.tar.gz
hadrian: Ensure that settings is regenerated during bindist installation
Previously Hadrian would simply install the settings file generated in the build environment during the binary distribution installation. This is wrong since these environments may differ (e.g. different `cc` versions). We noticed on Darwin when installation of a binary distribution produced on a newer Darwin release resulted in a broken compiler due to the installed `settings` file incorrectly claiming that `cc` supported `-no-pie`. Fixing this sadly requires a bit of code duplication since `settings` is produced by Hadrian and not `configure`. For now I have simply duplicated the `settings` generation logic used by the Make build system into Hadrian's bindist Makefile. Ultimately the solution will probably involve shipping a freestanding utility to replace `configure`'s toolchain probing logic and generate a toolchain description file (similar to `settings`) as described in #19877. Fixes #20253.
Diffstat (limited to 'rts')
-rw-r--r--rts/include/ghc.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/rts/include/ghc.mk b/rts/include/ghc.mk
index 88cb12caff..26275075bd 100644
--- a/rts/include/ghc.mk
+++ b/rts/include/ghc.mk
@@ -207,6 +207,7 @@ $(eval $(call includesHeaderPlatform,1))
includes_SETTINGS = rts/include/dist/build/settings
+# N.B. this is duplicated in hadrian/bindist/Makefile.
$(includes_SETTINGS) : rts/include/Makefile | $$(dir $$@)/.
$(call removeFiles,$@)
@echo '[("GCC extra via C opts", "$(GccExtraViaCOpts)")' >> $@