From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19387 invoked from network); 12 Oct 2021 05:55:42 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 12 Oct 2021 05:55:42 -0000 Received: (qmail 25794 invoked by uid 550); 12 Oct 2021 05:55:40 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 25757 invoked from network); 12 Oct 2021 05:55:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=sSEVme9cRoxqRo7byEKASHSIHqF9TwVCSUMAoxn2HkI=; b=iyAtzlkoe8qDI9G2TC8r0OH1j0DngKeSsQLsdwB/rCKUXqewytpPdITLXlNKpd4RsF RDt9zASB47mUISRvigu3aJLXRc7Rrn/hCyI6t/n0F1jJ0oVa6j4UEvWcPdPNNzN/EKPt tmKlr/aXyVtTYxn3b3NohIqrH1vcWf6gnWZD0nLXKMz/5w/ABB5e7YIzv3O9+J3CuRFg L4cBLArXeMHuQXmYjH3HGOVHDmLMaUWIxLz29LgqTj3Rf936wbe1RKLI6l/qKL/ruo4K Ymw9EmrLKoZgfCRS+z/yuOu5v9JTcnG7fUiF5hubcdBoHnzo15aeHbEMPpXZH9Hot6wx Hwzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=sSEVme9cRoxqRo7byEKASHSIHqF9TwVCSUMAoxn2HkI=; b=7N+SUu6pzBy4aJr5Y4Oi+vPEEdmmBthTHGL4AUcrodGLSPnXmrKjONvJgQ/ZpGRQGw emjN/TN08+RaUE+56WmPme+cofryCSh5aJpSvs5xf1i+M+eE4Xu8OP7n0IApFweEXCQd mfGZGFpPqK8alDxMTTj64L01h4O/q3hUm2IIStKPdPgHUXdprzmswd0csDpp6UzGEEqQ PI0uNDEA2dhu7WcbvzALkACQm8BdmRLzVmoAvihSrTD6DeSvEWCPZwd+w1dJOOa3fu52 qDS3pJEIpEW3fZSKmfobHD3bVjuIj81XPoY/VnSqhSKGt8yok7Oy607ZDPtsLAVQLonT iT+Q== X-Gm-Message-State: AOAM533xvdASoMLIrJ5Qem6am1VkLEKgWoYxWwrXoLNr/mTbEQ312t+a QaAv725nwOGbmKF2DRn7zNF8uRclcdasu0LfdwQRQbdQ X-Google-Smtp-Source: ABdhPJx6WCtb/39snxRVX3CCH5otKMMKaUj73dawq03V1f9T/q1XtfHuaECn/WDF17BBL0OLQpdWtNSxmHPZmcdWtVY= X-Received: by 2002:a17:906:5051:: with SMTP id e17mr30853015ejk.481.1634018128256; Mon, 11 Oct 2021 22:55:28 -0700 (PDT) MIME-Version: 1.0 References: <20211011004346.13768de6@tpx.quinq.eu.org> In-Reply-To: From: Matt Andrews Date: Tue, 12 Oct 2021 16:55:17 +1100 Message-ID: To: musl@lists.openwall.com Content-Type: multipart/alternative; boundary="00000000000017636e05ce217eeb" Subject: Re: [musl] Newbie cross compiling with LLVM --00000000000017636e05ce217eeb Content-Type: text/plain; charset="UTF-8" > --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 >>>> >>> --00000000000017636e05ce217eeb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> --rtlib=3Dcompiler-rt

I= s 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 Nagakami= ra <nagakamira= @gmail.com> wrote:
--rtlib=3Dcompiler-rt

On Tue, Oct 12, 2021, 7:5= 8 AM Matt Andrews <mattandrews@gmail.com> wrote:
> -fuse-ld=3Dlld
<= div>
I actually used

=C2=A0=C2=A0=C2= =A0 -fuse-ld=3Dld.lld

That did the trick, but has = unlocked another error

=C2=A0=C2=A0=C2=A0 ld.lld: = error: unable to find library -lgcc
=C2=A0=C2=A0=C2=A0 ld.lld: er= ror: unable to find library -lgcc_eh

I thought mus= l compiles with it's own headers?

On Tue, Oct 12, 2021 at 3:54= PM Nagakamira <nagakamira@gmail.com> wrote:
-fuse-ld=3Dlld
On= Tue, Oct 12, 2021, 3:26 AM Jeffrey Walton <noloader@gmail.com> w= rote:
On Mon, Oc= t 11, 2021 at 7:55 PM Matt Andrews <mattandrews@gmail.com<= /a>> wrote:
>
> >> How do I specify which linker to use?
> >
> >LD. Also see
https://www.gnu.org/software/make/manual/html_node/Implic= it-Variables.html.
>
> Looking at the ./configure for musl (which is not based on autoconf ac= cording 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 w= here 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
--00000000000017636e05ce217eeb--