rust-bin: set soname of shared objects
Poky will fail to automatically create RDEPENDS on shared objects lacking a SONAME in the ELF.
This commit is contained in:
committed by
Steven Walter
parent
837000f68a
commit
06f6aeaa79
@@ -59,7 +59,16 @@ get_overlap_externs () {
|
|||||||
|
|
||||||
oe_compile_rust_lib () {
|
oe_compile_rust_lib () {
|
||||||
rm -rf ${LIBNAME}.{rlib,so}
|
rm -rf ${LIBNAME}.{rlib,so}
|
||||||
oe_runrustc $(get_overlap_externs) ${LIB_SRC} --crate-name=${CRATE_NAME} --crate-type=${CRATE_TYPE} "$@"
|
local -a link_args
|
||||||
|
if [ "${CRATE_TYPE}" == "dylib" ]; then
|
||||||
|
link_args[0]="-C"
|
||||||
|
link_args[1]="link-args=-Wl,-soname -Wl,${LIBNAME}.so"
|
||||||
|
fi
|
||||||
|
oe_runrustc $(get_overlap_externs) \
|
||||||
|
"${link_args[@]}" \
|
||||||
|
${LIB_SRC} \
|
||||||
|
--crate-name=${CRATE_NAME} --crate-type=${CRATE_TYPE} \
|
||||||
|
"$@"
|
||||||
}
|
}
|
||||||
oe_compile_rust_lib[vardeps] += "get_overlap_externs"
|
oe_compile_rust_lib[vardeps] += "get_overlap_externs"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user