mold icon indicating copy to clipboard operation
mold copied to clipboard

Can mold be used with a crrosscompiler like arm-none-eabi-g++

Open zrno opened this issue 1 year ago • 5 comments

I am using mold to build my unit tests locally and everything is working fine.

The cross-compiler we use has recently been updated to the 12.2.1 version of GCC.

When I try to pass in "-fuse-ld=mold" as an option when calling arm-none-eabi-g++ I get the error collect2: fatal error: cannot find 'ld'

Is it possible to use mold with a crosscompiler?

zrno avatar Sep 27 '23 01:09 zrno

It didn't work because of the typo? The correct spelling of the option is -fuse-ld=mold.

rui314 avatar Sep 27 '23 02:09 rui314

It didn't work because of the typo? The correct spelling of the option is -fuse-ld=mold.

Sorry that was a typo in the issue description only. No typo in my actual command

zrno avatar Sep 27 '23 02:09 zrno

It seems like a GCC's bug, so I filed this as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111605.

In the meantime, please create a arm-none-eabi-ld.mold as a symbolic link to mold in a directory in your $PATH.

rui314 avatar Sep 27 '23 04:09 rui314

@ishitatsuyuki sent a patch to gcc: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/633093.html

rui314 avatar Oct 17 '23 06:10 rui314

Thanks for the update

zrno avatar Oct 17 '23 09:10 zrno