meson_option_build_array() {
printf '['
- (if test "$targetos" == windows; then
+ (if test "$targetos" = windows; then
IFS=\;
else
IFS=:
fi
for e in $1; do
- e=${e/'\'/'\\'}
- e=${e/\"/'\"'}
- printf '"""%s""",' "$e"
+ printf '"""'
+ # backslash escape any '\' and '"' characters
+ printf "%s" "$e" | sed -e 's/\([\"]\)/\\\1/g'
+ printf '""",'
done)
printf ']\n'
}
if compile_prog "-Werror -fno-pie" "-no-pie"; then
CONFIGURE_CFLAGS="-fno-pie $CONFIGURE_CFLAGS"
CONFIGURE_LDFLAGS="-no-pie $CONFIGURE_LDFLAGS"
+ # Meson currently only handles pie as a boolean for now so if we have
+ # explicitly disabled PIE we need to extend our cflags because it wont.
+ QEMU_CFLAGS="-fno-pie -no-pie $QEMU_CFLAGS"
fi
elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then
CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS"
git_submodules="$git_submodules tests/fp/berkeley-softfloat-3"
fi
-feature_not_found() {
- feature=$1
- remedy=$2
-
- error_exit "User requested feature $feature" \
- "configure was not able to find it." \
- "$remedy"
-}
-
# ---
# big/little endian test
cat > $TMPC << EOF
;;
ucontext)
if test "$ucontext_works" != "yes"; then
- feature_not_found "ucontext"
+ error_exit "'ucontext' backend requested but makecontext not available"
fi
;;
sigaltstack)
;;
ppc64|ppc64le)
container_image=debian-powerpc-test-cross
- container_cross_prefix=powerpc${1#ppc}-linux-gnu-
+ container_cross_prefix=powerpc${target_arch#ppc}-linux-gnu-
container_cross_cc=${container_cross_prefix}gcc-10
;;
riscv64)
build_static=
target_cc=
target_ccas=
- target_cflags=
target_ar=
target_as=
target_ld=
QEMU_CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
fi
-case "$ARCH" in
-alpha)
- # Ensure there's only a single GP
- QEMU_CFLAGS="-msmall-data $QEMU_CFLAGS"
-;;
-esac
-
if test "$have_asan" = "yes"; then
QEMU_CFLAGS="-fsanitize=address $QEMU_CFLAGS"
QEMU_LDFLAGS="-fsanitize=address $QEMU_LDFLAGS"
# emulation. Linux and OpenBSD/amd64 use 'elf_i386'; FreeBSD uses the _fbsd
# variant; OpenBSD/i386 uses the _obsd variant; and Windows uses i386pe.
for emu in elf_i386 elf_i386_fbsd elf_i386_obsd i386pe; do
- if "$target_ld" -verbose 2>&1 | grep -q "^[[:space:]]*$emu[[:space:]]*$"; then
+ if "$target_ld" -verbose 2>&1 | grep -q "^[[:space:]]*${emu}[[:space:]]*$"; then
ld_i386_emulation="$emu"
break
fi
cxx=
fi
-if !(GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
+if ! (GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
exit 1
fi