Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [Patch v4 1/3] rust-bootstrap: new package
Date: Sat, 8 Apr 2017 11:23:13 +0200	[thread overview]
Message-ID: <20170408092313.GA32154@itchy> (raw)
In-Reply-To: <1491548614.26127.3.camel@embedded.rocks>

Hi!

On 17-04-07 09:03:34, J?rg Krause wrote:
> On Sun, 2017-04-02 at 21:46 +0200, Eric Le Bihan wrote:
> > This new package fetches a binary snapshot of the Rust compiler,
> > suitable for the host, in order to bootstrap the Rust compiler.
> >
> > Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> > ---
> > ?DEVELOPERS?????????????????????????????????|??1 +
> > ?package/rust-bootstrap/rust-bootstrap.hash |??5 ++++
> > ?package/rust-bootstrap/rust-bootstrap.mk???| 37
> > ++++++++++++++++++++++++++++++
> > ?3 files changed, 43 insertions(+)
> > ?create mode 100644 package/rust-bootstrap/rust-bootstrap.hash
> > ?create mode 100644 package/rust-bootstrap/rust-bootstrap.mk
> >
> > diff --git a/DEVELOPERS b/DEVELOPERS
> > index c89468b..863d5aa 100644
> > --- a/DEVELOPERS
> > +++ b/DEVELOPERS
> > @@ -448,6 +448,7 @@ F:	package/execline/
> > ?F:	package/hicolor-icon-theme/
> > ?F:	package/jemalloc/
> > ?F:	package/ninja/
> > +F:	package/rust-bootstrap
> > ?F:	package/s6/
> > ?F:	package/s6-dns/
> > ?F:	package/s6-linux-init/
> > diff --git a/package/rust-bootstrap/rust-bootstrap.hash
> > b/package/rust-bootstrap/rust-bootstrap.hash
> > new file mode 100644
> > index 0000000..b418ea0
> > --- /dev/null
> > +++ b/package/rust-bootstrap/rust-bootstrap.hash
> > @@ -0,0 +1,5 @@
> > +# Locally calculated
> > +sha256
> > a833304f99071600c72ecd868c1c7bd5ce49d1102332637a8eb7adb942f349ab??rus
> > tc-1.15.1-i686-unknown-linux-gnu.tar.gz
> > +sha256
> > 33ff44672b731fc71145974ce84194a1a9bafe6da3a74fd1e7543f12467f8894??rus
> > tc-1.15.1-x86_64-unknown-linux-gnu.tar.gz
> > +sha256
> > eff452a54b208a83b35432f226cb7de046d27b5e43edfc31d71ff340af686db0??rus
> > t-std-1.15.1-i686-unknown-linux-gnu.tar.gz
> > +sha256
> > 69b251b478e284dfcaefc1153183f26f41d504ae213a81224f2101d8dbd52bb0??rus
> > t-std-1.15.1-x86_64-unknown-linux-gnu.tar.gz
> > diff --git a/package/rust-bootstrap/rust-bootstrap.mk b/package/rust-
> > bootstrap/rust-bootstrap.mk
> > new file mode 100644
> > index 0000000..1098423
> > --- /dev/null
> > +++ b/package/rust-bootstrap/rust-bootstrap.mk
> > @@ -0,0 +1,37 @@
> > +####################################################################
> > ############
> > +#
> > +# rust-bootstrap
> > +#
> > +####################################################################
> > ############
> > +
> > +RUST_BOOTSTRAP_VERSION = 1.15.1
> > +RUST_BOOTSTRAP_DATE = 2017-02-09
> > +RUST_BOOTSTRAP_TRIPLE = $(RUST_BOOTSTRAP_ARCH)-unknown-linux-gnu
> > +RUST_BOOTSTRAP_LABEL = $(RUST_BOOTSTRAP_VERSION)-
> > $(RUST_BOOTSTRAP_TRIPLE)
> > +
> > +ifeq ($(HOSTARCH),x86_64)
> > +RUST_BOOTSTRAP_ARCH = x86_64
> > +else ifeq ($(HOSTARCH),x86)
> > +RUST_BOOTSTRAP_ARCH = i686
> > +endif
>
> Is there any necessity to limit the bootstrap compiler to those host
> archs only?

I've limited the bootstrap compiler to i686 and x86_64 as these
architectures are listed as tier 1 of the Rust platform support [1].

PowerPC is in tier 2. If some Buildroot users are using pre-2005 Macs,
I can add it.

[1] https://forge.rust-lang.org/platform-support.html
>
> > +RUST_BOOTSTRAP_SITE = https://static.rust-
> > lang.org/dist/$(RUST_BOOTSTRAP_DATE)
>
> Why use a date and not https://static.rust-lang.org/dist solely. Since
> I can fetch https://static.rust-lang.org/dist/rust-1.15.1-x86_64-unknow
> n-linux-gnu.tar.gz.

Good catch! This part is a leftover from the early versions of this
patch series when Rust compiler version N could not be bootstrapped from
version N-1 but an obscure nightly one. I'll change this.

>
> > +RUST_BOOTSTRAP_SOURCE = rustc-$(RUST_BOOTSTRAP_LABEL).tar.gz
> > +RUST_BOOTSTRAP_LICENSE = Apache-2.0 or MIT
> > +RUST_BOOTSTRAP_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT
> > +RUST_BOOTSTRAP_LIBSTD_SOURCE= rust-std-
> > $(RUST_BOOTSTRAP_LABEL).tar.gz
> > +RUST_BOOTSTRAP_LIBSTD_ROOT = rust-std-$(RUST_BOOTSTRAP_LABEL)/rust-
> > std-$(RUST_BOOTSTRAP_TRIPLE)
>
> Why not make a seperate package?

I though about making it a separate package to clarify the Makefile, but
the library on its own is useless, so why expose it? This is just an
internal build dependency, like perl-cross in package/perl/perl.mk.

> > +RUST_BOOTSTRAP_EXTRA_DOWNLOADS =
> > $(RUST_BOOTSTRAP_SITE)/$(RUST_BOOTSTRAP_LIBSTD_SOURCE)
> > +
> > +define RUST_BOOTSTRAP_LIBSTD_EXTRACT
> > +	$(call suitable-extractor,$(RUST_BOOTSTRAP_LIBSTD_SOURCE)) \
> > +		$(DL_DIR)/$(RUST_BOOTSTRAP_LIBSTD_SOURCE) | \
> > +		$(TAR) --strip-components=2 -C $(@D)/rustc
> > $(TAR_OPTIONS) - \
> > +			$(RUST_BOOTSTRAP_LIBSTD_ROOT)/lib
> > +endef
> > +
> > +HOST_RUST_BOOTSTRAP_EXTRA_DOWNLOADS =
> > $(RUST_BOOTSTRAP_EXTRA_DOWNLOADS)
> > +HOST_RUST_BOOTSTRAP_POST_EXTRACT_HOOKS +=
> > RUST_BOOTSTRAP_LIBSTD_EXTRACT
> > +
> > +$(eval $(host-generic-package))
>
> J?rg

--
ELB

  parent reply	other threads:[~2017-04-08  9:23 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 [this message]
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
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=20170408092313.GA32154@itchy \
    --to=eric.le.bihan.dev@free.fr \
    --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