Commit graph

9 commits

Author SHA1 Message Date
Sam Voss 025b863e6f rust: modify Rust packaging to be usable as host-tool only
This commit modifies the host-rust virtual package to default to
host-rust-bin when no other selection has been made, as long as the
host supports rust. This allows host only tools to still use rust when
the target architecture does not support it.

Add target-specific variable which is used to differentiate host and
target arch requirements (BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS).

A target package shall depend on this variable where a host package will
use the previously defined BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS. The new
"target" version is selectable for the same set of architectures as
before, but now depends on the host variant.

Signed-off-by: Sam Voss <sam.voss@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-12 23:44:57 +02:00
Eric Le Bihan a878cdcf02 rust-bin: bump version to 1.27.2
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-09 10:38:28 +02:00
Eric Le Bihan f9ad75b4c1 rust-bin: bump version to 1.27.1
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-07-18 11:44:01 +02:00
Eric Le Bihan 69e1e6ae84 rust-bin: bump version to 1.25.0
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-05-02 14:25:19 +02:00
Maxime Hadjinlian bec950dde8 rust-bin: use HOST_RUST_BIN_DL_DIR instead of RUST_BIN_DL_DIR
The infrastructure only provides HOST_RUST_BIN_DL_DIR, because this
package is host only. Ideally the infra should provide RUST_BIN_DL_DIR,
but it doesn't currently, and that requires more significant changes.

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-02 20:50:53 +02:00
Maxime Hadjinlian 514291f39e packages: use new $($PKG)_DL_DIR) variable
Instead of DL_DIR, the package should now use $(PKG)_DL_DIR to ease the
transition into a new directory structure for DL_DIR.

This commit has been generated with the following scripts:

for i in $(find . -iname "*.mk"); do
	if ! grep -q "\$(DL_DIR)" ${i}; then
		continue
	fi
	pkg_name="$(basename $(dirname ${i}))"
	[ "${pkg_name}" = "package" ] && continue
	raw_pkg_name=$(echo ${pkg_name} | tr [a-z] [A-Z] | tr '-' '_')
	pkg_dl_dir="${raw_pkg_name}_DL_DIR"
	sed -i "s/\$(DL_DIR)/\$($pkg_dl_dir)/" ${i}
done

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-04-02 15:53:53 +02:00
Eric Le Bihan f69c519267 rustc: use RUSTC_{HOST,TARGET}_NAME
utils/check-package complains as follows:

  package/rustc/rustc.mk:10: possible typo: RUST_TARGET_NAME -> *RUSTC*
  package/rustc/rustc.mk:18: possible typo: RUST_HOST_NAME -> *RUSTC*

As RUST_{HOST,TARGET}_NAME are related to the Rust compiler, it
sounds sensible to rename them to RUSTC_{HOST,TARGET}_NAME.

So update all rust related packages to use the new variables.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-02-13 23:09:47 +01:00
Thomas Petazzoni 9600ed45e2 rust-bin: fix indentation
This fixes the following check-package warning:

./package/rust-bin/rust-bin.mk:27: expected indent with tabs

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-02-08 23:28:52 +01:00
Eric Le Bihan 194bcaeae3 rust-bin: new package
This package provides a pre-built version of rustc, the compiler for the
Rust programming language, fetched from the upstream project.

A pre-built version of the standard library for the host as well as one
for the chosen target are also fetched and installed.

Only the host variant is provided to allow the user to cross-compile
Rust programs and run them on the target.

This package could also be used to provide a bootstrap compiler when building
Rust from source. So, in order to add it as a build dependency, the compiler and
standard libraries are only installed in $(HOST_DIR) if the package is
explicitly selected.

The menuconfig entry for rustc is also updated to expose this provider.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-02-05 14:57:47 +01:00