Linker broken on M1 Mac in ghc-9.2.2
I have a GHC 9.2.2 as installed by ghcup. It cannot link:
rae:15:01:01 ~/temp/bug> cat Main.hs
module Main where
main = putStrLn "Hello, world!"
rae:15:01:07 ~/temp/bug> ghc Main.hs
Linking Main ...
ld64.lld: error: unknown argument '--gc-sections'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
rae:15:01:11 ~/temp/bug>
My GHC 9.2.1 works, both the one I installed myself and ghcup's version.
Help?