From: Rich Felker <dalias@libc.org>
To: Matt Andrews <mattandrews@gmail.com>
Cc: musl@lists.openwall.com
Subject: Re: [musl] Cross compiling with LLVM/clang
Date: Wed, 10 Nov 2021 17:43:16 -0500 [thread overview]
Message-ID: <20211110224316.GL7074@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAD0C5PAGEjWBuRGEoWwS_mLVntHM58SAzfdakD9TwgfDbd463A@mail.gmail.com>
On Thu, Nov 11, 2021 at 06:46:30AM +1100, Matt Andrews wrote:
> 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 "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.
It should be in CC, not CFLAGS, as it's actually the *identity of the
compiler* you're setting, not mere options. It probably works in
practice in either, but to be safe, use CC.
Rich
prev parent reply other threads:[~2021-11-10 22:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-10 6:28 Matt Andrews
2021-11-10 15:40 ` Markus Wichmann
2021-11-10 16:11 ` Rich Felker
2021-11-10 19:46 ` Matt Andrews
2021-11-10 22:43 ` Rich Felker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211110224316.GL7074@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=mattandrews@gmail.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).