Lines Matching +full:cross +full:- +full:armhf +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.
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"
537 #error not 64 bit system
550 if test -n "$host_arch" && {
551 ! test -d "$source_path/linux-user/include/host/$host_arch" ||
552 ! test -d "$source_path/common-user/host/$host_arch"; }; then
553 error_exit "linux-user/include/host/$host_arch does not exist." \
556 if test -n "$linux_arch" && ! test -d "$source_path/linux-headers/asm-$linux_arch"; then
557 error_exit "linux-headers/asm-$linux_arch does not exist." \
563 # NB: a True python conditional creates a non-zero return code (Failure)
564 "$1" -c 'import sys; sys.exit(sys.version_info < (3,8))'
568 if test -z "${PYTHON}"; then
574 python=$(command -v "$binary")
587 python=$(command -v "$PYTHON")
602 genisoimage=$(command -v "$binary")
621 printf "%s" "$e" | sed -e 's/\([\"]\)/\\\1/g'
627 . "$source_path/scripts/meson-buildoptions.sh"
638 if test $? -eq 1; then
640 echo "Try '$0 --help' for more information"
650 meson_option_add --cross-file "$1"
652 meson_option_add --native-file "$1"
659 --help|-h) show_help=yes
661 --version|-V) exec cat "$source_path/VERSION"
663 --cross-prefix=*)
665 --cc=*)
667 --host-cc=*) host_cc="$optarg"
669 --cxx=*)
671 --objcc=*)
673 --rustc=*)
675 --make=*)
677 --install=*)
679 --python=*) python="$optarg"
681 --skip-meson) skip_meson=yes
683 --ninja=*) ninja="$optarg"
685 --extra-cflags=*)
687 --extra-cxxflags=*)
689 --extra-objcflags=*)
691 --extra-ldflags=*)
693 --cross-cc-*)
695 --cross-prefix-*)
697 --enable-docs) docs=enabled
699 --disable-docs) docs=disabled
701 --cpu=*)
703 --target-list=*) target_list="$optarg"
705 error_exit "Can't mix --target-list with --target-list-exclude"
708 --target-list-exclude=*) target_list_exclude="$optarg"
710 error_exit "Can't mix --target-list-exclude with --target-list"
713 --with-default-devices) meson_option_add -Ddefault_devices=true
715 --without-default-devices) meson_option_add -Ddefault_devices=false
717 --with-devices-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --with-devices-FOO option"
719 --with-devices-*) device_arch=${opt#--with-devices-};
721 cf=$source_path/configs/devices/$device_arch-softmmu/$optarg.mak
722 if test -f "$cf"; then
729 --without-default-features) # processed above
731 --static) static="yes"
733 --host=*|--build=*|\
734 --disable-dependency-tracking|\
735 --sbindir=*|--sharedstatedir=*|\
736 --oldincludedir=*|--datarootdir=*|--infodir=*|\
737 --htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
739 # autoconf-generated configure scripts. This allows QEMU's
743 --enable-debug)
745 meson_option_parse --enable-debug-tcg ""
746 meson_option_parse --enable-debug-graph-lock ""
747 meson_option_parse --enable-debug-mutex ""
748 meson_option_add -Doptimization=0
749 default_cflags='-O0 -g'
751 --disable-tcg) tcg="disabled"
753 --enable-tcg) tcg="enabled"
755 --disable-system) system="no"
757 --enable-system) system="yes"
759 --disable-user)
763 --enable-user) ;;
764 --disable-linux-user) linux_user="no"
766 --enable-linux-user) linux_user="yes"
768 --disable-bsd-user) bsd_user="no"
770 --enable-bsd-user) bsd_user="yes"
772 --enable-pie) pie="yes"
774 --disable-pie) pie="no"
776 --enable-cfi) cfi=true
778 --disable-cfi) cfi=false
780 --disable-download) download="disabled"; git_submodules_action=validate;
782 --enable-download) download="enabled"; git_submodules_action=update;
784 --enable-plugins) plugins="yes"
786 --disable-plugins) plugins="no"
788 --enable-containers) use_containers="yes"
790 --disable-containers) use_containers="no"
792 --container-engine=*) container_engine="$optarg"
794 --rust-target-triple=*) rust_target_triple="$optarg"
796 --gdb=*) gdb_bin="$optarg"
798 --enable-rust) rust=enabled
800 --disable-rust) rust=disabled
803 --*) meson_option_parse "$opt" "$optarg"
805 # Pass through -Dxxxx options to meson
806 -D*) meson_option_add "$opt"
811 if ! test -e "$source_path/.git"
816 if ! test -f "$source_path/subprojects/keycodemapdb/README" \
822 if test -e "$source_path/.git"; then
823 echo "--disable-download specified but subprojects were not"
825 echo "before configuring QEMU, or remove --disable-download"
830 echo "to acquire QEMU source archives. Non-GIT builds are only"
835 echo "Developers working with GIT can use scripts/archive-source.sh"
845 if [ -n "$host_arch" ] && [ -d "$source_path/common-user/host/$host_arch" ]; then
850 error_exit "linux-user not supported on this architecture"
853 mak_wilds="${mak_wilds} $source_path/configs/targets/*-linux-user.mak"
860 if [ "$bsd_user" = yes ] && ! [ -d "$source_path/bsd-user/$host_os" ]; then
861 error_exit "bsd-user not supported on this host OS"
864 mak_wilds="${mak_wilds} $source_path/configs/targets/*-bsd-user.mak"
872 if [ "$system" = "yes" ]; then
873 mak_wilds="${mak_wilds} $source_path/configs/targets/*-softmmu.mak"
878 if echo "$target_list_exclude" | grep -vq "$target"; then
890 --help print this message
891 --target-list=LIST set target list (default: build all)
893 fold -s -w 53 | sed -e 's/^/ /')
894 --target-list-exclude=LIST exclude a set of targets from the default target-list
897 -Dmesonoptname=val passthrough option to meson unmodified
898 --cross-prefix=PREFIX use PREFIX for compile tools, PREFIX can be blank [$cross_prefix]
899 --cc=CC use C compiler CC [$cc]
900 --host-cc=CC when cross compiling, use C compiler CC for code run
902 --cxx=CXX use C++ compiler CXX [$cxx]
903 --objcc=OBJCC use Objective-C compiler OBJCC [$objcc]
904 --rustc=RUSTC use Rust compiler RUSTC [$rustc]
905 --extra-cflags=CFLAGS append extra C compiler flags CFLAGS
906 --extra-cxxflags=CXXFLAGS append extra C++ compiler flags CXXFLAGS
907 --extra-objcflags=OBJCFLAGS append extra Objective C compiler flags OBJCFLAGS
908 --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS
909 --cross-cc-ARCH=CC use compiler when building ARCH guest test cases
910 --cross-cc-cflags-ARCH= use compiler flags when building ARCH guest tests
911 --cross-prefix-ARCH=PREFIX cross compiler prefix when building ARCH guest test cases
912 --python=PYTHON use specified python [$python]
913 --ninja=NINJA use specified ninja [$ninja]
914 --static enable static build [$static]
915 --rust-target-triple=TRIPLE compilation target for Rust code [autodetect]
916 --without-default-features default all --enable-* options to "disabled"
917 --without-default-devices do not include any device that is not needed to
920 --with-devices-ARCH=NAME override default configs/devices
921 --enable-debug enable common debug build options
922 --cpu=CPU Build for host CPU [$cpu]
923 --disable-containers don't use containers for cross-building
924 --container-engine=TYPE which container engine to use [$container_engine]
925 --gdb=GDB-path gdb to use for gdbstub tests [$gdb_bin]
929 system all system emulation targets
931 linux-user all linux usermode emulation targets
932 bsd-user all BSD usermode emulation targets
940 # Now that we are sure that the user did not only want to print the --help
941 # information, we should double-check that the C compiler really works:
948 rm -f ./*/config-devices.mak.d
950 if test -z "$python"
954 if test -n "$first_python"; then
956 "Use --python=/path/to/python to specify a supported Python."
958 error_exit "Python not found. Use --python=/path/to/python"
964 "Use --python=/path/to/python to specify a supported Python." \
971 python="$(command -v "$python")"
980 # - venv is cleared if it exists already;
981 # - venv is allowed to use system packages;
982 # - all setup can be performed offline;
983 # - missing packages may be fetched from PyPI,
984 # unless --disable-download is passed.
985 # - pip is not installed into the venv when possible,
989 echo "python version: $($python --version)"
991 python="$($python -B "${source_path}/python/scripts/mkvenv.py" create pyvenv)"
992 if test "$?" -ne 0 ; then
997 python="$python -B"
1002 $mkvenv ensuregroup --dir "${source_path}/python/wheels" \
1016 mkvenv_online_flag=" --online"
1036 if test -z "$ninja"; then
1037 for c in ninja ninja-build samu; do
1039 ninja=$(command -v "$c")
1043 if test -z "$ninja"; then
1053 error_exit "Unrecognized host OS (uname -s reports '$(uname -s)')"
1065 error_exit "Can't enable plugins on non-TCG builds"
1075 if test "$plugins" != "no" && test $host_bits -eq 64; then
1076 if has_meson_option "-Dtcg_interpreter=true"; then
1103 pie_ldflags=-static-pie
1105 pie_ldflags=-pie
1107 if compile_prog "-Werror -fPIE -DPIE" "$pie_ldflags"; then
1110 error_exit "-static-pie not available due to missing toolchain support"
1119 if test -z "${target_list+xxx}" ; then
1127 target_list=$(echo "$target_list" | sed -e 's/,/ /g')
1142 if test -z "$target_list"; then
1152 if test -n "$gdb_bin"; then
1153 gdb_version_string=$($gdb_bin --version | head -n 1)
1157 gdb_arches=$($python "$source_path/scripts/probe-gdb-support.py" $gdb_bin)
1193 if test "$rust" != disabled && has "$rustc" && $rustc -vV > "${TMPDIR1}/${TMPB}.out"; then
1194 rust_host_triple=$(sed -n 's/^host: //p' "${TMPDIR1}/${TMPB}.out")
1201 if test "$rust" != disabled && test -z "$rust_target_triple"; then
1212 # e.g. aarch64-apple-darwin
1238 # e.g. arm-unknown-linux-gnueabi, arm-unknown-linux-gnueabihf
1241 if $READELF -A $TMPO | grep Tag_API_VFP_args: > /dev/null; then
1249 # e.g. mips64-unknown-linux-gnuabi64
1256 # e.g. arm-unknown-netbsd-eabihf
1266 # e.g. aarch64-pc-windows-gnullvm, x86_64-pc-windows-gnu (MSVC not supported)
1276 # now tweak the architecture part, possibly based on pre-canonicalization --cpu
1279 # preserve ISA version (armv7 etc.) from $raw_cpu if passed via --cpu
1291 # e.g. riscv64gc-unknown-linux-gnu, but riscv64-linux-android
1303 # e.g. x86_64-unknown-linux-gnux32
1309 # e.g. aarch64-linux-android
1310 rust_target_triple=$rust_arch-$rust_os-$rust_osvariant
1312 rust_target_triple=$rust_arch-$rust_machine-$rust_os${rust_osvariant:+-$rust_osvariant}
1317 # functions to probe cross compilers
1322 case $($python "$source_path"/tests/docker/docker.py --engine "$container_engine" probe) in
1328 docker_py="$python $source_path/tests/docker/docker.py --engine $container"
1333 # cross compilers defaults, can be overridden with --cross-cc-ARCH
1334 : ${cross_prefix_aarch64="aarch64-linux-gnu-"}
1336 : ${cross_prefix_alpha="alpha-linux-gnu-"}
1337 : ${cross_prefix_arm="arm-linux-gnueabihf-"}
1339 : ${cross_prefix_hexagon="hexagon-unknown-linux-musl-"}
1340 : ${cross_prefix_loongarch64="loongarch64-unknown-linux-gnu-"}
1341 : ${cross_prefix_hppa="hppa-linux-gnu-"}
1342 : ${cross_prefix_i386="i686-linux-gnu-"}
1343 : ${cross_prefix_m68k="m68k-linux-gnu-"}
1344 : ${cross_prefix_microblaze="microblaze-linux-musl-"}
1345 : ${cross_prefix_mips64el="mips64el-linux-gnuabi64-"}
1346 : ${cross_prefix_mips64="mips64-linux-gnuabi64-"}
1347 : ${cross_prefix_mipsel="mipsel-linux-gnu-"}
1348 : ${cross_prefix_mips="mips-linux-gnu-"}
1349 : ${cross_prefix_ppc="powerpc-linux-gnu-"}
1350 : ${cross_prefix_ppc64="powerpc64-linux-gnu-"}
1352 : ${cross_prefix_riscv64="riscv64-linux-gnu-"}
1353 : ${cross_prefix_s390x="s390x-linux-gnu-"}
1354 : ${cross_prefix_sh4="sh4-linux-gnu-"}
1355 : ${cross_prefix_sparc64="sparc64-linux-gnu-"}
1357 : ${cross_prefix_tricore="tricore-"}
1358 : ${cross_prefix_x86_64="x86_64-linux-gnu-"}
1361 : ${cross_cc_cflags_aarch64_be="-mbig-endian"}
1363 : ${cross_cc_cflags_armeb="-mbig-endian"}
1364 : ${cross_cc_hexagon="hexagon-unknown-linux-musl-clang"}
1365 : ${cross_cc_cflags_hexagon="-mv73 -O2 -static"}
1366 : ${cross_cc_cflags_i386="-m32"}
1367 : ${cross_cc_cflags_ppc="-m32 -mbig-endian"}
1368 : ${cross_cc_cflags_ppc64="-m64 -mbig-endian"}
1370 : ${cross_cc_cflags_ppc64le="-m64 -mlittle-endian"}
1371 : ${cross_cc_cflags_sparc64="-m64 -mcpu=ultrasparc"}
1373 : ${cross_cc_cflags_sparc="-m32 -mcpu=supersparc"}
1374 : ${cross_cc_cflags_x86_64="-m64 -mcx16"}
1378 if eval test -n "\"\${cross_prefix_$1}\""; then
1397 # Look for a compiler for the given target, either native or cross.
1399 # if a Docker-based cross-compiler image is known for the target.
1400 # Set got_cross_cc to yes/no depending on whether a non-container-based
1403 # If TARGET is a user-mode emulation target, also set build_static to
1421 target_arch=${1%%-*}
1452 # debian-all-test-cross architectures
1455 container_image=debian-all-test-cross
1456 container_cross_prefix=aarch64-linux-gnu-
1459 container_image=debian-all-test-cross
1462 container_image=debian-all-test-cross
1463 container_cross_prefix=mips64-linux-gnuabi64-
1466 container_image=debian-all-test-cross
1467 container_cross_prefix=powerpc${target_arch#ppc}-linux-gnu-
1470 # debian-legacy-test-cross architectures (need Debian 11)
1471 # - libc6.1-dev-alpha-cross: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1054412
1472 # - sh4-linux-user: binaries don't run with bookworm compiler
1475 container_image=debian-legacy-test-cross
1482 container_image=debian-arm64-cross
1486 container_image=debian-armhf-cross
1487 container_cross_prefix=arm-linux-gnueabihf-
1490 container_cross_prefix=hexagon-unknown-linux-musl-
1494 container_image=debian-i686-cross
1495 container_cross_prefix=i686-linux-gnu-
1498 container_image=debian-loongarch-cross
1499 container_cross_prefix=loongarch64-unknown-linux-gnu-
1502 container_cross_prefix=microblaze-linux-musl-
1505 container_image=debian-all-test-cross
1506 container_cross_prefix=mips64el-linux-gnuabi64-
1509 container_image=debian-tricore-cross
1510 container_cross_prefix=tricore-
1513 container_image=debian-amd64-cross
1516 container_image=debian-xtensa-cross
1519 container_cross_prefix=/opt/2020.07/xtensa-dc232b-elf/bin/xtensa-dc232b-elf-
1523 : ${container_image:=debian-$target_arch-cross}
1524 : ${container_cross_prefix:=$target_arch-linux-gnu-}
1535 try=cross
1536 # For softmmu/roms also look for a bi-endian or multilib-enabled host compiler
1546 try='native cross' ;;
1563 cross)
1565 if eval test -n "\"\${cross_cc_$target_arch}\""; then
1583 if test -n "$target_cc"; then
1586 if $target_cc --version | grep -qi "clang"; then
1591 elif test -n "$target_as" && test -n "$target_ld"; then
1594 tricore-softmmu)
1609 *-softmmu)
1610 if do_compiler "$target_cc" $target_cflags -o $TMPO -c $TMPC &&
1611 …do_compiler "$target_cc" $target_cflags -r -nostdlib -o "${TMPDIR1}/${TMPB}2.o" "$TMPO" -lgcc; then
1617 if do_compiler "$target_cc" $target_cflags -o $TMPE $TMPC -static ; then
1622 if do_compiler "$target_cc" $target_cflags -o $TMPE $TMPC ; then
1642 test -n "$target_cc"
1647 if test -z "$target_cc" && test -z "$target_as"; then
1648 test -z "$container_image" && error_exit "Internal error: could not find cross compiler for $1?"
1649 echo "$1: docker-image-$container_image" >> Makefile.prereqs
1650 if test -n "$container_cross_cc"; then
1651 echo "CC=$docker_py cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --"
1652 echo "CCAS=$docker_py cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --"
1654 echo "AR=$docker_py cc --cc $container_cross_ar -i qemu/$container_image -s $source_path --"
1655 echo "AS=$docker_py cc --cc $container_cross_as -i qemu/$container_image -s $source_path --"
1656 echo "LD=$docker_py cc --cc $container_cross_ld -i qemu/$container_image -s $source_path --"
1657 echo "NM=$docker_py cc --cc $container_cross_nm -i qemu/$container_image -s $source_path --"
1658 …echo "OBJCOPY=$docker_py cc --cc $container_cross_objcopy -i qemu/$container_image -s $source_path…
1659 …echo "RANLIB=$docker_py cc --cc $container_cross_ranlib -i qemu/$container_image -s $source_path -…
1660 … echo "STRIP=$docker_py cc --cc $container_cross_strip -i qemu/$container_image -s $source_path --"
1662 if test -n "$target_cc"; then
1666 if test -n "$target_ar"; then
1669 if test -n "$target_as"; then
1672 if test -n "$target_ld"; then
1675 if test -n "$target_nm"; then
1678 if test -n "$target_objcopy"; then
1681 if test -n "$target_ranlib"; then
1684 if test -n "$target_strip"; then
1691 # cross-compiled firmware targets
1697 # added to the source tree -- nothing will cause configure to be rerun
1703 LINKS="$LINKS pc-bios/optionrom/Makefile"
1704 LINKS="$LINKS pc-bios/s390-ccw/Makefile"
1705 LINKS="$LINKS pc-bios/vof/Makefile"
1708 LINKS="$LINKS tests/qemu-iotests/check tests/qemu-iotests/Makefile"
1711 if [ -e "$source_path/$f" ]; then
1717 if test "$host_os" = "linux" && test -n "$linux_arch"; then
1718 symlink "$source_path/linux-headers/asm-$linux_arch" linux-headers/asm
1721 echo "# Automatically generated by configure - do not modify" > Makefile.prereqs
1724 if have_target i386-softmmu x86_64-softmmu && \
1727 probe_target_compiler i386-softmmu; then
1728 subdirs="$subdirs pc-bios/optionrom"
1729 config_mak=pc-bios/optionrom/config.mak
1730 echo "# Automatically generated by configure - do not modify" > $config_mak
1735 if have_target ppc-softmmu ppc64-softmmu && \
1736 probe_target_compiler ppc-softmmu; then
1737 subdirs="$subdirs pc-bios/vof"
1738 config_mak=pc-bios/vof/config.mak
1739 echo "# Automatically generated by configure - do not modify" > $config_mak
1740 echo "SRC_DIR=$source_path/pc-bios/vof" >> $config_mak
1744 # Only build s390-ccw bios if the compiler has -march=z900 or -march=z10
1746 if have_target s390x-softmmu && probe_target_compiler s390x-softmmu && \
1747 …GIT=git "$source_path/scripts/git-submodule.sh" "$git_submodules_action" roms/SLOF >> config.log 2…
1749 do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC
1751 …00 = 0 ] || do_compiler "$target_cc" $target_cc_cflags -march=z10 -msoft-float -Werror -o $TMPO -c…
1754 echo " The s390-ccw bios will only work with guest CPUs >= z10."
1756 subdirs="$subdirs pc-bios/s390-ccw"
1757 config_mak=pc-bios/s390-ccw/config-host.mak
1758 echo "# Automatically generated by configure - do not modify" > $config_mak
1759 echo "SRC_PATH=$source_path/pc-bios/s390-ccw" >> $config_mak
1766 # generate config-host.mak
1768 config_host_mak="config-host.mak"
1770 echo "# Automatically generated by configure - do not modify" > $config_host_mak
1796 mkdir -p tests/tcg
1797 echo "# Automatically generated by configure - do not modify" > tests/tcg/$config_host_mak
1805 arch=${target%%-*}
1808 xtensa*-linux-user)
1809 # the toolchain is not complete with headers, only build system tests
1812 *-softmmu)
1813 test -f "$source_path/tests/tcg/$arch/Makefile.softmmu-target" || continue
1814 qemu="qemu-system-$arch"
1816 *-linux-user|*-bsd-user)
1817 qemu="qemu-$arch"
1821 if probe_target_compiler $target || test -n "$container_image"; then
1822 test -n "$container_image" && build_static=y
1823 mkdir -p "tests/tcg/$target"
1824 config_target_mak=tests/tcg/$target/config-target.mak
1825 ln -sf "$source_path/tests/tcg/Makefile.target" "tests/tcg/$target/Makefile"
1826 echo "# Automatically generated by configure - do not modify" > "$config_target_mak"
1829 write_target_makefile "build-tcg-tests-$target" >> "$config_target_mak"
1843 # GDB has to support MTE in baremetal to allow debugging MTE in QEMU system mode
1847 echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> Makefile.prereqs
1857 cross="config-meson.cross.new"
1863 echo "# Automatically generated by configure - do not modify" > $cross
1864 echo "[properties]" >> $cross
1869 echo "${a}-softmmu = '$c'" >> $cross
1872 echo "[built-in options]" >> $cross
1873 echo "c_args = [$(meson_quote $CFLAGS $EXTRA_CFLAGS)]" >> $cross
1874 echo "cpp_args = [$(meson_quote $CXXFLAGS $EXTRA_CXXFLAGS)]" >> $cross
1875 test -n "$objcc" && echo "objc_args = [$(meson_quote $OBJCFLAGS $EXTRA_OBJCFLAGS)]" >> $cross
1876 echo "c_link_args = [$(meson_quote $CFLAGS $LDFLAGS $EXTRA_CFLAGS $EXTRA_LDFLAGS)]" >> $cross
1877 …echo "cpp_link_args = [$(meson_quote $CXXFLAGS $LDFLAGS $EXTRA_CXXFLAGS $EXTRA_LDFLAGS)]" >> $cross
1880 echo "# environment defaults, can still be overridden on " >> $cross
1881 echo "# the command line" >> $cross
1882 if test -e "$source_path/.git" && \
1884 echo 'werror = true' >> $cross
1886 echo "[project options]" >> $cross
1888 echo "smbd = $(meson_quote "$SMBD")" >> $cross
1891 echo "qemu_ga_manufacturer = $(meson_quote "${QEMU_GA_MANUFACTURER}")" >> $cross
1894 echo "qemu_ga_distro = $(meson_quote "${QEMU_GA_DISTRO}")" >> $cross
1897 echo "qemu_ga_version = $(meson_quote "${QEMU_GA_VERSION}")" >> $cross
1900 echo >> $cross
1901 echo "[binaries]" >> $cross
1902 echo "c = [$(meson_quote $cc $CPU_CFLAGS)]" >> $cross
1903 test -n "$cxx" && echo "cpp = [$(meson_quote $cxx $CPU_CFLAGS)]" >> $cross
1904 test -n "$objcc" && echo "objc = [$(meson_quote $objcc $CPU_CFLAGS)]" >> $cross
1907 echo "rust = [$(meson_quote $rustc --target "$rust_target_triple")]" >> $cross
1909 echo "rust = [$(meson_quote $rustc)]" >> $cross
1912 echo "ar = [$(meson_quote $ar)]" >> $cross
1913 echo "dlltool = [$(meson_quote $dlltool)]" >> $cross
1914 echo "nm = [$(meson_quote $nm)]" >> $cross
1915 echo "pkgconfig = [$(meson_quote $pkg_config)]" >> $cross
1916 echo "pkg-config = [$(meson_quote $pkg_config)]" >> $cross
1917 echo "ranlib = [$(meson_quote $ranlib)]" >> $cross
1918 echo "readelf = [$(meson_quote $readelf)]" >> $cross
1920 echo "sdl2-config = [$(meson_quote $sdl2_config)]" >> $cross
1922 echo "strip = [$(meson_quote $strip)]" >> $cross
1923 echo "widl = [$(meson_quote $widl)]" >> $cross
1924 echo "windres = [$(meson_quote $windres)]" >> $cross
1925 echo "windmc = [$(meson_quote $windmc)]" >> $cross
1927 echo "[host_machine]" >> $cross
1928 echo "system = '$host_os'" >> $cross
1931 echo "cpu_family = 'x86'" >> $cross
1934 echo "cpu_family = '$cpu'" >> $cross
1937 echo "cpu = '$cpu'" >> $cross
1939 echo "endian = 'big'" >> $cross
1941 echo "endian = 'little'" >> $cross
1944 native="config-meson.native.new"
1945 echo "# Automatically generated by configure - do not modify" > $native
1949 echo "rust = [$(meson_quote $rustc)]" >> $cross
1951 mv $native config-meson.native
1952 meson_option_add --native-file
1953 meson_option_add config-meson.native
1955 mv $cross config-meson.cross
1956 meson_add_machine_file config-meson.cross
1957 if test -f "$source_path/configs/meson/$host_os.txt"; then
1961 rm -rf meson-private meson-info meson-logs
1963 test "$download" = "disabled" && meson_option_add "--wrap-mode=nodownload"
1964 test "$default_feature" = no && meson_option_add -Dauto_features=disabled
1965 test "$static" = yes && meson_option_add -Dprefer_static=true
1966 test "$pie" = no && meson_option_add -Db_pie=false
1969 test "$rust" != "disabled" && meson_option_add "-Drust=$rust"
1970 test "$cfi" != false && meson_option_add "-Dcfi=$cfi" "-Db_lto=$cfi"
1971 test "$docs" != auto && meson_option_add "-Ddocs=$docs"
1972 test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add "-Dfuzzing_engine=$LIB_FUZZING_ENGINE"
1973 test "$plugins" = yes && meson_option_add "-Dplugins=true"
1974 test "$tcg" != enabled && meson_option_add "-Dtcg=$tcg"
1979 if test "$?" -ne 0 ; then
1984 if test -f meson-private/cmd_line.txt; then
1986 # sed -i is not portable
1987 perl -i -ne '
1989 print;' meson-private/cmd_line.txt
2007 if test -n "$envval"
2048 test "$i" = --skip-meson || printf " %s" "$(quote_sh "$i")" >>config.status
2053 rm -r "$TMPDIR1"