rust/rust-bin: move bits to rust-bin
Bits that are only used by the rust-bin bbclass should get moved there. They aren't used by any recipe that includes the rust bbclass.
This commit is contained in:
+1
-21
@@ -16,7 +16,7 @@ def rust_base_dep(d):
|
||||
deps += " rust-native"
|
||||
return deps
|
||||
|
||||
DEPENDS_append = " ${@rust_base_dep(d)} patchelf-native"
|
||||
DEPENDS_append = " ${@rust_base_dep(d)}"
|
||||
|
||||
# BUILD_LDFLAGS
|
||||
# ${STAGING_LIBDIR_NATIVE}
|
||||
@@ -31,11 +31,6 @@ DEPENDS_append = " ${@rust_base_dep(d)} patchelf-native"
|
||||
# -L${STAGING_BASE_LIBDIR_NATIVE} \
|
||||
#"
|
||||
|
||||
oe_runrustc () {
|
||||
bbnote ${RUSTC} ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
|
||||
"${RUSTC}" ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
|
||||
}
|
||||
|
||||
# XXX: for some reason bitbake sets BUILD_* & TARGET_* but uses the bare
|
||||
# variables for HOST. Alias things to make it easier for us.
|
||||
HOST_LDFLAGS ?= "${LDFLAGS}"
|
||||
@@ -45,21 +40,6 @@ HOST_CPPFLAGS ?= "${CPPFLAGS}"
|
||||
|
||||
EXTRA_OECONF_remove = "--disable-static"
|
||||
|
||||
do_rust_bin_fixups() {
|
||||
for f in `find ${PKGD} -name '*.so*'`; do
|
||||
echo "Strip rust note: $f"
|
||||
${OBJCOPY} -R .note.rustc $f $f
|
||||
done
|
||||
|
||||
for f in `find ${PKGD}`; do
|
||||
file "$f" | grep -q ELF || continue
|
||||
readelf -d "$f" | grep RUNPATH | grep -q rustlib || continue
|
||||
echo "Set rpath:" "$f"
|
||||
patchelf --set-rpath '$ORIGIN:'${rustlibdir}:${rustlib} "$f"
|
||||
done
|
||||
}
|
||||
PACKAGE_PREPROCESS_FUNCS += "do_rust_bin_fixups"
|
||||
|
||||
rustlib_suffix="${TUNE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/rustlib/${HOST_SYS}/lib"
|
||||
# Native sysroot standard library path
|
||||
rustlib_src="${prefix}/lib/${rustlib_suffix}"
|
||||
|
||||
Reference in New Issue
Block a user