]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
rust: Use patchelf in place of chrpath to edit rpaths
authorKhem Raj <raj.khem@gmail.com>
Mon, 19 May 2025 22:51:54 +0000 (15:51 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 22 May 2025 10:13:15 +0000 (11:13 +0100)
commit22b903f6620455e142e836412d3f7f6a4f03bea7
treef0c061b64481c63a3d801c3250a2935b0e29b977
parentbbd3e7886e2ec5ab3578d618b28d007a80d917aa
rust: Use patchelf in place of chrpath to edit rpaths

chrpath has limitations e.g. the original rpath in ELF have to bigger in size
than the one being edited into it by chrpath, some toolchains do not use RPATH
but emit the RUNPATHs into ELF files and chrpath is not able to handle the
runpaths, this is the case with mips and pp32 build of rust, especially
when using clang compiler to build them.

patchelf can do more:

Modify RUNPATH entries
Add RPATH/RUNPATH where none existed
Set longer paths than the original
Convert between RPATH and RUNPATH

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/rust/rust_1.85.1.bb