Lines Matching +full:clang +full:- +full:user
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 --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'
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)
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)
299 # clang (if available)
301 if test -z "${objcc}${cross_prefix}"; then
302 if has clang; then
303 objcc=clang
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
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.
463 CPU_CFLAGS="-m32"
486 CPU_CFLAGS="-m32"
491 CPU_CFLAGS="-m64 -mbig-endian"
497 CPU_CFLAGS="-m64 -mlittle-endian"
507 CPU_CFLAGS="-m31"
512 CPU_CFLAGS="-m64"
517 CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc"
521 CPU_CFLAGS="-m64 -mcpu=ultrasparc"
528 CPU_CFLAGS="-mx32"
534 CPU_CFLAGS="-m64"
537 CPU_CFLAGS="-m32"
541 if test -n "$host_arch" && {
542 ! test -d "$source_path/linux-user/include/host/$host_arch" ||
543 ! test -d "$source_path/common-user/host/$host_arch"; }; then
544 error_exit "linux-user/include/host/$host_arch does not exist." \
547 if test -n "$linux_arch" && ! test -d "$source_path/linux-headers/asm-$linux_arch"; then
548 error_exit "linux-headers/asm-$linux_arch does not exist." \
554 # NB: a True python conditional creates a non-zero return code (Failure)
555 "$1" -c 'import sys; sys.exit(sys.version_info < (3,9))'
559 if test -z "${PYTHON}"; then
565 python=$(command -v "$binary")
578 python=$(command -v "$PYTHON")
593 genisoimage=$(command -v "$binary")
612 printf "%s" "$e" | sed -e 's/\([\"]\)/\\\1/g'
618 . "$source_path/scripts/meson-buildoptions.sh"
629 if test $? -eq 1; then
631 echo "Try '$0 --help' for more information"
641 meson_option_add --cross-file "$1"
643 meson_option_add --native-file "$1"
650 --help|-h) show_help=yes
652 --version|-V) exec cat "$source_path/VERSION"
654 --cross-prefix=*)
656 --cc=*)
658 --host-cc=*) host_cc="$optarg"
660 --cxx=*)
662 --objcc=*)
664 --rustc=*)
666 --rustdoc=*)
668 --make=*)
670 --install=*)
672 --python=*) python="$optarg"
674 --skip-meson) skip_meson=yes
676 --ninja=*) ninja="$optarg"
678 --extra-cflags=*)
680 --extra-cxxflags=*)
682 --extra-objcflags=*)
684 --extra-ldflags=*)
686 --cross-cc-*)
688 --cross-prefix-*)
690 --enable-docs) docs=enabled
692 --disable-docs) docs=disabled
694 --cpu=*)
696 --target-list=*) target_list="$optarg"
698 error_exit "Can't mix --target-list with --target-list-exclude"
701 --target-list-exclude=*) target_list_exclude="$optarg"
703 error_exit "Can't mix --target-list-exclude with --target-list"
706 --with-default-devices) meson_option_add -Ddefault_devices=true
708 --without-default-devices) meson_option_add -Ddefault_devices=false
710 --with-devices-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --with-devices-FOO option"
712 --with-devices-*) device_arch=${opt#--with-devices-};
714 cf=$source_path/configs/devices/$device_arch-softmmu/$optarg.mak
715 if test -f "$cf"; then
722 --without-default-features) # processed above
724 --static) static="yes"
726 --host=*|--build=*|\
727 --disable-dependency-tracking|\
728 --sbindir=*|--sharedstatedir=*|\
729 --oldincludedir=*|--datarootdir=*|--infodir=*|\
730 --htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
732 # autoconf-generated configure scripts. This allows QEMU's
736 --enable-debug)
738 meson_option_parse --enable-debug-tcg ""
739 meson_option_parse --enable-debug-graph-lock ""
740 meson_option_parse --enable-debug-mutex ""
741 meson_option_add -Doptimization=0
742 default_cflags='-O0 -g'
744 --disable-tcg) tcg="disabled"
746 --enable-tcg) tcg="enabled"
748 --disable-system) system="no"
750 --enable-system) system="yes"
752 --disable-user)
756 --enable-user) ;;
757 --disable-linux-user) linux_user="no"
759 --enable-linux-user) linux_user="yes"
761 --disable-bsd-user) bsd_user="no"
763 --enable-bsd-user) bsd_user="yes"
765 --enable-pie) pie="yes"
767 --disable-pie) pie="no"
769 --enable-cfi) cfi=true
771 --disable-cfi) cfi=false
773 --disable-download) download="disabled"; git_submodules_action=validate;
775 --enable-download) download="enabled"; git_submodules_action=update;
777 --enable-plugins) plugins="yes"
779 --disable-plugins) plugins="no"
781 --enable-containers) use_containers="yes"
783 --disable-containers) use_containers="no"
785 --container-engine=*) container_engine="$optarg"
787 --rust-target-triple=*) rust_target_triple="$optarg"
789 --gdb=*) gdb_bin="$optarg"
791 --enable-rust) rust=enabled
793 --disable-rust) rust=disabled
796 --*) meson_option_parse "$opt" "$optarg"
798 # Pass through -Dxxxx options to meson
799 -D*) meson_option_add "$opt"
804 if ! test -e "$source_path/.git"
809 if ! test -f "$source_path/subprojects/keycodemapdb/README" \
815 if test -e "$source_path/.git"; then
816 echo "--disable-download specified but subprojects were not"
818 echo "before configuring QEMU, or remove --disable-download"
823 echo "to acquire QEMU source archives. Non-GIT builds are only"
828 echo "Developers working with GIT can use scripts/archive-source.sh"
838 if [ -n "$host_arch" ] && [ -d "$source_path/common-user/host/$host_arch" ]; then
843 error_exit "linux-user not supported on this architecture"
846 mak_wilds="${mak_wilds} $source_path/configs/targets/*-linux-user.mak"
853 if [ "$bsd_user" = yes ] && ! [ -d "$source_path/bsd-user/$host_os" ]; then
854 error_exit "bsd-user not supported on this host OS"
857 mak_wilds="${mak_wilds} $source_path/configs/targets/*-bsd-user.mak"
862 error_exit "user mode emulation not supported on this architecture"
866 mak_wilds="${mak_wilds} $source_path/configs/targets/*-softmmu.mak"
871 if echo "$target_list_exclude" | grep -vq "$target"; then
883 --help print this message
884 --target-list=LIST set target list (default: build all)
886 fold -s -w 53 | sed -e 's/^/ /')
887 --target-list-exclude=LIST exclude a set of targets from the default target-list
890 -Dmesonoptname=val passthrough option to meson unmodified
891 --cross-prefix=PREFIX use PREFIX for compile tools, PREFIX can be blank [$cross_prefix]
892 --cc=CC use C compiler CC [$cc]
893 --host-cc=CC when cross compiling, use C compiler CC for code run
895 --cxx=CXX use C++ compiler CXX [$cxx]
896 --objcc=OBJCC use Objective-C compiler OBJCC [$objcc]
897 --rustc=RUSTC use Rust compiler RUSTC [$rustc]
898 --rustdoc=RUSTDOC use rustdoc binary RUSTDOC [$rustdoc]
899 --extra-cflags=CFLAGS append extra C compiler flags CFLAGS
900 --extra-cxxflags=CXXFLAGS append extra C++ compiler flags CXXFLAGS
901 --extra-objcflags=OBJCFLAGS append extra Objective C compiler flags OBJCFLAGS
902 --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS
903 --cross-cc-ARCH=CC use compiler when building ARCH guest test cases
904 --cross-cc-cflags-ARCH= use compiler flags when building ARCH guest tests
905 --cross-prefix-ARCH=PREFIX cross compiler prefix when building ARCH guest test cases
906 --python=PYTHON use specified python [$python]
907 --ninja=NINJA use specified ninja [$ninja]
908 --static enable static build [$static]
909 --rust-target-triple=TRIPLE compilation target for Rust code [autodetect]
910 --without-default-features default all --enable-* options to "disabled"
911 --without-default-devices do not include any device that is not needed to
914 --with-devices-ARCH=NAME override default configs/devices
915 --enable-debug enable common debug build options
916 --cpu=CPU Build for host CPU [$cpu]
917 --disable-containers don't use containers for cross-building
918 --container-engine=TYPE which container engine to use [$container_engine]
919 --gdb=GDB-path gdb to use for gdbstub tests [$gdb_bin]
924 user supported user emulation targets
925 linux-user all linux usermode emulation targets
926 bsd-user all BSD usermode emulation targets
934 # Now that we are sure that the user did not only want to print the --help
935 # information, we should double-check that the C compiler really works:
942 rm -f ./*/config-devices.mak.d
944 if test -z "$python"
948 if test -n "$first_python"; then
950 "Use --python=/path/to/python to specify a supported Python."
952 error_exit "Python not found. Use --python=/path/to/python"
958 "Use --python=/path/to/python to specify a supported Python." \
965 python="$(command -v "$python")"
974 # - venv is cleared if it exists already;
975 # - venv is allowed to use system packages;
976 # - all setup can be performed offline;
977 # - missing packages may be fetched from PyPI,
978 # unless --disable-download is passed.
979 # - pip is not installed into the venv when possible,
983 echo "python version: $($python --version)"
985 python="$($python -B "${source_path}/python/scripts/mkvenv.py" create pyvenv)"
986 if test "$?" -ne 0 ; then
991 python="$python -B"
996 $mkvenv ensuregroup --dir "${source_path}/python/wheels" \
1010 mkvenv_online_flag=" --online"
1030 if test -z "$ninja"; then
1031 for c in ninja ninja-build samu; do
1033 ninja=$(command -v "$c")
1037 if test -z "$ninja"; then
1047 error_exit "Unrecognized host OS (uname -s reports '$(uname -s)')"
1059 error_exit "Can't enable plugins on non-TCG builds"
1070 if has_meson_option "-Dtcg_interpreter=true"; then
1097 pie_ldflags=-static-pie
1099 pie_ldflags=-pie
1101 if compile_prog "-Werror -fPIE -DPIE" "$pie_ldflags"; then
1104 error_exit "-static-pie not available due to missing toolchain support"
1113 if test -z "${target_list+xxx}" ; then
1121 target_list=$(echo "$target_list" | sed -e 's/,/ /g')
1136 if test -z "$target_list"; then
1146 if test -n "$gdb_bin"; then
1147 gdb_version_string=$($gdb_bin --version | head -n 1)
1151 gdb_arches=$($python "$source_path/scripts/probe-gdb-support.py" $gdb_bin)
1187 meson_version=$($meson --version)
1195 if test "$rust" != disabled && has "$rustc" && $rustc -vV > "${TMPDIR1}/${TMPB}.out"; then
1196 rust_host_triple=$(sed -n 's/^host: //p' "${TMPDIR1}/${TMPB}.out")
1203 if test "$rust" != disabled && test -z "$rust_target_triple"; then
1214 # e.g. aarch64-apple-darwin
1240 # e.g. arm-unknown-linux-gnueabi, arm-unknown-linux-gnueabihf
1243 if $READELF -A $TMPO | grep Tag_API_VFP_args: > /dev/null; then
1251 # e.g. mips64-unknown-linux-gnuabi64
1258 # e.g. arm-unknown-netbsd-eabihf
1268 # e.g. aarch64-pc-windows-gnullvm, x86_64-pc-windows-gnu (MSVC not supported)
1278 # now tweak the architecture part, possibly based on pre-canonicalization --cpu
1281 # preserve ISA version (armv7 etc.) from $raw_cpu if passed via --cpu
1293 # e.g. riscv64gc-unknown-linux-gnu, but riscv64-linux-android
1305 # e.g. x86_64-unknown-linux-gnux32
1311 # e.g. aarch64-linux-android
1312 rust_target_triple=$rust_arch-$rust_os-$rust_osvariant
1314 rust_target_triple=$rust_arch-$rust_machine-$rust_os${rust_osvariant:+-$rust_osvariant}
1324 case $($python "$source_path"/tests/docker/docker.py --engine "$container_engine" probe) in
1330 docker_py="$python $source_path/tests/docker/docker.py --engine $container"
1335 # cross compilers defaults, can be overridden with --cross-cc-ARCH
1336 : ${cross_prefix_aarch64="aarch64-linux-gnu-"}
1338 : ${cross_prefix_alpha="alpha-linux-gnu-"}
1339 : ${cross_prefix_arm="arm-linux-gnueabihf-"}
1341 : ${cross_prefix_hexagon="hexagon-unknown-linux-musl-"}
1342 : ${cross_prefix_loongarch64="loongarch64-unknown-linux-gnu-"}
1343 : ${cross_prefix_hppa="hppa-linux-gnu-"}
1344 : ${cross_prefix_i386="i686-linux-gnu-"}
1345 : ${cross_prefix_m68k="m68k-linux-gnu-"}
1346 : ${cross_prefix_microblaze="microblaze-linux-musl-"}
1347 : ${cross_prefix_mips64el="mips64el-linux-gnuabi64-"}
1348 : ${cross_prefix_mips64="mips64-linux-gnuabi64-"}
1349 : ${cross_prefix_mipsel="mipsel-linux-gnu-"}
1350 : ${cross_prefix_mips="mips-linux-gnu-"}
1351 : ${cross_prefix_ppc="powerpc-linux-gnu-"}
1352 : ${cross_prefix_ppc64="powerpc64-linux-gnu-"}
1354 : ${cross_prefix_riscv64="riscv64-linux-gnu-"}
1355 : ${cross_prefix_s390x="s390x-linux-gnu-"}
1356 : ${cross_prefix_sh4="sh4-linux-gnu-"}
1357 : ${cross_prefix_sparc64="sparc64-linux-gnu-"}
1359 : ${cross_prefix_tricore="tricore-"}
1360 : ${cross_prefix_x86_64="x86_64-linux-gnu-"}
1363 : ${cross_cc_cflags_aarch64_be="-mbig-endian"}
1365 : ${cross_cc_cflags_armeb="-mbig-endian"}
1366 : ${cross_cc_hexagon="hexagon-unknown-linux-musl-clang"}
1367 : ${cross_cc_cflags_hexagon="-mv73 -O2 -static"}
1368 : ${cross_cc_cflags_i386="-m32"}
1369 : ${cross_cc_cflags_ppc="-m32 -mbig-endian"}
1370 : ${cross_cc_cflags_ppc64="-m64 -mbig-endian"}
1372 : ${cross_cc_cflags_ppc64le="-m64 -mlittle-endian"}
1373 : ${cross_cc_cflags_sparc64="-m64 -mcpu=ultrasparc"}
1375 : ${cross_cc_cflags_sparc="-m32 -mcpu=supersparc"}
1376 : ${cross_cc_cflags_x86_64="-m64 -mcx16"}
1380 if eval test -n "\"\${cross_prefix_$1}\""; then
1401 # if a Docker-based cross-compiler image is known for the target.
1402 # Set got_cross_cc to yes/no depending on whether a non-container-based
1405 # If TARGET is a user-mode emulation target, also set build_static to
1423 target_arch=${1%%-*}
1454 # debian-all-test-cross architectures
1457 container_image=debian-all-test-cross
1458 container_cross_prefix=aarch64-linux-gnu-
1461 container_image=debian-all-test-cross
1464 container_image=debian-all-test-cross
1465 container_cross_prefix=mips64-linux-gnuabi64-
1468 container_image=debian-all-test-cross
1469 container_cross_prefix=powerpc${target_arch#ppc}-linux-gnu-
1472 # debian-legacy-test-cross architectures (need Debian 11)
1473 # - libc6.1-dev-alpha-cross: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1054412
1474 # - sh4-linux-user: binaries don't run with bookworm compiler
1477 container_image=debian-legacy-test-cross
1484 container_image=debian-arm64-cross
1488 container_image=debian-armhf-cross
1489 container_cross_prefix=arm-linux-gnueabihf-
1492 container_cross_prefix=hexagon-unknown-linux-musl-
1493 container_cross_cc=${container_cross_prefix}clang
1496 container_image=debian-i686-cross
1497 container_cross_prefix=i686-linux-gnu-
1500 container_image=debian-loongarch-cross
1501 container_cross_prefix=loongarch64-unknown-linux-gnu-
1504 container_cross_prefix=microblaze-linux-musl-
1507 container_image=debian-all-test-cross
1508 container_cross_prefix=mips64el-linux-gnuabi64-
1511 container_image=debian-tricore-cross
1512 container_cross_prefix=tricore-
1515 container_image=debian-amd64-cross
1518 container_image=debian-xtensa-cross
1521 container_cross_prefix=/opt/2020.07/xtensa-dc232b-elf/bin/xtensa-dc232b-elf-
1525 : ${container_image:=debian-$target_arch-cross}
1526 : ${container_cross_prefix:=$target_arch-linux-gnu-}
1538 # For softmmu/roms also look for a bi-endian or multilib-enabled host compiler
1567 if eval test -n "\"\${cross_cc_$target_arch}\""; then
1585 if test -n "$target_cc"; then
1588 if $target_cc --version | grep -qi "clang"; then
1593 elif test -n "$target_as" && test -n "$target_ld"; then
1596 tricore-softmmu)
1611 *-softmmu)
1612 if do_compiler "$target_cc" $target_cflags -o $TMPO -c $TMPC &&
1613 …do_compiler "$target_cc" $target_cflags -r -nostdlib -o "${TMPDIR1}/${TMPB}2.o" "$TMPO" -lgcc; then
1619 if do_compiler "$target_cc" $target_cflags -o $TMPE $TMPC -static ; then
1624 if do_compiler "$target_cc" $target_cflags -o $TMPE $TMPC ; then
1644 test -n "$target_cc"
1649 if test -z "$target_cc" && test -z "$target_as"; then
1650 test -z "$container_image" && error_exit "Internal error: could not find cross compiler for $1?"
1651 echo "$1: docker-image-$container_image" >> Makefile.prereqs
1652 if test -n "$container_cross_cc"; then
1653 echo "CC=$docker_py cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --"
1654 echo "CCAS=$docker_py cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --"
1656 echo "AR=$docker_py cc --cc $container_cross_ar -i qemu/$container_image -s $source_path --"
1657 echo "AS=$docker_py cc --cc $container_cross_as -i qemu/$container_image -s $source_path --"
1658 echo "LD=$docker_py cc --cc $container_cross_ld -i qemu/$container_image -s $source_path --"
1659 echo "NM=$docker_py cc --cc $container_cross_nm -i qemu/$container_image -s $source_path --"
1660 …echo "OBJCOPY=$docker_py cc --cc $container_cross_objcopy -i qemu/$container_image -s $source_path…
1661 …echo "RANLIB=$docker_py cc --cc $container_cross_ranlib -i qemu/$container_image -s $source_path -…
1662 … echo "STRIP=$docker_py cc --cc $container_cross_strip -i qemu/$container_image -s $source_path --"
1664 if test -n "$target_cc"; then
1668 if test -n "$target_ar"; then
1671 if test -n "$target_as"; then
1674 if test -n "$target_ld"; then
1677 if test -n "$target_nm"; then
1680 if test -n "$target_objcopy"; then
1683 if test -n "$target_ranlib"; then
1686 if test -n "$target_strip"; then
1693 # cross-compiled firmware targets
1699 # added to the source tree -- nothing will cause configure to be rerun
1705 LINKS="$LINKS pc-bios/optionrom/Makefile"
1706 LINKS="$LINKS pc-bios/s390-ccw/Makefile"
1707 LINKS="$LINKS pc-bios/vof/Makefile"
1710 LINKS="$LINKS tests/qemu-iotests/check tests/qemu-iotests/Makefile"
1713 if [ -e "$source_path/$f" ]; then
1719 if test "$host_os" = "linux" && test -n "$linux_arch"; then
1720 symlink "$source_path/linux-headers/asm-$linux_arch" linux-headers/asm
1723 echo "# Automatically generated by configure - do not modify" > Makefile.prereqs
1726 if have_target i386-softmmu x86_64-softmmu && \
1729 probe_target_compiler i386-softmmu; then
1730 subdirs="$subdirs pc-bios/optionrom"
1731 config_mak=pc-bios/optionrom/config.mak
1732 echo "# Automatically generated by configure - do not modify" > $config_mak
1737 if have_target ppc-softmmu ppc64-softmmu && \
1738 probe_target_compiler ppc-softmmu; then
1739 subdirs="$subdirs pc-bios/vof"
1740 config_mak=pc-bios/vof/config.mak
1741 echo "# Automatically generated by configure - do not modify" > $config_mak
1742 echo "SRC_DIR=$source_path/pc-bios/vof" >> $config_mak
1746 # Only build s390-ccw bios if the compiler has -march=z900 or -march=z10
1747 # (which is the lowest architecture level that Clang supports)
1748 if have_target s390x-softmmu && probe_target_compiler s390x-softmmu && \
1749 …GIT=git "$source_path/scripts/git-submodule.sh" "$git_submodules_action" roms/SLOF >> config.log 2…
1751 do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC
1753 …00 = 0 ] || do_compiler "$target_cc" $target_cc_cflags -march=z10 -msoft-float -Werror -o $TMPO -c…
1756 echo " The s390-ccw bios will only work with guest CPUs >= z10."
1758 subdirs="$subdirs pc-bios/s390-ccw"
1759 config_mak=pc-bios/s390-ccw/config-host.mak
1760 echo "# Automatically generated by configure - do not modify" > $config_mak
1761 echo "SRC_PATH=$source_path/pc-bios/s390-ccw" >> $config_mak
1768 # generate config-host.mak
1770 config_host_mak="config-host.mak"
1772 echo "# Automatically generated by configure - do not modify" > $config_host_mak
1798 mkdir -p tests/tcg
1799 echo "# Automatically generated by configure - do not modify" > tests/tcg/$config_host_mak
1807 arch=${target%%-*}
1810 xtensa*-linux-user)
1814 *-softmmu)
1815 test -f "$source_path/tests/tcg/$arch/Makefile.softmmu-target" || continue
1816 qemu="qemu-system-$arch"
1818 *-linux-user|*-bsd-user)
1819 qemu="qemu-$arch"
1823 if probe_target_compiler $target || test -n "$container_image"; then
1824 test -n "$container_image" && build_static=y
1825 mkdir -p "tests/tcg/$target"
1826 config_target_mak=tests/tcg/$target/config-target.mak
1827 ln -sf "$source_path/tests/tcg/Makefile.target" "tests/tcg/$target/Makefile"
1828 echo "# Automatically generated by configure - do not modify" > "$config_target_mak"
1831 write_target_makefile "build-tcg-tests-$target" >> "$config_target_mak"
1849 echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> Makefile.prereqs
1859 cross="config-meson.cross.new"
1865 echo "# Automatically generated by configure - do not modify" > $cross
1871 echo "${a}-softmmu = '$c'" >> $cross
1874 echo "[built-in options]" >> $cross
1877 test -n "$objcc" && echo "objc_args = [$(meson_quote $OBJCFLAGS $EXTRA_OBJCFLAGS)]" >> $cross
1884 if test -e "$source_path/.git" && \
1905 test -n "$cxx" && echo "cpp = [$(meson_quote $cxx $CPU_CFLAGS)]" >> $cross
1906 test -n "$objcc" && echo "objc = [$(meson_quote $objcc $CPU_CFLAGS)]" >> $cross
1909 echo "rust = [$(meson_quote $rustc --target "$rust_target_triple")]" >> $cross
1910 echo "rustdoc = [$(meson_quote $rustdoc --target "$rust_target_triple")]" >> $cross
1920 echo "pkg-config = [$(meson_quote $pkg_config)]" >> $cross
1924 echo "sdl2-config = [$(meson_quote $sdl2_config)]" >> $cross
1948 native="config-meson.native.new"
1949 echo "# Automatically generated by configure - do not modify" > $native
1955 mv $native config-meson.native
1956 meson_option_add --native-file
1957 meson_option_add config-meson.native
1959 mv $cross config-meson.cross
1960 meson_add_machine_file config-meson.cross
1961 if test -f "$source_path/configs/meson/$host_os.txt"; then
1965 rm -rf meson-private meson-info meson-logs
1967 test "$download" = "disabled" && meson_option_add "--wrap-mode=nodownload"
1968 test "$default_feature" = no && meson_option_add -Dauto_features=disabled
1969 test "$static" = yes && meson_option_add -Dprefer_static=true
1970 test "$pie" = no && meson_option_add -Db_pie=false
1973 test "$rust" != "disabled" && meson_option_add "-Drust=$rust"
1974 test "$cfi" != false && meson_option_add "-Dcfi=$cfi" "-Db_lto=$cfi"
1975 test "$docs" != auto && meson_option_add "-Ddocs=$docs"
1976 test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add "-Dfuzzing_engine=$LIB_FUZZING_ENGINE"
1977 test "$plugins" = yes && meson_option_add "-Dplugins=true"
1978 test "$tcg" != enabled && meson_option_add "-Dtcg=$tcg"
1983 if test "$?" -ne 0 ; then
1988 if test -f meson-private/cmd_line.txt; then
1990 # sed -i is not portable
1991 perl -i -ne '
1993 print;' meson-private/cmd_line.txt
2011 if test -n "$envval"
2052 test "$i" = --skip-meson || printf " %s" "$(quote_sh "$i")" >>config.status
2057 rm -r "$TMPDIR1"
2062 echo 'the detected `libclang` does not match the expected `clang` version/target. In'
2063 echo 'this case you must pass the path to `clang` and `libclang` to your build'