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 13594 invoked from network); 12 Oct 2021 05:00:51 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 12 Oct 2021 05:00:51 -0000 Received: (qmail 5247 invoked by uid 550); 12 Oct 2021 05:00:49 -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 5206 invoked from network); 12 Oct 2021 05:00:48 -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=zUUyBRhc4mGM71F4ThoLRehKB/VQE8t9Vxjc0q9ZxiQ=; b=R8g4/gYEL3HssMFk+jF4PJuC6E8LABbywVS7XeNfufR6cnRBCsdl0Lph1wCsJA6RB6 RxtqpBITxH9Pah0WMZK7D0viqz4V1lIUN7ym9Lqd6jL30UzfW/eV6KWp+h3ifoVIFCbG 5/DjjkC/CLqM4UL+kC4Wma9OjXo+oSmzXa5/WiJvR/JrmWVvi60PAJY/sYzDtS2PkDUu rmusONcW1pJRDf1J3RFlaEbwuHYwxjJr7ZgKtNjn2oO34h9qhNq3zU1SuLXW4d2eEWkF 76vtVKTvRT41Mxc8JZP5IJZoVInfE4Bcy6YqyKCA7jXVigvhPvzzpMd7wC7Djkxq63iz jLXg== 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=zUUyBRhc4mGM71F4ThoLRehKB/VQE8t9Vxjc0q9ZxiQ=; b=ee97VDrXJa0tor9ji1QNZ0FCeDh6qa+7W8CXnWqsc8cRh+0CNKbeTn7E0xBVJCQ/Nj C+59djsABe9EE4buVtwUS+toyTp87OAbCh8qAND3K1kw7G4c3DS+EAb6EtTCtz1Rj86k h+JnRQn0IZgSDWKU+04mo5CSzcwI5027GxZIZ2F4joLT16pdo4tWbK1eBlWExnshYAK8 lRScQKVfolEmk0ghpXzDDPaWy7lti32mUZd88ypsJJATroqCriHdUfozNJ2HLbJaIfRJ w1sfdJkLhu6aRTSyVgo0kCGzSxc1gQ2zwO9PByP+nwgBMaUSdF6XXcihTRq+ZhoPPwlN XLkg== X-Gm-Message-State: AOAM533XbOhtl2HhAJTU3lYcVTo3cF6jARxEWebqwKA3xut72Zqab0n0 zlijxUBiwQzGYNNSGOBKZZyLUUdSJHUn5P+nfDx0f9n1 X-Google-Smtp-Source: ABdhPJxbAwwlR6Uav/bdsCW8lVcLg1nH48CnjIXWuM+D/nLX4MDZutU2ztGRkHHRFGOz66IarCG/IbecZQesPkdkXQY= X-Received: by 2002:a5d:9051:: with SMTP id v17mr22425228ioq.134.1634014836455; Mon, 11 Oct 2021 22:00:36 -0700 (PDT) MIME-Version: 1.0 References: <20211011004346.13768de6@tpx.quinq.eu.org> In-Reply-To: From: Nagakamira Date: Tue, 12 Oct 2021 08:00:23 +0300 Message-ID: To: musl@lists.openwall.com Content-Type: multipart/alternative; boundary="000000000000e27d0f05ce20b978" Subject: Re: [musl] Newbie cross compiling with LLVM --000000000000e27d0f05ce20b978 Content-Type: text/plain; charset="UTF-8" --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 >>> >> --000000000000e27d0f05ce20b978 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
--rtlib=3Dcompiler-rt


-fuse-ld=3Dlld

On Tue, Oct 12, 2021, 3:26 AM Jeffrey Walton <= ;noloader@gmail.com> wrote:
On Mon, Oct 11, 2021 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/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
--000000000000e27d0f05ce20b978--