All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-clang] target triple issue
@ 2017-02-20 17:38 Jack Mitchell
  2017-02-21 12:36 ` Jack Mitchell
  0 siblings, 1 reply; 3+ messages in thread
From: Jack Mitchell @ 2017-02-20 17:38 UTC (permalink / raw)
  To: openembedded-devel

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [meta-clang] target triple issue
  2017-02-20 17:38 [meta-clang] target triple issue Jack Mitchell
@ 2017-02-21 12:36 ` Jack Mitchell
  2017-02-21 17:15   ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Jack Mitchell @ 2017-02-21 12:36 UTC (permalink / raw)
  To: openembedded-devel

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?

clang -target arm64 test.c


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [meta-clang] target triple issue
  2017-02-21 12:36 ` Jack Mitchell
@ 2017-02-21 17:15   ` Khem Raj
  0 siblings, 0 replies; 3+ messages in thread
From: Khem Raj @ 2017-02-21 17:15 UTC (permalink / raw)
  To: Jack Mitchell, openembedded-devel

On Tue, Feb 21, 2017 at 4:34 AM Jack Mitchell <ml@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@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-21 17:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-20 17:38 [meta-clang] target triple issue Jack Mitchell
2017-02-21 12:36 ` Jack Mitchell
2017-02-21 17:15   ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.