[oe] [meta-clang] target triple issue

Khem Raj raj.khem at gmail.com
Tue Feb 21 17:15:23 UTC 2017


On Tue, Feb 21, 2017 at 4:34 AM Jack Mitchell <ml at embed.me.uk> wrote:

> On 20/02/17 17:38, Jack Mitchell wrote:
> > I'm trying to install clang to my aarch64 target and receiving this
> > error when attempting to compile
> >
> > test.c:1:1: warning: type specifier missing, defaults to 'int'
> > [-Wimplicit-int]
> > main() {
> > ^
> > error: unable to create target: 'No available targets are compatible
> > with this triple.'
> > 1 warning and 1 error generated.
> >
> > The version of clang built is as follows:
> >
> > clang version 4.0.0 (git://github.com/llvm-mirror/clang.git
> > ee02028a97bfbce4d63787dd05366fafdda445c5)
> > (git://github.com/llvm-mirror/llvm.git
> > 6af4d1ac2acfc8c22db959f2b7b11d68688b2425)
> > Target: x86_64-unknown-linux-gnu
> > Thread model: posix
> > InstalledDir: /usr/bin
> >
> > Is it wrong that the target is x86_64-unknown-linux-gnu? Should it not
> > be something aarch64 related? The configure log seems to have passed the
> > right values
> >
> > 201 -- Native target architecture is AArch64
> >
> > ...
> >
> > 495 -- Constructing LLVMBuild project information
> > 496 -- Targeting AArch64
> >
> > Any ideas, would any of the logs be useful?
> >
> > Regards,
> > Jack.
>
> Turns out I just needed to specify a target, seems odd though as
> shouldn't the default target be the one it was built for?


Yes that is better I think the problem is the fact we do a cross build
default target needs to be taught explicitly otherwise it defaults to build
host

I will try to look into it sometimes later this week or next

>
>
> clang -target arm64 test.c
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>



More information about the Openembedded-devel mailing list