All of lore.kernel.org
 help / color / mirror / Atom feed
* Questions regarding adding a new llvm based cross-compiler
@ 2014-10-16 17:46 Cody P Schafer
  2014-10-17  8:07 ` Paul Barker
  0 siblings, 1 reply; 6+ messages in thread
From: Cody P Schafer @ 2014-10-16 17:46 UTC (permalink / raw)
  To: yocto

Hi all,

I'm working on creating a layer for the rust compiler (which uses
llvm) and was wondering if there were any best practices and/or
examples people could point me at.

The compiler is designed to be built for multiple targets at once
(unlike the gcc model of having a single compiler build for each
target).

Q: Does this mean that I don't need to create a '-cross' package? (And
just use '-native'?)
Q: What about a -runtime package? Will one be needed? (The compiler
can build runtime libs for multiple targets, so a '-native' could
include the target runtime libs).

Thanks
--
Cody


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

* Re: Questions regarding adding a new llvm based cross-compiler
  2014-10-16 17:46 Questions regarding adding a new llvm based cross-compiler Cody P Schafer
@ 2014-10-17  8:07 ` Paul Barker
  2014-10-17 17:48   ` Martin Jansa
  2014-10-19  8:10   ` Khem Raj
  0 siblings, 2 replies; 6+ messages in thread
From: Paul Barker @ 2014-10-17  8:07 UTC (permalink / raw)
  To: Cody P Schafer; +Cc: Yocto discussion list

On 16 October 2014 18:46, Cody P Schafer <dev@codyps.com> wrote:
> Hi all,
>
> I'm working on creating a layer for the rust compiler (which uses
> llvm) and was wondering if there were any best practices and/or
> examples people could point me at.

I can't really offer much help on the LLVM side, but I can say this
will be really useful work. I'm slowly learning Rust and researching
how it can be used for embedded development and it will be excellent
to have a rust compiler working as part of OpenEmbedded/Yocto.

If you need any testing of this layer once it's created, just let me know.

Cheers,

-- 
Paul Barker

Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk


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

* Re: Questions regarding adding a new llvm based cross-compiler
  2014-10-17  8:07 ` Paul Barker
@ 2014-10-17 17:48   ` Martin Jansa
  2014-10-20 19:45     ` Cody P Schafer
  2014-10-19  8:10   ` Khem Raj
  1 sibling, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2014-10-17 17:48 UTC (permalink / raw)
  To: Paul Barker; +Cc: Yocto discussion list

[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]

On Fri, Oct 17, 2014 at 09:07:19AM +0100, Paul Barker wrote:
> On 16 October 2014 18:46, Cody P Schafer <dev@codyps.com> wrote:
> > Hi all,
> >
> > I'm working on creating a layer for the rust compiler (which uses
> > llvm) and was wondering if there were any best practices and/or
> > examples people could point me at.

Are you using llvm recipes from meta-oe (or at least starting from
them)?

> I can't really offer much help on the LLVM side, but I can say this
> will be really useful work. I'm slowly learning Rust and researching
> how it can be used for embedded development and it will be excellent
> to have a rust compiler working as part of OpenEmbedded/Yocto.
> 
> If you need any testing of this layer once it's created, just let me know.

I'm also interested.

I haven't tried it yet, but I've asked Servo developer, how they do
cross-builds and he said that it's really simple with Rust and Cargo,
which support cross-compilation by design.

Now reading:
http://doc.crates.io/faq.html#does-cargo-handle-multi-platform-projects-or-cross-compilation?
it doesn't looks so convincing, but I would be happy to test.

Regards,
-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: Questions regarding adding a new llvm based cross-compiler
  2014-10-17  8:07 ` Paul Barker
  2014-10-17 17:48   ` Martin Jansa
@ 2014-10-19  8:10   ` Khem Raj
  2014-10-20 19:47     ` Cody P Schafer
  1 sibling, 1 reply; 6+ messages in thread
From: Khem Raj @ 2014-10-19  8:10 UTC (permalink / raw)
  To: Paul Barker; +Cc: Yocto discussion list

[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]

On Friday, October 17, 2014, Paul Barker <paul@paulbarker.me.uk> wrote:

> On 16 October 2014 18:46, Cody P Schafer <dev@codyps.com <javascript:;>>
> wrote:
> > Hi all,
> >
> > I'm working on creating a layer for the rust compiler (which uses
> > llvm) and was wondering if there were any best practices and/or
> > examples people could point me at.
>
> I can't really offer much help on the LLVM side, but I can say this
> will be really useful work. I'm slowly learning Rust and researching
> how it can be used for embedded development and it will be excellent
> to have a rust compiler working as part of OpenEmbedded/Yocto.
>
> If you need any testing of this layer once it's created, just let me know.


I have started to integrate clang into oe
Which probably is quitquite similar to this effortwise. Its very
prelimpreliminary. Check my github repo. I should add it to layer index

>
> Cheers,
>
> --
> Paul Barker
>
> Email: paul@paulbarker.me.uk <javascript:;>
> http://www.paulbarker.me.uk
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org <javascript:;>
> https://lists.yoctoproject.org/listinfo/yocto
>

[-- Attachment #2: Type: text/html, Size: 1975 bytes --]

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

* Re: Questions regarding adding a new llvm based cross-compiler
  2014-10-17 17:48   ` Martin Jansa
@ 2014-10-20 19:45     ` Cody P Schafer
  0 siblings, 0 replies; 6+ messages in thread
From: Cody P Schafer @ 2014-10-20 19:45 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Yocto discussion list

On Fri, Oct 17, 2014 at 1:48 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> On Fri, Oct 17, 2014 at 09:07:19AM +0100, Paul Barker wrote:
>> On 16 October 2014 18:46, Cody P Schafer <dev@codyps.com> wrote:
>> > Hi all,
>> >
>> > I'm working on creating a layer for the rust compiler (which uses
>> > llvm) and was wondering if there were any best practices and/or
>> > examples people could point me at.
>
> Are you using llvm recipes from meta-oe (or at least starting from
> them)?

I wasn't. Rust packages a particular llvm version already (and ties it
into it's build scripts). I'm planning on just using that one.

> I haven't tried it yet, but I've asked Servo developer, how they do
> cross-builds and he said that it's really simple with Rust and Cargo,
> which support cross-compilation by design.

Well:

From what I've found, crossbuilds work fine if you're using one of a
small set of blessed triples (ie: not arm-poky-linux-gnueabi, but
arm-unknown-linux-gnueabihf), and you don't set any special
CFLAGS/LDFLAGS variables (which oe does).
And the infrastructure is not in place to allow packagers to easily
add/use different triples and "linkers" (rustc calls gcc/cc to link
it's programs, and as a result needs to know where it is).


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

* Re: Questions regarding adding a new llvm based cross-compiler
  2014-10-19  8:10   ` Khem Raj
@ 2014-10-20 19:47     ` Cody P Schafer
  0 siblings, 0 replies; 6+ messages in thread
From: Cody P Schafer @ 2014-10-20 19:47 UTC (permalink / raw)
  To: Khem Raj; +Cc: Yocto discussion list

On Sun, Oct 19, 2014 at 4:10 AM, Khem Raj <raj.khem@gmail.com> wrote:
>
[...]
> I have started to integrate clang into oe
> Which probably is quitquite similar to this effortwise. Its very
> prelimpreliminary. Check my github repo. I should add it to layer index

(repo link for the interested: https://github.com/kraj/meta-clang)

Khem: the complication for me is rustc doesn't magically build for all
targets it supports (at the moment) when using gcc as the
compiler/linker (rustc calls an external binary, typically gcc or cc
to link it's code). As a result, I can't just build for -native. I'm
currently fighting with cross.bbclass to convince it to do what I
want.


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

end of thread, other threads:[~2014-10-20 19:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-16 17:46 Questions regarding adding a new llvm based cross-compiler Cody P Schafer
2014-10-17  8:07 ` Paul Barker
2014-10-17 17:48   ` Martin Jansa
2014-10-20 19:45     ` Cody P Schafer
2014-10-19  8:10   ` Khem Raj
2014-10-20 19:47     ` Cody P Schafer

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.