Change:
Our can no longer link executables. For example: This issue is present in current versions of . Compiling and linking works fine with an older revision, say . It looks like this might be related to some change in binutils, maybe?
This is probably from
Yes, it is. came to the same conclusion.
This probably is GHC bug though. Things like gmp and libiconv get their paths hardcoded so this isn't a problem. I would expect the same treatment for elfutils. should provide a arg.
/cc
I guess now I know why there's a patch in branch.
I'll reopen the PR fixing the linking issues.
I opened while we wait on upstream fix.
Which one, from
Yes, although it doesn't help. See
Yes, it would have surprised me a bit if it helped against that symptom -- my patch fixes that DWARF-enabling is skipped completely.
I'm surprised this worked for you back then and now there are linking errors.

Discussion:
# Splicer will pull out correct variations libDeps = platform: [ ncurses ] ++ stdenv.lib.optional (!enableIntegerSimple) gmp <del> ++ stdenv.lib.optional (platform.libc != "glibc") libiconv ++ stdenv.lib.optional enableDwarf elfutils; </del> <ins> ++ stdenv.lib.optional (platform.libc != "glibc") libiconv; </ins> toolsForTarget = [ pkgsBuildTarget.targetPackages.stdenv.cc

] ++ stdenv.lib.optionals (targetPlatform.isDarwin && targetPlatform.isAarch64) [ # fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/ "--disable-large-address-space" <del> ] ++ stdenv.lib.optional enableDwarf [ "--enable-dwarf-unwind" </del> ]; # Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.

, libiconv ? null, ncurses <del> , enableDwarf ? !stdenv.targetPlatform.isDarwin && !stdenv.targetPlatform.isWindows, elfutils # for DWARF support </del> , useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform) , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a

] ++ stdenv.lib.optionals (targetPlatform.isDarwin && targetPlatform.isAarch64) [ # fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/ "--disable-large-address-space" <del> ] ++ stdenv.lib.optional enableDwarf [ "--enable-dwarf-unwind" </del> ]; # Make sure we never relax`$PATH` and hooks support for compatability.

, libiconv ? null, ncurses <del> , enableDwarf ? !stdenv.targetPlatform.isDarwin && !stdenv.targetPlatform.isWindows, elfutils # for DWARF support </del> , # GHC can be built with system libffi or a bundled one. libffi ? null

libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ] ++ [libffi] ++ stdenv.lib.optional (!enableIntegerSimple) gmp <del> ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv ++ stdenv.lib.optional enableDwarf elfutils; </del> <ins> ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv; </ins> toolsForTarget = [ pkgsBuildTarget.targetPackages.stdenv.cc

, libiconv ? null, ncurses <del> , enableDwarf ? !stdenv.targetPlatform.isDarwin && !stdenv.targetPlatform.isWindows, elfutils # for DWARF support </del> , useLLVM ? !stdenv.targetPlatform.isx86 , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a

# Splicer will pull out correct variations libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ] ++ stdenv.lib.optional (!enableIntegerSimple) gmp <del> ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv ++ stdenv.lib.optional enableDwarf elfutils; </del> <ins> ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv; </ins> toolsForTarget = [ pkgsBuildTarget.targetPackages.stdenv.cc

"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold" ] ++ stdenv.lib.optionals (disableLargeAddressSpace) [ "--disable-large-address-space" <del> ] ++ stdenv.lib.optional enableDwarf [ "--enable-dwarf-unwind" </del> ]; # Make sure we never relax`$PATH` and hooks support for compatability.