rust: Install to $(STAGING_DIR)/host

This allows rustc/cargo/etc to be called without having to set PATH, as
$(STAGING_DIR)/host/bin is already in PATH.

This also fixes CARGO_HOME not being set during Host/Configure and
Host/Compile.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from commit 49aaf19c65)
This commit is contained in:
Jeffery To
2023-09-23 00:02:01 +08:00
parent b7a65dba31
commit c3247d59e8
5 changed files with 12 additions and 16 deletions

View File

@@ -78,8 +78,7 @@ HOST_PYTHON3_VARS = \
CFLAGS="$(HOST_CFLAGS)" \
CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON3_INC_DIR)" \
LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON3_VERSION) -Wl$(comma)-rpath$(comma)$(STAGING_DIR_HOSTPKG)/lib" \
CARGO_HOME="$(CARGO_HOME)" \
PATH="$(CARGO_HOME)/bin:$(PATH)"
CARGO_HOME="$(CARGO_HOME)"
# $(1) => directory of python script
# $(2) => python script and its arguments

View File

@@ -47,7 +47,6 @@ PYTHON3_VARS = \
_python_exec_prefix="/usr" \
CARGO_BUILD_TARGET="$(RUSTC_TARGET_ARCH)" \
CARGO_HOME="$(CARGO_HOME)" \
PATH="$(CARGO_HOME)/bin:$(PATH)" \
PYO3_CROSS_LIB_DIR="$(PYTHON3_LIB_DIR)" \
RUSTFLAGS="$(CARGO_RUSTFLAGS)"