From b868aaab737986d8620e1af2574e59aeaa3effd6 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Fri, 19 Apr 2024 22:54:07 +0200 Subject: [PATCH] haskell.compiler.ghc9{6,8}: fix elfutils splicing elfutils is used in the RTS (rts/Libdw.c), i.e. it will be used on the target platform. Tested via pkgsCross.gnu32.haskellPackages.ghc [1], though #304605 needs to be cherry-picked for elfutils to build. [1]: nix-shell -E 'with import ./. { crossSystem = "i686-linux"; }; mkShell { nativeBuildInputs = [haskellPackages.ghc ]; }' --- pkgs/development/compilers/ghc/common-hadrian.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 522bcb10222ba..1cfe6651c10ab 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -405,8 +405,8 @@ stdenv.mkDerivation ({ "--disable-large-address-space" ] ++ lib.optionals enableDwarf [ "--enable-dwarf-unwind" - "--with-libdw-includes=${lib.getDev elfutils}/include" - "--with-libdw-libraries=${lib.getLib elfutils}/lib" + "--with-libdw-includes=${lib.getDev targetPackages.elfutils}/include" + "--with-libdw-libraries=${lib.getLib targetPackages.elfutils}/lib" ] ++ lib.optionals targetPlatform.isDarwin [ # Darwin uses llvm-ar. GHC will try to use `-L` with `ar` when it is `llvm-ar` # but it doesn’t currently work because Cabal never uses `-L` on Darwin. See: