Date: Wed, 10 Nov 2021 17:43:16 -0500 From: Rich Felker <dalias@...c.org> To: Matt Andrews <mattandrews@...il.com> Cc: musl@...ts.openwall.com Subject: Re: Cross compiling with LLVM/clang 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@...c.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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.