[commit: ghc] master: UNREG: fix PackageKey emission into .hc files (9a708d3)
git at git.haskell.org
git at git.haskell.org
Tue Aug 19 04:34:33 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9a708d38c4491dfdf7f97c03e3ff6d482cbdd66e/ghc
>---------------------------------------------------------------
commit 9a708d38c4491dfdf7f97c03e3ff6d482cbdd66e
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date: Mon Aug 18 21:45:11 2014 -0500
UNREG: fix PackageKey emission into .hc files
Summary:
Fixes ./configure --unable-unregisterised build failure:
HC [stage 1] (one of the first calls)
...
<command line>: unknown package: transformers-0.4.1.0
The reason of bug is how UNREG build stores package information
in .hc files:
compiler/main/CodeOutput.lhs generates first line as
/* GHC_PACKAGES pkg-name-ver1 pkg-name-ver2 ...
while DriverPipeline.hs (getHCFilePackages) expects
/* GHC_PACKAGES pkg-key1 pkg-key2 ...
Fix it by emitting ghc's PackageKey in CodeOutput
Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
Test Plan: build-tested on ./configure --enable-unregistersied
Reviewers: simonmar, ezyang, austin
Reviewed By: ezyang, austin
Subscribers: simonmar, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D164
>---------------------------------------------------------------
9a708d38c4491dfdf7f97c03e3ff6d482cbdd66e
compiler/main/CodeOutput.lhs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/compiler/main/CodeOutput.lhs b/compiler/main/CodeOutput.lhs
index 7a554f4..72803c0 100644
--- a/compiler/main/CodeOutput.lhs
+++ b/compiler/main/CodeOutput.lhs
@@ -124,8 +124,7 @@ outputC dflags filenm cmm_stream packages
'<':_ -> "#include "++h_file
_ -> "#include \""++h_file++"\""
- pkg_configs <- getPreloadPackagesAnd dflags packages
- let pkg_names = map (display.sourcePackageId) pkg_configs
+ let pkg_names = map packageKeyString packages
doOutput filenm $ \ h -> do
hPutStr h ("/* GHC_PACKAGES " ++ unwords pkg_names ++ "\n*/\n")
More information about the ghc-commits
mailing list