diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2014-08-18 21:45:11 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-08-18 23:26:19 -0500 |
commit | 9a708d38c4491dfdf7f97c03e3ff6d482cbdd66e (patch) | |
tree | e3a9371598032b29a6ba75c1b09f5f09ceac41fa /compiler/main/CodeOutput.lhs | |
parent | bbd031134a571c1020945b2548e3fc4795b5047a (diff) | |
download | haskell-9a708d38c4491dfdf7f97c03e3ff6d482cbdd66e.tar.gz |
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@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
Diffstat (limited to 'compiler/main/CodeOutput.lhs')
-rw-r--r-- | compiler/main/CodeOutput.lhs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/main/CodeOutput.lhs b/compiler/main/CodeOutput.lhs index 7a554f4d20..72803c0d6b 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") |