From: Richard Purdie Date: Wed, 1 Sep 2021 10:37:38 +0000 (+0100) Subject: cargo: Apply uninative fix to snapshot as with rust X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~6858 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3cb3958cc14672feef5d4d8953131f55db68573;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git cargo: Apply uninative fix to snapshot as with rust Also add the interpreter relocation trick from uninative to the prebuilt cargo binary to match rust-native, just in case that causes other problems later too. Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/cargo/cargo.inc b/meta/recipes-devtools/cargo/cargo.inc index 6161c327e81..1cf7dd62146 100644 --- a/meta/recipes-devtools/cargo/cargo.inc +++ b/meta/recipes-devtools/cargo/cargo.inc @@ -20,6 +20,11 @@ inherit cargo do_cargo_setup_snapshot () { ${WORKDIR}/rust-snapshot-components/${CARGO_SNAPSHOT}/install.sh --prefix="${WORKDIR}/${CARGO_SNAPSHOT}" --disable-ldconfig + # 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 + patchelf-uninative ${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo --set-interpreter ${UNINATIVE_LOADER} + fi } addtask cargo_setup_snapshot after do_unpack before do_configure