optee_rust_examples_ext: Fix Rust toolchain conflicts
Buildroot provides its own Rust toolchain for various Linux user-space
components. However, that toolchain doesn't support nightly version of
Rust complier which we need for OP-TEE Rust examples for the time being.
Due to two separate Rust toolchains being used for different buildroot
components, there are conflicts [1] [2] observed leading to CI errors.
In order to fix them enable OP-TEE specific Rust toolchain specifically
to build OP-TEE Rust examples rather than enabling it for the entire
buildroot build.
Fixes: [1] https://github.com/OP-TEE/build/issues/727
Fixes: [2] https://github.com/OP-TEE/build/issues/728
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
diff --git a/common.mk b/common.mk
index e3b0bb3..1635b6c 100644
--- a/common.mk
+++ b/common.mk
@@ -289,6 +289,7 @@
BR2_PACKAGE_OPTEE_RUST_EXAMPLES_EXT_TARGET_TA ?= "$(AARCH$(COMPILE_S_USER)_RUST_TARGET)"
BR2_PACKAGE_OPTEE_RUST_EXAMPLES_EXT_SDK ?= $(OPTEE_OS_TA_DEV_KIT_DIR)
BR2_PACKAGE_OPTEE_RUST_EXAMPLES_EXT_SITE ?= $(OPTEE_RUST_PATH)
+BR2_PACKAGE_OPTEE_RUST_EXAMPLES_EXT_TC_PATH ?= $(RUST_TOOLCHAIN_PATH)
endif
endif
# The OPTEE_OS package builds nothing, it just installs files into the
@@ -349,7 +350,7 @@
$(DEFCONFIG_FTPM) \
--br-defconfig out-br/extra.conf \
--make-cmd $(MAKE))
- @source $(RUST_TOOLCHAIN_PATH)/.cargo/env && $(MAKE) $(br-make-flags) -C ../out-br all
+ @$(MAKE) $(br-make-flags) -C ../out-br all
.PHONY: buildroot-clean
buildroot-clean: