Support --with-dwarf-libraries=
Summary
GHC doesn't know where to link dwarf libraries from.
Steps to reproduce
$ git clone https://github.com/NixOS/nixpkgs.git
$ cd nixpkgs
$ git checkout ghc-dwarf
$ nix-build -A haskell.compiler.ghc865
$ ./result/bin/ghc test.hs
Linking test ...
/nix/store/m5wwsdqmb62xzjxa7q70x7j46f5b2d1m-binutils-2.31.1/bin/ld: cannot find -lelf
/nix/store/m5wwsdqmb62xzjxa7q70x7j46f5b2d1m-binutils-2.31.1/bin/ld: cannot find -ldw
collect2: error: ld returned 1 exit status
`cc' failed in phase `Linker'. (Exit code: 1)
Expected behavior
test.hs
compiled.
Environment
- GHC version used: 8.6.5
Optional:
- Operating System: NixOS
- System Architecture: 64bit Linux