Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Jörg Krause" <joerg.krause@embedded.rocks>
To: buildroot@busybox.net
Subject: [Buildroot] [Patch v4 3/3] rust: new package
Date: Thu, 13 Apr 2017 08:05:04 +0200	[thread overview]
Message-ID: <1492063504.4490.1.camel@embedded.rocks> (raw)
In-Reply-To: <174ded3e-cc52-0456-3cd2-7750c531e442@mind.be>

Hi,

On Mon, 2017-04-10 at 23:43 +0200, Arnout Vandecappelle wrote:
> 
> On 10-04-17 21:02, J?rg Krause wrote:
> > Hi,
> > 
> > On Sat, 2017-04-08 at 12:09 +0200, Eric Le Bihan wrote:
> 
> [snip]
> > > Currently Buildroot only offers downloading binary versions of the C/C++
> > > cross-compilers. It does not take into account alternative C/C++
> > > cross-compilers like LLVM/Clang or compilers for new languages like
> > > Rust, D, or Haskell (though I do not know if Haskell is useful on
> > > embedded systems).
> 
>  There's a huge difference between alternative C/C++ compilers and compilers for
> other languages.
> 
>  Compilers for other languages we already have: python, mono, erlang. These are
> just normal packages, and any package in that language depends on the host-xxx
> package to provide the compiler. Similar to how packages that use the cmake
> buildsystem depend on the host-cmake package.
> 
>  Alternative C/C++ compilers are something else entirely, because they replace
> the special 'toolchain' target.
> 
>  Only when you can build an entire system with only the Rust compiler and
> without C/C++ compiler you can consider them equivalent. That day is still far away.

I see!

> > For now, we could use the host rustc package to fetch the latest stable
> > binary for the host architecture. Additionally, we could add the option
> > to build the Rust compiler within Buildroot. In my opinion, this option
> > only makes sense if the compiler can be configured meaningfully.
> 
>  I agree.

Cool.

@Eric: Do you mind to do that? By default fetch the latest stable
release, and alternatively offer an option to build a "Custom Rust
package". I think it would also be helpful to have at least one Rust
package to add as a proof of concept.

> 
> > > So, would it help to have a "Programming Languages" section in
> > > menuconfig where you can select Rust (or any other language) and choose
> > > between a using a pre-built compiler or build it from source?
> > 
> > In my opinion it would make more sense to have a menu "Toolchains" with
> > the submenus "C/C++ Toolchain", "Rust Toolchain", ...
> 
>  Given what I wrote above, I disagree. For the time being it's fine in the host
> packages menu. If that menu becomes too large, we could add something like an
> 'Alternative programming languages' menu.
> 

Sounds reasonable.

> 
> > > And where shoud LLVM/clang be exposed?
> > 
> > I would put it into "C/C++ Toolchain" (if we had such a menu).
> 
>  That's slightly more complicated. LLVM is just a library so it's just in the
> host menu. clang is a compiler that can be a replacement for gcc, so it'd have
> to go into the toolchain menu.
> 
>  Actually, Romain is working on LLVM/Clang. He's going to start adding it as a
> normal host package, so not as a replacement of gcc as the toolchain.

Nice!

J?rg

  reply	other threads:[~2017-04-13  6:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-02 19:46 [Buildroot] [Patch v4 0/3] Add support for the Rust programming language Eric Le Bihan
2017-04-02 19:46 ` [Buildroot] [Patch v4 1/3] rust-bootstrap: new package Eric Le Bihan
2017-04-07  7:03   ` Jörg Krause
2017-04-07  8:26     ` Thomas Petazzoni
2017-04-07  8:54       ` Jörg Krause
2017-04-07  9:03         ` Thomas Petazzoni
2017-04-07  9:22           ` Jörg Krause
2017-04-07 10:26             ` Thomas Petazzoni
2017-04-08  9:23     ` Eric Le Bihan
2017-04-02 19:46 ` [Buildroot] [Patch v4 2/3] cargo-bootstrap: " Eric Le Bihan
2017-04-07  7:06   ` Jörg Krause
2017-04-08  9:34     ` Eric Le Bihan
2017-04-08 13:20       ` Thomas Petazzoni
2017-04-02 19:46 ` [Buildroot] [Patch v4 3/3] rust: " Eric Le Bihan
2017-04-07  7:18   ` Jörg Krause
2017-04-08 10:09     ` Eric Le Bihan
2017-04-10 19:02       ` Jörg Krause
2017-04-10 21:43         ` Arnout Vandecappelle
2017-04-13  6:05           ` Jörg Krause [this message]
2017-04-13 16:49             ` Eric Le Bihan
2017-04-13 21:09               ` Arnout Vandecappelle

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=1492063504.4490.1.camel@embedded.rocks \
    --to=joerg.krause@embedded.rocks \
    --cc=buildroot@busybox.net \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox