mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
rust-cross-canadian: rename shell variables for easier appends
Make unique shell variable names for cargo and rust setup scripts. This change will make it easier to append to the scripts in a bbappend file by using the variable for the script. Before this change it was only possible for the last script as they shared the same variable name. (From OE-Core rev: 74307f57ad0b3c538be0add11028e4e6199a7662) Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
fa1246b099
commit
0823b7bc49
@@ -37,17 +37,17 @@ do_install () {
|
||||
|
||||
ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d
|
||||
mkdir "${ENV_SETUP_DIR}"
|
||||
ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh"
|
||||
RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh"
|
||||
|
||||
cat <<- EOF > "${ENV_SETUP_SH}"
|
||||
cat <<- EOF > "${RUST_ENV_SETUP_SH}"
|
||||
export RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
|
||||
export RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib"
|
||||
EOF
|
||||
|
||||
chown -R root.root ${D}
|
||||
|
||||
ENV_SETUP_SH="${ENV_SETUP_DIR}/cargo.sh"
|
||||
cat <<- EOF > "${ENV_SETUP_SH}"
|
||||
CARGO_ENV_SETUP_SH="${ENV_SETUP_DIR}/cargo.sh"
|
||||
cat <<- EOF > "${CARGO_ENV_SETUP_SH}"
|
||||
export CARGO_HOME="\$OECORE_TARGET_SYSROOT/home/cargo"
|
||||
mkdir -p "\$CARGO_HOME"
|
||||
# Init the default target once, it might be otherwise user modified.
|
||||
|
||||
Reference in New Issue
Block a user