]> code.ossystems Code Review - openembedded-core.git/commitdiff
cargo: Apply uninative fix to snapshot as with rust
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 1 Sep 2021 10:37:38 +0000 (11:37 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Sep 2021 20:22:25 +0000 (21:22 +0100)
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 <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/cargo/cargo.inc

index 6161c327e8158561308358ba2f75d7b627d26139..1cf7dd6214648423dbbbf419642ffd3baacc91bb 100644 (file)
@@ -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