Lines Matching +full:cross +full:- +full:i686 +full:- +full:system

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
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 --cpu=*) cpu="$optarg"
214 --extra-cflags=*)
219 --extra-cxxflags=*) EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $optarg"
221 --extra-objcflags=*) EXTRA_OBJCFLAGS="$EXTRA_OBJCFLAGS $optarg"
223 --extra-ldflags=*) EXTRA_LDFLAGS="$EXTRA_LDFLAGS $optarg"
225 --cross-cc-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --cross-cc-FOO option"
227 --cross-cc-cflags-*) cc_arch=${opt#--cross-cc-cflags-}; cc_arch=${cc_arch%%=*}
230 --cross-cc-*) cc_arch=${opt#--cross-cc-}; cc_arch=${cc_arch%%=*}
233 --cross-prefix-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --cross-prefix-FOO option"
235 --cross-prefix-*) cc_arch=${opt#--cross-prefix-}; cc_arch=${cc_arch%%=*}
238 --without-default-features) default_feature="no"
243 default_cflags='-O2 -g'
247 system="yes"
259 gdb_bin=$(command -v "gdb-multiarch" || command -v "gdb")
273 # and we also need to check for -static-pie before Meson runs
274 # which requires knowing whether --static is enabled.
280 # ${cross_prefix}gcc (if cross-prefix specified)
281 # system compiler
282 if test -z "${CC}${cross_prefix}"; then
285 cc="${CC-${cross_prefix}gcc}"
288 if test -z "${CXX}${cross_prefix}"; then
291 cxx="${CXX-${cross_prefix}g++}"
295 # $objcc (if set, i.e. via --objcc option)
296 # ${cross_prefix}clang (if cross-prefix specified)
299 if test -z "${objcc}${cross_prefix}"; then
306 objcc="${objcc-${cross_prefix}clang}"
309 ar="${AR-${cross_prefix}ar}"
310 as="${AS-${cross_prefix}as}"
311 ccas="${CCAS-$cc}"
312 dlltool="${DLLTOOL-${cross_prefix}dlltool}"
313 objcopy="${OBJCOPY-${cross_prefix}objcopy}"
314 ld="${LD-${cross_prefix}ld}"
315 ranlib="${RANLIB-${cross_prefix}ranlib}"
316 nm="${NM-${cross_prefix}nm}"
317 readelf="${READELF-${cross_prefix}readelf}"
318 strip="${STRIP-${cross_prefix}strip}"
319 widl="${WIDL-${cross_prefix}widl}"
320 windres="${WINDRES-${cross_prefix}windres}"
321 windmc="${WINDMC-${cross_prefix}windmc}"
322 pkg_config="${PKG_CONFIG-${cross_prefix}pkg-config}"
323 sdl2_config="${SDL2_CONFIG-${cross_prefix}sdl2-config}"
325 rustc="${RUSTC-rustc}"
365 # might be going to just print the --help text, or it might
370 if test ! -z "$cpu" ; then
424 cpu=$(uname -m)
426 echo "WARNING: unrecognized host CPU, proceeding with 'uname -m' output '$cpu'"
430 # Normalise host CPU name to the values used by Meson cross files and in source
433 # 'uname -m' case, but better safe than sorry in case --cpu= is used.
452 i386|i486|i586|i686)
456 CPU_CFLAGS="-m32"
479 CPU_CFLAGS="-m32"
484 CPU_CFLAGS="-m64 -mbig-endian"
490 CPU_CFLAGS="-m64 -mlittle-endian"
500 CPU_CFLAGS="-m31"
505 CPU_CFLAGS="-m64"
510 CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc"
514 CPU_CFLAGS="-m64 -mcpu=ultrasparc"
521 CPU_CFLAGS="-mx32"
527 CPU_CFLAGS="-m64"
531 if test -n "$host_arch" && {
532 ! test -d "$source_path/linux-user/include/host/$host_arch" ||
533 ! test -d "$source_path/common-user/host/$host_arch"; }; then
534 error_exit "linux-user/include/host/$host_arch does not exist." \
537 if test -n "$linux_arch" && ! test -d "$source_path/linux-headers/asm-$linux_arch"; then
538 error_exit "linux-headers/asm-$linux_arch does not exist." \
544 # NB: a True python conditional creates a non-zero return code (Failure)
545 "$1" -c 'import sys; sys.exit(sys.version_info < (3,8))'
549 if test -z "${PYTHON}"; then
555 python=$(command -v "$binary")
568 python=$(command -v "$PYTHON")
583 genisoimage=$(command -v "$binary")
602 printf "%s" "$e" | sed -e 's/\([\"]\)/\\\1/g'
608 . "$source_path/scripts/meson-buildoptions.sh"
619 if test $? -eq 1; then
621 echo "Try '$0 --help' for more information"
631 meson_option_add --cross-file "$1"
633 meson_option_add --native-file "$1"
640 --help|-h) show_help=yes
642 --version|-V) exec cat "$source_path/VERSION"
644 --cross-prefix=*)
646 --cc=*)
648 --host-cc=*) host_cc="$optarg"
650 --cxx=*)
652 --objcc=*)
654 --rustc=*)
656 --make=*)
658 --install=*)
660 --python=*) python="$optarg"
662 --skip-meson) skip_meson=yes
664 --ninja=*) ninja="$optarg"
666 --extra-cflags=*)
668 --extra-cxxflags=*)
670 --extra-objcflags=*)
672 --extra-ldflags=*)
674 --cross-cc-*)
676 --cross-prefix-*)
678 --enable-docs) docs=enabled
680 --disable-docs) docs=disabled
682 --cpu=*)
684 --target-list=*) target_list="$optarg"
686 error_exit "Can't mix --target-list with --target-list-exclude"
689 --target-list-exclude=*) target_list_exclude="$optarg"
691 error_exit "Can't mix --target-list-exclude with --target-list"
694 --with-default-devices) meson_option_add -Ddefault_devices=true
696 --without-default-devices) meson_option_add -Ddefault_devices=false
698 --with-devices-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --with-devices-FOO option"
700 --with-devices-*) device_arch=${opt#--with-devices-};
702 cf=$source_path/configs/devices/$device_arch-softmmu/$optarg.mak
703 if test -f "$cf"; then
710 --without-default-features) # processed above
712 --static) static="yes"
714 --host=*|--build=*|\
715 --disable-dependency-tracking|\
716 --sbindir=*|--sharedstatedir=*|\
717 --oldincludedir=*|--datarootdir=*|--infodir=*|\
718 --htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
720 # autoconf-generated configure scripts. This allows QEMU's
724 --enable-debug)
726 meson_option_parse --enable-debug-tcg ""
727 meson_option_parse --enable-debug-graph-lock ""
728 meson_option_parse --enable-debug-mutex ""
729 meson_option_add -Doptimization=0
730 default_cflags='-O0 -g'
732 --disable-tcg) tcg="disabled"
734 --enable-tcg) tcg="enabled"
736 --disable-system) system="no"
738 --enable-system) system="yes"
740 --disable-user)
744 --enable-user) ;;
745 --disable-linux-user) linux_user="no"
747 --enable-linux-user) linux_user="yes"
749 --disable-bsd-user) bsd_user="no"
751 --enable-bsd-user) bsd_user="yes"
753 --enable-pie) pie="yes"
755 --disable-pie) pie="no"
757 --enable-cfi) cfi=true
759 --disable-cfi) cfi=false
761 --disable-download) download="disabled"; git_submodules_action=validate;
763 --enable-download) download="enabled"; git_submodules_action=update;
765 --enable-plugins) plugins="yes"
767 --disable-plugins) plugins="no"
769 --enable-containers) use_containers="yes"
771 --disable-containers) use_containers="no"
773 --container-engine=*) container_engine="$optarg"
775 --rust-target-triple=*) rust_target_triple="$optarg"
777 --gdb=*) gdb_bin="$optarg"
779 --enable-rust) rust=enabled
781 --disable-rust) rust=disabled
784 --*) meson_option_parse "$opt" "$optarg"
786 # Pass through -Dxxxx options to meson
787 -D*) meson_option_add "$opt"
792 if ! test -e "$source_path/.git"
797 if ! test -f "$source_path/subprojects/keycodemapdb/README" \
803 if test -e "$source_path/.git"; then
804 echo "--disable-download specified but subprojects were not"
806 echo "before configuring QEMU, or remove --disable-download"
811 echo "to acquire QEMU source archives. Non-GIT builds are only"
816 echo "Developers working with GIT can use scripts/archive-source.sh"
826 if [ -n "$host_arch" ] && [ -d "$source_path/common-user/host/$host_arch" ]; then
831 error_exit "linux-user not supported on this architecture"
834 mak_wilds="${mak_wilds} $source_path/configs/targets/*-linux-user.mak"
841 if [ "$bsd_user" = yes ] && ! [ -d "$source_path/bsd-user/$host_os" ]; then
842 error_exit "bsd-user not supported on this host OS"
845 mak_wilds="${mak_wilds} $source_path/configs/targets/*-bsd-user.mak"
853 if [ "$system" = "yes" ]; then
854 mak_wilds="${mak_wilds} $source_path/configs/targets/*-softmmu.mak"
859 if echo "$target_list_exclude" | grep -vq "$target"; then
871 --help print this message
872 --target-list=LIST set target list (default: build all)
874 fold -s -w 53 | sed -e 's/^/ /')
875 --target-list-exclude=LIST exclude a set of targets from the default target-list
878 -Dmesonoptname=val passthrough option to meson unmodified
879 --cross-prefix=PREFIX use PREFIX for compile tools, PREFIX can be blank [$cross_prefix]
880 --cc=CC use C compiler CC [$cc]
881 --host-cc=CC when cross compiling, use C compiler CC for code run
883 --cxx=CXX use C++ compiler CXX [$cxx]
884 --objcc=OBJCC use Objective-C compiler OBJCC [$objcc]
885 --rustc=RUSTC use Rust compiler RUSTC [$rustc]
886 --extra-cflags=CFLAGS append extra C compiler flags CFLAGS
887 --extra-cxxflags=CXXFLAGS append extra C++ compiler flags CXXFLAGS
888 --extra-objcflags=OBJCFLAGS append extra Objective C compiler flags OBJCFLAGS
889 --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS
890 --cross-cc-ARCH=CC use compiler when building ARCH guest test cases
891 --cross-cc-cflags-ARCH= use compiler flags when building ARCH guest tests
892 --cross-prefix-ARCH=PREFIX cross compiler prefix when building ARCH guest test cases
893 --python=PYTHON use specified python [$python]
894 --ninja=NINJA use specified ninja [$ninja]
895 --static enable static build [$static]
896 --rust-target-triple=TRIPLE compilation target for Rust code [autodetect]
897 --without-default-features default all --enable-* options to "disabled"
898 --without-default-devices do not include any device that is not needed to
901 --with-devices-ARCH=NAME override default configs/devices
902 --enable-debug enable common debug build options
903 --cpu=CPU Build for host CPU [$cpu]
904 --disable-containers don't use containers for cross-building
905 --container-engine=TYPE which container engine to use [$container_engine]
906 --gdb=GDB-path gdb to use for gdbstub tests [$gdb_bin]
910 system all system emulation targets
912 linux-user all linux usermode emulation targets
913 bsd-user all BSD usermode emulation targets
921 # Now that we are sure that the user did not only want to print the --help
922 # information, we should double-check that the C compiler really works:
929 rm -f ./*/config-devices.mak.d
931 if test -z "$python"
935 if test -n "$first_python"; then
937 "Use --python=/path/to/python to specify a supported Python."
939 error_exit "Python not found. Use --python=/path/to/python"
945 "Use --python=/path/to/python to specify a supported Python." \
952 python="$(command -v "$python")"
961 # - venv is cleared if it exists already;
962 # - venv is allowed to use system packages;
963 # - all setup can be performed offline;
964 # - missing packages may be fetched from PyPI,
965 # unless --disable-download is passed.
966 # - pip is not installed into the venv when possible,
970 echo "python version: $($python --version)"
972 python="$($python -B "${source_path}/python/scripts/mkvenv.py" create pyvenv)"
973 if test "$?" -ne 0 ; then
978 python="$python -B"
983 $mkvenv ensuregroup --dir "${source_path}/python/wheels" \
997 mkvenv_online_flag=" --online"
1017 if test -z "$ninja"; then
1018 for c in ninja ninja-build samu; do
1020 ninja=$(command -v "$c")
1024 if test -z "$ninja"; then
1034 error_exit "Unrecognized host OS (uname -s reports '$(uname -s)')"
1046 error_exit "Can't enable plugins on non-TCG builds"
1057 if has_meson_option "-Dtcg_interpreter=true"; then
1084 pie_ldflags=-static-pie
1086 pie_ldflags=-pie
1088 if compile_prog "-Werror -fPIE -DPIE" "$pie_ldflags"; then
1091 error_exit "-static-pie not available due to missing toolchain support"
1100 if test -z "${target_list+xxx}" ; then
1108 target_list=$(echo "$target_list" | sed -e 's/,/ /g')
1123 if test -z "$target_list"; then
1133 if test -n "$gdb_bin"; then
1134 gdb_version_string=$($gdb_bin --version | head -n 1)
1138 gdb_arches=$($python "$source_path/scripts/probe-gdb-support.py" $gdb_bin)
1174 if test "$rust" != disabled && has "$rustc" && $rustc -vV > "${TMPDIR1}/${TMPB}.out"; then
1175 rust_host_triple=$(sed -n 's/^host: //p' "${TMPDIR1}/${TMPB}.out")
1182 if test "$rust" != disabled && test -z "$rust_target_triple"; then
1193 # e.g. aarch64-apple-darwin
1219 # e.g. arm-unknown-linux-gnueabi, arm-unknown-linux-gnueabihf
1222 if $READELF -A $TMPO | grep Tag_API_VFP_args: > /dev/null; then
1230 # e.g. mips64-unknown-linux-gnuabi64
1237 # e.g. arm-unknown-netbsd-eabihf
1247 # e.g. aarch64-pc-windows-gnullvm, x86_64-pc-windows-gnu (MSVC not supported)
1257 # now tweak the architecture part, possibly based on pre-canonicalization --cpu
1260 # preserve ISA version (armv7 etc.) from $raw_cpu if passed via --cpu
1272 # e.g. riscv64gc-unknown-linux-gnu, but riscv64-linux-android
1284 # e.g. x86_64-unknown-linux-gnux32
1290 # e.g. aarch64-linux-android
1291 rust_target_triple=$rust_arch-$rust_os-$rust_osvariant
1293 rust_target_triple=$rust_arch-$rust_machine-$rust_os${rust_osvariant:+-$rust_osvariant}
1298 # functions to probe cross compilers
1303 case $($python "$source_path"/tests/docker/docker.py --engine "$container_engine" probe) in
1309 docker_py="$python $source_path/tests/docker/docker.py --engine $container"
1314 # cross compilers defaults, can be overridden with --cross-cc-ARCH
1315 : ${cross_prefix_aarch64="aarch64-linux-gnu-"}
1317 : ${cross_prefix_alpha="alpha-linux-gnu-"}
1318 : ${cross_prefix_arm="arm-linux-gnueabihf-"}
1320 : ${cross_prefix_hexagon="hexagon-unknown-linux-musl-"}
1321 : ${cross_prefix_loongarch64="loongarch64-unknown-linux-gnu-"}
1322 : ${cross_prefix_hppa="hppa-linux-gnu-"}
1323 : ${cross_prefix_i386="i686-linux-gnu-"}
1324 : ${cross_prefix_m68k="m68k-linux-gnu-"}
1325 : ${cross_prefix_microblaze="microblaze-linux-musl-"}
1326 : ${cross_prefix_mips64el="mips64el-linux-gnuabi64-"}
1327 : ${cross_prefix_mips64="mips64-linux-gnuabi64-"}
1328 : ${cross_prefix_mipsel="mipsel-linux-gnu-"}
1329 : ${cross_prefix_mips="mips-linux-gnu-"}
1330 : ${cross_prefix_ppc="powerpc-linux-gnu-"}
1331 : ${cross_prefix_ppc64="powerpc64-linux-gnu-"}
1333 : ${cross_prefix_riscv64="riscv64-linux-gnu-"}
1334 : ${cross_prefix_s390x="s390x-linux-gnu-"}
1335 : ${cross_prefix_sh4="sh4-linux-gnu-"}
1336 : ${cross_prefix_sparc64="sparc64-linux-gnu-"}
1338 : ${cross_prefix_tricore="tricore-"}
1339 : ${cross_prefix_x86_64="x86_64-linux-gnu-"}
1342 : ${cross_cc_cflags_aarch64_be="-mbig-endian"}
1344 : ${cross_cc_cflags_armeb="-mbig-endian"}
1345 : ${cross_cc_hexagon="hexagon-unknown-linux-musl-clang"}
1346 : ${cross_cc_cflags_hexagon="-mv73 -O2 -static"}
1347 : ${cross_cc_cflags_i386="-m32"}
1348 : ${cross_cc_cflags_ppc="-m32 -mbig-endian"}
1349 : ${cross_cc_cflags_ppc64="-m64 -mbig-endian"}
1351 : ${cross_cc_cflags_ppc64le="-m64 -mlittle-endian"}
1352 : ${cross_cc_cflags_sparc64="-m64 -mcpu=ultrasparc"}
1354 : ${cross_cc_cflags_sparc="-m32 -mcpu=supersparc"}
1355 : ${cross_cc_cflags_x86_64="-m64 -mcx16"}
1359 if eval test -n "\"\${cross_prefix_$1}\""; then
1378 # Look for a compiler for the given target, either native or cross.
1380 # if a Docker-based cross-compiler image is known for the target.
1381 # Set got_cross_cc to yes/no depending on whether a non-container-based
1384 # If TARGET is a user-mode emulation target, also set build_static to
1402 target_arch=${1%%-*}
1433 # debian-all-test-cross architectures
1436 container_image=debian-all-test-cross
1437 container_cross_prefix=aarch64-linux-gnu-
1440 container_image=debian-all-test-cross
1443 container_image=debian-all-test-cross
1444 container_cross_prefix=mips64-linux-gnuabi64-
1447 container_image=debian-all-test-cross
1448 container_cross_prefix=powerpc${target_arch#ppc}-linux-gnu-
1451 # debian-legacy-test-cross architectures (need Debian 11)
1452 # - libc6.1-dev-alpha-cross: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1054412
1453 # - sh4-linux-user: binaries don't run with bookworm compiler
1456 container_image=debian-legacy-test-cross
1463 container_image=debian-arm64-cross
1467 container_image=debian-armhf-cross
1468 container_cross_prefix=arm-linux-gnueabihf-
1471 container_cross_prefix=hexagon-unknown-linux-musl-
1475 container_image=debian-i686-cross
1476 container_cross_prefix=i686-linux-gnu-
1479 container_image=debian-loongarch-cross
1480 container_cross_prefix=loongarch64-unknown-linux-gnu-
1483 container_cross_prefix=microblaze-linux-musl-
1486 container_image=debian-all-test-cross
1487 container_cross_prefix=mips64el-linux-gnuabi64-
1490 container_image=debian-tricore-cross
1491 container_cross_prefix=tricore-
1494 container_image=debian-amd64-cross
1497 container_image=debian-xtensa-cross
1500 container_cross_prefix=/opt/2020.07/xtensa-dc232b-elf/bin/xtensa-dc232b-elf-
1504 : ${container_image:=debian-$target_arch-cross}
1505 : ${container_cross_prefix:=$target_arch-linux-gnu-}
1516 try=cross
1517 # For softmmu/roms also look for a bi-endian or multilib-enabled host compiler
1527 try='native cross' ;;
1544 cross)
1546 if eval test -n "\"\${cross_cc_$target_arch}\""; then
1564 if test -n "$target_cc"; then
1567 if $target_cc --version | grep -qi "clang"; then
1572 elif test -n "$target_as" && test -n "$target_ld"; then
1575 tricore-softmmu)
1590 *-softmmu)
1591 if do_compiler "$target_cc" $target_cflags -o $TMPO -c $TMPC &&
1592 …do_compiler "$target_cc" $target_cflags -r -nostdlib -o "${TMPDIR1}/${TMPB}2.o" "$TMPO" -lgcc; then
1598 if do_compiler "$target_cc" $target_cflags -o $TMPE $TMPC -static ; then
1603 if do_compiler "$target_cc" $target_cflags -o $TMPE $TMPC ; then
1623 test -n "$target_cc"
1628 if test -z "$target_cc" && test -z "$target_as"; then
1629 test -z "$container_image" && error_exit "Internal error: could not find cross compiler for $1?"
1630 echo "$1: docker-image-$container_image" >> Makefile.prereqs
1631 if test -n "$container_cross_cc"; then
1632 echo "CC=$docker_py cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --"
1633 echo "CCAS=$docker_py cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --"
1635 echo "AR=$docker_py cc --cc $container_cross_ar -i qemu/$container_image -s $source_path --"
1636 echo "AS=$docker_py cc --cc $container_cross_as -i qemu/$container_image -s $source_path --"
1637 echo "LD=$docker_py cc --cc $container_cross_ld -i qemu/$container_image -s $source_path --"
1638 echo "NM=$docker_py cc --cc $container_cross_nm -i qemu/$container_image -s $source_path --"
1639 …echo "OBJCOPY=$docker_py cc --cc $container_cross_objcopy -i qemu/$container_image -s $source_path…
1640 …echo "RANLIB=$docker_py cc --cc $container_cross_ranlib -i qemu/$container_image -s $source_path -…
1641 … echo "STRIP=$docker_py cc --cc $container_cross_strip -i qemu/$container_image -s $source_path --"
1643 if test -n "$target_cc"; then
1647 if test -n "$target_ar"; then
1650 if test -n "$target_as"; then
1653 if test -n "$target_ld"; then
1656 if test -n "$target_nm"; then
1659 if test -n "$target_objcopy"; then
1662 if test -n "$target_ranlib"; then
1665 if test -n "$target_strip"; then
1672 # cross-compiled firmware targets
1678 # added to the source tree -- nothing will cause configure to be rerun
1684 LINKS="$LINKS pc-bios/optionrom/Makefile"
1685 LINKS="$LINKS pc-bios/s390-ccw/Makefile"
1686 LINKS="$LINKS pc-bios/vof/Makefile"
1689 LINKS="$LINKS tests/qemu-iotests/check tests/qemu-iotests/Makefile"
1692 if [ -e "$source_path/$f" ]; then
1698 if test "$host_os" = "linux" && test -n "$linux_arch"; then
1699 symlink "$source_path/linux-headers/asm-$linux_arch" linux-headers/asm
1702 echo "# Automatically generated by configure - do not modify" > Makefile.prereqs
1705 if have_target i386-softmmu x86_64-softmmu && \
1708 probe_target_compiler i386-softmmu; then
1709 subdirs="$subdirs pc-bios/optionrom"
1710 config_mak=pc-bios/optionrom/config.mak
1711 echo "# Automatically generated by configure - do not modify" > $config_mak
1716 if have_target ppc-softmmu ppc64-softmmu && \
1717 probe_target_compiler ppc-softmmu; then
1718 subdirs="$subdirs pc-bios/vof"
1719 config_mak=pc-bios/vof/config.mak
1720 echo "# Automatically generated by configure - do not modify" > $config_mak
1721 echo "SRC_DIR=$source_path/pc-bios/vof" >> $config_mak
1725 # Only build s390-ccw bios if the compiler has -march=z900 or -march=z10
1727 if have_target s390x-softmmu && probe_target_compiler s390x-softmmu && \
1728 …GIT=git "$source_path/scripts/git-submodule.sh" "$git_submodules_action" roms/SLOF >> config.log 2…
1730 do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC
1732 …00 = 0 ] || do_compiler "$target_cc" $target_cc_cflags -march=z10 -msoft-float -Werror -o $TMPO -c…
1735 echo " The s390-ccw bios will only work with guest CPUs >= z10."
1737 subdirs="$subdirs pc-bios/s390-ccw"
1738 config_mak=pc-bios/s390-ccw/config-host.mak
1739 echo "# Automatically generated by configure - do not modify" > $config_mak
1740 echo "SRC_PATH=$source_path/pc-bios/s390-ccw" >> $config_mak
1747 # generate config-host.mak
1749 config_host_mak="config-host.mak"
1751 echo "# Automatically generated by configure - do not modify" > $config_host_mak
1777 mkdir -p tests/tcg
1778 echo "# Automatically generated by configure - do not modify" > tests/tcg/$config_host_mak
1786 arch=${target%%-*}
1789 xtensa*-linux-user)
1790 # the toolchain is not complete with headers, only build system tests
1793 *-softmmu)
1794 test -f "$source_path/tests/tcg/$arch/Makefile.softmmu-target" || continue
1795 qemu="qemu-system-$arch"
1797 *-linux-user|*-bsd-user)
1798 qemu="qemu-$arch"
1802 if probe_target_compiler $target || test -n "$container_image"; then
1803 test -n "$container_image" && build_static=y
1804 mkdir -p "tests/tcg/$target"
1805 config_target_mak=tests/tcg/$target/config-target.mak
1806 ln -sf "$source_path/tests/tcg/Makefile.target" "tests/tcg/$target/Makefile"
1807 echo "# Automatically generated by configure - do not modify" > "$config_target_mak"
1810 write_target_makefile "build-tcg-tests-$target" >> "$config_target_mak"
1824 # GDB has to support MTE in baremetal to allow debugging MTE in QEMU system mode
1828 echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> Makefile.prereqs
1838 cross="config-meson.cross.new"
1844 echo "# Automatically generated by configure - do not modify" > $cross
1845 echo "[properties]" >> $cross
1850 echo "${a}-softmmu = '$c'" >> $cross
1853 echo "[built-in options]" >> $cross
1854 echo "c_args = [$(meson_quote $CFLAGS $EXTRA_CFLAGS)]" >> $cross
1855 echo "cpp_args = [$(meson_quote $CXXFLAGS $EXTRA_CXXFLAGS)]" >> $cross
1856 test -n "$objcc" && echo "objc_args = [$(meson_quote $OBJCFLAGS $EXTRA_OBJCFLAGS)]" >> $cross
1857 echo "c_link_args = [$(meson_quote $CFLAGS $LDFLAGS $EXTRA_CFLAGS $EXTRA_LDFLAGS)]" >> $cross
1858 …echo "cpp_link_args = [$(meson_quote $CXXFLAGS $LDFLAGS $EXTRA_CXXFLAGS $EXTRA_LDFLAGS)]" >> $cross
1861 echo "# environment defaults, can still be overridden on " >> $cross
1862 echo "# the command line" >> $cross
1863 if test -e "$source_path/.git" && \
1865 echo 'werror = true' >> $cross
1867 echo "[project options]" >> $cross
1869 echo "smbd = $(meson_quote "$SMBD")" >> $cross
1872 echo "qemu_ga_manufacturer = $(meson_quote "${QEMU_GA_MANUFACTURER}")" >> $cross
1875 echo "qemu_ga_distro = $(meson_quote "${QEMU_GA_DISTRO}")" >> $cross
1878 echo "qemu_ga_version = $(meson_quote "${QEMU_GA_VERSION}")" >> $cross
1881 echo >> $cross
1882 echo "[binaries]" >> $cross
1883 echo "c = [$(meson_quote $cc $CPU_CFLAGS)]" >> $cross
1884 test -n "$cxx" && echo "cpp = [$(meson_quote $cxx $CPU_CFLAGS)]" >> $cross
1885 test -n "$objcc" && echo "objc = [$(meson_quote $objcc $CPU_CFLAGS)]" >> $cross
1888 echo "rust = [$(meson_quote $rustc --target "$rust_target_triple")]" >> $cross
1890 echo "rust = [$(meson_quote $rustc)]" >> $cross
1893 echo "ar = [$(meson_quote $ar)]" >> $cross
1894 echo "dlltool = [$(meson_quote $dlltool)]" >> $cross
1895 echo "nm = [$(meson_quote $nm)]" >> $cross
1896 echo "pkgconfig = [$(meson_quote $pkg_config)]" >> $cross
1897 echo "pkg-config = [$(meson_quote $pkg_config)]" >> $cross
1898 echo "ranlib = [$(meson_quote $ranlib)]" >> $cross
1899 echo "readelf = [$(meson_quote $readelf)]" >> $cross
1901 echo "sdl2-config = [$(meson_quote $sdl2_config)]" >> $cross
1903 echo "strip = [$(meson_quote $strip)]" >> $cross
1904 echo "widl = [$(meson_quote $widl)]" >> $cross
1905 echo "windres = [$(meson_quote $windres)]" >> $cross
1906 echo "windmc = [$(meson_quote $windmc)]" >> $cross
1908 echo "[host_machine]" >> $cross
1909 echo "system = '$host_os'" >> $cross
1912 echo "cpu_family = 'x86'" >> $cross
1915 echo "cpu_family = '$cpu'" >> $cross
1918 echo "cpu = '$cpu'" >> $cross
1920 echo "endian = 'big'" >> $cross
1922 echo "endian = 'little'" >> $cross
1925 native="config-meson.native.new"
1926 echo "# Automatically generated by configure - do not modify" > $native
1930 echo "rust = [$(meson_quote $rustc)]" >> $cross
1932 mv $native config-meson.native
1933 meson_option_add --native-file
1934 meson_option_add config-meson.native
1936 mv $cross config-meson.cross
1937 meson_add_machine_file config-meson.cross
1938 if test -f "$source_path/configs/meson/$host_os.txt"; then
1942 rm -rf meson-private meson-info meson-logs
1944 test "$download" = "disabled" && meson_option_add "--wrap-mode=nodownload"
1945 test "$default_feature" = no && meson_option_add -Dauto_features=disabled
1946 test "$static" = yes && meson_option_add -Dprefer_static=true
1947 test "$pie" = no && meson_option_add -Db_pie=false
1950 test "$rust" != "disabled" && meson_option_add "-Drust=$rust"
1951 test "$cfi" != false && meson_option_add "-Dcfi=$cfi" "-Db_lto=$cfi"
1952 test "$docs" != auto && meson_option_add "-Ddocs=$docs"
1953 test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add "-Dfuzzing_engine=$LIB_FUZZING_ENGINE"
1954 test "$plugins" = yes && meson_option_add "-Dplugins=true"
1955 test "$tcg" != enabled && meson_option_add "-Dtcg=$tcg"
1960 if test "$?" -ne 0 ; then
1965 if test -f meson-private/cmd_line.txt; then
1967 # sed -i is not portable
1968 perl -i -ne '
1970 print;' meson-private/cmd_line.txt
1988 if test -n "$envval"
2029 test "$i" = --skip-meson || printf " %s" "$(quote_sh "$i")" >>config.status
2034 rm -r "$TMPDIR1"