#
PROGNAME=$0
-REALNAME=$(readlink -f $0)
+REALNAME=$(readlink -f "$0")
-REALNAME_BASE=$(basename $REALNAME)
-REALNAME_DIR=$(dirname $REALNAME)
+REALNAME_BASE=$(basename "$REALNAME")
+REALNAME_DIR=$(dirname "$REALNAME")
TARGET_FUNDAMENTAL_ASFLAGS=''
TARGET_FUNDAMENTAL_CFLAGS=''
BINARY=${PROGNAME##*-}
# Parse our tool name, splitting it at '-' characters.
-IFS=- read -r TOOLCHAIN_ARCH TOOLCHAIN_BUILDROOT TOOLCHAIN_OS TOOLCHAIN_PLATFORM PROGNAME << EOF
+IFS=- read -r _ _ _ TOOLCHAIN_PLATFORM PROGNAME << EOF
$REALNAME_BASE
EOF
#
case $BINARY in
cc|gcc|g++|c++|cpp)
- exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin $GCC_SYSROOT_FLAGS $TARGET_FUNDAMENTAL_CFLAGS $TARGET_ROOTFS_CFLAGS "$@"
+ exec "$TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin" $GCC_SYSROOT_FLAGS $TARGET_FUNDAMENTAL_CFLAGS $TARGET_ROOTFS_CFLAGS "$@"
;;
ld)
- exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin $LD_SYSROOT_FLAGS $TARGET_FUNDAMENTAL_LDFLAGS "$@"
+ exec "$TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin" $LD_SYSROOT_FLAGS $TARGET_FUNDAMENTAL_LDFLAGS "$@"
;;
as)
- exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin $TARGET_FUNDAMENTAL_ASFLAGS "$@"
+ exec "$TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin" $TARGET_FUNDAMENTAL_ASFLAGS "$@"
;;
*)
- exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin "$@"
+ exec "$TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin" "$@"
;;
esac