Re: [ptxdist] [PATCH] rust: new package
Hi Michael, El vie, 6 ago 2021 a las 8:25, Michael Olbrich () escribió: > On Thu, Aug 05, 2021 at 07:36:36PM +0200, Guillermo Rodriguez Garcia wrote: > > El mié, 4 ago 2021 a las 9:41, Michael Olbrich (< > m.olbr...@pengutronix.de>) > > escribió: > > > > > On Fri, Jul 30, 2021 at 07:41:56PM +0200, avazquez@gmail.com > wrote: > > > > From: Alejandro Vazquez > > > > > > > > - host-rust: This package provides a pre-built version of rustc, > > > > cargo and standard library for the host. > > > > - host-rust-std-target: A pre-built version of the standard library > for > > > > the target. > > > > > > No. The compiler should be built not just downloaded. > > > > > > Please take a look at the latest OSELAS.Toolchain. It contains a rust > > > compiler and std libraries for the target. I've done very little > testing > > > with that so far and I would be interested in some feedback. > Especially if > > > something isn't working. > > > > > > Also, I'm pretty sure that there are some hidden downloads in there for > > > cargo and maybe the host std library. So if you keep those rules > locally, > > > you should add that to the downloads. This way, they will be cached > with > > > the rest of the source. Take a look at what I did for the toolchain. > > > > > > > Just for the record, looks like there are no hidden downloads. > > The package that is donwloaded includes rustc, cargo, and the selected > > host-std lib. > > Thanks for the feedback. That's good to know. So there seem to be different > binary packages available. When building rustc from sources then for > bootstrapping rustc, cargo and the std lib are downloaded separately. > I am trying to build the rust-enabled toolchain from sources and I am having some trouble with the cross-rustc package. It seems that there are hidden downloads when using the toolchain rules. Specifically when you are building rustc 1.54, all sources for 1.54 are downloaded explicitly (so this is OK), but then in the compile stage it tries to download 1.53 automatically (this actually failed in my test, which is how I noticed). See this: === --- target: cross-rustc.compile --- downloading https://static.rust-lang.org/dist/2021-06-17/rust-std-1.53.0-x86_64-unknown-linux-gnu.tar.xz.sha256 running: curl -# -y 30 -Y 10 --connect-timeout 30 --retry 3 -Sf -o /tmp/tmpherqj8wk.sha256 https://static.rust-lang.org/dist/2021-06-17/rust-std-1.53.0-x86_64-unknown-linux-gnu.tar.xz.sha256 curl: (5) Could not resolve proxy: - Warning: Transient problem: timeout Will retry in 1 seconds. 3 retries left. #=#=- # curl: (5) Could not resolve proxy: - Warning: Transient problem: timeout Will retry in 2 seconds. 2 retries left. ##O=# # curl: (5) Could not resolve proxy: - Warning: Transient problem: timeout Will retry in 4 seconds. 1 retries left. #=#=-# # curl: (5) Could not resolve proxy: - === I guess this is not what is wanted? Guillermo ___ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-requ...@pengutronix.de
Re: [ptxdist] [PATCH] rust: new package
On Thu, Aug 05, 2021 at 07:36:36PM +0200, Guillermo Rodriguez Garcia wrote: > El mié, 4 ago 2021 a las 9:41, Michael Olbrich () > escribió: > > > On Fri, Jul 30, 2021 at 07:41:56PM +0200, avazquez@gmail.com wrote: > > > From: Alejandro Vazquez > > > > > > - host-rust: This package provides a pre-built version of rustc, > > > cargo and standard library for the host. > > > - host-rust-std-target: A pre-built version of the standard library for > > > the target. > > > > No. The compiler should be built not just downloaded. > > > > Please take a look at the latest OSELAS.Toolchain. It contains a rust > > compiler and std libraries for the target. I've done very little testing > > with that so far and I would be interested in some feedback. Especially if > > something isn't working. > > > > Also, I'm pretty sure that there are some hidden downloads in there for > > cargo and maybe the host std library. So if you keep those rules locally, > > you should add that to the downloads. This way, they will be cached with > > the rest of the source. Take a look at what I did for the toolchain. > > > > Just for the record, looks like there are no hidden downloads. > The package that is donwloaded includes rustc, cargo, and the selected > host-std lib. Thanks for the feedback. That's good to know. So there seem to be different binary packages available. When building rustc from sources then for bootstrapping rustc, cargo and the std lib are downloaded separately. Michael -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | ___ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-requ...@pengutronix.de
Re: [ptxdist] [PATCH] rust: new package
Hi Michael, El mié, 4 ago 2021 a las 9:41, Michael Olbrich () escribió: > On Fri, Jul 30, 2021 at 07:41:56PM +0200, avazquez@gmail.com wrote: > > From: Alejandro Vazquez > > > > - host-rust: This package provides a pre-built version of rustc, > > cargo and standard library for the host. > > - host-rust-std-target: A pre-built version of the standard library for > > the target. > > No. The compiler should be built not just downloaded. > > Please take a look at the latest OSELAS.Toolchain. It contains a rust > compiler and std libraries for the target. I've done very little testing > with that so far and I would be interested in some feedback. Especially if > something isn't working. > > Also, I'm pretty sure that there are some hidden downloads in there for > cargo and maybe the host std library. So if you keep those rules locally, > you should add that to the downloads. This way, they will be cached with > the rest of the source. Take a look at what I did for the toolchain. > Just for the record, looks like there are no hidden downloads. The package that is donwloaded includes rustc, cargo, and the selected host-std lib. BR, Guillermo Guillermo Rodriguez Garcia guille.rodrig...@gmail.com ___ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-requ...@pengutronix.de
Re: [ptxdist] [PATCH] rust: new package
El mié, 4 ago 2021 a las 12:32, Guillermo Rodriguez Garcia () escribió: > > > > El mié, 4 ago 2021 a las 12:16, Michael Olbrich () > escribió: >> >> On Wed, Aug 04, 2021 at 11:52:49AM +0200, Guillermo Rodriguez Garcia wrote: >> > El mié, 4 ago 2021 a las 9:41, Michael Olbrich () >> > escribió: >> > >> > > On Fri, Jul 30, 2021 at 07:41:56PM +0200, avazquez@gmail.com wrote: >> > > > From: Alejandro Vazquez >> > > > >> > > > - host-rust: This package provides a pre-built version of rustc, >> > > > cargo and standard library for the host. >> > > > - host-rust-std-target: A pre-built version of the standard library for >> > > > the target. >> > > >> > > No. The compiler should be built not just downloaded. Thank you, Michael. I will take your feedback and apply them to a future v2 version. >> > > >> > > Please take a look at the latest OSELAS.Toolchain. It contains a rust >> > > compiler and std libraries for the target. I've done very little testing >> > > with that so far and I would be interested in some feedback. Especially >> > > if >> > > something isn't working. >> > > >> > >> > I think it would be useful to have rules that support building rust >> > packages without the need to update the toolchain. >> It can also be useful if someone wants to use a specific toolchain vendor. >> Why would you not want to update the toolchain? > > > For existing BSPs that are already used in production we might want to add a > new package or update an existing package but keep everything else the same. > If the toolchain is updated, every package will/may change. > >> >> >> > > Also, I'm pretty sure that there are some hidden downloads in there for >> > > cargo and maybe the host std library. So if you keep those rules locally, >> > > you should add that to the downloads. >> > >> > >> > Is it possible to specify more than one download in a single .make file? >> >> Yes, that's what I do in the rustc package[1] in the toolchain. Or take a >> look at rules/shaderc.make in PTXdist itself if you need to extract all >> archives. > > > Very interesting! I didn't know this was possible. > > Thx, > > Guillermo > >> >> >> Michael >> >> [1] >> https://git.pengutronix.de/cgit/OSELAS.Toolchain/tree/rules/cross-rustc.make >> >> > > This way, they will be cached with >> > > the rest of the source. Take a look at what I did for the toolchain. >> > > >> > > Michael >> > > >> > > > Signed-off-by: Alejandro Vazquez >> > > > --- >> > > > rules/host-rust-std-target.in | 18 >> > > > rules/host-rust-std-target.make | 81 + >> > > > rules/host-rust.in | 8 >> > > > rules/host-rust.make| 80 >> > > > 4 files changed, 187 insertions(+) >> > > > create mode 100644 rules/host-rust-std-target.in >> > > > create mode 100644 rules/host-rust-std-target.make >> > > > create mode 100644 rules/host-rust.in >> > > > create mode 100644 rules/host-rust.make >> > > > >> > > > diff --git a/rules/host-rust-std-target.in b/rules/ >> > > host-rust-std-target.in >> > > > new file mode 100644 >> > > > index 0..ed47f8c89 >> > > > --- /dev/null >> > > > +++ b/rules/host-rust-std-target.in >> > > > @@ -0,0 +1,18 @@ >> > > > +## SECTION=hosttools >> > > > + >> > > > +menuconfig HOST_RUST_STD_TARGET >> > > > + bool >> > > > + select HOST_RUST >> > > > + prompt "host-rust-std-target (pre-built)" >> > > > + help >> > > > + This package will install pre-built versions of >> > > > + the Rust standard library for the target. >> > > > + >> > > > +if HOST_RUST_STD_TARGET >> > > > + >> > > > +config HOST_RUST_STD_TARGET_ARCH >> > > > + string >> > > > + default "armv7-unknown-linux-gnueabihf" >> > > > + prompt "Target Architecture" >> > > > + >> > > > +endif >> > > > diff --git a/rules/host-rust-std-target.make >> > > b/rules/host-rust-std-target.make >> > > > new file mode 100644 >> > > > index 0..f41c2caa1 >> > > > --- /dev/null >> > > > +++ b/rules/host-rust-std-target.make >> > > > @@ -0,0 +1,81 @@ >> > > > +# -*-makefile-*- >> > > > +# >> > > > +# Copyright (C) 2021 by Alejandro Vazquez >> > > > +# >> > > > +# For further information about the PTXdist project and license >> > > conditions >> > > > +# see the README file. >> > > > +# >> > > > + >> > > > +# >> > > > +# We provide this package >> > > > +# >> > > > +PACKAGES-$(PTXCONF_HOST_RUST_STD_TARGET) += host-rust-std-target >> > > > + >> > > > +# >> > > > +# Paths and names >> > > > +# >> > > > +HOST_RUST_STD_TARGET_VERSION := 1.53.0 >> > > > +HOST_RUST_STD_TARGET_MD5 := >> > > > 6eeb959f5a9294adc8220e79502b00df >> > > > +HOST_RUST_STD_TARGET_SUFFIX := tar.xz >> > > > +HOST_RUST_STD_TARGET_SPEC:= $(call remove_quotes, >> > > $(PTXCONF_HOST_RUST_STD_TARGET_ARCH)) >> > > > +HOST_RUST_STD_TARGET := >> > > rust-std-$(HOST_RUST_STD_TARGET_VERSION) >> > > > +HOST_RUST_STD_TARGET_NAME
Re: [ptxdist] [PATCH] rust: new package
El mié, 4 ago 2021 a las 12:16, Michael Olbrich () escribió: > On Wed, Aug 04, 2021 at 11:52:49AM +0200, Guillermo Rodriguez Garcia wrote: > > El mié, 4 ago 2021 a las 9:41, Michael Olbrich (< > m.olbr...@pengutronix.de>) > > escribió: > > > > > On Fri, Jul 30, 2021 at 07:41:56PM +0200, avazquez@gmail.com > wrote: > > > > From: Alejandro Vazquez > > > > > > > > - host-rust: This package provides a pre-built version of rustc, > > > > cargo and standard library for the host. > > > > - host-rust-std-target: A pre-built version of the standard library > for > > > > the target. > > > > > > No. The compiler should be built not just downloaded. > > > > > > Please take a look at the latest OSELAS.Toolchain. It contains a rust > > > compiler and std libraries for the target. I've done very little > testing > > > with that so far and I would be interested in some feedback. > Especially if > > > something isn't working. > > > > > > > I think it would be useful to have rules that support building rust > > packages without the need to update the toolchain. > > Why would you not want to update the toolchain? > For existing BSPs that are already used in production we might want to add a new package or update an existing package but keep everything else the same. If the toolchain is updated, every package will/may change. > > > > Also, I'm pretty sure that there are some hidden downloads in there for > > > cargo and maybe the host std library. So if you keep those rules > locally, > > > you should add that to the downloads. > > > > > > Is it possible to specify more than one download in a single .make file? > > Yes, that's what I do in the rustc package[1] in the toolchain. Or take a > look at rules/shaderc.make in PTXdist itself if you need to extract all > archives. > Very interesting! I didn't know this was possible. Thx, Guillermo > > Michael > > [1] > https://git.pengutronix.de/cgit/OSELAS.Toolchain/tree/rules/cross-rustc.make > > > > This way, they will be cached with > > > the rest of the source. Take a look at what I did for the toolchain. > > > > > > Michael > > > > > > > Signed-off-by: Alejandro Vazquez > > > > --- > > > > rules/host-rust-std-target.in | 18 > > > > rules/host-rust-std-target.make | 81 > + > > > > rules/host-rust.in | 8 > > > > rules/host-rust.make| 80 > > > > > 4 files changed, 187 insertions(+) > > > > create mode 100644 rules/host-rust-std-target.in > > > > create mode 100644 rules/host-rust-std-target.make > > > > create mode 100644 rules/host-rust.in > > > > create mode 100644 rules/host-rust.make > > > > > > > > diff --git a/rules/host-rust-std-target.in b/rules/ > > > host-rust-std-target.in > > > > new file mode 100644 > > > > index 0..ed47f8c89 > > > > --- /dev/null > > > > +++ b/rules/host-rust-std-target.in > > > > @@ -0,0 +1,18 @@ > > > > +## SECTION=hosttools > > > > + > > > > +menuconfig HOST_RUST_STD_TARGET > > > > + bool > > > > + select HOST_RUST > > > > + prompt "host-rust-std-target (pre-built)" > > > > + help > > > > + This package will install pre-built versions of > > > > + the Rust standard library for the target. > > > > + > > > > +if HOST_RUST_STD_TARGET > > > > + > > > > +config HOST_RUST_STD_TARGET_ARCH > > > > + string > > > > + default "armv7-unknown-linux-gnueabihf" > > > > + prompt "Target Architecture" > > > > + > > > > +endif > > > > diff --git a/rules/host-rust-std-target.make > > > b/rules/host-rust-std-target.make > > > > new file mode 100644 > > > > index 0..f41c2caa1 > > > > --- /dev/null > > > > +++ b/rules/host-rust-std-target.make > > > > @@ -0,0 +1,81 @@ > > > > +# -*-makefile-*- > > > > +# > > > > +# Copyright (C) 2021 by Alejandro Vazquez > > > > +# > > > > +# For further information about the PTXdist project and license > > > conditions > > > > +# see the README file. > > > > +# > > > > + > > > > +# > > > > +# We provide this package > > > > +# > > > > +PACKAGES-$(PTXCONF_HOST_RUST_STD_TARGET) += host-rust-std-target > > > > + > > > > +# > > > > +# Paths and names > > > > +# > > > > +HOST_RUST_STD_TARGET_VERSION := 1.53.0 > > > > +HOST_RUST_STD_TARGET_MD5 := > 6eeb959f5a9294adc8220e79502b00df > > > > +HOST_RUST_STD_TARGET_SUFFIX := tar.xz > > > > +HOST_RUST_STD_TARGET_SPEC:= $(call remove_quotes, > > > $(PTXCONF_HOST_RUST_STD_TARGET_ARCH)) > > > > +HOST_RUST_STD_TARGET := > > > rust-std-$(HOST_RUST_STD_TARGET_VERSION) > > > > +HOST_RUST_STD_TARGET_NAME:= > > > $(HOST_RUST_STD_TARGET)-$(HOST_RUST_STD_TARGET_SPEC) > > > > +HOST_RUST_STD_TARGET_URL := > > > > https://static.rust-lang.org/dist/$(HOST_RUST_STD_TARGET_NAME).$(HOST_RUST_STD_TARGET_SUFFIX) > > > > +HOST_RUST_STD_TARGET_DIR := > > > $(HOST_BUILDDIR)/$(HOST_RUST_STD_TARGET) > > > > +HOST_RUST_STD_TARGET_SOURCE
Re: [ptxdist] [PATCH] rust: new package
On Wed, Aug 04, 2021 at 11:52:49AM +0200, Guillermo Rodriguez Garcia wrote: > El mié, 4 ago 2021 a las 9:41, Michael Olbrich () > escribió: > > > On Fri, Jul 30, 2021 at 07:41:56PM +0200, avazquez@gmail.com wrote: > > > From: Alejandro Vazquez > > > > > > - host-rust: This package provides a pre-built version of rustc, > > > cargo and standard library for the host. > > > - host-rust-std-target: A pre-built version of the standard library for > > > the target. > > > > No. The compiler should be built not just downloaded. > > > > Please take a look at the latest OSELAS.Toolchain. It contains a rust > > compiler and std libraries for the target. I've done very little testing > > with that so far and I would be interested in some feedback. Especially if > > something isn't working. > > > > I think it would be useful to have rules that support building rust > packages without the need to update the toolchain. Why would you not want to update the toolchain? > > Also, I'm pretty sure that there are some hidden downloads in there for > > cargo and maybe the host std library. So if you keep those rules locally, > > you should add that to the downloads. > > > Is it possible to specify more than one download in a single .make file? Yes, that's what I do in the rustc package[1] in the toolchain. Or take a look at rules/shaderc.make in PTXdist itself if you need to extract all archives. Michael [1] https://git.pengutronix.de/cgit/OSELAS.Toolchain/tree/rules/cross-rustc.make > > This way, they will be cached with > > the rest of the source. Take a look at what I did for the toolchain. > > > > Michael > > > > > Signed-off-by: Alejandro Vazquez > > > --- > > > rules/host-rust-std-target.in | 18 > > > rules/host-rust-std-target.make | 81 + > > > rules/host-rust.in | 8 > > > rules/host-rust.make| 80 > > > 4 files changed, 187 insertions(+) > > > create mode 100644 rules/host-rust-std-target.in > > > create mode 100644 rules/host-rust-std-target.make > > > create mode 100644 rules/host-rust.in > > > create mode 100644 rules/host-rust.make > > > > > > diff --git a/rules/host-rust-std-target.in b/rules/ > > host-rust-std-target.in > > > new file mode 100644 > > > index 0..ed47f8c89 > > > --- /dev/null > > > +++ b/rules/host-rust-std-target.in > > > @@ -0,0 +1,18 @@ > > > +## SECTION=hosttools > > > + > > > +menuconfig HOST_RUST_STD_TARGET > > > + bool > > > + select HOST_RUST > > > + prompt "host-rust-std-target (pre-built)" > > > + help > > > + This package will install pre-built versions of > > > + the Rust standard library for the target. > > > + > > > +if HOST_RUST_STD_TARGET > > > + > > > +config HOST_RUST_STD_TARGET_ARCH > > > + string > > > + default "armv7-unknown-linux-gnueabihf" > > > + prompt "Target Architecture" > > > + > > > +endif > > > diff --git a/rules/host-rust-std-target.make > > b/rules/host-rust-std-target.make > > > new file mode 100644 > > > index 0..f41c2caa1 > > > --- /dev/null > > > +++ b/rules/host-rust-std-target.make > > > @@ -0,0 +1,81 @@ > > > +# -*-makefile-*- > > > +# > > > +# Copyright (C) 2021 by Alejandro Vazquez > > > +# > > > +# For further information about the PTXdist project and license > > conditions > > > +# see the README file. > > > +# > > > + > > > +# > > > +# We provide this package > > > +# > > > +PACKAGES-$(PTXCONF_HOST_RUST_STD_TARGET) += host-rust-std-target > > > + > > > +# > > > +# Paths and names > > > +# > > > +HOST_RUST_STD_TARGET_VERSION := 1.53.0 > > > +HOST_RUST_STD_TARGET_MD5 := 6eeb959f5a9294adc8220e79502b00df > > > +HOST_RUST_STD_TARGET_SUFFIX := tar.xz > > > +HOST_RUST_STD_TARGET_SPEC:= $(call remove_quotes, > > $(PTXCONF_HOST_RUST_STD_TARGET_ARCH)) > > > +HOST_RUST_STD_TARGET := > > rust-std-$(HOST_RUST_STD_TARGET_VERSION) > > > +HOST_RUST_STD_TARGET_NAME:= > > $(HOST_RUST_STD_TARGET)-$(HOST_RUST_STD_TARGET_SPEC) > > > +HOST_RUST_STD_TARGET_URL := > > https://static.rust-lang.org/dist/$(HOST_RUST_STD_TARGET_NAME).$(HOST_RUST_STD_TARGET_SUFFIX) > > > +HOST_RUST_STD_TARGET_DIR := > > $(HOST_BUILDDIR)/$(HOST_RUST_STD_TARGET) > > > +HOST_RUST_STD_TARGET_SOURCE := > > $(SRCDIR)/$(HOST_RUST_STD_TARGET_NAME).$(HOST_RUST_STD_TARGET_SUFFIX) > > > +HOST_RUST_STD_TARGET_LICENSE := Apache-2.0 AND MIT > > > +HOST_RUST_STD_TARGET_LICENSE_FILES := \ > > > + file://COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0 \ > > > + file://LICENSE-APACHE;md5=22a53954e4e0ec258dfce4391e905dac \ > > > + file://LICENSE-MIT;md5=b377b220f43d747efdec40d69fcaa69d > > > + > > > +# > > > > > +# Prepare > > > +# > > > > > + > > >
Re: [ptxdist] [PATCH] rust: new package
Hi Michael, El mié, 4 ago 2021 a las 9:41, Michael Olbrich () escribió: > On Fri, Jul 30, 2021 at 07:41:56PM +0200, avazquez@gmail.com wrote: > > From: Alejandro Vazquez > > > > - host-rust: This package provides a pre-built version of rustc, > > cargo and standard library for the host. > > - host-rust-std-target: A pre-built version of the standard library for > > the target. > > No. The compiler should be built not just downloaded. > > Please take a look at the latest OSELAS.Toolchain. It contains a rust > compiler and std libraries for the target. I've done very little testing > with that so far and I would be interested in some feedback. Especially if > something isn't working. > I think it would be useful to have rules that support building rust packages without the need to update the toolchain. > Also, I'm pretty sure that there are some hidden downloads in there for > cargo and maybe the host std library. So if you keep those rules locally, > you should add that to the downloads. Is it possible to specify more than one download in a single .make file? Thanks, Guillermo > This way, they will be cached with > the rest of the source. Take a look at what I did for the toolchain. > > Michael > > > Signed-off-by: Alejandro Vazquez > > --- > > rules/host-rust-std-target.in | 18 > > rules/host-rust-std-target.make | 81 + > > rules/host-rust.in | 8 > > rules/host-rust.make| 80 > > 4 files changed, 187 insertions(+) > > create mode 100644 rules/host-rust-std-target.in > > create mode 100644 rules/host-rust-std-target.make > > create mode 100644 rules/host-rust.in > > create mode 100644 rules/host-rust.make > > > > diff --git a/rules/host-rust-std-target.in b/rules/ > host-rust-std-target.in > > new file mode 100644 > > index 0..ed47f8c89 > > --- /dev/null > > +++ b/rules/host-rust-std-target.in > > @@ -0,0 +1,18 @@ > > +## SECTION=hosttools > > + > > +menuconfig HOST_RUST_STD_TARGET > > + bool > > + select HOST_RUST > > + prompt "host-rust-std-target (pre-built)" > > + help > > + This package will install pre-built versions of > > + the Rust standard library for the target. > > + > > +if HOST_RUST_STD_TARGET > > + > > +config HOST_RUST_STD_TARGET_ARCH > > + string > > + default "armv7-unknown-linux-gnueabihf" > > + prompt "Target Architecture" > > + > > +endif > > diff --git a/rules/host-rust-std-target.make > b/rules/host-rust-std-target.make > > new file mode 100644 > > index 0..f41c2caa1 > > --- /dev/null > > +++ b/rules/host-rust-std-target.make > > @@ -0,0 +1,81 @@ > > +# -*-makefile-*- > > +# > > +# Copyright (C) 2021 by Alejandro Vazquez > > +# > > +# For further information about the PTXdist project and license > conditions > > +# see the README file. > > +# > > + > > +# > > +# We provide this package > > +# > > +PACKAGES-$(PTXCONF_HOST_RUST_STD_TARGET) += host-rust-std-target > > + > > +# > > +# Paths and names > > +# > > +HOST_RUST_STD_TARGET_VERSION := 1.53.0 > > +HOST_RUST_STD_TARGET_MD5 := 6eeb959f5a9294adc8220e79502b00df > > +HOST_RUST_STD_TARGET_SUFFIX := tar.xz > > +HOST_RUST_STD_TARGET_SPEC:= $(call remove_quotes, > $(PTXCONF_HOST_RUST_STD_TARGET_ARCH)) > > +HOST_RUST_STD_TARGET := > rust-std-$(HOST_RUST_STD_TARGET_VERSION) > > +HOST_RUST_STD_TARGET_NAME:= > $(HOST_RUST_STD_TARGET)-$(HOST_RUST_STD_TARGET_SPEC) > > +HOST_RUST_STD_TARGET_URL := > https://static.rust-lang.org/dist/$(HOST_RUST_STD_TARGET_NAME).$(HOST_RUST_STD_TARGET_SUFFIX) > > +HOST_RUST_STD_TARGET_DIR := > $(HOST_BUILDDIR)/$(HOST_RUST_STD_TARGET) > > +HOST_RUST_STD_TARGET_SOURCE := > $(SRCDIR)/$(HOST_RUST_STD_TARGET_NAME).$(HOST_RUST_STD_TARGET_SUFFIX) > > +HOST_RUST_STD_TARGET_LICENSE := Apache-2.0 AND MIT > > +HOST_RUST_STD_TARGET_LICENSE_FILES := \ > > + file://COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0 \ > > + file://LICENSE-APACHE;md5=22a53954e4e0ec258dfce4391e905dac \ > > + file://LICENSE-MIT;md5=b377b220f43d747efdec40d69fcaa69d > > + > > +# > > > +# Prepare > > +# > > > + > > +HOST_RUST_STD_TARGET_DEVPKG := NO > > +HOST_RUST_STD_TARGET_CONF_TOOL := NO > > + > > +HOST_RUST_STD_TARGET_INSTALL_COMPONENTS = > --components=rust-std-$(HOST_RUST_STD_TARGET_SPEC) > > + > > +HOST_RUST_STD_TARGET_INSTALL_OPTS = \ > > + --prefix=$(PTXDIST_SYSROOT_HOST) \ > > + --without=rust-docs \ > > + --disable-ldconfig \ > > + $(HOST_RUST_STD_TARGET_INSTALL_COMPONENTS) > > + > > +# > > > +# Compile > > +# >
Re: [ptxdist] [PATCH] rust: new package
On Fri, Jul 30, 2021 at 07:41:56PM +0200, avazquez@gmail.com wrote: > From: Alejandro Vazquez > > - host-rust: This package provides a pre-built version of rustc, > cargo and standard library for the host. > - host-rust-std-target: A pre-built version of the standard library for > the target. No. The compiler should be built not just downloaded. Please take a look at the latest OSELAS.Toolchain. It contains a rust compiler and std libraries for the target. I've done very little testing with that so far and I would be interested in some feedback. Especially if something isn't working. Also, I'm pretty sure that there are some hidden downloads in there for cargo and maybe the host std library. So if you keep those rules locally, you should add that to the downloads. This way, they will be cached with the rest of the source. Take a look at what I did for the toolchain. Michael > Signed-off-by: Alejandro Vazquez > --- > rules/host-rust-std-target.in | 18 > rules/host-rust-std-target.make | 81 + > rules/host-rust.in | 8 > rules/host-rust.make| 80 > 4 files changed, 187 insertions(+) > create mode 100644 rules/host-rust-std-target.in > create mode 100644 rules/host-rust-std-target.make > create mode 100644 rules/host-rust.in > create mode 100644 rules/host-rust.make > > diff --git a/rules/host-rust-std-target.in b/rules/host-rust-std-target.in > new file mode 100644 > index 0..ed47f8c89 > --- /dev/null > +++ b/rules/host-rust-std-target.in > @@ -0,0 +1,18 @@ > +## SECTION=hosttools > + > +menuconfig HOST_RUST_STD_TARGET > + bool > + select HOST_RUST > + prompt "host-rust-std-target (pre-built)" > + help > + This package will install pre-built versions of > + the Rust standard library for the target. > + > +if HOST_RUST_STD_TARGET > + > +config HOST_RUST_STD_TARGET_ARCH > + string > + default "armv7-unknown-linux-gnueabihf" > + prompt "Target Architecture" > + > +endif > diff --git a/rules/host-rust-std-target.make b/rules/host-rust-std-target.make > new file mode 100644 > index 0..f41c2caa1 > --- /dev/null > +++ b/rules/host-rust-std-target.make > @@ -0,0 +1,81 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2021 by Alejandro Vazquez > +# > +# For further information about the PTXdist project and license conditions > +# see the README file. > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_HOST_RUST_STD_TARGET) += host-rust-std-target > + > +# > +# Paths and names > +# > +HOST_RUST_STD_TARGET_VERSION := 1.53.0 > +HOST_RUST_STD_TARGET_MD5 := 6eeb959f5a9294adc8220e79502b00df > +HOST_RUST_STD_TARGET_SUFFIX := tar.xz > +HOST_RUST_STD_TARGET_SPEC:= $(call remove_quotes, > $(PTXCONF_HOST_RUST_STD_TARGET_ARCH)) > +HOST_RUST_STD_TARGET := > rust-std-$(HOST_RUST_STD_TARGET_VERSION) > +HOST_RUST_STD_TARGET_NAME:= > $(HOST_RUST_STD_TARGET)-$(HOST_RUST_STD_TARGET_SPEC) > +HOST_RUST_STD_TARGET_URL := > https://static.rust-lang.org/dist/$(HOST_RUST_STD_TARGET_NAME).$(HOST_RUST_STD_TARGET_SUFFIX) > +HOST_RUST_STD_TARGET_DIR := > $(HOST_BUILDDIR)/$(HOST_RUST_STD_TARGET) > +HOST_RUST_STD_TARGET_SOURCE := > $(SRCDIR)/$(HOST_RUST_STD_TARGET_NAME).$(HOST_RUST_STD_TARGET_SUFFIX) > +HOST_RUST_STD_TARGET_LICENSE := Apache-2.0 AND MIT > +HOST_RUST_STD_TARGET_LICENSE_FILES := \ > + file://COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0 \ > + file://LICENSE-APACHE;md5=22a53954e4e0ec258dfce4391e905dac \ > + file://LICENSE-MIT;md5=b377b220f43d747efdec40d69fcaa69d > + > +# > > +# Prepare > +# > > + > +HOST_RUST_STD_TARGET_DEVPKG := NO > +HOST_RUST_STD_TARGET_CONF_TOOL := NO > + > +HOST_RUST_STD_TARGET_INSTALL_COMPONENTS = > --components=rust-std-$(HOST_RUST_STD_TARGET_SPEC) > + > +HOST_RUST_STD_TARGET_INSTALL_OPTS = \ > + --prefix=$(PTXDIST_SYSROOT_HOST) \ > + --without=rust-docs \ > + --disable-ldconfig \ > + $(HOST_RUST_STD_TARGET_INSTALL_COMPONENTS) > + > +# > > +# Compile > +# > > + > +$(STATEDIR)/host-rust-std-target.compile: > + @$(call targetinfo) > + @$(call touch) > + > +# > > +# Install > +# > > + > +$(STATEDIR)/host-rust-std-target.install.post: > + @$(call targetinfo) > + > + @cd "$(HOST_RUST_STD_TARGET_DIR)" && sh install.sh > $(HOST_RUST_STD_TARGET_INSTALL_OPTS) > + @cd
[ptxdist] [PATCH] rust: new package
From: Alejandro Vazquez - host-rust: This package provides a pre-built version of rustc, cargo and standard library for the host. - host-rust-std-target: A pre-built version of the standard library for the target. Signed-off-by: Alejandro Vazquez --- rules/host-rust-std-target.in | 18 rules/host-rust-std-target.make | 81 + rules/host-rust.in | 8 rules/host-rust.make| 80 4 files changed, 187 insertions(+) create mode 100644 rules/host-rust-std-target.in create mode 100644 rules/host-rust-std-target.make create mode 100644 rules/host-rust.in create mode 100644 rules/host-rust.make diff --git a/rules/host-rust-std-target.in b/rules/host-rust-std-target.in new file mode 100644 index 0..ed47f8c89 --- /dev/null +++ b/rules/host-rust-std-target.in @@ -0,0 +1,18 @@ +## SECTION=hosttools + +menuconfig HOST_RUST_STD_TARGET + bool + select HOST_RUST + prompt "host-rust-std-target (pre-built)" + help + This package will install pre-built versions of + the Rust standard library for the target. + +if HOST_RUST_STD_TARGET + +config HOST_RUST_STD_TARGET_ARCH + string + default "armv7-unknown-linux-gnueabihf" + prompt "Target Architecture" + +endif diff --git a/rules/host-rust-std-target.make b/rules/host-rust-std-target.make new file mode 100644 index 0..f41c2caa1 --- /dev/null +++ b/rules/host-rust-std-target.make @@ -0,0 +1,81 @@ +# -*-makefile-*- +# +# Copyright (C) 2021 by Alejandro Vazquez +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_HOST_RUST_STD_TARGET) += host-rust-std-target + +# +# Paths and names +# +HOST_RUST_STD_TARGET_VERSION := 1.53.0 +HOST_RUST_STD_TARGET_MD5 := 6eeb959f5a9294adc8220e79502b00df +HOST_RUST_STD_TARGET_SUFFIX:= tar.xz +HOST_RUST_STD_TARGET_SPEC := $(call remove_quotes, $(PTXCONF_HOST_RUST_STD_TARGET_ARCH)) +HOST_RUST_STD_TARGET := rust-std-$(HOST_RUST_STD_TARGET_VERSION) +HOST_RUST_STD_TARGET_NAME := $(HOST_RUST_STD_TARGET)-$(HOST_RUST_STD_TARGET_SPEC) +HOST_RUST_STD_TARGET_URL := https://static.rust-lang.org/dist/$(HOST_RUST_STD_TARGET_NAME).$(HOST_RUST_STD_TARGET_SUFFIX) +HOST_RUST_STD_TARGET_DIR := $(HOST_BUILDDIR)/$(HOST_RUST_STD_TARGET) +HOST_RUST_STD_TARGET_SOURCE:= $(SRCDIR)/$(HOST_RUST_STD_TARGET_NAME).$(HOST_RUST_STD_TARGET_SUFFIX) +HOST_RUST_STD_TARGET_LICENSE := Apache-2.0 AND MIT +HOST_RUST_STD_TARGET_LICENSE_FILES := \ + file://COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0 \ + file://LICENSE-APACHE;md5=22a53954e4e0ec258dfce4391e905dac \ + file://LICENSE-MIT;md5=b377b220f43d747efdec40d69fcaa69d + +# +# Prepare +# + +HOST_RUST_STD_TARGET_DEVPKG:= NO +HOST_RUST_STD_TARGET_CONF_TOOL := NO + +HOST_RUST_STD_TARGET_INSTALL_COMPONENTS = --components=rust-std-$(HOST_RUST_STD_TARGET_SPEC) + +HOST_RUST_STD_TARGET_INSTALL_OPTS = \ + --prefix=$(PTXDIST_SYSROOT_HOST) \ + --without=rust-docs \ + --disable-ldconfig \ + $(HOST_RUST_STD_TARGET_INSTALL_COMPONENTS) + +# +# Compile +# + +$(STATEDIR)/host-rust-std-target.compile: + @$(call targetinfo) + @$(call touch) + +# +# Install +# + +$(STATEDIR)/host-rust-std-target.install.post: + @$(call targetinfo) + + @cd "$(HOST_RUST_STD_TARGET_DIR)" && sh install.sh $(HOST_RUST_STD_TARGET_INSTALL_OPTS) + @cd "$(PTXDIST_SYSROOT_HOST)/lib/rustlib/" && mv uninstall.sh uninstall-target.sh + + @$(call world/install, HOST_RUST_STD_TARGET) + @$(call touch) + +# +# Clean +# + +$(STATEDIR)/host-rust-std-target.clean: + @$(call targetinfo) + + sh $(PTXDIST_SYSROOT_HOST)/lib/rustlib/uninstall-host.sh \ + --uninstall \ + --prefix=$(PTXDIST_SYSROOT_HOST) \ + $(HOST_RUST_STD_TARGET_INSTALL_COMPONENTS) + @$(call clean_pkg, HOST_RUST_STD_TARGET) + +# vim: syntax=make diff --git a/rules/host-rust.in b/rules/host-rust.in new file mode 100644 index 0..4f73dae6c --- /dev/null +++ b/rules/host-rust.in @@ -0,0 +1,8 @@ +## SECTION=hosttools + +config HOST_RUST + tristate + prompt