Lines Matching +full:qemu +full:- +full:system +full:- +full:x86_64

3 # qemu configure script (c) 2003 Fabrice Bellard
14 source_path=$(cd "$(dirname -- "$0")"; pwd)
16 if test "$PWD" -ef "$source_path"
20 MARKER=build/auto-created-by-configure
22 if test -e build
24 if test -f $MARKER
26 rm -rf build
36 echo "your source directory, or try doing an out-of-tree build."
41 # This file is auto-generated by configure to support in-source tree
46 @$(MAKE) -C build -f Makefile $(MAKECMDGOALS)
48 test -e build/auto-created-by-configure ; \
50 rm -rf build GNUmakefile ; \
67 TMPDIR1="config-temp"
68 rm -rf "${TMPDIR1}"
69 if ! mkdir -p "${TMPDIR1}"; then
74 TMPB="qemu-conf"
79 rm -f config.log
82 echo "# QEMU configure log $(date)" >> config.log
86 test -n "$GITLAB_CI" && echo "configuring with: $invoke"
96 while test -n "$2"; do
109 if test -n "$BASH_VERSION"; then eval '
124 do_cc $CFLAGS $EXTRA_CFLAGS $local_cflags -c -o $TMPO $TMPC
130 do_cc $CFLAGS $EXTRA_CFLAGS $local_cflags -o $TMPE $TMPC \
134 # symbolically link $1 to $2. Portable version of "ln -sf".
136 rm -rf "$2"
137 mkdir -p "$(dirname "$2")"
138 ln -s "$1" "$2"
148 local_ver1=$(expr "$1" : '\([0-9.]*\)' | tr . ' ')
152 local_first=${2-0}
159 test $local_first -lt $2 && return 1
160 test $local_first -gt $2 && return 0
166 if printf %s\\n "$source_path" "$PWD" | grep -q "[[:space:]:]";
186 # * foo="no" feature will only be used if --enable-foo arg is given
188 # unless --disable-foo is given
189 # * foo="yes" this value will only be set by --enable-foo flag.
193 # Always add --enable-foo and --disable-foo command line args.
195 # is impossible without a --enable-foo that exits if a feature is not found.
201 --cross-prefix=*) cross_prefix="$optarg"
204 --cc=*) CC="$optarg"
206 --cxx=*) CXX="$optarg"
208 --objcc=*) objcc="$optarg"
210 --rustc=*) RUSTC="$optarg"
212 --rustdoc=*) RUSTDOC="$optarg"
214 --cpu=*) cpu="$optarg"
216 --extra-cflags=*)
221 --extra-cxxflags=*) EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $optarg"
223 --extra-objcflags=*) EXTRA_OBJCFLAGS="$EXTRA_OBJCFLAGS $optarg"
225 --extra-ldflags=*) EXTRA_LDFLAGS="$EXTRA_LDFLAGS $optarg"
227 --cross-cc-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --cross-cc-FOO option"
229 --cross-cc-cflags-*) cc_arch=${opt#--cross-cc-cflags-}; cc_arch=${cc_arch%%=*}
232 --cross-cc-*) cc_arch=${opt#--cross-cc-}; cc_arch=${cc_arch%%=*}
235 --cross-prefix-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --cross-prefix-FOO option"
237 --cross-prefix-*) cc_arch=${opt#--cross-prefix-}; cc_arch=${cc_arch%%=*}
240 --without-default-features) default_feature="no"
245 default_cflags='-O2 -g'
249 system="yes"
261 gdb_bin=$(command -v "gdb-multiarch" || command -v "gdb")
275 # and we also need to check for -static-pie before Meson runs
276 # which requires knowing whether --static is enabled.
282 # ${cross_prefix}gcc (if cross-prefix specified)
283 # system compiler
284 if test -z "${CC}${cross_prefix}"; then
287 cc="${CC-${cross_prefix}gcc}"
290 if test -z "${CXX}${cross_prefix}"; then
293 cxx="${CXX-${cross_prefix}g++}"
297 # $objcc (if set, i.e. via --objcc option)
298 # ${cross_prefix}clang (if cross-prefix specified)
301 if test -z "${objcc}${cross_prefix}"; then
308 objcc="${objcc-${cross_prefix}clang}"
311 ar="${AR-${cross_prefix}ar}"
312 as="${AS-${cross_prefix}as}"
313 ccas="${CCAS-$cc}"
314 dlltool="${DLLTOOL-${cross_prefix}dlltool}"
315 objcopy="${OBJCOPY-${cross_prefix}objcopy}"
316 ld="${LD-${cross_prefix}ld}"
317 ranlib="${RANLIB-${cross_prefix}ranlib}"
318 nm="${NM-${cross_prefix}nm}"
319 readelf="${READELF-${cross_prefix}readelf}"
320 strip="${STRIP-${cross_prefix}strip}"
321 widl="${WIDL-${cross_prefix}widl}"
322 windres="${WINDRES-${cross_prefix}windres}"
323 windmc="${WINDMC-${cross_prefix}windmc}"
324 pkg_config="${PKG_CONFIG-${cross_prefix}pkg-config}"
325 sdl2_config="${SDL2_CONFIG-${cross_prefix}sdl2-config}"
327 rustc="${RUSTC-rustc}"
328 rustdoc="${RUSTDOC-rustdoc}"
372 # might be going to just print the --help text, or it might
377 if test ! -z "$cpu" ; then
386 cpu="x86_64"
431 cpu=$(uname -m)
433 echo "WARNING: unrecognized host CPU, proceeding with 'uname -m' output '$cpu'"
440 # 'uname -m' case, but better safe than sorry in case --cpu= is used.
462 CPU_CFLAGS="-m32"
485 CPU_CFLAGS="-m32"
490 CPU_CFLAGS="-m64 -mbig-endian"
496 CPU_CFLAGS="-m64 -mlittle-endian"
506 CPU_CFLAGS="-m31"
511 CPU_CFLAGS="-m64"
516 CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc"
520 CPU_CFLAGS="-m64 -mcpu=ultrasparc"
524 cpu="x86_64"
525 host_arch=x86_64
527 CPU_CFLAGS="-mx32"
529 x86_64|amd64)
530 cpu="x86_64"
531 host_arch=x86_64
533 CPU_CFLAGS="-m64"
536 CPU_CFLAGS="-m32"
540 if test -n "$host_arch" && {
541 ! test -d "$source_path/linux-user/include/host/$host_arch" ||
542 ! test -d "$source_path/common-user/host/$host_arch"; }; then
543 error_exit "linux-user/include/host/$host_arch does not exist." \
546 if test -n "$linux_arch" && ! test -d "$source_path/linux-headers/asm-$linux_arch"; then
547 error_exit "linux-headers/asm-$linux_arch does not exist." \
553 # NB: a True python conditional creates a non-zero return code (Failure)
554 "$1" -c 'import sys; sys.exit(sys.version_info < (3,9))'
558 if test -z "${PYTHON}"; then
564 python=$(command -v "$binary")
577 python=$(command -v "$PYTHON")
592 genisoimage=$(command -v "$binary")
611 printf "%s" "$e" | sed -e 's/\([\"]\)/\\\1/g'
617 . "$source_path/scripts/meson-buildoptions.sh"
628 if test $? -eq 1; then
630 echo "Try '$0 --help' for more information"
640 meson_option_add --cross-file "$1"
642 meson_option_add --native-file "$1"
649 --help|-h) show_help=yes
651 --version|-V) exec cat "$source_path/VERSION"
653 --cross-prefix=*)
655 --cc=*)
657 --host-cc=*) host_cc="$optarg"
659 --cxx=*)
661 --objcc=*)
663 --rustc=*)
665 --rustdoc=*)
667 --make=*)
669 --install=*)
671 --python=*) python="$optarg"
673 --skip-meson) skip_meson=yes
675 --ninja=*) ninja="$optarg"
677 --extra-cflags=*)
679 --extra-cxxflags=*)
681 --extra-objcflags=*)
683 --extra-ldflags=*)
685 --cross-cc-*)
687 --cross-prefix-*)
689 --enable-docs) docs=enabled
691 --disable-docs) docs=disabled
693 --cpu=*)
695 --target-list=*) target_list="$optarg"
697 error_exit "Can't mix --target-list with --target-list-exclude"
700 --target-list-exclude=*) target_list_exclude="$optarg"
702 error_exit "Can't mix --target-list-exclude with --target-list"
705 --with-default-devices) meson_option_add -Ddefault_devices=true
707 --without-default-devices) meson_option_add -Ddefault_devices=false
709 --with-devices-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --with-devices-FOO option"
711 --with-devices-*) device_arch=${opt#--with-devices-};
713 cf=$source_path/configs/devices/$device_arch-softmmu/$optarg.mak
714 if test -f "$cf"; then
721 --without-default-features) # processed above
723 --static) static="yes"
725 --host=*|--build=*|\
726 --disable-dependency-tracking|\
727 --sbindir=*|--sharedstatedir=*|\
728 --oldincludedir=*|--datarootdir=*|--infodir=*|\
729 --htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
731 # autoconf-generated configure scripts. This allows QEMU's
735 --enable-debug)
737 meson_option_parse --enable-debug-tcg ""
738 meson_option_parse --enable-debug-graph-lock ""
739 meson_option_parse --enable-debug-mutex ""
740 meson_option_add -Doptimization=0
741 default_cflags='-O0 -g'
743 --disable-tcg) tcg="disabled"
745 --enable-tcg) tcg="enabled"
747 --disable-system) system="no"
749 --enable-system) system="yes"
751 --disable-user)
755 --enable-user) ;;
756 --disable-linux-user) linux_user="no"
758 --enable-linux-user) linux_user="yes"
760 --disable-bsd-user) bsd_user="no"
762 --enable-bsd-user) bsd_user="yes"
764 --enable-pie) pie="yes"
766 --disable-pie) pie="no"
768 --enable-cfi) cfi=true
770 --disable-cfi) cfi=false
772 --disable-download) download="disabled"; git_submodules_action=validate;
774 --enable-download) download="enabled"; git_submodules_action=update;
776 --enable-plugins) plugins="yes"
778 --disable-plugins) plugins="no"
780 --enable-containers) use_containers="yes"
782 --disable-containers) use_containers="no"
784 --container-engine=*) container_engine="$optarg"
786 --rust-target-triple=*) rust_target_triple="$optarg"
788 --gdb=*) gdb_bin="$optarg"
790 --enable-rust) rust=enabled
792 --disable-rust) rust=disabled
795 --*) meson_option_parse "$opt" "$optarg"
797 # Pass through -Dxxxx options to meson
798 -D*) meson_option_add "$opt"
803 if ! test -e "$source_path/.git"
808 if ! test -f "$source_path/subprojects/keycodemapdb/README" \
814 if test -e "$source_path/.git"; then
815 echo "--disable-download specified but subprojects were not"
817 echo "before configuring QEMU, or remove --disable-download"
822 echo "to acquire QEMU source archives. Non-GIT builds are only"
825 echo " https://www.qemu.org/download/#source"
827 echo "Developers working with GIT can use scripts/archive-source.sh"
837 if [ -n "$host_arch" ] && [ -d "$source_path/common-user/host/$host_arch" ]; then
842 error_exit "linux-user not supported on this architecture"
845 mak_wilds="${mak_wilds} $source_path/configs/targets/*-linux-user.mak"
852 if [ "$bsd_user" = yes ] && ! [ -d "$source_path/bsd-user/$host_os" ]; then
853 error_exit "bsd-user not supported on this host OS"
856 mak_wilds="${mak_wilds} $source_path/configs/targets/*-bsd-user.mak"
864 if [ "$system" = "yes" ]; then
865 mak_wilds="${mak_wilds} $source_path/configs/targets/*-softmmu.mak"
870 if echo "$target_list_exclude" | grep -vq "$target"; then
882 --help print this message
883 --target-list=LIST set target list (default: build all)
885 fold -s -w 53 | sed -e 's/^/ /')
886 --target-list-exclude=LIST exclude a set of targets from the default target-list
889 -Dmesonoptname=val passthrough option to meson unmodified
890 --cross-prefix=PREFIX use PREFIX for compile tools, PREFIX can be blank [$cross_prefix]
891 --cc=CC use C compiler CC [$cc]
892 --host-cc=CC when cross compiling, use C compiler CC for code run
894 --cxx=CXX use C++ compiler CXX [$cxx]
895 --objcc=OBJCC use Objective-C compiler OBJCC [$objcc]
896 --rustc=RUSTC use Rust compiler RUSTC [$rustc]
897 --rustdoc=RUSTDOC use rustdoc binary RUSTDOC [$rustdoc]
898 --extra-cflags=CFLAGS append extra C compiler flags CFLAGS
899 --extra-cxxflags=CXXFLAGS append extra C++ compiler flags CXXFLAGS
900 --extra-objcflags=OBJCFLAGS append extra Objective C compiler flags OBJCFLAGS
901 --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS
902 --cross-cc-ARCH=CC use compiler when building ARCH guest test cases
903 --cross-cc-cflags-ARCH= use compiler flags when building ARCH guest tests
904 --cross-prefix-ARCH=PREFIX cross compiler prefix when building ARCH guest test cases
905 --python=PYTHON use specified python [$python]
906 --ninja=NINJA use specified ninja [$ninja]
907 --static enable static build [$static]
908 --rust-target-triple=TRIPLE compilation target for Rust code [autodetect]
909 --without-default-features default all --enable-* options to "disabled"
910 --without-default-devices do not include any device that is not needed to
913 --with-devices-ARCH=NAME override default configs/devices
914 --enable-debug enable common debug build options
915 --cpu=CPU Build for host CPU [$cpu]
916 --disable-containers don't use containers for cross-building
917 --container-engine=TYPE which container engine to use [$container_engine]
918 --gdb=GDB-path gdb to use for gdbstub tests [$gdb_bin]
922 system all system emulation targets
924 linux-user all linux usermode emulation targets
925 bsd-user all BSD usermode emulation targets
933 # Now that we are sure that the user did not only want to print the --help
934 # information, we should double-check that the C compiler really works:
941 rm -f ./*/config-devices.mak.d
943 if test -z "$python"
947 if test -n "$first_python"; then
949 "Use --python=/path/to/python to specify a supported Python."
951 error_exit "Python not found. Use --python=/path/to/python"
957 "Use --python=/path/to/python to specify a supported Python." \
964 python="$(command -v "$python")"
973 # - venv is cleared if it exists already;
974 # - venv is allowed to use system packages;
975 # - all setup can be performed offline;
976 # - missing packages may be fetched from PyPI,
977 # unless --disable-download is passed.
978 # - pip is not installed into the venv when possible,
982 echo "python version: $($python --version)"
984 python="$($python -B "${source_path}/python/scripts/mkvenv.py" create pyvenv)"
985 if test "$?" -ne 0 ; then
990 python="$python -B"
995 $mkvenv ensuregroup --dir "${source_path}/python/wheels" \
1009 mkvenv_online_flag=" --online"
1029 if test -z "$ninja"; then
1030 for c in ninja ninja-build samu; do
1032 ninja=$(command -v "$c")
1036 if test -z "$ninja"; then
1046 error_exit "Unrecognized host OS (uname -s reports '$(uname -s)')"
1058 error_exit "Can't enable plugins on non-TCG builds"
1069 if has_meson_option "-Dtcg_interpreter=true"; then
1096 pie_ldflags=-static-pie
1098 pie_ldflags=-pie
1100 if compile_prog "-Werror -fPIE -DPIE" "$pie_ldflags"; then
1103 error_exit "-static-pie not available due to missing toolchain support"
1112 if test -z "${target_list+xxx}" ; then
1120 target_list=$(echo "$target_list" | sed -e 's/,/ /g')
1135 if test -z "$target_list"; then
1145 if test -n "$gdb_bin"; then
1146 gdb_version_string=$($gdb_bin --version | head -n 1)
1150 gdb_arches=$($python "$source_path/scripts/probe-gdb-support.py" $gdb_bin)
1186 meson_version=$($meson --version)
1189 $mkvenv ensuregroup --dir "${source_path}/python/wheels" \
1190 ${source_path}/pythondeps.toml meson-rust || exit 1
1196 if test "$rust" != disabled && has "$rustc" && $rustc -vV > "${TMPDIR1}/${TMPB}.out"; then
1197 rust_host_triple=$(sed -n 's/^host: //p' "${TMPDIR1}/${TMPB}.out")
1204 if test "$rust" != disabled && test -z "$rust_target_triple"; then
1215 # e.g. aarch64-apple-darwin
1241 # e.g. arm-unknown-linux-gnueabi, arm-unknown-linux-gnueabihf
1244 if $READELF -A $TMPO | grep Tag_API_VFP_args: > /dev/null; then
1252 # e.g. mips64-unknown-linux-gnuabi64
1259 # e.g. arm-unknown-netbsd-eabihf
1269 # e.g. aarch64-pc-windows-gnullvm, x86_64-pc-windows-gnu (MSVC not supported)
1279 # now tweak the architecture part, possibly based on pre-canonicalization --cpu
1282 # preserve ISA version (armv7 etc.) from $raw_cpu if passed via --cpu
1294 # e.g. riscv64gc-unknown-linux-gnu, but riscv64-linux-android
1305 x86_64)
1306 # e.g. x86_64-unknown-linux-gnux32
1312 # e.g. aarch64-linux-android
1313 rust_target_triple=$rust_arch-$rust_os-$rust_osvariant
1315 rust_target_triple=$rust_arch-$rust_machine-$rust_os${rust_osvariant:+-$rust_osvariant}
1325 case $($python "$source_path"/tests/docker/docker.py --engine "$container_engine" probe) in
1331 docker_py="$python $source_path/tests/docker/docker.py --engine $container"
1336 # cross compilers defaults, can be overridden with --cross-cc-ARCH
1337 : ${cross_prefix_aarch64="aarch64-linux-gnu-"}
1339 : ${cross_prefix_alpha="alpha-linux-gnu-"}
1340 : ${cross_prefix_arm="arm-linux-gnueabihf-"}
1342 : ${cross_prefix_hexagon="hexagon-unknown-linux-musl-"}
1343 : ${cross_prefix_loongarch64="loongarch64-unknown-linux-gnu-"}
1344 : ${cross_prefix_hppa="hppa-linux-gnu-"}
1345 : ${cross_prefix_i386="i686-linux-gnu-"}
1346 : ${cross_prefix_m68k="m68k-linux-gnu-"}
1347 : ${cross_prefix_microblaze="microblaze-linux-musl-"}
1348 : ${cross_prefix_mips64el="mips64el-linux-gnuabi64-"}
1349 : ${cross_prefix_mips64="mips64-linux-gnuabi64-"}
1350 : ${cross_prefix_mipsel="mipsel-linux-gnu-"}
1351 : ${cross_prefix_mips="mips-linux-gnu-"}
1352 : ${cross_prefix_ppc="powerpc-linux-gnu-"}
1353 : ${cross_prefix_ppc64="powerpc64-linux-gnu-"}
1355 : ${cross_prefix_riscv64="riscv64-linux-gnu-"}
1356 : ${cross_prefix_s390x="s390x-linux-gnu-"}
1357 : ${cross_prefix_sh4="sh4-linux-gnu-"}
1358 : ${cross_prefix_sparc64="sparc64-linux-gnu-"}
1360 : ${cross_prefix_tricore="tricore-"}
1361 : ${cross_prefix_x86_64="x86_64-linux-gnu-"}
1364 : ${cross_cc_cflags_aarch64_be="-mbig-endian"}
1366 : ${cross_cc_cflags_armeb="-mbig-endian"}
1367 : ${cross_cc_hexagon="hexagon-unknown-linux-musl-clang"}
1368 : ${cross_cc_cflags_hexagon="-mv73 -O2 -static"}
1369 : ${cross_cc_cflags_i386="-m32"}
1370 : ${cross_cc_cflags_ppc="-m32 -mbig-endian"}
1371 : ${cross_cc_cflags_ppc64="-m64 -mbig-endian"}
1373 : ${cross_cc_cflags_ppc64le="-m64 -mlittle-endian"}
1374 : ${cross_cc_cflags_sparc64="-m64 -mcpu=ultrasparc"}
1376 : ${cross_cc_cflags_sparc="-m32 -mcpu=supersparc"}
1377 : ${cross_cc_cflags_x86_64="-m64 -mcx16"}
1381 if eval test -n "\"\${cross_prefix_$1}\""; then
1402 # if a Docker-based cross-compiler image is known for the target.
1403 # Set got_cross_cc to yes/no depending on whether a non-container-based
1406 # If TARGET is a user-mode emulation target, also set build_static to
1424 target_arch=${1%%-*}
1426 aarch64) container_hosts="x86_64 aarch64" ;;
1427 aarch64_be) container_hosts="x86_64 aarch64" ;;
1428 alpha) container_hosts=x86_64 ;;
1429 arm) container_hosts="x86_64 aarch64" ;;
1430 hexagon) container_hosts=x86_64 ;;
1431 hppa) container_hosts=x86_64 ;;
1432 i386) container_hosts=x86_64 ;;
1433 loongarch64) container_hosts=x86_64 ;;
1434 m68k) container_hosts=x86_64 ;;
1435 microblaze) container_hosts=x86_64 ;;
1436 mips64el) container_hosts=x86_64 ;;
1437 mips64) container_hosts=x86_64 ;;
1438 mipsel) container_hosts=x86_64 ;;
1439 mips) container_hosts=x86_64 ;;
1440 ppc) container_hosts=x86_64 ;;
1441 ppc64|ppc64le) container_hosts=x86_64 ;;
1442 riscv64) container_hosts=x86_64 ;;
1443 s390x) container_hosts=x86_64 ;;
1444 sh4) container_hosts=x86_64 ;;
1445 sparc64) container_hosts=x86_64 ;;
1446 tricore) container_hosts=x86_64 ;;
1447 x86_64) container_hosts="aarch64 ppc64le x86_64" ;;
1448 xtensa*) container_hosts=x86_64 ;;
1455 # debian-all-test-cross architectures
1458 container_image=debian-all-test-cross
1459 container_cross_prefix=aarch64-linux-gnu-
1462 container_image=debian-all-test-cross
1465 container_image=debian-all-test-cross
1466 container_cross_prefix=mips64-linux-gnuabi64-
1469 container_image=debian-all-test-cross
1470 container_cross_prefix=powerpc${target_arch#ppc}-linux-gnu-
1473 # debian-legacy-test-cross architectures (need Debian 11)
1474 # - libc6.1-dev-alpha-cross: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1054412
1475 # - sh4-linux-user: binaries don't run with bookworm compiler
1478 container_image=debian-legacy-test-cross
1485 container_image=debian-arm64-cross
1489 container_image=debian-armhf-cross
1490 container_cross_prefix=arm-linux-gnueabihf-
1493 container_cross_prefix=hexagon-unknown-linux-musl-
1497 container_image=debian-i686-cross
1498 container_cross_prefix=i686-linux-gnu-
1501 container_image=debian-loongarch-cross
1502 container_cross_prefix=loongarch64-unknown-linux-gnu-
1505 container_cross_prefix=microblaze-linux-musl-
1508 container_image=debian-all-test-cross
1509 container_cross_prefix=mips64el-linux-gnuabi64-
1512 container_image=debian-tricore-cross
1513 container_cross_prefix=tricore-
1515 x86_64)
1516 container_image=debian-amd64-cross
1519 container_image=debian-xtensa-cross
1522 container_cross_prefix=/opt/2020.07/xtensa-dc232b-elf/bin/xtensa-dc232b-elf-
1526 : ${container_image:=debian-$target_arch-cross}
1527 : ${container_cross_prefix:=$target_arch-linux-gnu-}
1539 # For softmmu/roms also look for a bi-endian or multilib-enabled host compiler
1544 i386:x86_64 | \
1568 if eval test -n "\"\${cross_cc_$target_arch}\""; then
1586 if test -n "$target_cc"; then
1588 i386|x86_64)
1589 if $target_cc --version | grep -qi "clang"; then
1594 elif test -n "$target_as" && test -n "$target_ld"; then
1597 tricore-softmmu)
1612 *-softmmu)
1613 if do_compiler "$target_cc" $target_cflags -o $TMPO -c $TMPC &&
1614 …do_compiler "$target_cc" $target_cflags -r -nostdlib -o "${TMPDIR1}/${TMPB}2.o" "$TMPO" -lgcc; then
1620 if do_compiler "$target_cc" $target_cflags -o $TMPE $TMPC -static ; then
1625 if do_compiler "$target_cc" $target_cflags -o $TMPE $TMPC ; then
1645 test -n "$target_cc"
1650 if test -z "$target_cc" && test -z "$target_as"; then
1651 test -z "$container_image" && error_exit "Internal error: could not find cross compiler for $1?"
1652 echo "$1: docker-image-$container_image" >> Makefile.prereqs
1653 if test -n "$container_cross_cc"; then
1654 echo "CC=$docker_py cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --"
1655 echo "CCAS=$docker_py cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --"
1657 echo "AR=$docker_py cc --cc $container_cross_ar -i qemu/$container_image -s $source_path --"
1658 echo "AS=$docker_py cc --cc $container_cross_as -i qemu/$container_image -s $source_path --"
1659 echo "LD=$docker_py cc --cc $container_cross_ld -i qemu/$container_image -s $source_path --"
1660 echo "NM=$docker_py cc --cc $container_cross_nm -i qemu/$container_image -s $source_path --"
1661 …echo "OBJCOPY=$docker_py cc --cc $container_cross_objcopy -i qemu/$container_image -s $source_path…
1662 …echo "RANLIB=$docker_py cc --cc $container_cross_ranlib -i qemu/$container_image -s $source_path -…
1663 … echo "STRIP=$docker_py cc --cc $container_cross_strip -i qemu/$container_image -s $source_path --"
1665 if test -n "$target_cc"; then
1669 if test -n "$target_ar"; then
1672 if test -n "$target_as"; then
1675 if test -n "$target_ld"; then
1678 if test -n "$target_nm"; then
1681 if test -n "$target_objcopy"; then
1684 if test -n "$target_ranlib"; then
1687 if test -n "$target_strip"; then
1694 # cross-compiled firmware targets
1700 # added to the source tree -- nothing will cause configure to be rerun
1706 LINKS="$LINKS pc-bios/optionrom/Makefile"
1707 LINKS="$LINKS pc-bios/s390-ccw/Makefile"
1708 LINKS="$LINKS pc-bios/vof/Makefile"
1711 LINKS="$LINKS tests/qemu-iotests/check tests/qemu-iotests/Makefile"
1714 if [ -e "$source_path/$f" ]; then
1720 if test "$host_os" = "linux" && test -n "$linux_arch"; then
1721 symlink "$source_path/linux-headers/asm-$linux_arch" linux-headers/asm
1724 echo "# Automatically generated by configure - do not modify" > Makefile.prereqs
1727 if have_target i386-softmmu x86_64-softmmu && \
1730 probe_target_compiler i386-softmmu; then
1731 subdirs="$subdirs pc-bios/optionrom"
1732 config_mak=pc-bios/optionrom/config.mak
1733 echo "# Automatically generated by configure - do not modify" > $config_mak
1738 if have_target ppc-softmmu ppc64-softmmu && \
1739 probe_target_compiler ppc-softmmu; then
1740 subdirs="$subdirs pc-bios/vof"
1741 config_mak=pc-bios/vof/config.mak
1742 echo "# Automatically generated by configure - do not modify" > $config_mak
1743 echo "SRC_DIR=$source_path/pc-bios/vof" >> $config_mak
1747 # Only build s390-ccw bios if the compiler has -march=z900 or -march=z10
1749 if have_target s390x-softmmu && probe_target_compiler s390x-softmmu && \
1750 …GIT=git "$source_path/scripts/git-submodule.sh" "$git_submodules_action" roms/SLOF >> config.log 2…
1752 do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC
1754 …00 = 0 ] || do_compiler "$target_cc" $target_cc_cflags -march=z10 -msoft-float -Werror -o $TMPO -c…
1757 echo " The s390-ccw bios will only work with guest CPUs >= z10."
1759 subdirs="$subdirs pc-bios/s390-ccw"
1760 config_mak=pc-bios/s390-ccw/config-host.mak
1761 echo "# Automatically generated by configure - do not modify" > $config_mak
1762 echo "SRC_PATH=$source_path/pc-bios/s390-ccw" >> $config_mak
1769 # generate config-host.mak
1771 config_host_mak="config-host.mak"
1773 echo "# Automatically generated by configure - do not modify" > $config_host_mak
1799 mkdir -p tests/tcg
1800 echo "# Automatically generated by configure - do not modify" > tests/tcg/$config_host_mak
1809 arch=${target%%-*}
1812 xtensa*-linux-user)
1813 # the toolchain is not complete with headers, only build system tests
1816 *-softmmu)
1817 test -f "$source_path/tests/tcg/$arch/Makefile.softmmu-target" || continue
1818 qemu="qemu-system-$arch"
1820 *-linux-user|*-bsd-user)
1821 qemu="qemu-$arch"
1825 if probe_target_compiler $target || test -n "$container_image"; then
1826 test -n "$container_image" && build_static=y
1827 mkdir -p "tests/tcg/$target"
1828 config_target_mak=tests/tcg/$target/config-target.mak
1829 ln -sf "$source_path/tests/tcg/Makefile.target" "tests/tcg/$target/Makefile"
1830 echo "# Automatically generated by configure - do not modify" > "$config_target_mak"
1833 write_target_makefile "build-tcg-tests-$target" >> "$config_target_mak"
1835 echo "QEMU=$PWD/$qemu" >> "$config_target_mak"
1847 # GDB has to support MTE in baremetal to allow debugging MTE in QEMU system mode
1851 echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> Makefile.prereqs
1861 cross="config-meson.cross.new"
1867 echo "# Automatically generated by configure - do not modify" > $cross
1873 echo "${a}-softmmu = '$c'" >> $cross
1876 echo "[built-in options]" >> $cross
1879 test -n "$objcc" && echo "objc_args = [$(meson_quote $OBJCFLAGS $EXTRA_OBJCFLAGS)]" >> $cross
1886 if test -e "$source_path/.git" && \
1907 test -n "$cxx" && echo "cpp = [$(meson_quote $cxx $CPU_CFLAGS)]" >> $cross
1908 test -n "$objcc" && echo "objc = [$(meson_quote $objcc $CPU_CFLAGS)]" >> $cross
1911 echo "rust = [$(meson_quote $rustc --target "$rust_target_triple")]" >> $cross
1912 echo "rustdoc = [$(meson_quote $rustdoc --target "$rust_target_triple")]" >> $cross
1922 echo "pkg-config = [$(meson_quote $pkg_config)]" >> $cross
1926 echo "sdl2-config = [$(meson_quote $sdl2_config)]" >> $cross
1934 echo "system = '$host_os'" >> $cross
1950 native="config-meson.native.new"
1951 echo "# Automatically generated by configure - do not modify" > $native
1957 mv $native config-meson.native
1958 meson_option_add --native-file
1959 meson_option_add config-meson.native
1961 mv $cross config-meson.cross
1962 meson_add_machine_file config-meson.cross
1963 if test -f "$source_path/configs/meson/$host_os.txt"; then
1967 rm -rf meson-private meson-info meson-logs
1969 test "$download" = "disabled" && meson_option_add "--wrap-mode=nodownload"
1970 test "$default_feature" = no && meson_option_add -Dauto_features=disabled
1971 test "$static" = yes && meson_option_add -Dprefer_static=true
1972 test "$pie" = no && meson_option_add -Db_pie=false
1974 # QEMU options
1975 test "$rust" != "disabled" && meson_option_add "-Drust=$rust"
1976 test "$cfi" != false && meson_option_add "-Dcfi=$cfi" "-Db_lto=$cfi"
1977 test "$docs" != auto && meson_option_add "-Ddocs=$docs"
1978 test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add "-Dfuzzing_engine=$LIB_FUZZING_ENGINE"
1979 test "$plugins" = yes && meson_option_add "-Dplugins=true"
1980 test "$tcg" != enabled && meson_option_add "-Dtcg=$tcg"
1985 if test "$?" -ne 0 ; then
1990 if test -f meson-private/cmd_line.txt; then
1992 # sed -i is not portable
1993 perl -i -ne '
1995 print;' meson-private/cmd_line.txt
2013 if test -n "$envval"
2054 test "$i" = --skip-meson || printf " %s" "$(quote_sh "$i")" >>config.status
2059 rm -r "$TMPDIR1"