summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-08-01 11:34:32 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-08-05 04:00:39 -0400
commit53ce0db5a06598c88c6b8cb32043b878e7083dd4 (patch)
tree281c045c9f198c5bb046780881931b41de1f15d4 /includes
parent2bff2f87e43985e02bdde8c6fa39279df86cb617 (diff)
downloadhaskell-53ce0db5a06598c88c6b8cb32043b878e7083dd4.tar.gz
Refactor handling of object merging
Previously to merge a set of object files we would invoke the linker as usual, adding -r to the command-line. However, this can result in non-sensical command-lines which causes lld to balk (#17962). To avoid this we introduce a new tool setting into GHC, -pgmlm, which is the linker which we use to merge object files.
Diffstat (limited to 'includes')
-rw-r--r--includes/ghc.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/includes/ghc.mk b/includes/ghc.mk
index 6b7fb6f1ba..70733f1e2c 100644
--- a/includes/ghc.mk
+++ b/includes/ghc.mk
@@ -223,6 +223,8 @@ $(includes_SETTINGS) : includes/Makefile | $$(dir $$@)/.
@echo ',("ld supports build-id", "$(LdHasBuildId)")' >> $@
@echo ',("ld supports filelist", "$(LdHasFilelist)")' >> $@
@echo ',("ld is GNU ld", "$(LdIsGNULd)")' >> $@
+ @echo ',("Merge objects command", "$(SettingsMergeObjectsCommand)")' >> $@
+ @echo ',("Merge objects flags", "$(SettingsMergeObjectsFlags)")' >> $@
@echo ',("ar command", "$(SettingsArCommand)")' >> $@
@echo ',("ar flags", "$(ArArgs)")' >> $@
@echo ',("ar supports at file", "$(ArSupportsAtFile)")' >> $@