Skip to content

GHC's build-time ld-flag checks are problematic

If the linker that GHC was built against happened to recognize the --hash-size and --reduce-memory-overhead flags, but the current system linker does not, GHC will indiscriminately pass those flags to the current linker when attempting to link anything, and the linking will fail due to an 'unrecognized option' error.

I have experienced this behavior when I upgraded to GHC 7.4.1 on debian. The GHC package in question was built against bfd ld, which recognized those linker flags, but my system linker is gold, which does not recognized those flags. Therefore, I could not build anything until i reverted to bfd ld.

(Relevant commits: 3275b7bd and 9ccb59ed)

Trac metadata
Trac field Value
Version 7.4.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown/Multiple
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information