mirror of
https://github.com/thead-yocto-mirror/meta-external-toolchain
synced 2026-06-21 08:52:27 +02:00
29 lines
748 B
Plaintext
29 lines
748 B
Plaintext
inherit external-toolchain cross
|
|
|
|
EXTERNAL_CROSS_BINARIES ?= ""
|
|
|
|
wrap_bin () {
|
|
bin="$1"
|
|
shift
|
|
script="${D}${bindir}/${TARGET_PREFIX}$bin"
|
|
printf '#!/bin/sh\n' >$script
|
|
for arg in "$@"; do
|
|
printf '%s\n' "$arg"
|
|
done >>"$script"
|
|
printf 'exec ${EXTERNAL_TOOLCHAIN_BIN}/${EXTERNAL_TARGET_SYS}-%s "$@"\n' "$bin" >>"$script"
|
|
chmod +x "$script"
|
|
}
|
|
|
|
do_install () {
|
|
install -d ${D}${bindir}
|
|
for bin in ${EXTERNAL_CROSS_BINARIES}; do
|
|
if [ ! -e "${EXTERNAL_TOOLCHAIN_BIN}/${EXTERNAL_TARGET_SYS}-$bin" ]; then
|
|
bbdebug 1 "${EXTERNAL_TOOLCHAIN_BIN}/${EXTERNAL_TARGET_SYS}-$bin does not exist"
|
|
continue
|
|
fi
|
|
|
|
bbdebug 1 wrap_bin "$bin"
|
|
wrap_bin "$bin"
|
|
done
|
|
}
|