summaryrefslogtreecommitdiffstats
path: root/package/rustc
Commit message (Collapse)AuthorAgeFilesLines
* rust: modify Rust packaging to be usable as host-tool onlySam Voss2018-09-122-4/+14
| | | | | | | | | | | | | | | | | | | | | 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>
* rustc: drop BR2_PACKAGE_HAS_HOST_RUSTCThomas Petazzoni2018-06-101-5/+0
| | | | | | | | This commit drops the option BR2_PACKAGE_HAS_HOST_RUSTC, which is no longer used following commit bd425f716f0a92ef627f7287869d88ca408fe55e ("host-cargo: select host-rustc"). Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* rustc: enable on powerpc64le architectureSam Bobroff2018-05-191-1/+1
| | | | | | | | | Rust supports powerpc64le to the same level as powerpc64, so allow it. Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com> Tested-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> Acked-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* rustc: disable for ARMV7A with EABIEric Le Bihan2018-02-261-1/+2
| | | | | | | | | | | | | | The Rust project does not support armv7a EABI, only EABIHF [1]. So disable rustc for this ARM variant. Fixes: - http://autobuild.buildroot.net/results/51c98ca5486e7e83725ababa437cbb8204ceb66b/ [1] https://forge.rust-lang.org/platform-support.html Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* rustc: fix check-package warningsEric Le Bihan2018-02-131-2/+1
| | | | | | | | | | | | utils/check-package complains as follows: package/rustc/Config.in.host:6: attributes order: type, default, depends on, select, help (http://nightly.buildroot.org/#_config_files) package/rustc/Config.in.host:79: empty line at end of file This patch fixes these warnings. Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* rustc: use RUSTC_{HOST,TARGET}_NAMEEric Le Bihan2018-02-131-2/+2
| | | | | | | | | | | | | | | 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>
* rust: new packageEric Le Bihan2018-02-051-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new package provides rustc, the compiler for the Rust programming language, built from source. Currently, only the host variant is built. The Rust compiler uses LLVM as its backend: a copy of LLVM source code is provided and CMake is used to build it. It is possible to use a pre-built external copy. When LLVM/clang will be available in Buildroot, it would be possible to benefit from this feature and thus decrease build time. LLVM is configured to generate code for x86, ARM, PowerPC and MIPS architectures. The Rust compiler uses Cargo as its build system and is written in Rust. Therefore this package depends on cargo-bin and rust-bin. The internal build process is as follows: 1. stage0 compiler, provided by rust-bin, is used to build stage1 compiler. 2. stage1 compiler builds the final Rust compiler (stage2 compiler) and the standard library for the host architecture. 3. the standard library for the target architecture is built. The target architecture to support is given by the GNU/LLVM target triple. Rust supports some predefined targets [1]. As the build system expects the triple to be in the form of <arch>-unknown-<system> and Buildroot toolchain wrapper uses <arch>-buildroot-<system>, the package Makefile uses $(RUST_TARGET_NAME) defined in the rustc package and uses it instead of $(GNU_TARGET_NAME). When compiling Rust code with this compiler, the generated program only depends on the target C library, as it is statically linked to the Rust standard library and any other code from Rust packages (a.k.a. "crates"). If the jemalloc package is selected, support for this memory allocator will be enabled in the target standard library. The menuconfig entry for rustc is also updated to expose this provider. [1] https://forge.rust-lang.org/platform-support.html Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* rust-bin: new packageEric Le Bihan2018-02-051-0/+29
| | | | | | | | | | | | | | | | | | | | | 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>
* rustc: new virtual packageEric Le Bihan2018-02-052-0/+51
The compiler for the Rust programming language is called rustc. There is only one reference implementation for it, based on LLVM, from the Rust project [1]. It can generate code for various architectures so it can be labeled as a cross-compiler. But, as for GCC, building it from source takes time. So it would be sensible to have at least one package which provides it as a pre-built version, fetched from the upstream project. Later another package can be added, to build it from source code. In addition to the compiler, the standard library for the host and/or the target should also be fetched/built. So, add a virtual package named rustc to enable support for multiple providers. Currently, only the host variant will be available to allow the user to cross-compile Rust programs for the target. [1] http://rust-lang.org Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
OpenPOWER on IntegriCloud