mirror of
https://github.com/thead-yocto-mirror/meta-external-toolchain
synced 2026-09-04 06:54:36 +02:00
Since the external-cross recipes link/wrap the binaries already, there's no actual need to override TARGET_PREFIX anymore. Signed-off-by: Christopher Larson <chris_larson@mentor.com>
40 lines
989 B
Plaintext
40 lines
989 B
Plaintext
inherit external-toolchain cross
|
|
|
|
EXTERNAL_CROSS_BINARIES ?= ""
|
|
EXTERNAL_CROSS_NOPSEUDO = "gcc g++ cpp"
|
|
|
|
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
|
|
continue
|
|
fi
|
|
|
|
disable=0
|
|
for nopseudo in ${EXTERNAL_CROSS_NOPSEUDO}; do
|
|
case "$bin" in
|
|
*$nopseudo)
|
|
disable=1
|
|
;;
|
|
esac
|
|
done
|
|
if [ $disable -eq 1 ]; then
|
|
wrap_bin "$bin" "export PSEUDO_UNLOAD=1"
|
|
else
|
|
wrap_bin "$bin"
|
|
fi
|
|
done
|
|
}
|