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 6133 invoked from network); 10 Nov 2021 19:46:56 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 10 Nov 2021 19:46:56 -0000 Received: (qmail 11791 invoked by uid 550); 10 Nov 2021 19:46:54 -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 11752 invoked from network); 10 Nov 2021 19:46:53 -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 :cc; bh=onyxbjUaH7CGME0t6ZgrulAd4XDKMkSZV3KAEEMsHDU=; b=VXnfQOhickeFVcQgs6vUNQe72VkfQZacyIl3NJNHChqIr2FAgP+LGkCNcsRnn4GqDR Kg2tj9ja3HoRgEyR+U64jF7qBA2w4groKNk4eAeFYqVIytbs184Po9V/0sszgORjRwRl f+KF1EO8kL2Q1o0YeF3/4B9TgXqbawnR8VmFCGX27y9upzAE78z5AawVuscxY5rHKhEw PtD1jgUtTwXnG+qjfUmsilRRdkXTlP+py0zNpBWk6swVjCOfJKhs4fAv3QtItet4Qtqu Fc+rwTf2LmFeLJnpobVbbOWqquTiq4QyxVwGziY0zb6p16Yb+jOBluhwqCNvqrf6ad8F osIA== 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:cc; bh=onyxbjUaH7CGME0t6ZgrulAd4XDKMkSZV3KAEEMsHDU=; b=pFqJpHrIGm4FKcK73IOFYD0YIXXmGzHoWvoKbWr2wk5eaIbEvrEbkNiIAHg+UJGWmm OPDdsfwRBtwx+ZNclgNmhzCshsBpqcokUIxk6H+Ifs/EWrXzC5QpFFOlU7gE6/RcKAA/ +D3whO7xkF8MjXDXyvQ3uLthdJcgK+iDn7wF5azKjDaVFLdOXJt9I0IP14S6wA/+/WxF +3qKYb09260+vEO/2qk5tA2EskRlz97xwWjTB21ShUt2++gw98PxHDP/ua80iOYj9K4I +Ike9Xmio578xDle3oWp0vdIr1gjFdsS5eK4gImQsSQYfuGHP2CrQnGCPRUVTMA3NnE7 vWRw== X-Gm-Message-State: AOAM532MGE7erSSXFTMxS0DtKr/f5B5l4OPJOd2VePdoKFPKpyfiErTl 3SAK4GYj4pkU6orno1xHYMwMofXHp1jxX2pA9eO426Zv X-Google-Smtp-Source: ABdhPJx5xs/j2g1hqkcvw/rTqlzDyvDJRAW4js+RFV7YdOb5mqghFhihzfWGTcB8Sv4cs/WB7y4plvoFsuCqBo/QGuU= X-Received: by 2002:a17:907:868e:: with SMTP id qa14mr2123185ejc.564.1636573602049; Wed, 10 Nov 2021 11:46:42 -0800 (PST) MIME-Version: 1.0 References: <20211110161152.GJ7074@brightrain.aerifal.cx> In-Reply-To: <20211110161152.GJ7074@brightrain.aerifal.cx> From: Matt Andrews Date: Thu, 11 Nov 2021 06:46:30 +1100 Message-ID: To: Rich Felker Cc: musl@lists.openwall.com Content-Type: multipart/alternative; boundary="00000000000032f2fe05d0747c7d" Subject: Re: [musl] Cross compiling with LLVM/clang --00000000000032f2fe05d0747c7d Content-Type: text/plain; charset="UTF-8" On Thu, Nov 11, 2021 at 3:11 AM Rich Felker wrote: > As far as I can tell you're not invoking configure to cross compile. > You told it the target (note: this should really be called host but it > doesn't matter) is arm but you're invoking the compiler as "clang" so > it will just be whatever clang's default target is (probably x86_64). > > If you want to cross compile, you need something like > CC="/usr/lib/llvm-13/bin/clang --target=armv7-a" and you also need to > have a suitable compiler-rt for arm available. > > We should probably do something to detect this kind of breakage > earlier than at long double type mismatch. > > Rich > Thanks Rich, this worked. I actually put "--target=armv7a-linux-eabihf" into CFLAGS. I had done that at some earlier stage, but it caused another problem so I removed it. Now for the job of cross compiling compiler-rt... --00000000000032f2fe05d0747c7d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Nov 11, 2021 at 3:11 AM Rich = Felker <dalias@libc.org> wrote= :
As far as I can tell you're not invoking configure to cross compile. You told it the target (note: this should really be called host but it
doesn't matter) is arm but you're invoking the compiler as "cl= ang" so
it will just be whatever clang's default target is (probably x86_64).
If you want to cross compile, you need something like
CC=3D"/usr/lib/llvm-13/bin/clang --target=3Darmv7-a" and you also= need to
have a suitable compiler-rt for arm available.

We should probably do something to detect this kind of breakage
earlier than at long double type mismatch.

Rich

Thanks Rich, this worked. I actual= ly put "--target=3Darmv7a-linux-eabihf" into CFLAGS. I had done t= hat at some earlier stage, but it caused another problem so I removed it.

Now for the job of cross compiling compiler-rt.= ..
--00000000000032f2fe05d0747c7d--