Skip to content

configure should use the default system linker on Linux by default

Summary

As first reported indirectly in #22195 (closed), configure (m4/find_ld.m4) always prefers the lld linker over gold or bfd. I don't think this is a good choice on Linux, at least if one is using a GNU toolchain.

Steps to reproduce

Run ./configure on Linux with lld (and ld.gold/ld.bfd) installed: stage0 is configured to use ld.lld instead of ld.bfd or ld.gold.

Expected behavior

/usr/bin/ld (or gcc/toolchain default) to be default and preferred on Linux.

Environment

  • GHC version used: ghc-9.4

Optional:

  • Operating System: Fedora Linux
  • System Architecture: x86_64
Edited by Jens Petersen
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information