Skip to content

Can't run ghc with custom linker (mold)

Summary

When building program with non-GNU linker (though it fully compatible), this error rises

<no location info>: error:
    Warning: Couldn't figure out linker information!
             Make sure you're using GNU ld, GNU gold or the built in OS X linker, etc

Steps to reproduce

mold -run ghc Main.hs

Expected behavior

It builds

Environment

Why it's even restricted to fixed types of linker in the first place ? As can be seen from sourses ghc literally parses stdoud to detect and limit linker.

Can it be fixed, extended to support any linker or at least add mold to that list ?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information