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 13204 invoked from network); 12 Oct 2021 04:58:10 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 12 Oct 2021 04:58:10 -0000 Received: (qmail 1988 invoked by uid 550); 12 Oct 2021 04:58:08 -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 1957 invoked from network); 12 Oct 2021 04:58:07 -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=4Ayjn2id2KY5wv3qxhJlk96v38b9FT6klyC+7mLRD/k=; b=obdIP2L+ajlroytSYn+yQHvMUVcU8Bzxh/dP2MIaekbcdv+LFwg/vu4/OOzS2Mm+qP GqoA7MhRP95vNjxPyzj/prv72fxoiRil0caHURCoqmypiQpyBFC8jbsIV5OcyV8pOSTN mVCLqpnpSfJfhGNoUHCL0GfmRrMjESqk11Mzg+ccZGJb9QLBSydouwrffZEmqrjddUcM vE6EeznM8zl2sHUNOUY0SALICGgw04hl5C0vi/xicVPXaoXUG5lvPpmctXstev/wqLOE TfrvzATzUvVce8T5Kny23lbBBXwO8oOS3UBACzpqj2eTX000dXMFt//vlBDXhH32iqqs Zsmw== 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=4Ayjn2id2KY5wv3qxhJlk96v38b9FT6klyC+7mLRD/k=; b=zyDKPy3W8IDm4D5+3LGx2if2HHrZ4cuF8ksDjCp4eTlMFkw6uSOeMoyXBu6K7Nvrcm uM3L2IY/uYZlh10xJIcpkHFEvXC9GdwnPqLt14zl/BZgwiouN4fJnanBEGnFVCd+gIkF tw2hHNoB4PIja6VvNU0/eoHYty37aTc13E9SDtSXavvXOhOK4xat2iJQHp0C7KRQ/o7m +XCKZ1afzOlL5O0iFGFHPTAGzmzcv+L+NuTB3tHlorEd/mgXZHYVEnTjYAmHs4IZKP03 toyV5UASNNYhvHWW/n7uqDzZp7jhZDKhAKpY2SkNCUHFkvlsWzmG9qH/6C5oX1dw9BGY sXJw== X-Gm-Message-State: AOAM533qw8n7exkWjHIBgh1axa61F5r6CeF1AW0PrtnayZW2wqXHg1Xh 1XW+wQRjqP71W6AMy/W5nk3JqfGarqHyN2s9cztLLT9XLCI= X-Google-Smtp-Source: ABdhPJyAug2OSM5NnHfXMMpjWFbzHzHY0AUOO8/2PIzwkW0T1FtHqauWukjwwF9Amoze4SM30sYSYh+Qyl0+D6Hudeg= X-Received: by 2002:a05:6402:270f:: with SMTP id y15mr42060714edd.126.1634014676256; Mon, 11 Oct 2021 21:57:56 -0700 (PDT) MIME-Version: 1.0 References: <20211011004346.13768de6@tpx.quinq.eu.org> In-Reply-To: From: Matt Andrews Date: Tue, 12 Oct 2021 15:57:45 +1100 Message-ID: To: musl@lists.openwall.com Content-Type: multipart/alternative; boundary="000000000000560e1d05ce20b09f" Subject: Re: [musl] Newbie cross compiling with LLVM --000000000000560e1d05ce20b09f Content-Type: text/plain; charset="UTF-8" > -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 >> > --000000000000560e1d05ce20b09f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> -fuse-ld=3Dlld

I actual= ly 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 libra= ry -lgcc
=C2=A0=C2=A0=C2=A0 ld.lld: error: unable to find library= -lgcc_eh

I thought musl compiles with it's ow= n headers?

On Tue, Oct 12, 2021 at 3:54 PM Nagakamira <nagakamira@gmail.com> wrote:
-fus= e-ld=3Dlld

On Tue, Oct 12, 2021, 3:26 AM Jeffrey Walton <noloader@gmail.com> wrote:
On Mon, Oct 11, 2= 021 at 7:55 PM Matt Andrews <mattandrews@gmail.com> wrote:
>
> >> How do I specify which linker to use?
> >
> >LD. Also see https://www.gnu.org/software/make/manual/html_node/Implicit-Variable= s.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
--000000000000560e1d05ce20b09f--