From f90244c970dbc053cee0fdb9b73eb98493d65fde Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Mon, 17 May 2021 17:22:47 +0200 Subject: [PATCH 1/2] haskell.compiler.ghcHEAD: disable DWARF on non x86 The broken build of ghcHEAD on aarch64-linux results from rts/Libdw.c not supporting that platform. Seemingly this particular file is only relevant for DWARF support in GHC, so we disable that on unsupported platforms. --- pkgs/development/compilers/ghc/head.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 60371ec5a1b..8a2a6397257 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -10,7 +10,9 @@ , # GHC can be built with system libffi or a bundled one. libffi ? null -, enableDwarf ? !stdenv.targetPlatform.isDarwin && + # Libdw.c only supports x86_64, i686 and s390x +, enableDwarf ? stdenv.targetPlatform.isx86 && + !stdenv.targetPlatform.isDarwin && !stdenv.targetPlatform.isWindows , elfutils # for DWARF support @@ -258,10 +260,7 @@ stdenv.mkDerivation (rec { homepage = "http://haskell.org/ghc"; description = "The Glasgow Haskell Compiler"; maintainers = with lib.maintainers; [ marcweber andres peti ]; - inherit (ghc.meta) license; - # GHC-HEAD does not appear to compile on aarch64. - broken = stdenv.isAarch64; - platforms = builtins.filter (p: p != "aarch64-linux") ghc.meta.platforms; + inherit (ghc.meta) license platforms; }; dontStrip = (targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm); From 29e029da1c568aacdbe94409314263f6bb568f71 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Mon, 17 May 2021 22:08:56 +0200 Subject: [PATCH 2/2] haskell.compiler.ghcHEAD: bootstrap using GHC 9.0 They use matching LLVM versions which should alleviate some warnings. --- pkgs/top-level/haskell-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index af4125d6713..8bea40efe64 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -86,7 +86,7 @@ in { llvmPackages = pkgs.llvmPackages_10; }; ghcHEAD = callPackage ../development/compilers/ghc/head.nix { - bootPkgs = packages.ghc8104; # no binary yet + bootPkgs = packages.ghc901; # no binary yet inherit (buildPackages.python3Packages) sphinx; buildLlvmPackages = buildPackages.llvmPackages_10; llvmPackages = pkgs.llvmPackages_10;