[commit: ghc] ghc-8.0: Fix bootstrapping with GHC 7.8. (36e1fea)
git at git.haskell.org
git at git.haskell.org
Wed Jan 20 11:20:27 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/36e1fead2fa63ad3d73d2e0fafbb305ff35cd08a/ghc
>---------------------------------------------------------------
commit 36e1fead2fa63ad3d73d2e0fafbb305ff35cd08a
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date: Wed Jan 20 11:22:43 2016 +0100
Fix bootstrapping with GHC 7.8.
Test Plan: bootstrap with GHC 7.8
Reviewers: hvr, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1803
>---------------------------------------------------------------
36e1fead2fa63ad3d73d2e0fafbb305ff35cd08a
mk/config.mk.in | 1 +
rules/distdir-way-opts.mk | 18 +++++++++++-------
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/mk/config.mk.in b/mk/config.mk.in
index fcc4b8a..a8581e3 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -500,6 +500,7 @@ GHC_PACKAGE_DB_FLAG = @GHC_PACKAGE_DB_FLAG@
CMM_SINK_BOOTSTRAP_IS_NEEDED = @CMM_SINK_BOOTSTRAP_IS_NEEDED@
+SUPPORTS_COMPONENT_ID = @SUPPORTS_COMPONENT_ID@
SUPPORTS_THIS_UNIT_ID = @SUPPORTS_THIS_UNIT_ID@
#-----------------------------------------------------------------------------
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index 66c00af..f099d4e 100644
--- a/rules/distdir-way-opts.mk
+++ b/rules/distdir-way-opts.mk
@@ -96,18 +96,22 @@ define distdir-way-opts # args: $1 = dir, $2 = distdir, $3 = way, $4 = stage
# $1_$2_$3_MOST_HC_OPTS is also passed to C compilations when we use
# GHC as the C compiler.
-ifeq "$(SUPPORTS_THIS_UNIT_ID)" "NO"
-ifeq "$4" "0"
-$4_USE_THIS_UNIT_ID=NO
-endif
-endif
-
$1_$2_$4_DEP_OPTS = \
$$(foreach pkg,$$($1_$2_DEP_IPIDS),-package-id $$(pkg))
-ifeq "$($4_USE_THIS_UNIT_ID)" "NO"
+# These are really all misnomers; SUPPORTS_COMPONENT_ID just tests for >=7.9
+# and SUPPORTS_THIS_UNIT_ID >=7.11
+ifeq "$4" "0"
+ifeq "$(SUPPORTS_THIS_UNIT_ID)" "YES"
+$4_THIS_UNIT_ID = -this-unit-id
+else
+ifeq "$(SUPPORTS_COMPONENT_ID)" "YES"
$4_THIS_UNIT_ID = -this-package-key
else
+$4_THIS_UNIT_ID = -package-name
+endif
+endif
+else
$4_THIS_UNIT_ID = -this-unit-id
endif
More information about the ghc-commits
mailing list