You can pass --unwindlib=libunwind and rtlib, they are both link options On Tue, Oct 12, 2021, 8:55 AM Matt Andrews wrote: > > --rtlib=compiler-rt > > Is that a compiler option or a linker option? I used it in both places, > but still get the same error. > > On Tue, Oct 12, 2021 at 4:00 PM Nagakamira wrote: > >> --rtlib=compiler-rt >> >> On Tue, Oct 12, 2021, 7:58 AM Matt Andrews wrote: >> >>> > -fuse-ld=lld >>> >>> I actually used >>> >>> -fuse-ld=ld.lld >>> >>> That did the trick, but has unlocked another error >>> >>> ld.lld: error: unable to find library -lgcc >>> ld.lld: error: unable to find library -lgcc_eh >>> >>> I thought musl compiles with it's own headers? >>> >>> On Tue, Oct 12, 2021 at 3:54 PM Nagakamira wrote: >>> >>>> -fuse-ld=lld >>>> >>>> On Tue, Oct 12, 2021, 3:26 AM Jeffrey Walton >>>> wrote: >>>> >>>>> On Mon, Oct 11, 2021 at 7:55 PM Matt Andrews >>>>> wrote: >>>>> > >>>>> > >> How do I specify which linker to use? >>>>> > > >>>>> > >LD. Also see >>>>> https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html >>>>> . >>>>> > >>>>> > Looking at the ./configure for musl (which is not based on autoconf >>>>> according to the docs), there is no mention of LD. Setting LD for >>>>> ./configure and/or the call to make still results in the error. >>>>> > >>>>> > Who calls the linker? The compiler or make? Shouldn't clang know >>>>> where it's linker is? How to tell clang which linker to use? >>>>> >>>>> You can have the compiler driver call the linker for you by specifying >>>>> -o with an output file name. In that case, $CC or $CXX will drive the >>>>> link. And in this case, your LDFLAGS should prefix options with -Wl to >>>>> tell the compiler driver the option is for the linker. >>>>> >>>>> Jeff >>>>> >>>>