diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc index 6045ab4d42..dc92cf5fd0 100644 --- a/meta/recipes-devtools/rust/rust.inc +++ b/meta/recipes-devtools/rust/rust.inc @@ -50,6 +50,14 @@ do_rust_setup_snapshot () { # and fail without it there. mkdir -p ${RUSTSRC}/build/${BUILD_SYS} ln -sf ${WORKDIR}/rust-snapshot/ ${RUSTSRC}/build/${BUILD_SYS}/stage0 + + # Need to use uninative's loader if enabled/present since the library paths + # are used internally by rust and result in symbol mismatches if we don't + if [ ! -z "${UNINATIVE_LOADER}" -a -e "${UNINATIVE_LOADER}" ]; then + for bin in cargo rustc rustdoc; do + patchelf-uninative ${WORKDIR}/rust-snapshot/bin/$bin --set-interpreter ${UNINATIVE_LOADER} + done + fi } addtask rust_setup_snapshot after do_unpack before do_configure do_rust_setup_snapshot[dirs] += "${WORKDIR}/rust-snapshot"