Skip to content

Commit eb39cf1

Browse files
authored
Add genprimopcode and deriveConstants to ghc cross compilers (input-output-hk#2147)
* Add genprimopcode and deriveConstants to ghc cross compilers * ifdLevel 1 * ifdLevel 2 * ifdLevel 0 * ifdLevel 1 * ifdLevel 2 * ifdLevel 3 * musl utils have no prefix * ifdLevel 1 * ifdLevel 2 * ifdLevel 3 * Pin hlint for ghc 9.2.8
1 parent f577789 commit eb39cf1

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

build.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ in rec {
4242
"ghc8105" = "3.4.1";
4343
"ghc8106" = "3.4.1";
4444
"ghc8107" = "3.4.1";
45+
"ghc928" = "3.6.1";
4546
}.${compiler-nix-name} or "latest";
4647
};
4748
} // pkgs.lib.optionalAttrs (ghcFromTo "9.2" "9.6") {

compiler/ghc/default.nix

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,19 @@ stdenv.mkDerivation (rec {
793793
then ''
794794
mkdir $out
795795
cp -r _build/stage1/bin $out
796+
${
797+
# These are needed when building the reinstallable lib ghc
798+
if targetPlatform.isMusl
799+
then ''
800+
cp _build/stageBoot/bin/genprimopcode $out/bin
801+
cp _build/stageBoot/bin/deriveConstants $out/bin
802+
'' else ''
803+
cp _build/stageBoot/bin/${targetPrefix}genprimopcode $out/bin
804+
ln -s $out/bin/${targetPrefix}genprimopcode $out/bin/genprimopcode
805+
cp _build/stageBoot/bin/${targetPrefix}deriveConstants $out/bin
806+
ln -s $out/bin/${targetPrefix}deriveConstants $out/bin/deriveConstants
807+
''
808+
}
796809
cp -r _build/stage1/lib $out
797810
mkdir $doc
798811
cp -r _build/stage1/share $doc

0 commit comments

Comments
 (0)