EOF
cd build
- exec $source_path/configure "$@"
+ exec "$source_path/configure" "$@"
fi
# Temporary directory used for files created while
printf ']\n'
}
-. $source_path/scripts/meson-buildoptions.sh
+. "$source_path/scripts/meson-buildoptions.sh"
meson_options=
meson_option_add() {
case "$opt" in
--help|-h) show_help=yes
;;
- --version|-V) exec cat $source_path/VERSION
+ --version|-V) exec cat "$source_path/VERSION"
;;
--prefix=*) prefix="$optarg"
;;
mak_wilds=""
if [ "$linux_user" != no ]; then
- if [ "$targetos" = linux ] && [ -d $source_path/linux-user/include/host/$cpu ]; then
+ if [ "$targetos" = linux ] && [ -d "$source_path/linux-user/include/host/$cpu" ]; then
linux_user=yes
elif [ "$linux_user" = yes ]; then
error_exit "linux-user not supported on this architecture"
if [ "$bsd_user" = "" ]; then
test $targetos = freebsd && bsd_user=yes
fi
- if [ "$bsd_user" = yes ] && ! [ -d $source_path/bsd-user/$targetos ]; then
+ if [ "$bsd_user" = yes ] && ! [ -d "$source_path/bsd-user/$targetos" ]; then
error_exit "bsd-user not supported on this host OS"
fi
fi
if test -z "$meson"; then
if test "$explicit_python" = no && has meson && version_ge "$(meson --version)" 0.59.3; then
meson=meson
- elif test $git_submodules_action != 'ignore' ; then
+ elif test "$git_submodules_action" != 'ignore' ; then
meson=git
elif test -e "${source_path}/meson/meson.py" ; then
meson=internal
container="no"
if test $use_containers = "yes"; then
if has "docker" || has "podman"; then
- container=$($python $source_path/tests/docker/docker.py probe)
+ container=$($python "$source_path"/tests/docker/docker.py probe)
fi
fi
QEMU_GA_DISTRO=Linux
fi
if test "$QEMU_GA_VERSION" = ""; then
- QEMU_GA_VERSION=$(cat $source_path/VERSION)
+ QEMU_GA_VERSION=$(cat "$source_path"/VERSION)
fi
for target in $target_list; do
target_dir="$target"
target_name=$(echo $target | cut -d '-' -f 1)$EXESUF
- mkdir -p $target_dir
+ mkdir -p "$target_dir"
case $target in
*-user) symlink "../qemu-$target_name" "$target_dir/qemu-$target_name" ;;
*) symlink "../qemu-system-$target_name" "$target_dir/qemu-system-$target_name" ;;
config_target_mak=tests/tcg/config-$target.mak
echo "# Automatically generated by configure - do not modify" > $config_target_mak
- echo "TARGET_NAME=$arch" >> $config_target_mak
+ echo "TARGET_NAME=$arch" >> "$config_target_mak"
case $target in
xtensa*-linux-user)
# the toolchain is not complete with headers, only build softmmu tests
continue
;;
*-softmmu)
- test -f $source_path/tests/tcg/$arch/Makefile.softmmu-target || continue
+ test -f "$source_path/tests/tcg/$arch/Makefile.softmmu-target" || continue
qemu="qemu-system-$arch"
;;
*-linux-user|*-bsd-user)
# compilers is a requirememt for adding a new test that needs a
# compiler feature.
- echo "BUILD_STATIC=$build_static" >> $config_target_mak
- write_target_makefile >> $config_target_mak
+ echo "BUILD_STATIC=$build_static" >> "$config_target_mak"
+ write_target_makefile >> "$config_target_mak"
case $target in
aarch64-*)
if do_compiler "$target_cc" $target_cflags \
-march=armv8.1-a+sve -o $TMPE $TMPC; then
- echo "CROSS_CC_HAS_SVE=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_SVE=y" >> "$config_target_mak"
fi
if do_compiler "$target_cc" $target_cflags \
-march=armv8.1-a+sve2 -o $TMPE $TMPC; then
- echo "CROSS_CC_HAS_SVE2=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_SVE2=y" >> "$config_target_mak"
fi
if do_compiler "$target_cc" $target_cflags \
-march=armv8.3-a -o $TMPE $TMPC; then
- echo "CROSS_CC_HAS_ARMV8_3=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_ARMV8_3=y" >> "$config_target_mak"
fi
if do_compiler "$target_cc" $target_cflags \
-mbranch-protection=standard -o $TMPE $TMPC; then
- echo "CROSS_CC_HAS_ARMV8_BTI=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_ARMV8_BTI=y" >> "$config_target_mak"
fi
if do_compiler "$target_cc" $target_cflags \
-march=armv8.5-a+memtag -o $TMPE $TMPC; then
- echo "CROSS_CC_HAS_ARMV8_MTE=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_ARMV8_MTE=y" >> "$config_target_mak"
fi
;;
ppc*)
if do_compiler "$target_cc" $target_cflags \
-mpower8-vector -o $TMPE $TMPC; then
- echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> "$config_target_mak"
fi
if do_compiler "$target_cc" $target_cflags \
-mpower10 -o $TMPE $TMPC; then
- echo "CROSS_CC_HAS_POWER10=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_POWER10=y" >> "$config_target_mak"
fi
;;
i386-linux-user)
if do_compiler "$target_cc" $target_cflags \
-Werror -fno-pie -o $TMPE $TMPC; then
- echo "CROSS_CC_HAS_I386_NOPIE=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_I386_NOPIE=y" >> "$config_target_mak"
fi
;;
esac
elif test -n "$container_image"; then
echo "build-tcg-tests-$target: docker-image-$container_image" >> $makefile
- echo "BUILD_STATIC=y" >> $config_target_mak
- write_container_target_makefile >> $config_target_mak
+ echo "BUILD_STATIC=y" >> "$config_target_mak"
+ write_container_target_makefile >> "$config_target_mak"
case $target in
aarch64-*)
- echo "CROSS_CC_HAS_SVE=y" >> $config_target_mak
- echo "CROSS_CC_HAS_SVE2=y" >> $config_target_mak
- echo "CROSS_CC_HAS_ARMV8_3=y" >> $config_target_mak
- echo "CROSS_CC_HAS_ARMV8_BTI=y" >> $config_target_mak
- echo "CROSS_CC_HAS_ARMV8_MTE=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_SVE=y" >> "$config_target_mak"
+ echo "CROSS_CC_HAS_SVE2=y" >> "$config_target_mak"
+ echo "CROSS_CC_HAS_ARMV8_3=y" >> "$config_target_mak"
+ echo "CROSS_CC_HAS_ARMV8_BTI=y" >> "$config_target_mak"
+ echo "CROSS_CC_HAS_ARMV8_MTE=y" >> "$config_target_mak"
;;
ppc*)
- echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak
- echo "CROSS_CC_HAS_POWER10=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> "$config_target_mak"
+ echo "CROSS_CC_HAS_POWER10=y" >> "$config_target_mak"
;;
i386-linux-user)
- echo "CROSS_CC_HAS_I386_NOPIE=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_I386_NOPIE=y" >> "$config_target_mak"
;;
esac
got_cross_cc=yes
fi
if test $got_cross_cc = yes; then
mkdir -p tests/tcg/$target
- echo "QEMU=$PWD/$qemu" >> $config_target_mak
+ echo "QEMU=$PWD/$qemu" >> "$config_target_mak"
echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> $makefile
tcg_tests_targets="$tcg_tests_targets $target"
fi