ron minnich has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/74124 )
Change subject: Add support for rust ......................................................................
Add support for rust
This is what is done on oreboot. It is not clear that the four commands in the rule are strictly necessary.
Change-Id: Ibff3ca83b3dfebcc18006cddf0f649bcfb076500 Signed-off-by: Ronald G. Minnich rminnich@gmail.com --- M util/crossgcc/Makefile 1 file changed, 29 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/74124/1
diff --git a/util/crossgcc/Makefile b/util/crossgcc/Makefile index 06ec91c..c5cf19b 100644 --- a/util/crossgcc/Makefile +++ b/util/crossgcc/Makefile @@ -11,7 +11,7 @@ all: $(MAKE) build-i386 build-x64 build-arm \ build-riscv build-aarch64 build-ppc64 build-nds32le \ - build_clang build_iasl build_nasm + build_clang build_iasl build_nasm build_rust
########################################################### ### targets to do buildgcc builds @@ -31,6 +31,20 @@ build_nasm: bash ./buildgcc -P nasm $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS) -d $(DEST)
+# Rust is a bit different, because one compiler works for all targets. +BINUTILS_VER := 0.3.4 +STACK_SIZES_VER := 0.4.0 +TARPAULIN_VER := 0.19.1 +DPRINT_VER := 0.32.2 + +CARGOINST := rustup run --install 1.67 cargo install + +build_rust: + $(CARGOINST) $(if $(BINUTILS_VER),--version $(BINUTILS_VER),) cargo-binutils + $(CARGOINST) $(if $(STACK_SIZES_VER),--version $(STACK_SIZES_VER),) stack-sizes + $(CARGOINST) $(if $(TARPAULIN_VER),--version $(TARPAULIN_VER),) cargo-tarpaulin + $(CARGOINST) $(if $(DPRINT_VER),--version $(DPRINT_VER),) dprint + ########################################################### build-i386: @$(MAKE) build_gcc build_nasm BUILD_PLATFORM=i386-elf