* [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0
@ 2019-09-29 17:16 Eric Le Bihan
2019-09-29 17:16 ` [Buildroot] [PATCH 1/6] package/cargo: convert to virtual package Eric Le Bihan
` (6 more replies)
0 siblings, 7 replies; 14+ messages in thread
From: Eric Le Bihan @ 2019-09-29 17:16 UTC (permalink / raw)
To: buildroot
Cargo source code is not provided anymore as a separate tarball but is now
built along with the Rust compiler.
This patch series converts cargo to a virtual package and declare cargo-bin
and rust are providers. Versions for each package are also bumped to latest
ones.
Eric Le Bihan (6):
package/cargo: convert to virtual package
package/cargo-bin: declare as cargo provider
package/rust: declare as cargo provider
package/cargo-bin: bump version to 0.38.0
package/rust-bin: bump version to 1.38.0
package/rust: bump version to 1.38.0
package/cargo-bin/cargo-bin.hash | 18 +-
package/cargo-bin/cargo-bin.mk | 10 +-
package/cargo/Config.in.host | 38 ++-
package/cargo/cargo.mk | 79 +-----
package/rust-bin/rust-bin.hash | 90 +++---
package/rust-bin/rust-bin.mk | 2 +-
...esence-of-LLVM-library-in-stage0-lib.patch | 264 ------------------
...disabling-deny-warnings-for-bootstra.patch | 116 ++++++++
package/rust/rust.hash | 6 +-
package/rust/rust.mk | 26 +-
10 files changed, 245 insertions(+), 404 deletions(-)
delete mode 100644 package/rust/0001-Workaround-presence-of-LLVM-library-in-stage0-lib.patch
create mode 100644 package/rust/0001-rustbuild-allow-disabling-deny-warnings-for-bootstra.patch
--
2.21.0
^ permalink raw reply [flat|nested] 14+ messages in thread* [Buildroot] [PATCH 1/6] package/cargo: convert to virtual package 2019-09-29 17:16 [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 Eric Le Bihan @ 2019-09-29 17:16 ` Eric Le Bihan 2019-10-01 23:33 ` Sam Voss 2019-09-29 17:16 ` [Buildroot] [PATCH 2/6] package/cargo-bin: declare as cargo provider Eric Le Bihan ` (5 subsequent siblings) 6 siblings, 1 reply; 14+ messages in thread From: Eric Le Bihan @ 2019-09-29 17:16 UTC (permalink / raw) To: buildroot Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> --- package/cargo/Config.in.host | 11 ++++- package/cargo/cargo.mk | 79 +----------------------------------- 2 files changed, 11 insertions(+), 79 deletions(-) diff --git a/package/cargo/Config.in.host b/package/cargo/Config.in.host index c33c6851f2..82652fa980 100644 --- a/package/cargo/Config.in.host +++ b/package/cargo/Config.in.host @@ -1,9 +1,16 @@ config BR2_PACKAGE_HOST_CARGO bool "host cargo" depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS - select BR2_PACKAGE_HOST_RUSTC help Cargo is the package manager for the Rust programming - language. + language https://crates.io/ + +config BR2_PACKAGE_HAS_HOST_CARGO + bool + +config BR2_PACKAGE_PROVIDES_HOST_CARGO + string + depends on BR2_PACKAGE_HAS_HOST_CARGO + depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS diff --git a/package/cargo/cargo.mk b/package/cargo/cargo.mk index a387281b4c..54dc86d811 100644 --- a/package/cargo/cargo.mk +++ b/package/cargo/cargo.mk @@ -4,82 +4,7 @@ # ################################################################################ -CARGO_VERSION = 0.26.0 -CARGO_SITE = $(call github,rust-lang,cargo,$(CARGO_VERSION)) -CARGO_LICENSE = Apache-2.0 or MIT -CARGO_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT - -CARGO_DEPS_SHA512 = 6ed2a1644c9b18fc24ddad5350d41b6c36cd5b62de4cf0b748a57b589f4f0ac12f91461989158d58d0892bf6fc2c1626cf574e7e2b9da4b0e35f72dfd88f9048 -CARGO_DEPS_SITE = https://src.fedoraproject.org/repo/pkgs/cargo/$(CARGO_DEPS_SOURCE)/sha512/$(CARGO_DEPS_SHA512) -CARGO_DEPS_SOURCE = cargo-$(CARGO_VERSION)-vendor.tar.xz - -CARGO_INSTALLER_VERSION = 4f994850808a572e2cc8d43f968893c8e942e9bf -CARGO_INSTALLER_SITE = $(call github,rust-lang,rust-installer,$(CARGO_INSTALLER_VERSION)) -CARGO_INSTALLER_SOURCE = rust-installer-$(CARGO_INSTALLER_VERSION).tar.gz - -HOST_CARGO_EXTRA_DOWNLOADS = \ - $(CARGO_DEPS_SITE)/$(CARGO_DEPS_SOURCE) \ - $(CARGO_INSTALLER_SITE)/$(CARGO_INSTALLER_SOURCE) - -HOST_CARGO_DEPENDENCIES = \ - $(BR2_CMAKE_HOST_DEPENDENCY) \ - host-pkgconf \ - host-openssl \ - host-libhttpparser \ - host-libssh2 \ - host-libcurl \ - host-rustc \ - host-cargo-bin - -HOST_CARGO_SNAP_BIN = $(HOST_CARGO_BIN_DIR)/cargo/bin/cargo -HOST_CARGO_HOME = $(HOST_DIR)/share/cargo - -define HOST_CARGO_EXTRACT_DEPS - @mkdir -p $(@D)/vendor - $(call suitable-extractor,$(CARGO_DEPS_SOURCE)) \ - $(HOST_CARGO_DL_DIR)/$(CARGO_DEPS_SOURCE) | \ - $(TAR) --strip-components=1 -C $(@D)/vendor $(TAR_OPTIONS) - -endef - -HOST_CARGO_POST_EXTRACT_HOOKS += HOST_CARGO_EXTRACT_DEPS - -define HOST_CARGO_EXTRACT_INSTALLER - @mkdir -p $(@D)/src/rust-installer - $(call suitable-extractor,$(CARGO_INSTALLER_SOURCE)) \ - $(HOST_CARGO_DL_DIR)/$(CARGO_INSTALLER_SOURCE) | \ - $(TAR) --strip-components=1 -C $(@D)/src/rust-installer $(TAR_OPTIONS) - -endef - -HOST_CARGO_POST_EXTRACT_HOOKS += HOST_CARGO_EXTRACT_INSTALLER - -define HOST_CARGO_SETUP_DEPS - mkdir -p $(@D)/.cargo - ( \ - echo "[source.crates-io]"; \ - echo "registry = 'https://github.com/rust-lang/crates.io-index'"; \ - echo "replace-with = 'vendored-sources'"; \ - echo "[source.vendored-sources]"; \ - echo "directory = '$(@D)/vendor'"; \ - ) > $(@D)/.cargo/config -endef - -HOST_CARGO_PRE_CONFIGURE_HOOKS += HOST_CARGO_SETUP_DEPS - -HOST_CARGO_SNAP_OPTS = \ - --release \ - $(if $(VERBOSE),--verbose) - -HOST_CARGO_ENV = \ - RUSTFLAGS="$(addprefix -Clink-arg=,$(HOST_LDFLAGS))" \ - CARGO_HOME=$(HOST_CARGO_HOME) - -define HOST_CARGO_BUILD_CMDS - (cd $(@D); $(HOST_MAKE_ENV) $(HOST_CARGO_ENV) $(HOST_CARGO_SNAP_BIN) \ - build $(HOST_CARGO_SNAP_OPTS)) -endef - -define HOST_CARGO_INSTALL_CMDS - $(INSTALL) -D -m 0755 $(@D)/target/release/cargo $(HOST_DIR)/bin/cargo +define HOST_CARGO_INSTALL_CONFIG $(INSTALL) -D package/cargo/config.in \ $(HOST_DIR)/share/cargo/config $(SED) 's/@RUSTC_TARGET_NAME@/$(RUSTC_TARGET_NAME)/' \ @@ -88,4 +13,4 @@ define HOST_CARGO_INSTALL_CMDS $(HOST_DIR)/share/cargo/config endef -$(eval $(host-generic-package)) +$(eval $(host-virtual-package)) -- 2.21.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 1/6] package/cargo: convert to virtual package 2019-09-29 17:16 ` [Buildroot] [PATCH 1/6] package/cargo: convert to virtual package Eric Le Bihan @ 2019-10-01 23:33 ` Sam Voss 2019-10-03 19:06 ` Sam Voss 0 siblings, 1 reply; 14+ messages in thread From: Sam Voss @ 2019-10-01 23:33 UTC (permalink / raw) To: buildroot Eric, All, On Sun, Sep 29, 2019 at 12:17 PM Eric Le Bihan <eric.le.bihan.dev@free.fr> wrote: > > Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> Tested-by: Sam Voss <sam.voss@gmail.com> > --- > package/cargo/Config.in.host | 11 ++++- > package/cargo/cargo.mk | 79 +----------------------------------- > 2 files changed, 11 insertions(+), 79 deletions(-) > > diff --git a/package/cargo/Config.in.host b/package/cargo/Config.in.host > index c33c6851f2..82652fa980 100644 > --- a/package/cargo/Config.in.host > +++ b/package/cargo/Config.in.host > @@ -1,9 +1,16 @@ > config BR2_PACKAGE_HOST_CARGO > bool "host cargo" > depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS > - select BR2_PACKAGE_HOST_RUSTC > help > Cargo is the package manager for the Rust programming > - language. > + language > > https://crates.io/ > + > +config BR2_PACKAGE_HAS_HOST_CARGO > + bool > + > +config BR2_PACKAGE_PROVIDES_HOST_CARGO > + string > + depends on BR2_PACKAGE_HAS_HOST_CARGO > + depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS > diff --git a/package/cargo/cargo.mk b/package/cargo/cargo.mk > index a387281b4c..54dc86d811 100644 > --- a/package/cargo/cargo.mk > +++ b/package/cargo/cargo.mk > @@ -4,82 +4,7 @@ > # > ################################################################################ > > -CARGO_VERSION = 0.26.0 > -CARGO_SITE = $(call github,rust-lang,cargo,$(CARGO_VERSION)) > -CARGO_LICENSE = Apache-2.0 or MIT > -CARGO_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT > - > -CARGO_DEPS_SHA512 = 6ed2a1644c9b18fc24ddad5350d41b6c36cd5b62de4cf0b748a57b589f4f0ac12f91461989158d58d0892bf6fc2c1626cf574e7e2b9da4b0e35f72dfd88f9048 > -CARGO_DEPS_SITE = https://src.fedoraproject.org/repo/pkgs/cargo/$(CARGO_DEPS_SOURCE)/sha512/$(CARGO_DEPS_SHA512) > -CARGO_DEPS_SOURCE = cargo-$(CARGO_VERSION)-vendor.tar.xz > - > -CARGO_INSTALLER_VERSION = 4f994850808a572e2cc8d43f968893c8e942e9bf > -CARGO_INSTALLER_SITE = $(call github,rust-lang,rust-installer,$(CARGO_INSTALLER_VERSION)) > -CARGO_INSTALLER_SOURCE = rust-installer-$(CARGO_INSTALLER_VERSION).tar.gz > - > -HOST_CARGO_EXTRA_DOWNLOADS = \ > - $(CARGO_DEPS_SITE)/$(CARGO_DEPS_SOURCE) \ > - $(CARGO_INSTALLER_SITE)/$(CARGO_INSTALLER_SOURCE) > - > -HOST_CARGO_DEPENDENCIES = \ > - $(BR2_CMAKE_HOST_DEPENDENCY) \ > - host-pkgconf \ > - host-openssl \ > - host-libhttpparser \ > - host-libssh2 \ > - host-libcurl \ > - host-rustc \ > - host-cargo-bin > - > -HOST_CARGO_SNAP_BIN = $(HOST_CARGO_BIN_DIR)/cargo/bin/cargo > -HOST_CARGO_HOME = $(HOST_DIR)/share/cargo > - > -define HOST_CARGO_EXTRACT_DEPS > - @mkdir -p $(@D)/vendor > - $(call suitable-extractor,$(CARGO_DEPS_SOURCE)) \ > - $(HOST_CARGO_DL_DIR)/$(CARGO_DEPS_SOURCE) | \ > - $(TAR) --strip-components=1 -C $(@D)/vendor $(TAR_OPTIONS) - > -endef > - > -HOST_CARGO_POST_EXTRACT_HOOKS += HOST_CARGO_EXTRACT_DEPS > - > -define HOST_CARGO_EXTRACT_INSTALLER > - @mkdir -p $(@D)/src/rust-installer > - $(call suitable-extractor,$(CARGO_INSTALLER_SOURCE)) \ > - $(HOST_CARGO_DL_DIR)/$(CARGO_INSTALLER_SOURCE) | \ > - $(TAR) --strip-components=1 -C $(@D)/src/rust-installer $(TAR_OPTIONS) - > -endef > - > -HOST_CARGO_POST_EXTRACT_HOOKS += HOST_CARGO_EXTRACT_INSTALLER > - > -define HOST_CARGO_SETUP_DEPS > - mkdir -p $(@D)/.cargo > - ( \ > - echo "[source.crates-io]"; \ > - echo "registry = 'https://github.com/rust-lang/crates.io-index'"; \ > - echo "replace-with = 'vendored-sources'"; \ > - echo "[source.vendored-sources]"; \ > - echo "directory = '$(@D)/vendor'"; \ > - ) > $(@D)/.cargo/config > -endef > - > -HOST_CARGO_PRE_CONFIGURE_HOOKS += HOST_CARGO_SETUP_DEPS > - > -HOST_CARGO_SNAP_OPTS = \ > - --release \ > - $(if $(VERBOSE),--verbose) > - > -HOST_CARGO_ENV = \ > - RUSTFLAGS="$(addprefix -Clink-arg=,$(HOST_LDFLAGS))" \ > - CARGO_HOME=$(HOST_CARGO_HOME) > - > -define HOST_CARGO_BUILD_CMDS > - (cd $(@D); $(HOST_MAKE_ENV) $(HOST_CARGO_ENV) $(HOST_CARGO_SNAP_BIN) \ > - build $(HOST_CARGO_SNAP_OPTS)) > -endef > - > -define HOST_CARGO_INSTALL_CMDS > - $(INSTALL) -D -m 0755 $(@D)/target/release/cargo $(HOST_DIR)/bin/cargo > +define HOST_CARGO_INSTALL_CONFIG > $(INSTALL) -D package/cargo/config.in \ > $(HOST_DIR)/share/cargo/config > $(SED) 's/@RUSTC_TARGET_NAME@/$(RUSTC_TARGET_NAME)/' \ > @@ -88,4 +13,4 @@ define HOST_CARGO_INSTALL_CMDS > $(HOST_DIR)/share/cargo/config > endef > > -$(eval $(host-generic-package)) > +$(eval $(host-virtual-package)) > -- > 2.21.0 > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 1/6] package/cargo: convert to virtual package 2019-10-01 23:33 ` Sam Voss @ 2019-10-03 19:06 ` Sam Voss 0 siblings, 0 replies; 14+ messages in thread From: Sam Voss @ 2019-10-03 19:06 UTC (permalink / raw) To: buildroot On Tue, Oct 1, 2019 at 6:33 PM Sam Voss <sam.voss@gmail.com> wrote: > > Eric, All, > > On Sun, Sep 29, 2019 at 12:17 PM Eric Le Bihan > <eric.le.bihan.dev@free.fr> wrote: > > > > Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> > > Tested-by: Sam Voss <sam.voss@gmail.com> My original tests this had no issues, but I noticed today this patchset causes Cargo to not select rustc in any way. This causes no providers to be selected, and propagate out a build failure. My legacy defconfig I based on already had RUSTC selected. ? make host-cargo make[1]: *** No rule to make target 'host-', needed by '/accts/smvoss/project/rust/build/host-cargo/.stamp_configured'. Stop. make: *** [_all] Error 2 Makefile:23: recipe for target '_all' failed This happened when only BR2_PACKAGE_HOST_CARGO is selected, leaving no providers as each of them require either RUSTC or RUSTC_BIN. -- Sam Voss | Sr. Software Engineer | Commercial Avionics COLLINS AEROSPACE 400 Collins Road NE, Cedar Rapids, Iowa 52498, USA Tel: +1 319 263 4039 sam.voss at collins.com | collinsaerospace.com CONFIDENTIALITY WARNING: This message may contain proprietary and/or privileged information of Collins Aerospace and its affiliated companies. If you are not the intended recipient, please 1) Do not disclose, copy, distribute or use this message or its contents. 2) Advise the sender by return email. 3) Delete all copies (including all attachments) from your computer. Your cooperation is greatly appreciated. ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 2/6] package/cargo-bin: declare as cargo provider 2019-09-29 17:16 [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 Eric Le Bihan 2019-09-29 17:16 ` [Buildroot] [PATCH 1/6] package/cargo: convert to virtual package Eric Le Bihan @ 2019-09-29 17:16 ` Eric Le Bihan 2019-09-29 17:16 ` [Buildroot] [PATCH 3/6] package/rust: " Eric Le Bihan ` (4 subsequent siblings) 6 siblings, 0 replies; 14+ messages in thread From: Eric Le Bihan @ 2019-09-29 17:16 UTC (permalink / raw) To: buildroot If cargo-bin is explicitly selected, then install binary in $(HOST_DIR) and declare package as cargo provider. Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> --- package/cargo-bin/cargo-bin.mk | 8 ++++++++ package/cargo/Config.in.host | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/package/cargo-bin/cargo-bin.mk b/package/cargo-bin/cargo-bin.mk index 3614f7a53d..809bb64cae 100644 --- a/package/cargo-bin/cargo-bin.mk +++ b/package/cargo-bin/cargo-bin.mk @@ -9,5 +9,13 @@ CARGO_BIN_SITE = https://static.rust-lang.org/dist CARGO_BIN_SOURCE = cargo-$(CARGO_BIN_VERSION)-$(RUSTC_HOST_NAME).tar.xz CARGO_BIN_LICENSE = Apache-2.0 or MIT CARGO_BIN_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT +CARGO_BIN_PROVIDES = host-cargo + +ifeq ($(BR2_PACKAGE_HOST_CARGO_BIN),y) +define HOST_CARGO_BIN_INSTALL_CMDS + $(@D)/install.sh --prefix=$(HOST_DIR) --disable-ldconfig +endef +HOST_CARGO_BIN_POST_INSTALL_HOOKS += HOST_CARGO_INSTALL_CONFIG +endif $(eval $(host-generic-package)) diff --git a/package/cargo/Config.in.host b/package/cargo/Config.in.host index 82652fa980..bae30d2f57 100644 --- a/package/cargo/Config.in.host +++ b/package/cargo/Config.in.host @@ -7,10 +7,29 @@ config BR2_PACKAGE_HOST_CARGO https://crates.io/ +if BR2_PACKAGE_HOST_CARGO + +choice + prompt "Cargo provider" + help + Select a Cargo package manager provider + +config BR2_PACKAGE_HOST_CARGO_BIN + bool "host cargo (pre-built)" + depends on BR2_PACKAGE_HOST_RUST_BIN + select BR2_PACKAGE_HAS_HOST_CARGO + help + This package will install a pre-built version of Cargo. + +endchoice + +endif + config BR2_PACKAGE_HAS_HOST_CARGO bool config BR2_PACKAGE_PROVIDES_HOST_CARGO string depends on BR2_PACKAGE_HAS_HOST_CARGO + default "host-cargo-bin" if !BR2_PACKAGE_HOST_RUST depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS -- 2.21.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 3/6] package/rust: declare as cargo provider 2019-09-29 17:16 [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 Eric Le Bihan 2019-09-29 17:16 ` [Buildroot] [PATCH 1/6] package/cargo: convert to virtual package Eric Le Bihan 2019-09-29 17:16 ` [Buildroot] [PATCH 2/6] package/cargo-bin: declare as cargo provider Eric Le Bihan @ 2019-09-29 17:16 ` Eric Le Bihan 2019-09-29 17:16 ` [Buildroot] [PATCH 4/6] package/cargo-bin: bump version to 0.38.0 Eric Le Bihan ` (3 subsequent siblings) 6 siblings, 0 replies; 14+ messages in thread From: Eric Le Bihan @ 2019-09-29 17:16 UTC (permalink / raw) To: buildroot Enable build of cargo along with Rust compiler and declare this package as a cargo provider. Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> --- package/cargo/Config.in.host | 8 ++++++++ package/rust/rust.mk | 23 ++++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/package/cargo/Config.in.host b/package/cargo/Config.in.host index bae30d2f57..d1bb913573 100644 --- a/package/cargo/Config.in.host +++ b/package/cargo/Config.in.host @@ -14,6 +14,13 @@ choice help Select a Cargo package manager provider +config BR2_PACKAGE_HOST_RUST_CARGO + bool "host rust" + depends on BR2_PACKAGE_HOST_RUST + select BR2_PACKAGE_HAS_HOST_CARGO + help + Install Cargo built at the same time as the Rust compiler. + config BR2_PACKAGE_HOST_CARGO_BIN bool "host cargo (pre-built)" depends on BR2_PACKAGE_HOST_RUST_BIN @@ -32,4 +39,5 @@ config BR2_PACKAGE_PROVIDES_HOST_CARGO string depends on BR2_PACKAGE_HAS_HOST_CARGO default "host-cargo-bin" if !BR2_PACKAGE_HOST_RUST + default "host-rust" if BR2_PACKAGE_HOST_RUST depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS diff --git a/package/rust/rust.mk b/package/rust/rust.mk index 5d14fc6682..ff23cd8930 100644 --- a/package/rust/rust.mk +++ b/package/rust/rust.mk @@ -10,7 +10,7 @@ RUST_SITE = https://static.rust-lang.org/dist RUST_LICENSE = Apache-2.0 or MIT RUST_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT -HOST_RUST_PROVIDES = host-rustc +HOST_RUST_PROVIDES = host-rustc host-cargo HOST_RUST_DEPENDENCIES = \ toolchain \ @@ -38,6 +38,25 @@ endef HOST_RUST_POST_EXTRACT_HOOKS += HOST_RUST_EXCLUDE_ORIG_FILES +ifeq ($(BR2_PACKAGE_HOST_RUST_CARGO),y) + +define HOST_RUST_ENABLE_CARGO + echo 'extended = true'; \ + echo 'tools = ["cargo"]'; +endef + +define HOST_RUST_INSTALL_CARGO + find $(@D)/build/tmp/dist -maxdepth 2 -wholename '*cargo*/install.sh' \ + -exec {} --prefix=$(HOST_DIR) --disable-ldconfig \; + +endef + +HOST_RUST_POST_INSTALL_HOOKS += \ + HOST_RUST_INSTALL_CARGO \ + HOST_CARGO_INSTALL_CONFIG + +endif + define HOST_RUST_CONFIGURE_CMDS ( \ echo '[build]'; \ @@ -47,11 +66,13 @@ define HOST_RUST_CONFIGURE_CMDS echo 'python = "$(HOST_DIR)/bin/python2"'; \ echo 'submodules = false'; \ echo 'vendor = true'; \ + $(HOST_RUST_ENABLE_CARGO) \ echo 'compiler-docs = false'; \ echo 'docs = false'; \ echo 'verbose = $(HOST_RUST_VERBOSITY)'; \ echo '[install]'; \ echo 'prefix = "$(HOST_DIR)"'; \ + echo 'sysconfdir = "$(HOST_DIR)/etc"'; \ echo '[rust]'; \ echo 'channel = "stable"'; \ echo '[target.$(RUSTC_TARGET_NAME)]'; \ -- 2.21.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 4/6] package/cargo-bin: bump version to 0.38.0 2019-09-29 17:16 [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 Eric Le Bihan ` (2 preceding siblings ...) 2019-09-29 17:16 ` [Buildroot] [PATCH 3/6] package/rust: " Eric Le Bihan @ 2019-09-29 17:16 ` Eric Le Bihan 2019-09-29 17:16 ` [Buildroot] [PATCH 5/6] package/rust-bin: bump version to 1.38.0 Eric Le Bihan ` (2 subsequent siblings) 6 siblings, 0 replies; 14+ messages in thread From: Eric Le Bihan @ 2019-09-29 17:16 UTC (permalink / raw) To: buildroot Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> --- package/cargo-bin/cargo-bin.hash | 18 +++++++++--------- package/cargo-bin/cargo-bin.mk | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package/cargo-bin/cargo-bin.hash b/package/cargo-bin/cargo-bin.hash index 0e9e9c5c61..a1c43e6c19 100644 --- a/package/cargo-bin/cargo-bin.hash +++ b/package/cargo-bin/cargo-bin.hash @@ -1,12 +1,12 @@ -# From https://static.rust-lang.org/dist/cargo-0.33.0-i686-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/cargo-0.33.0-i686-unknown-linux-gnu.tar.xz.asc -sha256 13acdb3c9f2505805ceed8a696f5f62ab8cd73e443cd43d6edd588aad88e1c32 cargo-0.33.0-i686-unknown-linux-gnu.tar.xz -# From https://static.rust-lang.org/dist/cargo-0.33.0-powerpc64le-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/cargo-0.33.0-powerpc64le-unknown-linux-gnu.tar.xz.asc -sha256 6628db22370f397676195555d768f0449a60f0a694bcac24611f4cd1cfc97cdc cargo-0.33.0-powerpc64le-unknown-linux-gnu.tar.xz -# From https://static.rust-lang.org/dist/cargo-0.33.0-x86_64-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/cargo-0.33.0-x86_64-unknown-linux-gnu.tar.xz.asc -sha256 c2c31db68c4dcb50ad856a19e6f11489a0d4df1212f31bd068dfbb73c5425761 cargo-0.33.0-x86_64-unknown-linux-gnu.tar.xz +# From https://static.rust-lang.org/dist/cargo-0.38.0-i686-unknown-linux-gnu.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/cargo-0.38.0-i686-unknown-linux-gnu.tar.xz.asc +sha256 a6c3781d8b2bf8619fc2231b01dc73877756c7bbbc1a68c521b9e748b3b7737a cargo-0.38.0-i686-unknown-linux-gnu.tar.xz +# From https://static.rust-lang.org/dist/cargo-0.38.0-powerpc64le-unknown-linux-gnu.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/cargo-0.38.0-powerpc64le-unknown-linux-gnu.tar.xz.asc +sha256 8be0c71639c22e18815971079e46e7f3e5bce25365658ca39349e694321b92db cargo-0.38.0-powerpc64le-unknown-linux-gnu.tar.xz +# From https://static.rust-lang.org/dist/cargo-0.38.0-x86_64-unknown-linux-gnu.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/cargo-0.38.0-x86_64-unknown-linux-gnu.tar.xz.asc +sha256 a3ba2df5e21aaba70e40bd289e4b3bab3df516c4e374c7178d3762338949df56 cargo-0.38.0-x86_64-unknown-linux-gnu.tar.xz # Locally generated sha256 a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2 LICENSE-APACHE sha256 23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3 LICENSE-MIT diff --git a/package/cargo-bin/cargo-bin.mk b/package/cargo-bin/cargo-bin.mk index 809bb64cae..388eb65880 100644 --- a/package/cargo-bin/cargo-bin.mk +++ b/package/cargo-bin/cargo-bin.mk @@ -4,7 +4,7 @@ # ################################################################################ -CARGO_BIN_VERSION = 0.33.0 +CARGO_BIN_VERSION = 0.38.0 CARGO_BIN_SITE = https://static.rust-lang.org/dist CARGO_BIN_SOURCE = cargo-$(CARGO_BIN_VERSION)-$(RUSTC_HOST_NAME).tar.xz CARGO_BIN_LICENSE = Apache-2.0 or MIT -- 2.21.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 5/6] package/rust-bin: bump version to 1.38.0 2019-09-29 17:16 [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 Eric Le Bihan ` (3 preceding siblings ...) 2019-09-29 17:16 ` [Buildroot] [PATCH 4/6] package/cargo-bin: bump version to 0.38.0 Eric Le Bihan @ 2019-09-29 17:16 ` Eric Le Bihan 2019-09-29 17:16 ` [Buildroot] [PATCH 6/6] package/rust: " Eric Le Bihan 2019-09-29 19:22 ` [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 Arnout Vandecappelle 6 siblings, 0 replies; 14+ messages in thread From: Eric Le Bihan @ 2019-09-29 17:16 UTC (permalink / raw) To: buildroot Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> --- package/rust-bin/rust-bin.hash | 90 +++++++++++++++++----------------- package/rust-bin/rust-bin.mk | 2 +- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/package/rust-bin/rust-bin.hash b/package/rust-bin/rust-bin.hash index 96d81a347c..4c5978bdab 100644 --- a/package/rust-bin/rust-bin.hash +++ b/package/rust-bin/rust-bin.hash @@ -1,48 +1,48 @@ -# From https://static.rust-lang.org/dist/rustc-1.33.0-i686-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rustc-1.33.0-i686-unknown-linux-gnu.tar.xz.asc -sha256 90b6414eddbce4a245cdcaea8353d3a637ef565d2bd119e25a6c2bf3e38cdf63 rustc-1.33.0-i686-unknown-linux-gnu.tar.xz -# From https://static.rust-lang.org/dist/rustc-1.33.0-x86_64-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rustc-1.33.0-x86_64-unknown-linux-gnu.tar.xz.asc -sha256 57c5ced1a826d34f26e50adf041528dd0000f2a59e8be32d2359386843382ce1 rustc-1.33.0-x86_64-unknown-linux-gnu.tar.xz -# From https://static.rust-lang.org/dist/rust-std-1.33.0-aarch64-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rust-std-1.33.0-aarch64-unknown-linux-gnu.tar.xz.asc -sha256 3e3449dada8306b3ff91f23c7803c7312a47e93af140f757b29b74f1e226a505 rust-std-1.33.0-aarch64-unknown-linux-gnu.tar.xz -# From https://static.rust-lang.org/dist/rust-std-1.33.0-arm-unknown-linux-gnueabi.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rust-std-1.33.0-arm-unknown-linux-gnueabi.tar.xz.asc -sha256 ddb372a43fb2ba9949e78643df43d6ae447b70cefd440ccdd6b9f6c2ff929ea7 rust-std-1.33.0-arm-unknown-linux-gnueabi.tar.xz -# From https://static.rust-lang.org/dist/rust-std-1.33.0-arm-unknown-linux-gnueabihf.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rust-std-1.33.0-arm-unknown-linux-gnueabihf.tar.xz.asc -sha256 1142d5064d8cbfab16ab71130e5a84804a1ebdfeb10173e6238adc0d757937b6 rust-std-1.33.0-arm-unknown-linux-gnueabihf.tar.xz -# From https://static.rust-lang.org/dist/rust-std-1.33.0-armv7-unknown-linux-gnueabihf.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rust-std-1.33.0-armv7-unknown-linux-gnueabihf.tar.xz.asc -sha256 8492b5c91a9ea7ee7e22881382c1b9ad8bb9a4147aff0dfee09940b34783e3d5 rust-std-1.33.0-armv7-unknown-linux-gnueabihf.tar.xz -# From https://static.rust-lang.org/dist/rust-std-1.33.0-i686-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rust-std-1.33.0-i686-unknown-linux-gnu.tar.xz.asc -sha256 e945dd37ab9b143dbcbcdbeaba63b8de47411a4ff815d2e178f745e183078127 rust-std-1.33.0-i686-unknown-linux-gnu.tar.xz -# From https://static.rust-lang.org/dist/rust-std-1.33.0-mips-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rust-std-1.33.0-mips-unknown-linux-gnu.tar.xz.asc -sha256 abf6b7050c1cdef092ecfde5128067434bb7989def19cfe95c06bfd71de07ba0 rust-std-1.33.0-mips-unknown-linux-gnu.tar.xz -# From https://static.rust-lang.org/dist/rust-std-1.33.0-mips64-unknown-linux-gnuabi64.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rust-std-1.33.0-mips64-unknown-linux-gnuabi64.tar.xz.asc -sha256 9cad816c989c991ffd342d03956b54209d7d32743ebb9b0624b2d36d5bbd525f rust-std-1.33.0-mips64-unknown-linux-gnuabi64.tar.xz -# From https://static.rust-lang.org/dist/rust-std-1.33.0-mips64el-unknown-linux-gnuabi64.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rust-std-1.33.0-mips64el-unknown-linux-gnuabi64.tar.xz.asc -sha256 c7ac98e7a7c3757b5bb8bde596455d50a8787236e290bc1f49e2d59d486ae564 rust-std-1.33.0-mips64el-unknown-linux-gnuabi64.tar.xz -# From https://static.rust-lang.org/dist/rust-std-1.33.0-mipsel-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rust-std-1.33.0-mipsel-unknown-linux-gnu.tar.xz.asc -sha256 4ec3cade12e2e527f81d0b315e6a37152bf73938aab4a9216aef7d06ef913eb6 rust-std-1.33.0-mipsel-unknown-linux-gnu.tar.xz -# From https://static.rust-lang.org/dist/rust-std-1.33.0-powerpc-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rust-std-1.33.0-powerpc-unknown-linux-gnu.tar.xz.asc -sha256 0ab78e0cb710f35d108abce90bbf426947fed6222d2f6c04c9eba4ca00adea06 rust-std-1.33.0-powerpc-unknown-linux-gnu.tar.xz -# From https://static.rust-lang.org/dist/rust-std-1.33.0-powerpc64-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rust-std-1.33.0-powerpc64-unknown-linux-gnu.tar.xz.asc -sha256 4bc32bf4660a9fc5cd2af9e09f1bfb668b335442097fed6f3892b50950e97d3c rust-std-1.33.0-powerpc64-unknown-linux-gnu.tar.xz -# From https://static.rust-lang.org/dist/rust-std-1.33.0-powerpc64le-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rust-std-1.33.0-powerpc64le-unknown-linux-gnu.tar.xz.asc -sha256 984d3ca2a47db04345a2bddd657761f66d209ef95a02097ad4bd549f45a0dc9f rust-std-1.33.0-powerpc64le-unknown-linux-gnu.tar.xz -# From https://static.rust-lang.org/dist/rust-std-1.33.0-x86_64-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rust-std-1.33.0-x86_64-unknown-linux-gnu.tar.xz.asc -sha256 6f20343ed73faf5fdfc423bec38a9bb1910a0a962af6f2dddd7184407543ed0e rust-std-1.33.0-x86_64-unknown-linux-gnu.tar.xz +# From https://static.rust-lang.org/dist/rustc-1.38.0-i686-unknown-linux-gnu.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rustc-1.38.0-i686-unknown-linux-gnu.tar.xz.asc +sha256 183dca6a4d746b833804e658267c1a60cdb446a36d4e4f8d29b04cfd29d886d5 rustc-1.38.0-i686-unknown-linux-gnu.tar.xz +# From https://static.rust-lang.org/dist/rustc-1.38.0-x86_64-unknown-linux-gnu.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rustc-1.38.0-x86_64-unknown-linux-gnu.tar.xz.asc +sha256 0fedde3406cf3367ceb00f493698e6bfc3264bd7f7253c85de7a042b45f873fa rustc-1.38.0-x86_64-unknown-linux-gnu.tar.xz +# From https://static.rust-lang.org/dist/rust-std-1.38.0-aarch64-unknown-linux-gnu.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rust-std-1.38.0-aarch64-unknown-linux-gnu.tar.xz.asc +sha256 b931843898b0457fa92b8ef1521ff460bef525451ed786897cfaa6f7baed4105 rust-std-1.38.0-aarch64-unknown-linux-gnu.tar.xz +# From https://static.rust-lang.org/dist/rust-std-1.38.0-arm-unknown-linux-gnueabi.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rust-std-1.38.0-arm-unknown-linux-gnueabi.tar.xz.asc +sha256 a2cbc0e887896c518eea97af25383d0eeeb34b57fb10ba85917a802a63072043 rust-std-1.38.0-arm-unknown-linux-gnueabi.tar.xz +# From https://static.rust-lang.org/dist/rust-std-1.38.0-arm-unknown-linux-gnueabihf.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rust-std-1.38.0-arm-unknown-linux-gnueabihf.tar.xz.asc +sha256 64baa713e5913c6adcbca1a498d05248cef5877529c0c4a9e845aebd75484f7f rust-std-1.38.0-arm-unknown-linux-gnueabihf.tar.xz +# From https://static.rust-lang.org/dist/rust-std-1.38.0-armv7-unknown-linux-gnueabihf.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rust-std-1.38.0-armv7-unknown-linux-gnueabihf.tar.xz.asc +sha256 7fc0b85375865e7d3fd1e63446fc1b7a865ec537f880343797f32a1a3e0ecbce rust-std-1.38.0-armv7-unknown-linux-gnueabihf.tar.xz +# From https://static.rust-lang.org/dist/rust-std-1.38.0-i686-unknown-linux-gnu.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rust-std-1.38.0-i686-unknown-linux-gnu.tar.xz.asc +sha256 a3248cf8cf7e33afb0a2508c7c204ffe5db2e515c3d3d31ffd9a2146ffa3bad3 rust-std-1.38.0-i686-unknown-linux-gnu.tar.xz +# From https://static.rust-lang.org/dist/rust-std-1.38.0-mips-unknown-linux-gnu.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rust-std-1.38.0-mips-unknown-linux-gnu.tar.xz.asc +sha256 b9043d9d18285809881790601e06b58d835f457edb29acd0d21e45dfa5910fd9 rust-std-1.38.0-mips-unknown-linux-gnu.tar.xz +# From https://static.rust-lang.org/dist/rust-std-1.38.0-mips64-unknown-linux-gnuabi64.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rust-std-1.38.0-mips64-unknown-linux-gnuabi64.tar.xz.asc +sha256 b3469cea015cf0871df761d0aff72e82a3d27b8b100409b8d5d8a0cf775c0d4d rust-std-1.38.0-mips64-unknown-linux-gnuabi64.tar.xz +# From https://static.rust-lang.org/dist/rust-std-1.38.0-mips64el-unknown-linux-gnuabi64.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rust-std-1.38.0-mips64el-unknown-linux-gnuabi64.tar.xz.asc +sha256 a836b87a78c023af5bd0fe9f9db0362a87b5df3ac7fcac43d30aefeb05158645 rust-std-1.38.0-mips64el-unknown-linux-gnuabi64.tar.xz +# From https://static.rust-lang.org/dist/rust-std-1.38.0-mipsel-unknown-linux-gnu.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rust-std-1.38.0-mipsel-unknown-linux-gnu.tar.xz.asc +sha256 7d238edab91a2f681986c61c2dab5d37b9c85580c0338ff64c89780b8ccf829e rust-std-1.38.0-mipsel-unknown-linux-gnu.tar.xz +# From https://static.rust-lang.org/dist/rust-std-1.38.0-powerpc-unknown-linux-gnu.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rust-std-1.38.0-powerpc-unknown-linux-gnu.tar.xz.asc +sha256 b892b009abc974eec1b08acce92d654c804f168dcc59d7de8fb49effe1d0c986 rust-std-1.38.0-powerpc-unknown-linux-gnu.tar.xz +# From https://static.rust-lang.org/dist/rust-std-1.38.0-powerpc64-unknown-linux-gnu.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rust-std-1.38.0-powerpc64-unknown-linux-gnu.tar.xz.asc +sha256 9359f21093515299b6f0f3ded6e90a0ce7ec4615509f319f33e9889bb543304b rust-std-1.38.0-powerpc64-unknown-linux-gnu.tar.xz +# From https://static.rust-lang.org/dist/rust-std-1.38.0-powerpc64le-unknown-linux-gnu.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rust-std-1.38.0-powerpc64le-unknown-linux-gnu.tar.xz.asc +sha256 937d2ece46539ba149cdce307718dadbc4b038a3c751bd75749430bd421a6249 rust-std-1.38.0-powerpc64le-unknown-linux-gnu.tar.xz +# From https://static.rust-lang.org/dist/rust-std-1.38.0-x86_64-unknown-linux-gnu.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rust-std-1.38.0-x86_64-unknown-linux-gnu.tar.xz.asc +sha256 51b334337804baeff7524e5496d396f254894d7529860d236975e9ed8fcca371 rust-std-1.38.0-x86_64-unknown-linux-gnu.tar.xz # Locally generated sha256 a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2 LICENSE-APACHE sha256 23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3 LICENSE-MIT diff --git a/package/rust-bin/rust-bin.mk b/package/rust-bin/rust-bin.mk index a374215e20..a5a251367b 100644 --- a/package/rust-bin/rust-bin.mk +++ b/package/rust-bin/rust-bin.mk @@ -4,7 +4,7 @@ # ################################################################################ -RUST_BIN_VERSION = 1.33.0 +RUST_BIN_VERSION = 1.38.0 RUST_BIN_SITE = https://static.rust-lang.org/dist RUST_BIN_LICENSE = Apache-2.0 or MIT RUST_BIN_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT -- 2.21.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 6/6] package/rust: bump version to 1.38.0 2019-09-29 17:16 [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 Eric Le Bihan ` (4 preceding siblings ...) 2019-09-29 17:16 ` [Buildroot] [PATCH 5/6] package/rust-bin: bump version to 1.38.0 Eric Le Bihan @ 2019-09-29 17:16 ` Eric Le Bihan 2019-09-29 19:22 ` [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 Arnout Vandecappelle 6 siblings, 0 replies; 14+ messages in thread From: Eric Le Bihan @ 2019-09-29 17:16 UTC (permalink / raw) To: buildroot Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> --- ...esence-of-LLVM-library-in-stage0-lib.patch | 264 ------------------ ...disabling-deny-warnings-for-bootstra.patch | 116 ++++++++ package/rust/rust.hash | 6 +- package/rust/rust.mk | 3 +- 4 files changed, 121 insertions(+), 268 deletions(-) delete mode 100644 package/rust/0001-Workaround-presence-of-LLVM-library-in-stage0-lib.patch create mode 100644 package/rust/0001-rustbuild-allow-disabling-deny-warnings-for-bootstra.patch diff --git a/package/rust/0001-Workaround-presence-of-LLVM-library-in-stage0-lib.patch b/package/rust/0001-Workaround-presence-of-LLVM-library-in-stage0-lib.patch deleted file mode 100644 index 0c756e3028..0000000000 --- a/package/rust/0001-Workaround-presence-of-LLVM-library-in-stage0-lib.patch +++ /dev/null @@ -1,264 +0,0 @@ -From 2d21df8a3fd7a68ba9f52389ead7f06f13190c12 Mon Sep 17 00:00:00 2001 -From: Mark Rousskov <mark.simulacrum@gmail.com> -Date: Mon, 21 Jan 2019 17:47:57 -0700 -Subject: [PATCH] Workaround presence of LLVM library in stage0/lib - -This commit works around the newly-introduced LLVM shared library. - -This is needed such that llvm-config run from -librustc_llvm's build script can correctly locate it's own LLVM, not the -one in stage0/lib. The LLVM build system uses the DT_RUNPATH/RUNPATH -header within the llvm-config binary, which we want to use, but because -Cargo always adds the host compiler's "libdir" (stage0/lib in our -case) to the dynamic linker's search path, we weren't properly finding -the freshly-built LLVM in llvm/lib. By restoring the environment -variable setting the search path to what bootstrap sees, the problem is -resolved and librustc_llvm correctly links and finds the appropriate -LLVM. - -Several run-make-fulldeps tests are also updated with similar handling. - -Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> ---- - src/bootstrap/builder.rs | 9 ++++++++- - src/bootstrap/compile.rs | 1 + - src/bootstrap/util.rs | 6 +++++- - src/build_helper/lib.rs | 19 +++++++++++++++++++ - src/librustc_asan/build.rs | 2 ++ - src/librustc_llvm/build.rs | 2 ++ - src/librustc_lsan/build.rs | 2 ++ - src/librustc_msan/build.rs | 2 ++ - src/librustc_tsan/build.rs | 2 ++ - .../cross-lang-lto-upstream-rlibs/Makefile | 4 ++-- - .../run-make-fulldeps/cross-lang-lto/Makefile | 19 ++++++++++--------- - 11 files changed, 55 insertions(+), 13 deletions(-) - -diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs -index a69ba20749..f742bce180 100644 ---- a/src/bootstrap/builder.rs -+++ b/src/bootstrap/builder.rs -@@ -21,7 +21,7 @@ use crate::install; - use crate::native; - use crate::test; - use crate::tool; --use crate::util::{add_lib_path, exe, libdir}; -+use crate::util::{self, add_lib_path, exe, libdir}; - use crate::{Build, DocTests, Mode, GitRepo}; - - pub use crate::Compiler; -@@ -791,6 +791,13 @@ impl<'a> Builder<'a> { - .env("CARGO_TARGET_DIR", out_dir) - .arg(cmd); - -+ // See comment in librustc_llvm/build.rs for why this is necessary, largely llvm-config -+ // needs to not accidentally link to libLLVM in stage0/lib. -+ cargo.env("REAL_LIBRARY_PATH_VAR", &util::dylib_path_var()); -+ if let Some(e) = env::var_os(util::dylib_path_var()) { -+ cargo.env("REAL_LIBRARY_PATH", e); -+ } -+ - if cmd != "install" { - cargo.arg("--target") - .arg(target); -diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs -index b581271663..ec04dee6c3 100644 ---- a/src/bootstrap/compile.rs -+++ b/src/bootstrap/compile.rs -@@ -712,6 +712,7 @@ pub fn build_codegen_backend(builder: &Builder, - if builder.is_rust_llvm(target) && backend != "emscripten" { - cargo.env("LLVM_RUSTLLVM", "1"); - } -+ - cargo.env("LLVM_CONFIG", &llvm_config); - if backend != "emscripten" { - let target_config = builder.config.target_config.get(&target); -diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs -index 2880f1a084..37c6c040da 100644 ---- a/src/bootstrap/util.rs -+++ b/src/bootstrap/util.rs -@@ -70,7 +70,11 @@ pub fn dylib_path_var() -> &'static str { - /// Parses the `dylib_path_var()` environment variable, returning a list of - /// paths that are members of this lookup path. - pub fn dylib_path() -> Vec<PathBuf> { -- env::split_paths(&env::var_os(dylib_path_var()).unwrap_or_default()).collect() -+ let var = match env::var_os(dylib_path_var()) { -+ Some(v) => v, -+ None => return vec![], -+ }; -+ env::split_paths(&var).collect() - } - - /// `push` all components to `buf`. On windows, append `.exe` to the last component. -diff --git a/src/build_helper/lib.rs b/src/build_helper/lib.rs -index 5a704e5577..c66c5c9249 100644 ---- a/src/build_helper/lib.rs -+++ b/src/build_helper/lib.rs -@@ -23,6 +23,25 @@ macro_rules! t { - }; - } - -+// Because Cargo adds the compiler's dylib path to our library search path, llvm-config may -+// break: the dylib path for the compiler, as of this writing, contains a copy of the LLVM -+// shared library, which means that when our freshly built llvm-config goes to load it's -+// associated LLVM, it actually loads the compiler's LLVM. In particular when building the first -+// compiler (i.e., in stage 0) that's a problem, as the compiler's LLVM is likely different from -+// the one we want to use. As such, we restore the environment to what bootstrap saw. This isn't -+// perfect -- we might actually want to see something from Cargo's added library paths -- but -+// for now it works. -+pub fn restore_library_path() { -+ println!("cargo:rerun-if-env-changed=REAL_LIBRARY_PATH_VAR"); -+ println!("cargo:rerun-if-env-changed=REAL_LIBRARY_PATH"); -+ let key = env::var_os("REAL_LIBRARY_PATH_VAR").expect("REAL_LIBRARY_PATH_VAR"); -+ if let Some(env) = env::var_os("REAL_LIBRARY_PATH") { -+ env::set_var(&key, &env); -+ } else { -+ env::remove_var(&key); -+ } -+} -+ - pub fn run(cmd: &mut Command) { - println!("running: {:?}", cmd); - run_silent(cmd); -diff --git a/src/librustc_asan/build.rs b/src/librustc_asan/build.rs -index 2d921b6669..b42d775deb 100644 ---- a/src/librustc_asan/build.rs -+++ b/src/librustc_asan/build.rs -@@ -8,6 +8,8 @@ use cmake::Config; - - fn main() { - if let Some(llvm_config) = env::var_os("LLVM_CONFIG") { -+ build_helper::restore_library_path(); -+ - let (native, target) = match sanitizer_lib_boilerplate("asan") { - Ok(native) => native, - _ => return, -diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs -index ec3dff783c..cd91fcb299 100644 ---- a/src/librustc_llvm/build.rs -+++ b/src/librustc_llvm/build.rs -@@ -24,6 +24,8 @@ fn main() { - return; - } - -+ build_helper::restore_library_path(); -+ - let target = env::var("TARGET").expect("TARGET was not set"); - let llvm_config = env::var_os("LLVM_CONFIG") - .map(PathBuf::from) -diff --git a/src/librustc_lsan/build.rs b/src/librustc_lsan/build.rs -index 470f2bb3e5..ad528bb039 100644 ---- a/src/librustc_lsan/build.rs -+++ b/src/librustc_lsan/build.rs -@@ -8,6 +8,8 @@ use cmake::Config; - - fn main() { - if let Some(llvm_config) = env::var_os("LLVM_CONFIG") { -+ build_helper::restore_library_path(); -+ - let (native, target) = match sanitizer_lib_boilerplate("lsan") { - Ok(native) => native, - _ => return, -diff --git a/src/librustc_msan/build.rs b/src/librustc_msan/build.rs -index e1140278f2..085514b5a0 100644 ---- a/src/librustc_msan/build.rs -+++ b/src/librustc_msan/build.rs -@@ -8,6 +8,8 @@ use cmake::Config; - - fn main() { - if let Some(llvm_config) = env::var_os("LLVM_CONFIG") { -+ build_helper::restore_library_path(); -+ - let (native, target) = match sanitizer_lib_boilerplate("msan") { - Ok(native) => native, - _ => return, -diff --git a/src/librustc_tsan/build.rs b/src/librustc_tsan/build.rs -index f63bb46b87..0db3db392d 100644 ---- a/src/librustc_tsan/build.rs -+++ b/src/librustc_tsan/build.rs -@@ -8,6 +8,8 @@ use cmake::Config; - - fn main() { - if let Some(llvm_config) = env::var_os("LLVM_CONFIG") { -+ build_helper::restore_library_path(); -+ - let (native, target) = match sanitizer_lib_boilerplate("tsan") { - Ok(native) => native, - _ => return, -diff --git a/src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs/Makefile b/src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs/Makefile -index 0a6f226a02..6992dab1a1 100644 ---- a/src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs/Makefile -+++ b/src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs/Makefile -@@ -9,7 +9,7 @@ all: staticlib.rs upstream.rs - - # Check No LTO - $(RUSTC) staticlib.rs -Z cross-lang-lto -Ccodegen-units=1 -L. -o $(TMPDIR)/staticlib.a -- (cd $(TMPDIR); llvm-ar x ./staticlib.a) -+ (cd $(TMPDIR); $(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-ar x ./staticlib.a) - # Make sure the upstream object file was included - ls $(TMPDIR)/upstream.*.rcgu.o - -@@ -19,5 +19,5 @@ all: staticlib.rs upstream.rs - # Check ThinLTO - $(RUSTC) upstream.rs -Z cross-lang-lto -Ccodegen-units=1 -Clto=thin - $(RUSTC) staticlib.rs -Z cross-lang-lto -Ccodegen-units=1 -Clto=thin -L. -o $(TMPDIR)/staticlib.a -- (cd $(TMPDIR); llvm-ar x ./staticlib.a) -+ (cd $(TMPDIR); $(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-ar x ./staticlib.a) - ls $(TMPDIR)/upstream.*.rcgu.o -diff --git a/src/test/run-make-fulldeps/cross-lang-lto/Makefile b/src/test/run-make-fulldeps/cross-lang-lto/Makefile -index 1d072e03de..4d1fb7b953 100644 ---- a/src/test/run-make-fulldeps/cross-lang-lto/Makefile -+++ b/src/test/run-make-fulldeps/cross-lang-lto/Makefile -@@ -5,8 +5,9 @@ - # LLVM bitcode files (as used by linker LTO plugins) when compiling with - # -Z cross-lang-lto. - --ASSERT_IS_BITCODE_OBJ=llvm-bcanalyzer # this only succeeds for bitcode files --EXTRACT_OBJS=(cd $(TMPDIR); rm -f ./*.o; llvm-ar x $(1)) -+# this only succeeds for bitcode files -+ASSERT_IS_BITCODE_OBJ=($(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-bcanalyzer $(1)) -+EXTRACT_OBJS=(cd $(TMPDIR); rm -f ./*.o; $(LD_LIB_PATH_ENVVAR)=$(REAL_LD_LIBRARY_PATH) llvm-ar x $(1)) - - BUILD_LIB=$(RUSTC) lib.rs -Copt-level=2 -Z cross-lang-lto=on -Ccodegen-units=1 - BUILD_EXE=$(RUSTC) main.rs -Copt-level=2 -Z cross-lang-lto=on -Ccodegen-units=1 --emit=obj -@@ -16,31 +17,31 @@ all: staticlib staticlib-fat-lto staticlib-thin-lto rlib exe cdylib rdylib - staticlib: lib.rs - $(BUILD_LIB) --crate-type=staticlib -o $(TMPDIR)/liblib.a - $(call EXTRACT_OBJS, liblib.a) -- for file in $(TMPDIR)/liblib.*.rcgu.o; do $(ASSERT_IS_BITCODE_OBJ) $$file; done -+ for file in $(TMPDIR)/liblib.*.rcgu.o; do $(call ASSERT_IS_BITCODE_OBJ, $$file); done - - staticlib-fat-lto: lib.rs - $(BUILD_LIB) --crate-type=staticlib -o $(TMPDIR)/liblib-fat-lto.a -Clto=fat - $(call EXTRACT_OBJS, liblib-fat-lto.a) -- for file in $(TMPDIR)/liblib-fat-lto.*.rcgu.o; do $(ASSERT_IS_BITCODE_OBJ) $$file; done -+ for file in $(TMPDIR)/liblib-fat-lto.*.rcgu.o; do $(call ASSERT_IS_BITCODE_OBJ, $$file); done - - staticlib-thin-lto: lib.rs - $(BUILD_LIB) --crate-type=staticlib -o $(TMPDIR)/liblib-thin-lto.a -Clto=thin - $(call EXTRACT_OBJS, liblib-thin-lto.a) -- for file in $(TMPDIR)/liblib-thin-lto.*.rcgu.o; do $(ASSERT_IS_BITCODE_OBJ) $$file; done -+ for file in $(TMPDIR)/liblib-thin-lto.*.rcgu.o; do $(call ASSERT_IS_BITCODE_OBJ, $$file); done - - rlib: lib.rs - $(BUILD_LIB) --crate-type=rlib -o $(TMPDIR)/liblib.rlib - $(call EXTRACT_OBJS, liblib.rlib) -- for file in $(TMPDIR)/liblib.*.rcgu.o; do $(ASSERT_IS_BITCODE_OBJ) $$file; done -+ for file in $(TMPDIR)/liblib.*.rcgu.o; do $(call ASSERT_IS_BITCODE_OBJ, $$file); done - - cdylib: lib.rs - $(BUILD_LIB) --crate-type=cdylib --emit=obj -o $(TMPDIR)/cdylib.o -- $(ASSERT_IS_BITCODE_OBJ) $(TMPDIR)/cdylib.o -+ $(call ASSERT_IS_BITCODE_OBJ, $(TMPDIR)/cdylib.o) - - rdylib: lib.rs - $(BUILD_LIB) --crate-type=dylib --emit=obj -o $(TMPDIR)/rdylib.o -- $(ASSERT_IS_BITCODE_OBJ) $(TMPDIR)/rdylib.o -+ $(call ASSERT_IS_BITCODE_OBJ, $(TMPDIR)/rdylib.o) - - exe: lib.rs - $(BUILD_EXE) -o $(TMPDIR)/exe.o -- $(ASSERT_IS_BITCODE_OBJ) $(TMPDIR)/exe.o -+ $(call ASSERT_IS_BITCODE_OBJ, $(TMPDIR)/exe.o) --- -2.17.2 - diff --git a/package/rust/0001-rustbuild-allow-disabling-deny-warnings-for-bootstra.patch b/package/rust/0001-rustbuild-allow-disabling-deny-warnings-for-bootstra.patch new file mode 100644 index 0000000000..29c2dea71b --- /dev/null +++ b/package/rust/0001-rustbuild-allow-disabling-deny-warnings-for-bootstra.patch @@ -0,0 +1,116 @@ +From 935c1c86070dfac3515a4296bf991cdf544bae27 Mon Sep 17 00:00:00 2001 +From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> +Date: Tue, 27 Aug 2019 09:37:51 +0200 +Subject: [PATCH] rustbuild: allow disabling deny(warnings) for bootstrap + +When deny-warnings is not specified or set to true, the behaviour is the same as before. +When deny-warnings is set to false, warnings are now allowed + +Fixes #63911 + +Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> +Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> +--- + src/bootstrap/bin/main.rs | 3 --- + src/bootstrap/bin/rustc.rs | 8 +++----- + src/bootstrap/bin/rustdoc.rs | 3 --- + src/bootstrap/bootstrap.py | 2 ++ + src/bootstrap/lib.rs | 3 --- + src/build_helper/lib.rs | 3 --- + 6 files changed, 5 insertions(+), 17 deletions(-) + +diff --git a/src/bootstrap/bin/main.rs b/src/bootstrap/bin/main.rs +index bd1a87c5744..138b7f4b261 100644 +--- a/src/bootstrap/bin/main.rs ++++ b/src/bootstrap/bin/main.rs +@@ -5,9 +5,6 @@ + //! parent directory, and otherwise documentation can be found throughout the `build` + //! directory in each respective module. + +-// NO-RUSTC-WRAPPER +-#![deny(warnings, rust_2018_idioms, unused_lifetimes)] +- + use std::env; + + use bootstrap::{Config, Build}; +diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs +index ce92ce02696..8cb48df14bf 100644 +--- a/src/bootstrap/bin/rustc.rs ++++ b/src/bootstrap/bin/rustc.rs +@@ -15,9 +15,6 @@ + //! switching compilers for the bootstrap and for build scripts will probably + //! never get replaced. + +-// NO-RUSTC-WRAPPER +-#![deny(warnings, rust_2018_idioms, unused_lifetimes)] +- + use std::env; + use std::ffi::OsString; + use std::io; +@@ -124,8 +121,9 @@ fn main() { + + if env::var_os("RUSTC_DENY_WARNINGS").is_some() && + env::var_os("RUSTC_EXTERNAL_TOOL").is_none() { +- // When extending this list, search for `NO-RUSTC-WRAPPER` and add the new lints +- // there as well, some code doesn't go through this `rustc` wrapper. ++ // When extending this list, add the new lints to the RUSTFLAGS of the ++ // build_bootstrap function of src/bootstrap/bootstrap.py as well as ++ // some code doesn't go through this `rustc` wrapper. + cmd.arg("-Dwarnings"); + cmd.arg("-Drust_2018_idioms"); + cmd.arg("-Dunused_lifetimes"); +diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs +index ff38ee8788f..766a3463ecd 100644 +--- a/src/bootstrap/bin/rustdoc.rs ++++ b/src/bootstrap/bin/rustdoc.rs +@@ -2,9 +2,6 @@ + //! + //! See comments in `src/bootstrap/rustc.rs` for more information. + +-// NO-RUSTC-WRAPPER +-#![deny(warnings, rust_2018_idioms, unused_lifetimes)] +- + use std::env; + use std::process::Command; + use std::path::PathBuf; +diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py +index 86901792d79..3c56131396f 100644 +--- a/src/bootstrap/bootstrap.py ++++ b/src/bootstrap/bootstrap.py +@@ -631,6 +631,8 @@ class RustBuild(object): + target_linker = self.get_toml("linker", build_section) + if target_linker is not None: + env["RUSTFLAGS"] += "-C linker=" + target_linker + " " ++ if self.get_toml("deny-warnings", "rust") != "false": ++ env["RUSTFLAGS"] += "-Dwarnings -Drust_2018_idioms -Dunused_lifetimes " + + env["PATH"] = os.path.join(self.bin_root(), "bin") + \ + os.pathsep + env["PATH"] +diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs +index c0e0ad1a857..575844028d5 100644 +--- a/src/bootstrap/lib.rs ++++ b/src/bootstrap/lib.rs +@@ -103,9 +103,6 @@ + //! More documentation can be found in each respective module below, and you can + //! also check out the `src/bootstrap/README.md` file for more information. + +-// NO-RUSTC-WRAPPER +-#![deny(warnings, rust_2018_idioms, unused_lifetimes)] +- + #![feature(core_intrinsics)] + #![feature(drain_filter)] + +diff --git a/src/build_helper/lib.rs b/src/build_helper/lib.rs +index 131d2034675..f035a711918 100644 +--- a/src/build_helper/lib.rs ++++ b/src/build_helper/lib.rs +@@ -1,6 +1,3 @@ +-// NO-RUSTC-WRAPPER +-#![deny(warnings, rust_2018_idioms, unused_lifetimes)] +- + use std::fs::File; + use std::path::{Path, PathBuf}; + use std::process::{Command, Stdio}; +-- +2.21.0 + diff --git a/package/rust/rust.hash b/package/rust/rust.hash index 62e2e1855c..47c24219c5 100644 --- a/package/rust/rust.hash +++ b/package/rust/rust.hash @@ -1,6 +1,6 @@ -# From https://static.rust-lang.org/dist/rustc-1.33.0-src.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rustc-1.33.0-src.tar.xz.asc -sha256 f4b1a72f1a29b23dcc9d7be5f60878f0434560513273906aa93dcd5c0de39b71 rustc-1.33.0-src.tar.xz +# From https://static.rust-lang.org/dist/rustc-1.38.0-src.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rustc-1.38.0-src.tar.xz.asc +sha256 3a7991aa4cb44ef941d71636e45a95468b520dc6fc7cf725364925bd3e3d3a34 rustc-1.38.0-src.tar.xz # Locally generated sha256 a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2 LICENSE-APACHE sha256 23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3 LICENSE-MIT diff --git a/package/rust/rust.mk b/package/rust/rust.mk index ff23cd8930..faeb4238fa 100644 --- a/package/rust/rust.mk +++ b/package/rust/rust.mk @@ -4,7 +4,7 @@ # ################################################################################ -RUST_VERSION = 1.33.0 +RUST_VERSION = 1.38.0 RUST_SOURCE = rustc-$(RUST_VERSION)-src.tar.xz RUST_SITE = https://static.rust-lang.org/dist RUST_LICENSE = Apache-2.0 or MIT @@ -75,6 +75,7 @@ define HOST_RUST_CONFIGURE_CMDS echo 'sysconfdir = "$(HOST_DIR)/etc"'; \ echo '[rust]'; \ echo 'channel = "stable"'; \ + echo 'deny-warnings = false'; \ echo '[target.$(RUSTC_TARGET_NAME)]'; \ echo 'cc = "$(TARGET_CROSS)gcc"'; \ echo $(HOST_RUST_JEMALLOC_CONF); \ -- 2.21.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 2019-09-29 17:16 [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 Eric Le Bihan ` (5 preceding siblings ...) 2019-09-29 17:16 ` [Buildroot] [PATCH 6/6] package/rust: " Eric Le Bihan @ 2019-09-29 19:22 ` Arnout Vandecappelle 2019-10-05 16:06 ` Eric Le Bihan 6 siblings, 1 reply; 14+ messages in thread From: Arnout Vandecappelle @ 2019-09-29 19:22 UTC (permalink / raw) To: buildroot On 29/09/2019 19:16, Eric Le Bihan wrote: > Cargo source code is not provided anymore as a separate tarball but is now > built along with the Rust compiler. > > This patch series converts cargo to a virtual package and declare cargo-bin > and rust are providers. Versions for each package are also bumped to latest > ones. Why do we need the virtual package? I would think that cargo just becomes a sub-option of rust. Or, given how cargo and rust really go hand in hand, we could just remove the cargo package entirely and always build cargo as part of rust. For host packages, we don't care about size (too much), the only possible issue is build time. But I expect building rust with cargo isn't going to be that much longer. > > Eric Le Bihan (6): > package/cargo: convert to virtual package > package/cargo-bin: declare as cargo provider > package/rust: declare as cargo provider You can't do this until the version has been bumped, because in the current version (AFAIU) rust doesn't have the cargo sources yet. In other words, it has to go in the same patch that bumps rust. Regards, Arnout > package/cargo-bin: bump version to 0.38.0 > package/rust-bin: bump version to 1.38.0 > package/rust: bump version to 1.38.0 > > package/cargo-bin/cargo-bin.hash | 18 +- > package/cargo-bin/cargo-bin.mk | 10 +- > package/cargo/Config.in.host | 38 ++- > package/cargo/cargo.mk | 79 +----- > package/rust-bin/rust-bin.hash | 90 +++--- > package/rust-bin/rust-bin.mk | 2 +- > ...esence-of-LLVM-library-in-stage0-lib.patch | 264 ------------------ > ...disabling-deny-warnings-for-bootstra.patch | 116 ++++++++ > package/rust/rust.hash | 6 +- > package/rust/rust.mk | 26 +- > 10 files changed, 245 insertions(+), 404 deletions(-) > delete mode 100644 package/rust/0001-Workaround-presence-of-LLVM-library-in-stage0-lib.patch > create mode 100644 package/rust/0001-rustbuild-allow-disabling-deny-warnings-for-bootstra.patch > > -- > 2.21.0 > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot > ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 2019-09-29 19:22 ` [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 Arnout Vandecappelle @ 2019-10-05 16:06 ` Eric Le Bihan 2019-10-08 21:17 ` Arnout Vandecappelle 0 siblings, 1 reply; 14+ messages in thread From: Eric Le Bihan @ 2019-10-05 16:06 UTC (permalink / raw) To: buildroot Hi! On 2019-09-29 21:22, Arnout Vandecappelle wrote: > > > On 29/09/2019 19:16, Eric Le Bihan wrote: > > Cargo source code is not provided anymore as a separate tarball but is now > > built along with the Rust compiler. > > > > This patch series converts cargo to a virtual package and declare cargo-bin > > and rust are providers. Versions for each package are also bumped to latest > > ones. > > Why do we need the virtual package? I would think that cargo just becomes a > sub-option of rust. Or, given how cargo and rust really go hand in hand, we > could just remove the cargo package entirely and always build cargo as part of > rust. For host packages, we don't care about size (too much), the only possible > issue is build time. But I expect building rust with cargo isn't going to be > that much longer. Rust needs a Rust compiler and Cargo to build. So there are some packages providing the pre-built binaries (rust-bin and cargo-bin). When Cargo was available as a standalone package, the user could choose to either: a) select rust-bin and build cargo (using cargo-bin). b) select to build rust and cargo, using rust-bin and cargo-bin. Now that Cargo is provided and built along with the Rust compiler, option a) is not possible anymore, unless cargo-bin is updated to be also installable and not only used as an intermediate tool. In that case we have two packages providing the same program (rust and cargo-bin), hence the idea of introducing the virtual package for Cargo. But it sure may be overkill and having just a sub-option might do the trick. Would adding a sub-option to Rust which behaves as follows be suitable? - if rust-bin is selected, then install Cargo from cargo-bin - if rust is selected, build Cargo along with the compiler using rust-bin and cargo-bin and install it. > > Eric Le Bihan (6): > > package/cargo: convert to virtual package > > package/cargo-bin: declare as cargo provider > > package/rust: declare as cargo provider > > You can't do this until the version has been bumped, because in the current > version (AFAIU) rust doesn't have the cargo sources yet. > > In other words, it has to go in the same patch that bumps rust. Duly noted. Thanks for the review. Regards, -- ELB ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 2019-10-05 16:06 ` Eric Le Bihan @ 2019-10-08 21:17 ` Arnout Vandecappelle 2019-10-27 22:19 ` Arnout Vandecappelle 0 siblings, 1 reply; 14+ messages in thread From: Arnout Vandecappelle @ 2019-10-08 21:17 UTC (permalink / raw) To: buildroot On 05/10/2019 18:06, Eric Le Bihan wrote: > Hi! > On 2019-09-29 21:22, Arnout Vandecappelle wrote: >> >> >> On 29/09/2019 19:16, Eric Le Bihan wrote: >>> Cargo source code is not provided anymore as a separate tarball but is now >>> built along with the Rust compiler. >>> >>> This patch series converts cargo to a virtual package and declare cargo-bin >>> and rust are providers. Versions for each package are also bumped to latest >>> ones. >> >> Why do we need the virtual package? I would think that cargo just becomes a >> sub-option of rust. Or, given how cargo and rust really go hand in hand, we >> could just remove the cargo package entirely and always build cargo as part of >> rust. For host packages, we don't care about size (too much), the only possible >> issue is build time. But I expect building rust with cargo isn't going to be >> that much longer. > > Rust needs a Rust compiler and Cargo to build. So there are some > packages providing the pre-built binaries (rust-bin and cargo-bin). When > Cargo was available as a standalone package, the user could choose to > either: > > a) select rust-bin and build cargo (using cargo-bin). > b) select to build rust and cargo, using rust-bin and cargo-bin. OK, I didn't realize that a) was a possibility. I thought we always built rust+cargo based on rust-bin+cargo-bin. So, if I understand correctly, we have this choice between rust-bin or rust to be able to save some build time (in case the standard library from rust-bin can be used). If it simplifies our life, I think it's worth considering to drop this choice and instead *always* build rust for the target if it's needed for the target, and *always* use rust-bin/cargo-bin if it only needed for the host. But that is kind of orthogonal to this version bump. > Now that Cargo is provided and built along with the Rust compiler, > option a) is not possible anymore, unless cargo-bin is updated to be > also installable and not only used as an intermediate tool. In that case > we have two packages providing the same program (rust and cargo-bin), > hence the idea of introducing the virtual package for Cargo. > > But it sure may be overkill and having just a sub-option might do the > trick. Would adding a sub-option to Rust which behaves as follows be > suitable? > > - if rust-bin is selected, then install Cargo from cargo-bin > - if rust is selected, build Cargo along with the compiler using > rust-bin and cargo-bin and install it. It would make most sense to me to drop either cargo or rust as a user-selectable option. Probably dropping cargo is the easiest. (Actually, I think the rust-bin tarball might already include cargo anyway, so we could remove host-cargo-bin and host-cargo entirely.) So, we would only have host-rustc as a user-selectable option, with the choice between host-rust-bin or host-rust. If we choose host-rust-bin, the host-rustc virtual package depends on host-rust-bin (which installs the stdlib for the target) and host-cargo-bin. If we choose host-rust, the host-rustc virtual package depends on host-rust (which builds rust and cargo for the host and the stdlib for the target) and host-rust depends on host-rust-bin and host-rust-cargo. That leaves us with two pieces of weirdness: - host-rustc depends on host-cargo-bin depending on the choice; - host-rust-bin installs stdlib depending on the choice. Neither of these is insurmountable, but the weirdness would be cleaned up if we didn't have the choice. Note that independent of this, I think there are currently already a number of issues with the rust integration. - rust-bin will install the target stdlib even if rust is selected, so rust will (probably?) overwrite it again. - The rust compiler itself and the host stdlib will for sure be overwritten by rust (but we do the same for gcc-initial, so OK). - BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS now depends on glibc, while I guess it should be possible to build the target stdlib for another libc. Regards, Arnout >>> Eric Le Bihan (6): >>> package/cargo: convert to virtual package >>> package/cargo-bin: declare as cargo provider >>> package/rust: declare as cargo provider >> >> You can't do this until the version has been bumped, because in the current >> version (AFAIU) rust doesn't have the cargo sources yet. >> >> In other words, it has to go in the same patch that bumps rust. > > Duly noted. > > Thanks for the review. > > Regards, > > -- > ELB > ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 2019-10-08 21:17 ` Arnout Vandecappelle @ 2019-10-27 22:19 ` Arnout Vandecappelle 2019-11-05 20:48 ` Eric Le Bihan 0 siblings, 1 reply; 14+ messages in thread From: Arnout Vandecappelle @ 2019-10-27 22:19 UTC (permalink / raw) To: buildroot On 08/10/2019 23:17, Arnout Vandecappelle wrote: > > > On 05/10/2019 18:06, Eric Le Bihan wrote: >> Hi! >> On 2019-09-29 21:22, Arnout Vandecappelle wrote: >>> >>> >>> On 29/09/2019 19:16, Eric Le Bihan wrote: >>>> Cargo source code is not provided anymore as a separate tarball but is now >>>> built along with the Rust compiler. >>>> >>>> This patch series converts cargo to a virtual package and declare cargo-bin >>>> and rust are providers. Versions for each package are also bumped to latest >>>> ones. >>> >>> Why do we need the virtual package? I would think that cargo just becomes a >>> sub-option of rust. Or, given how cargo and rust really go hand in hand, we >>> could just remove the cargo package entirely and always build cargo as part of >>> rust. For host packages, we don't care about size (too much), the only possible >>> issue is build time. But I expect building rust with cargo isn't going to be >>> that much longer. >> >> Rust needs a Rust compiler and Cargo to build. So there are some >> packages providing the pre-built binaries (rust-bin and cargo-bin). When >> Cargo was available as a standalone package, the user could choose to >> either: >> >> a) select rust-bin and build cargo (using cargo-bin). >> b) select to build rust and cargo, using rust-bin and cargo-bin. > > OK, I didn't realize that a) was a possibility. I thought we always built > rust+cargo based on rust-bin+cargo-bin. > > So, if I understand correctly, we have this choice between rust-bin or rust to > be able to save some build time (in case the standard library from rust-bin can > be used). > > If it simplifies our life, I think it's worth considering to drop this choice > and instead *always* build rust for the target if it's needed for the target, > and *always* use rust-bin/cargo-bin if it only needed for the host. But that is > kind of orthogonal to this version bump. > > >> Now that Cargo is provided and built along with the Rust compiler, >> option a) is not possible anymore, unless cargo-bin is updated to be >> also installable and not only used as an intermediate tool. In that case >> we have two packages providing the same program (rust and cargo-bin), >> hence the idea of introducing the virtual package for Cargo. >> >> But it sure may be overkill and having just a sub-option might do the >> trick. Would adding a sub-option to Rust which behaves as follows be >> suitable? >> >> - if rust-bin is selected, then install Cargo from cargo-bin >> - if rust is selected, build Cargo along with the compiler using >> rust-bin and cargo-bin and install it. > > It would make most sense to me to drop either cargo or rust as a > user-selectable option. We've discussed this at the BR developer day. The conclusion is: - no virtual package for cargo; - remove cargo entirely as a package; - rustc implies cargo: - if rust-bin is used as rustc provider, rustc depends on cargo-bin; - if rust is used as rustc provider, rust will provide cargo; - since cargo is implied by rustc, is can be removed from packages (i.e. ripgrep); - if indeed there is a tarball that contains the rust and the cargo binary, then cargo-bin can be removed as well. I've marked the series as changes requested so you can rework accordingly. Regards, Arnout > Probably dropping cargo is the easiest. (Actually, I > think the rust-bin tarball might already include cargo anyway, so we could > remove host-cargo-bin and host-cargo entirely.) So, we would only have > host-rustc as a user-selectable option, with the choice between host-rust-bin or > host-rust. If we choose host-rust-bin, the host-rustc virtual package depends on > host-rust-bin (which installs the stdlib for the target) and host-cargo-bin. If > we choose host-rust, the host-rustc virtual package depends on host-rust (which > builds rust and cargo for the host and the stdlib for the target) and host-rust > depends on host-rust-bin and host-rust-cargo. > > That leaves us with two pieces of weirdness: > - host-rustc depends on host-cargo-bin depending on the choice; > - host-rust-bin installs stdlib depending on the choice. > > Neither of these is insurmountable, but the weirdness would be cleaned up if we > didn't have the choice. > > > Note that independent of this, I think there are currently already a number of > issues with the rust integration. > > - rust-bin will install the target stdlib even if rust is selected, so rust will > (probably?) overwrite it again. > > - The rust compiler itself and the host stdlib will for sure be overwritten by > rust (but we do the same for gcc-initial, so OK). > > - BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS now depends on glibc, while I > guess it should be possible to build the target stdlib for another libc. > > > Regards, > Arnout > > >>>> Eric Le Bihan (6): >>>> package/cargo: convert to virtual package >>>> package/cargo-bin: declare as cargo provider >>>> package/rust: declare as cargo provider >>> >>> You can't do this until the version has been bumped, because in the current >>> version (AFAIU) rust doesn't have the cargo sources yet. >>> >>> In other words, it has to go in the same patch that bumps rust. >> >> Duly noted. >> >> Thanks for the review. >> >> Regards, >> >> -- >> ELB >> ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 2019-10-27 22:19 ` Arnout Vandecappelle @ 2019-11-05 20:48 ` Eric Le Bihan 0 siblings, 0 replies; 14+ messages in thread From: Eric Le Bihan @ 2019-11-05 20:48 UTC (permalink / raw) To: buildroot On 2019-10-27 23:19, Arnout Vandecappelle wrote: > > > On 08/10/2019 23:17, Arnout Vandecappelle wrote: > > > > > > On 05/10/2019 18:06, Eric Le Bihan wrote: > >> Hi! > >> On 2019-09-29 21:22, Arnout Vandecappelle wrote: > >>> > >>> > >>> On 29/09/2019 19:16, Eric Le Bihan wrote: > >>>> Cargo source code is not provided anymore as a separate tarball but is now > >>>> built along with the Rust compiler. > >>>> > >>>> This patch series converts cargo to a virtual package and declare cargo-bin > >>>> and rust are providers. Versions for each package are also bumped to latest > >>>> ones. > >>> > >>> Why do we need the virtual package? I would think that cargo just becomes a > >>> sub-option of rust. Or, given how cargo and rust really go hand in hand, we > >>> could just remove the cargo package entirely and always build cargo as part of > >>> rust. For host packages, we don't care about size (too much), the only possible > >>> issue is build time. But I expect building rust with cargo isn't going to be > >>> that much longer. > >> > >> Rust needs a Rust compiler and Cargo to build. So there are some > >> packages providing the pre-built binaries (rust-bin and cargo-bin). When > >> Cargo was available as a standalone package, the user could choose to > >> either: > >> > >> a) select rust-bin and build cargo (using cargo-bin). > >> b) select to build rust and cargo, using rust-bin and cargo-bin. > > > > OK, I didn't realize that a) was a possibility. I thought we always built > > rust+cargo based on rust-bin+cargo-bin. > > > > So, if I understand correctly, we have this choice between rust-bin or rust to > > be able to save some build time (in case the standard library from rust-bin can > > be used). > > > > If it simplifies our life, I think it's worth considering to drop this choice > > and instead *always* build rust for the target if it's needed for the target, > > and *always* use rust-bin/cargo-bin if it only needed for the host. But that is > > kind of orthogonal to this version bump. > > > > > >> Now that Cargo is provided and built along with the Rust compiler, > >> option a) is not possible anymore, unless cargo-bin is updated to be > >> also installable and not only used as an intermediate tool. In that case > >> we have two packages providing the same program (rust and cargo-bin), > >> hence the idea of introducing the virtual package for Cargo. > >> > >> But it sure may be overkill and having just a sub-option might do the > >> trick. Would adding a sub-option to Rust which behaves as follows be > >> suitable? > >> > >> - if rust-bin is selected, then install Cargo from cargo-bin > >> - if rust is selected, build Cargo along with the compiler using > >> rust-bin and cargo-bin and install it. > > > > It would make most sense to me to drop either cargo or rust as a > > user-selectable option. > > We've discussed this at the BR developer day. The conclusion is: > > - no virtual package for cargo; > - remove cargo entirely as a package; > - rustc implies cargo: > - if rust-bin is used as rustc provider, rustc depends on cargo-bin; > - if rust is used as rustc provider, rust will provide cargo; > - since cargo is implied by rustc, is can be removed from packages (i.e. ripgrep); > - if indeed there is a tarball that contains the rust and the cargo binary, then > cargo-bin can be removed as well. > > > I've marked the series as changes requested so you can rework accordingly. OK. So I'll send one series for these changes, then another for the version bump. Thanks for the review. Regards, -- ELB ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2019-11-05 20:48 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-09-29 17:16 [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 Eric Le Bihan 2019-09-29 17:16 ` [Buildroot] [PATCH 1/6] package/cargo: convert to virtual package Eric Le Bihan 2019-10-01 23:33 ` Sam Voss 2019-10-03 19:06 ` Sam Voss 2019-09-29 17:16 ` [Buildroot] [PATCH 2/6] package/cargo-bin: declare as cargo provider Eric Le Bihan 2019-09-29 17:16 ` [Buildroot] [PATCH 3/6] package/rust: " Eric Le Bihan 2019-09-29 17:16 ` [Buildroot] [PATCH 4/6] package/cargo-bin: bump version to 0.38.0 Eric Le Bihan 2019-09-29 17:16 ` [Buildroot] [PATCH 5/6] package/rust-bin: bump version to 1.38.0 Eric Le Bihan 2019-09-29 17:16 ` [Buildroot] [PATCH 6/6] package/rust: " Eric Le Bihan 2019-09-29 19:22 ` [Buildroot] [PATCH 0/6] Cargo virtual and Rust 1.38.0 Arnout Vandecappelle 2019-10-05 16:06 ` Eric Le Bihan 2019-10-08 21:17 ` Arnout Vandecappelle 2019-10-27 22:19 ` Arnout Vandecappelle 2019-11-05 20:48 ` Eric Le Bihan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox