[commit: ghc] ghc-8.8: Fix bindist for ghci library (4985e1c)
git at git.haskell.org
git at git.haskell.org
Wed Jan 16 05:48:32 UTC 2019
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.8
Link : http://ghc.haskell.org/trac/ghc/changeset/4985e1c6cf9f577a913bcafbc5500e185096b460/ghc
>---------------------------------------------------------------
commit 4985e1c6cf9f577a913bcafbc5500e185096b460
Author: Zejun Wu <watashi at fb.com>
Date: Tue Jan 1 18:59:23 2019 -0800
Fix bindist for ghci library
Summary:
https://phabricator.haskell.org/D5169 built libghci for both vanilla way
and profiling way. We need to include both in the bindist list so they
will be installed.
Test Plan:
```
$ grep '^BuildFlavour' mk/build.mk
BuildFlavour=perf
$ make test_bindist
$ grep HSghc-prim bindist-list.uniq
ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.o
ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.p_o
ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3.a
ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3-ghc8.7.20190101.so
ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3_p.a
```
(cherry picked from commit 3fb726d0696f4c59e58331e505e49f02f135a2f1)
>---------------------------------------------------------------
4985e1c6cf9f577a913bcafbc5500e185096b460
ghc.mk | 7 +++++--
rules/build-package-way.mk | 8 ++++----
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/ghc.mk b/ghc.mk
index e0d5837..f6d3b48 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -784,8 +784,11 @@ ifneq "$(BINDIST)" "YES"
# Make sure we have all the GHCi libs by the time we've built
# ghc-stage2.
#
-GHCI_LIBS = $(foreach lib,$(PACKAGES_STAGE1),$(libraries/$(lib)_dist-install_GHCI_LIB)) \
- $(compiler_stage2_GHCI_LIB)
+GHCI_LIBS = \
+ $(foreach way,$(GhcLibWays),\
+ $(foreach lib,$(PACKAGES_STAGE1),\
+ $(libraries/$(lib)_dist-install_$(way)_GHCI_LIB)) \
+ $(compiler_stage2_$(way)_GHCI_LIB))
ifeq "$(UseArchivesForGhci)" "NO"
ghc/stage2/build/tmp/$(ghc_stage2_PROG) : $(GHCI_LIBS)
diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk
index 0a762d3..f9eca23 100644
--- a/rules/build-package-way.mk
+++ b/rules/build-package-way.mk
@@ -113,14 +113,14 @@ endif
# Build the GHCi library
ifneq "$(filter $3, v p)" ""
-$1_$2_GHCI_LIB = $1/$2/build/HS$$($1_$2_COMPONENT_ID).$$($3_osuf)
+$1_$2_$3_GHCI_LIB = $1/$2/build/HS$$($1_$2_COMPONENT_ID).$$($3_osuf)
ifeq "$$($1_$2_BUILD_GHCI_LIB)" "YES"
# Don't put bootstrapping packages in the bindist
ifneq "$4" "0"
-BINDIST_LIBS += $$($1_$2_GHCI_LIB)
+BINDIST_LIBS += $$($1_$2_$3_GHCI_LIB)
endif
endif
-$$($1_$2_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS) $$($1_$2_LD_SCRIPT)
+$$($1_$2_$3_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS) $$($1_$2_LD_SCRIPT)
$$(call cmd,LD_NO_GOLD) $$(CONF_LD_LINKER_OPTS_STAGE$4) -r $$(if $$($1_$2_LD_SCRIPT),$$($1_$2_LD_SCRIPT_CMD) $$($1_$2_LD_SCRIPT)) -o $$@ $$(EXTRA_LD_LINKER_OPTS) $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS)
# NB. LD_NO_GOLD above: see #14328 (symptoms: #14675,#14291). At least
# some versions of ld.gold appear to have a bug that causes the
@@ -129,7 +129,7 @@ $$($1_$2_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OB
ifeq "$$($1_$2_BUILD_GHCI_LIB)" "YES"
# Don't bother making ghci libs for bootstrapping packages
ifneq "$4" "0"
-$(call all-target,$1_$2,$$($1_$2_GHCI_LIB))
+$(call all-target,$1_$2,$$($1_$2_$3_GHCI_LIB))
endif
endif # "$$($1_$2_BUILD_GHCI_LIB)" "YES"
endif # "$(filter $3, v p)" ""
More information about the ghc-commits
mailing list