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 12807 invoked from network); 12 Oct 2021 04:54:27 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 12 Oct 2021 04:54:27 -0000 Received: (qmail 32432 invoked by uid 550); 12 Oct 2021 04:54:25 -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 32401 invoked from network); 12 Oct 2021 04:54:24 -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=4cdLiDPHb0wx1kyPojxe+reZtImIUpD1idTO3as6NO8=; b=M+TjxuVCg1hJKyH8eCoufSGISdxYbWeVswaK8zNEPvK+wZ603LIrBVo9jdUMIUONfI bgI9UwHNvlhiGD7MG0aP8S6tpZd5bppkFvRyafeO9dGDathdATEkfp4jINsXV47ueQAt /igu9LiemdBo7WND1rdGG7pKXqaWUkS7jSiBd8SbjK/tUt5Giqou+Nuu7cHR6gM/ieXJ cp/LyINUOph0AAlsmSwWFGV0haJSDStPsVg+1RMK0CMTKbRWKVSfWVf4sjDanG4iK266 RcH8UvINJviucKr1InWAFvvevbsLYE55KRWy2GvHN5AWJ8MRN96ZO6Rh3T6xP8LfB+DT DyEQ== 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=4cdLiDPHb0wx1kyPojxe+reZtImIUpD1idTO3as6NO8=; b=7kRoyVJbLPgvEC1Ck+YH7P13MAPLWc4IutMmcf3D/MAN5aksYoTp0ISeY+D/j3Nygh 1LrjOobi2rTBLCq6b8mFH1gpFxNa+HAMY6fV8w0r4EdlMMe5lOFtB6IZJfeaiSxst1aI Huz9Q8lHt+67AFlQr/18OMJoJfL4gCYtUkc2kN8zF6VSK8V4xn01rjwptId9h52XFjvN sJGcjMWHzYqVRHBinqSmHYDDov8GWt8iYGwFo59lj4iI8N+JZbcnuZCjUcq55sd1yO8h WY50XObwuB1fnUR7SbBxdJ9YUZ2VbB/ER7l1MYLmkgJQFpsJd1FmpGpKmx2MAVAF0L4E 1mUA== X-Gm-Message-State: AOAM530lYMkgzFWUHr5/f4pxNrTPmSWMrOve9SNpvKDZktHL8mvIKO+l k9uQLkxwxG64vcju3mI1PwY9VV8vzfZMCgT2TAQk4o1u X-Google-Smtp-Source: ABdhPJxDN0EldE8luGYYhPwfR6MTzSsI+adYyIM/7edzU498YicVDjRbbTlzvaQCqfBPtq9U1av+sKbWVE7bcgpWujk= X-Received: by 2002:a05:6e02:1a43:: with SMTP id u3mr14120762ilv.35.1634014451506; Mon, 11 Oct 2021 21:54:11 -0700 (PDT) MIME-Version: 1.0 References: <20211011004346.13768de6@tpx.quinq.eu.org> In-Reply-To: From: Nagakamira Date: Tue, 12 Oct 2021 07:53:58 +0300 Message-ID: To: musl@lists.openwall.com Content-Type: multipart/alternative; boundary="000000000000f0a29505ce20a261" Subject: Re: [musl] Newbie cross compiling with LLVM --000000000000f0a29505ce20a261 Content-Type: text/plain; charset="UTF-8" -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 > --000000000000f0a29505ce20a261 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
-fuse-ld=3Dlld

On Tue, Oct 12, 2021, 3:26 AM Jeffrey Walto= n <noloader@gmail.com> wrot= e:
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/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
--000000000000f0a29505ce20a261--