haskell / ghcup-hs

https://www.haskell.org/ghcup/
GNU Lesser General Public License v3.0
289 stars 89 forks source link

Disable GHCs aggressive selection of `ld.gold` #1032

Open hasufell opened 7 months ago

hasufell commented 7 months ago

GHC constantly tries to overwrite distro defaults and selects ld.gold very aggressively even if ld.bfd is the system default.

Major source distros advice against using ld.gold as default and we should follow their lead.

As such, I propose to:

Sparked by discussion: https://gitlab.haskell.org/ghc/ghc/-/issues/24565

hasufell commented 7 months ago

https://github.com/haskell/ghcup-hs/pull/1033

hseg commented 7 months ago

Thanks for that, double-checked that ghc --info emits ("Merge objects command", "ld") (though oddly enough, it still seems to think ("ld is GNU ld", "YES") -- I don't know if that's correct, but that's a GHC bug if it is). Now I just need to figure out/prod stack to enable the same (given that https://gitlab.haskell.org/ghc/ghc/-/issues/24565 was triggered when running a stack-vendored ghc in a packaging context, not my usual usage of a ghcup-vendored ghc in a dev context)

EDIT: First result when googling this https://www.haskell.org/ghcup/guide/#stack-integration. Probably best solution for now.

mpickering commented 4 months ago

It seems that 2a7f32ec8caf638a9c14c6ba223e2a489db9620c reverts the change to use --disable-ld-override "for now".

Is the plan to enable --disable-ld-override in future, is there an issue which is block it being used now?

hasufell commented 4 months ago

I want some more time to pass and reflect on it.

@alt-romes talked to me about that at ZuriHac.

mpickering commented 4 months ago

Thanks sounds good, just wanted to check in about what the status was there.

hasufell commented 4 months ago

Repoening.