From nobody Wed Nov 27 00:42:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1703179426; cv=none; d=zohomail.com; s=zohoarc; b=GgF82JfNThNnDosxWNB57PWYCVyEboH9FUd5aAuO3+iAheA+S4VmFK0llC/OQ3no+PKe8MTEM9KE0wilVY9oqioas4rOyiBwLUVHznJf7Psy6VhkOLNpBE8hGdUzoShBqqU/WBVzFrlP5Gj/wlMD5jrzPtTt65hDcbgXd8Pbr2M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703179426; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=o4uVjNyp+2pe0deYxzBMA34yvN2nwkTTTUs2trReG2U=; b=QAhj1BOxK2UVfdWVBOEDCE31HWVE/dpXMjsAUAoxC40VkW6HZi365o/qrrFD3viBkX4srWwHsbOK9jackZ1VfS8ov05JU1vV3dWS9WfqgDDZ0pnOWuR0cvdJxGGF93q7SS0kFA8vChVJ6gaEfpWe/xZLZIFr8jUZSCFy7EN8qiI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1703179426646104.08045979718509; Thu, 21 Dec 2023 09:23:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rGMj8-0007kp-GE; Thu, 21 Dec 2023 12:20:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rGMj6-0007kX-P8 for qemu-devel@nongnu.org; Thu, 21 Dec 2023 12:20:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rGMj2-0004ef-Aj for qemu-devel@nongnu.org; Thu, 21 Dec 2023 12:20:52 -0500 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-619-52JXoOY9Npe02H7YxVxvkg-1; Thu, 21 Dec 2023 12:20:44 -0500 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-40d3b0783beso7351905e9.3 for ; Thu, 21 Dec 2023 09:20:43 -0800 (PST) Received: from [192.168.10.118] ([2001:b07:6468:f312:4783:a68:c1ee:15c5]) by smtp.gmail.com with ESMTPSA id k4-20020a5d5244000000b003368c8d120fsm1072350wrc.7.2023.12.21.09.20.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 09:20:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703179246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o4uVjNyp+2pe0deYxzBMA34yvN2nwkTTTUs2trReG2U=; b=dJ1OmTIPL3/OlRdq5RPTNRMFaZwhsbvahlwvhyj3ceI6ntqKyQuRFsnVgDL50/cULPEko9 nsT8DHbaHze7XOKTDWXDs+S5buAhlxVGvEYzU2a+vPM6wtOHDRLytfT/34+gPMLiSA6xmx Ftu5SYqHreex0SgEZt58y4xmrxJL1yA= X-MC-Unique: 52JXoOY9Npe02H7YxVxvkg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703179242; x=1703784042; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o4uVjNyp+2pe0deYxzBMA34yvN2nwkTTTUs2trReG2U=; b=QV3b2XdQza5Vm4tUAU4LnDabtQz7IxTIBAsEOsCoeqQ8k+BZGsuN453eIsqRB20JQi wWfOm8xdn4JIJjUP7VZgyH2u6SXGg7v4ERh3lEPwQ8NCOuZgDppenoiHfewUquZmncDn vnXBssgam9eHFou6CABoVindO0BXOOyEulwQCnOdFc5o39vaRZT2aOYZh0TNOm7CJwz+ kcj2OG9njHvZVOzsemP7MLmMiSZ90Rjsjbwe+OXqImwIghwfWpQW6J2oRKoARlxQCHTj SRVjBwuHazIsVNKnpc+5UPJasuAcRixlp2ARCMr3xi9nQspqFrxpdlJ0ycZhkt4KBUH6 +vNw== X-Gm-Message-State: AOJu0YyLkucAabDqM8UHJyVlQwZWBNN3YIFFj5ZjzKdUDCvjc3bQjLho x4vCarV58U47Ln69fxhJQyGbKufjFQ/A0ot/iSvSm9T1qdLVuTzFGmR4cMbNcy95Cu8duDNEg12 U+ttPBEdZOjdnO4ORos3aI2CziBZRtTkndqYi7xKsDcVXSjIrkCQ23ZHoQf0AGeKNquBc9zngA/ I0/if4+OU= X-Received: by 2002:a05:600c:3201:b0:40b:4c54:3d78 with SMTP id r1-20020a05600c320100b0040b4c543d78mr38119wmp.28.1703179241392; Thu, 21 Dec 2023 09:20:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IG24+qmmUgbFYcEpbJZ1IvtTAYXi2RSbCgwyL1qm8ODmP14Vw19bFG6XwfqQUSV+xI7cV7Fow== X-Received: by 2002:a05:600c:3201:b0:40b:4c54:3d78 with SMTP id r1-20020a05600c320100b0040b4c543d78mr38094wmp.28.1703179239941; Thu, 21 Dec 2023 09:20:39 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 21/21] configure, meson: rename targetos to host_os Date: Thu, 21 Dec 2023 18:19:58 +0100 Message-ID: <20231221171958.59350-22-pbonzini@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231221171958.59350-1-pbonzini@redhat.com> References: <20231221171958.59350-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.061, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1703179428398100003 Content-Type: text/plain; charset="utf-8" This variable is about the host OS, not the target. It is used a lot more since the Meson conversion, but the original sin dates back to 2003. Time to fix it. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- accel/tcg/meson.build | 2 +- backends/meson.build | 4 +- block/meson.build | 4 +- bsd-user/meson.build | 2 +- chardev/meson.build | 4 +- configure | 58 ++++---- contrib/ivshmem-client/meson.build | 2 +- contrib/ivshmem-server/meson.build | 2 +- contrib/vhost-user-blk/meson.build | 2 +- contrib/vhost-user-input/meson.build | 2 +- contrib/vhost-user-scsi/meson.build | 2 +- docs/devel/kconfig.rst | 2 +- fsdev/meson.build | 2 +- hw/9pfs/meson.build | 4 +- hw/display/meson.build | 2 +- hw/ppc/meson.build | 2 +- hw/usb/meson.build | 4 +- meson.build | 206 +++++++++++++-------------- net/can/meson.build | 2 +- net/meson.build | 8 +- plugins/meson.build | 4 +- qga/meson.build | 16 +-- scsi/meson.build | 2 +- system/meson.build | 4 +- tests/fp/meson.build | 2 +- tests/meson.build | 2 +- tests/plugin/meson.build | 2 +- tests/qemu-iotests/meson.build | 2 +- tests/qtest/meson.build | 10 +- tests/unit/meson.build | 8 +- ui/dbus-display1.xml | 10 +- ui/meson.build | 8 +- util/meson.build | 8 +- 33 files changed, 197 insertions(+), 197 deletions(-) diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 1dad6bbbfbd..d25638d6c15 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -17,7 +17,7 @@ if get_option('plugins') tcg_ss.add(files('plugin-gen.c')) endif tcg_ss.add(when: libdw, if_true: files('debuginfo.c')) -if targetos =3D=3D 'linux' +if host_os =3D=3D 'linux' tcg_ss.add(files('perf.c')) endif specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss) diff --git a/backends/meson.build b/backends/meson.build index 6dee4e9203b..8b2b111497f 100644 --- a/backends/meson.build +++ b/backends/meson.build @@ -10,11 +10,11 @@ system_ss.add([files( 'confidential-guest-support.c', ), numa]) =20 -if targetos !=3D 'windows' +if host_os !=3D 'windows' system_ss.add(files('rng-random.c')) system_ss.add(files('hostmem-file.c')) endif -if targetos =3D=3D 'linux' +if host_os =3D=3D 'linux' system_ss.add(files('hostmem-memfd.c')) endif if keyutils.found() diff --git a/block/meson.build b/block/meson.build index ddea1e40070..e1f03fd773e 100644 --- a/block/meson.build +++ b/block/meson.build @@ -88,13 +88,13 @@ if get_option('parallels').allowed() block_ss.add(files('parallels.c', 'parallels-ext.c')) endif =20 -if targetos =3D=3D 'windows' +if host_os =3D=3D 'windows' block_ss.add(files('file-win32.c', 'win32-aio.c')) else block_ss.add(files('file-posix.c'), coref, iokit) endif block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c')) -if targetos =3D=3D 'linux' +if host_os =3D=3D 'linux' block_ss.add(files('nvme.c')) endif if get_option('replication').allowed() diff --git a/bsd-user/meson.build b/bsd-user/meson.build index c6bfd3b2b53..39bad0ae33e 100644 --- a/bsd-user/meson.build +++ b/bsd-user/meson.build @@ -24,6 +24,6 @@ kvm =3D cc.find_library('kvm', required: true) bsd_user_ss.add(elf, procstat, kvm) =20 # Pull in the OS-specific build glue, if any -subdir(targetos) +subdir(host_os) =20 specific_ss.add_all(when: 'CONFIG_BSD_USER', if_true: bsd_user_ss) diff --git a/chardev/meson.build b/chardev/meson.build index db6840b71af..c80337d15fa 100644 --- a/chardev/meson.build +++ b/chardev/meson.build @@ -12,7 +12,7 @@ chardev_ss.add(files( 'char-udp.c', 'char.c', )) -if targetos =3D=3D 'windows' +if host_os =3D=3D 'windows' chardev_ss.add(files( 'char-console.c', 'char-win-stdio.c', @@ -23,7 +23,7 @@ else 'char-fd.c', 'char-pty.c', ), util) - if targetos in ['linux', 'gnu/kfreebsd', 'freebsd', 'dragonfly'] + if host_os in ['linux', 'gnu/kfreebsd', 'freebsd', 'dragonfly'] chardev_ss.add(files('char-parallel.c')) endif endif diff --git a/configure b/configure index 38ca267096f..134010844d9 100755 --- a/configure +++ b/configure @@ -334,30 +334,30 @@ EOF } =20 if check_define __linux__ ; then - targetos=3Dlinux + host_os=3Dlinux elif check_define _WIN32 ; then - targetos=3Dwindows + host_os=3Dwindows elif check_define __OpenBSD__ ; then - targetos=3Dopenbsd + host_os=3Dopenbsd elif check_define __sun__ ; then - targetos=3Dsunos + host_os=3Dsunos elif check_define __HAIKU__ ; then - targetos=3Dhaiku + host_os=3Dhaiku elif check_define __FreeBSD__ ; then - targetos=3Dfreebsd + host_os=3Dfreebsd elif check_define __FreeBSD_kernel__ && check_define __GLIBC__; then - targetos=3Dgnu/kfreebsd + host_os=3Dgnu/kfreebsd elif check_define __DragonFly__ ; then - targetos=3Ddragonfly + host_os=3Ddragonfly elif check_define __NetBSD__; then - targetos=3Dnetbsd + host_os=3Dnetbsd elif check_define __APPLE__; then - targetos=3Ddarwin + host_os=3Ddarwin else # This is a fatal error, but don't report it yet, because we # might be going to just print the --help text, or it might # be the result of a missing compiler. - targetos=3Dbogus + host_os=3Dbogus fi =20 if test ! -z "$cpu" ; then @@ -573,13 +573,13 @@ do fi done =20 -if test "$targetos" =3D "windows" ; then +if test "$host_os" =3D "windows" ; then EXESUF=3D".exe" fi =20 meson_option_build_array() { printf '[' - (if test "$targetos" =3D windows; then + (if test "$host_os" =3D windows; then IFS=3D\; else IFS=3D: @@ -802,7 +802,7 @@ mak_wilds=3D"" =20 if [ -n "$host_arch" ] && [ -d "$source_path/common-user/host/$host_arch" = ]; then if [ "$linux_user" !=3D no ]; then - if [ "$targetos" =3D linux ]; then + if [ "$host_os" =3D linux ]; then linux_user=3Dyes elif [ "$linux_user" =3D yes ]; then error_exit "linux-user not supported on this architecture" @@ -813,9 +813,9 @@ if [ -n "$host_arch" ] && [ -d "$source_path/common-use= r/host/$host_arch" ]; the fi if [ "$bsd_user" !=3D no ]; then if [ "$bsd_user" =3D "" ]; then - test $targetos =3D freebsd && bsd_user=3Dyes + test $host_os =3D freebsd && bsd_user=3Dyes fi - if [ "$bsd_user" =3D yes ] && ! [ -d "$source_path/bsd-user/$targe= tos" ]; then + if [ "$bsd_user" =3D yes ] && ! [ -d "$source_path/bsd-user/$host_= os" ]; then error_exit "bsd-user not supported on this host OS" fi if [ "$bsd_user" =3D "yes" ]; then @@ -998,7 +998,7 @@ if test -z "$ninja"; then fi fi =20 -if test "$targetos" =3D "bogus"; then +if test "$host_os" =3D "bogus"; then # Now that we know that we're not printing the help and that # the compiler works (so the results of the check_defines we used # to identify the OS are reliable), if we didn't recognize the @@ -1007,7 +1007,7 @@ if test "$targetos" =3D "bogus"; then fi =20 # test for any invalid configuration combinations -if test "$targetos" =3D "windows" && ! has "$dlltool"; then +if test "$host_os" =3D "windows" && ! has "$dlltool"; then if test "$plugins" =3D "yes"; then error_exit "TCG plugins requires dlltool to build on Windows platforms" fi @@ -1041,7 +1041,7 @@ static THREAD int tls_var; int main(void) { return tls_var; } EOF =20 -if test "$targetos" =3D windows || test "$targetos" =3D haiku; then +if test "$host_os" =3D windows || test "$host_os" =3D haiku; then if test "$pie" =3D "yes"; then error_exit "PIE not available due to missing OS support" fi @@ -1540,8 +1540,8 @@ echo "# Automatically generated by configure - do not= modify" > Makefile.prereqs =20 # Mac OS X ships with a broken assembler if have_target i386-softmmu x86_64-softmmu && \ - test "$targetos" !=3D "darwin" && test "$targetos" !=3D "sunos" &&= \ - test "$targetos" !=3D "haiku" && \ + test "$host_os" !=3D "darwin" && test "$host_os" !=3D "sunos" && \ + test "$host_os" !=3D "haiku" && \ probe_target_compiler i386-softmmu; then subdirs=3D"$subdirs pc-bios/optionrom" config_mak=3Dpc-bios/optionrom/config.mak @@ -1605,7 +1605,7 @@ echo "NINJA=3D$ninja" >> $config_host_mak echo "EXESUF=3D$EXESUF" >> $config_host_mak =20 # use included Linux headers for KVM architectures -if test "$targetos" =3D "linux" && test -n "$linux_arch"; then +if test "$host_os" =3D "linux" && test -n "$linux_arch"; then symlink "$source_path/linux-headers/asm-$linux_arch" linux-headers/asm fi =20 @@ -1628,13 +1628,13 @@ echo "SRC_PATH=3D$source_path/contrib/plugins" >> c= ontrib/plugins/$config_host_mak echo "PKG_CONFIG=3D${pkg_config}" >> contrib/plugins/$config_host_mak echo "CC=3D$cc $CPU_CFLAGS" >> contrib/plugins/$config_host_mak echo "CFLAGS=3D${CFLAGS-$default_cflags} $EXTRA_CFLAGS" >> contrib/plugins= /$config_host_mak -if test "$targetos" =3D windows; then +if test "$host_os" =3D windows; then echo "DLLTOOL=3D$dlltool" >> contrib/plugins/$config_host_mak fi -if test "$targetos" =3D darwin; then +if test "$host_os" =3D darwin; then echo "CONFIG_DARWIN=3Dy" >> contrib/plugins/$config_host_mak fi -if test "$targetos" =3D windows; then +if test "$host_os" =3D windows; then echo "CONFIG_WIN32=3Dy" >> contrib/plugins/$config_host_mak fi =20 @@ -1714,7 +1714,7 @@ if test "$skip_meson" =3D no; then echo "# environment defaults, can still be overridden on " >> $cross echo "# the command line" >> $cross if test -e "$source_path/.git" && \ - { test "$targetos" =3D linux || test "$targetos" =3D "windows"; }; t= hen + { test "$host_os" =3D linux || test "$host_os" =3D "windows"; }; then echo 'werror =3D true' >> $cross fi echo "[project options]" >> $cross @@ -1751,7 +1751,7 @@ if test "$skip_meson" =3D no; then echo "windmc =3D [$(meson_quote $windmc)]" >> $cross if test "$cross_compile" =3D "yes"; then echo "[host_machine]" >> $cross - echo "system =3D '$targetos'" >> $cross + echo "system =3D '$host_os'" >> $cross case "$cpu" in i386) echo "cpu_family =3D 'x86'" >> $cross @@ -1777,8 +1777,8 @@ if test "$skip_meson" =3D no; then fi mv $cross config-meson.cross meson_add_machine_file config-meson.cross - if test -f "$source_path/configs/meson/$targetos.txt"; then - meson_add_machine_file $source_path/configs/meson/$targetos.txt + if test -f "$source_path/configs/meson/$host_os.txt"; then + meson_add_machine_file $source_path/configs/meson/$host_os.txt fi =20 rm -rf meson-private meson-info meson-logs diff --git a/contrib/ivshmem-client/meson.build b/contrib/ivshmem-client/me= son.build index ce8dcca84dd..3c8b09af4bf 100644 --- a/contrib/ivshmem-client/meson.build +++ b/contrib/ivshmem-client/meson.build @@ -1,4 +1,4 @@ executable('ivshmem-client', files('ivshmem-client.c', 'main.c'), genh, dependencies: glib, - build_by_default: targetos =3D=3D 'linux', + build_by_default: host_os =3D=3D 'linux', install: false) diff --git a/contrib/ivshmem-server/meson.build b/contrib/ivshmem-server/me= son.build index c6c3c82e89f..1c8fea6594d 100644 --- a/contrib/ivshmem-server/meson.build +++ b/contrib/ivshmem-server/meson.build @@ -1,4 +1,4 @@ executable('ivshmem-server', files('ivshmem-server.c', 'main.c'), genh, dependencies: [qemuutil, rt], - build_by_default: targetos =3D=3D 'linux', + build_by_default: host_os =3D=3D 'linux', install: false) diff --git a/contrib/vhost-user-blk/meson.build b/contrib/vhost-user-blk/me= son.build index dcb9e2ffcd0..ac1eece37a4 100644 --- a/contrib/vhost-user-blk/meson.build +++ b/contrib/vhost-user-blk/meson.build @@ -1,4 +1,4 @@ executable('vhost-user-blk', files('vhost-user-blk.c'), dependencies: [qemuutil, vhost_user], - build_by_default: targetos =3D=3D 'linux', + build_by_default: host_os =3D=3D 'linux', install: false) diff --git a/contrib/vhost-user-input/meson.build b/contrib/vhost-user-inpu= t/meson.build index 21a9ed4f15e..840d866594b 100644 --- a/contrib/vhost-user-input/meson.build +++ b/contrib/vhost-user-input/meson.build @@ -1,4 +1,4 @@ executable('vhost-user-input', files('main.c'), dependencies: [qemuutil, vhost_user], - build_by_default: targetos =3D=3D 'linux', + build_by_default: host_os =3D=3D 'linux', install: false) diff --git a/contrib/vhost-user-scsi/meson.build b/contrib/vhost-user-scsi/= meson.build index cc893f6f203..44be04853e4 100644 --- a/contrib/vhost-user-scsi/meson.build +++ b/contrib/vhost-user-scsi/meson.build @@ -1,6 +1,6 @@ if libiscsi.found() executable('vhost-user-scsi', files('vhost-user-scsi.c'), dependencies: [qemuutil, libiscsi, vhost_user], - build_by_default: targetos =3D=3D 'linux', + build_by_default: host_os =3D=3D 'linux', install: false) endif diff --git a/docs/devel/kconfig.rst b/docs/devel/kconfig.rst index 73f52de1067..ccb9a46bd77 100644 --- a/docs/devel/kconfig.rst +++ b/docs/devel/kconfig.rst @@ -316,6 +316,6 @@ variable:: =20 host_kconfig =3D \ (have_tpm ? ['CONFIG_TPM=3Dy'] : []) + \ - (targetos =3D=3D 'linux' ? ['CONFIG_LINUX=3Dy'] : []) + \ + (host_os =3D=3D 'linux' ? ['CONFIG_LINUX=3Dy'] : []) + \ (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ ... diff --git a/fsdev/meson.build b/fsdev/meson.build index db67530d7f2..e20d7255e1e 100644 --- a/fsdev/meson.build +++ b/fsdev/meson.build @@ -5,7 +5,7 @@ fsdev_ss.add(when: ['CONFIG_FSDEV_9P'], if_true: files( '9p-marshal.c', 'qemu-fsdev.c', ), if_false: files('qemu-fsdev-dummy.c')) -if targetos in ['linux', 'darwin'] +if host_os in ['linux', 'darwin'] system_ss.add_all(fsdev_ss) endif =20 diff --git a/hw/9pfs/meson.build b/hw/9pfs/meson.build index 3eee7c268a9..f1b62fa8c80 100644 --- a/hw/9pfs/meson.build +++ b/hw/9pfs/meson.build @@ -13,9 +13,9 @@ fs_ss.add(files( 'coth.c', 'coxattr.c', )) -if targetos =3D=3D 'darwin' +if host_os =3D=3D 'darwin' fs_ss.add(files('9p-util-darwin.c')) -elif targetos =3D=3D 'linux' +elif host_os =3D=3D 'linux' fs_ss.add(files('9p-util-linux.c')) endif fs_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-9p-backend.c')) diff --git a/hw/display/meson.build b/hw/display/meson.build index ac0159c516e..f93a69f70f4 100644 --- a/hw/display/meson.build +++ b/hw/display/meson.build @@ -69,7 +69,7 @@ if config_all_devices.has_key('CONFIG_VIRTIO_GPU') virtio_gpu_ss =3D ss.source_set() virtio_gpu_ss.add(when: 'CONFIG_VIRTIO_GPU', if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c'), = pixman]) - if targetos =3D=3D 'linux' + if host_os =3D=3D 'linux' virtio_gpu_ss.add(files('virtio-gpu-udmabuf.c')) else virtio_gpu_ss.add(files('virtio-gpu-udmabuf-stubs.c')) diff --git a/hw/ppc/meson.build b/hw/ppc/meson.build index 3dedcf3043d..eba3406e7f3 100644 --- a/hw/ppc/meson.build +++ b/hw/ppc/meson.build @@ -34,7 +34,7 @@ ppc_ss.add(when: ['CONFIG_PSERIES', 'CONFIG_TCG'], if_tru= e: files( 'spapr_softmmu.c', )) ppc_ss.add(when: 'CONFIG_SPAPR_RNG', if_true: files('spapr_rng.c')) -if targetos =3D=3D 'linux' +if host_os =3D=3D 'linux' ppc_ss.add(when: 'CONFIG_PSERIES', if_true: files( 'spapr_pci_vfio.c', )) diff --git a/hw/usb/meson.build b/hw/usb/meson.build index b7755b638fc..2c13c528785 100644 --- a/hw/usb/meson.build +++ b/hw/usb/meson.build @@ -44,7 +44,7 @@ system_ss.add(when: 'CONFIG_USB_STORAGE_UAS', if_true: fi= les('dev-uas.c')) system_ss.add(when: 'CONFIG_USB_AUDIO', if_true: files('dev-audio.c')) system_ss.add(when: 'CONFIG_USB_SERIAL', if_true: files('dev-serial.c')) system_ss.add(when: 'CONFIG_USB_NETWORK', if_true: files('dev-network.c')) -if targetos !=3D 'windows' +if host_os !=3D 'windows' system_ss.add(when: 'CONFIG_USB_STORAGE_MTP', if_true: files('dev-mtp.c'= )) endif =20 @@ -60,7 +60,7 @@ endif =20 # U2F system_ss.add(when: 'CONFIG_USB_U2F', if_true: files('u2f.c')) -if targetos =3D=3D 'linux' +if host_os =3D=3D 'linux' system_ss.add(when: 'CONFIG_USB_U2F', if_true: [libudev, files('u2f-pass= thru.c')]) endif if u2f.found() diff --git a/meson.build b/meson.build index 6cf70cbfb89..eed49e4201b 100644 --- a/meson.build +++ b/meson.build @@ -18,7 +18,7 @@ keyval =3D import('keyval') ss =3D import('sourceset') fs =3D import('fs') =20 -targetos =3D host_machine.system() +host_os =3D host_machine.system() config_host =3D keyval.load(meson.current_build_dir() / 'config-host.mak') =20 # Temporary directory used for files created while @@ -61,11 +61,11 @@ python =3D import('python').find_installation() =20 cc =3D meson.get_compiler('c') all_languages =3D ['c'] -if targetos =3D=3D 'windows' and add_languages('cpp', required: false, nat= ive: false) +if host_os =3D=3D 'windows' and add_languages('cpp', required: false, nati= ve: false) all_languages +=3D ['cpp'] cxx =3D meson.get_compiler('cpp') endif -if targetos =3D=3D 'darwin' and \ +if host_os =3D=3D 'darwin' and \ add_languages('objc', required: get_option('cocoa'), native: false) all_languages +=3D ['objc'] objc =3D meson.get_compiler('objc') @@ -164,7 +164,7 @@ endif =20 modular_tcg =3D [] # Darwin does not support references to thread-local variables in modules -if targetos !=3D 'darwin' +if host_os !=3D 'darwin' modular_tcg =3D ['i386-softmmu', 'x86_64-softmmu'] endif =20 @@ -204,18 +204,18 @@ qemu_common_flags =3D [ qemu_cflags =3D [] qemu_ldflags =3D [] =20 -if targetos =3D=3D 'darwin' +if host_os =3D=3D 'darwin' # Disable attempts to use ObjectiveC features in os/object.h since they # won't work when we're compiling with gcc as a C compiler. if compiler.get_id() =3D=3D 'gcc' qemu_common_flags +=3D '-DOS_OBJECT_USE_OBJC=3D0' endif -elif targetos =3D=3D 'sunos' +elif host_os =3D=3D 'sunos' # needed for CMSG_ macros in sys/socket.h qemu_common_flags +=3D '-D_XOPEN_SOURCE=3D600' # needed for TIOCWIN* defines in termios.h qemu_common_flags +=3D '-D__EXTENSIONS__' -elif targetos =3D=3D 'haiku' +elif host_os =3D=3D 'haiku' qemu_common_flags +=3D ['-DB_USE_POSITIVE_POSIX_ERRORS', '-D_BSD_SOURCE'= , '-fPIC'] endif =20 @@ -299,10 +299,10 @@ ucontext_probe =3D ''' # For POSIX prefer ucontext, but it's not always possible. The fallback # is sigcontext. supported_backends =3D [] -if targetos =3D=3D 'windows' +if host_os =3D=3D 'windows' supported_backends +=3D ['windows'] else - if targetos !=3D 'darwin' and cc.links(ucontext_probe) + if host_os !=3D 'darwin' and cc.links(ucontext_probe) supported_backends +=3D ['ucontext'] endif supported_backends +=3D ['sigaltstack'] @@ -373,13 +373,13 @@ endif # The combination is known as "full relro", because .got.plt is read-only = too. qemu_ldflags +=3D cc.get_supported_link_arguments('-Wl,-z,relro', '-Wl,-z,= now') =20 -if targetos =3D=3D 'windows' +if host_os =3D=3D 'windows' qemu_ldflags +=3D cc.get_supported_link_arguments('-Wl,--no-seh', '-Wl,-= -nxcompat') qemu_ldflags +=3D cc.get_supported_link_arguments('-Wl,--dynamicbase', '= -Wl,--high-entropy-va') endif =20 # Exclude --warn-common with TSan to suppress warnings from the TSan libra= ries. -if targetos !=3D 'sunos' and not get_option('tsan') +if host_os !=3D 'sunos' and not get_option('tsan') qemu_ldflags +=3D cc.get_supported_link_arguments('-Wl,--warn-common') endif =20 @@ -489,7 +489,7 @@ warn_flags =3D [ '-Wshadow=3Dlocal', ] =20 -if targetos !=3D 'darwin' +if host_os !=3D 'darwin' warn_flags +=3D ['-Wthread-safety'] endif =20 @@ -509,7 +509,7 @@ if 'objc' in all_languages # Note sanitizer flags are not applied to Objective-C sources! add_project_arguments(objc.get_supported_arguments(warn_flags), native: = false, language: 'objc') endif -if targetos =3D=3D 'linux' +if host_os =3D=3D 'linux' add_project_arguments('-isystem', meson.current_source_dir() / 'linux-he= aders', '-isystem', 'linux-headers', language: all_languages) @@ -556,7 +556,7 @@ if get_option('fuzzing') and get_option('fuzzing_engine= ') =3D=3D '' and \ endif =20 # Tracing backends -if 'ftrace' in get_option('trace_backends') and targetos !=3D 'linux' +if 'ftrace' in get_option('trace_backends') and host_os !=3D 'linux' error('ftrace is supported only on Linux') endif if 'syslog' in get_option('trace_backends') and not cc.compiles(''' @@ -571,18 +571,18 @@ endif =20 # Miscellaneous Linux-only features get_option('mpath') \ - .require(targetos =3D=3D 'linux', error_message: 'Multipath is supported= only on Linux') + .require(host_os =3D=3D 'linux', error_message: 'Multipath is supported = only on Linux') =20 multiprocess_allowed =3D get_option('multiprocess') \ - .require(targetos =3D=3D 'linux', error_message: 'Multiprocess QEMU is s= upported only on Linux') \ + .require(host_os =3D=3D 'linux', error_message: 'Multiprocess QEMU is su= pported only on Linux') \ .allowed() =20 vfio_user_server_allowed =3D get_option('vfio_user_server') \ - .require(targetos =3D=3D 'linux', error_message: 'vfio-user server is su= pported only on Linux') \ + .require(host_os =3D=3D 'linux', error_message: 'vfio-user server is sup= ported only on Linux') \ .allowed() =20 have_tpm =3D get_option('tpm') \ - .require(targetos !=3D 'windows', error_message: 'TPM emulation only ava= ilable on POSIX systems') \ + .require(host_os !=3D 'windows', error_message: 'TPM emulation only avai= lable on POSIX systems') \ .allowed() =20 # type of binaries to build @@ -601,13 +601,13 @@ have_tools =3D get_option('tools') \ .allowed() have_ga =3D get_option('guest_agent') \ .disable_auto_if(not have_system and not have_tools) \ - .require(targetos in ['sunos', 'linux', 'windows', 'freebsd', 'netbsd', = 'openbsd'], + .require(host_os in ['sunos', 'linux', 'windows', 'freebsd', 'netbsd', '= openbsd'], error_message: 'unsupported OS for QEMU guest agent') \ .allowed() =20 have_block =3D have_system or have_tools enable_modules =3D get_option('modules') \ - .require(targetos !=3D 'windows', + .require(host_os !=3D 'windows', error_message: 'Modules are not available for Windows') \ .require(not get_option('prefer_static'), error_message: 'Modules are incompatible with static linking') \ @@ -615,14 +615,14 @@ enable_modules =3D get_option('modules') \ =20 # vhost have_vhost_user =3D get_option('vhost_user') \ - .disable_auto_if(targetos !=3D 'linux') \ - .require(targetos !=3D 'windows', + .disable_auto_if(host_os !=3D 'linux') \ + .require(host_os !=3D 'windows', error_message: 'vhost-user is not available on Windows').allowe= d() have_vhost_vdpa =3D get_option('vhost_vdpa') \ - .require(targetos =3D=3D 'linux', + .require(host_os =3D=3D 'linux', error_message: 'vhost-vdpa is only available on Linux').allowed= () have_vhost_kernel =3D get_option('vhost_kernel') \ - .require(targetos =3D=3D 'linux', + .require(host_os =3D=3D 'linux', error_message: 'vhost-kernel is only available on Linux').allow= ed() have_vhost_user_crypto =3D get_option('vhost_crypto') \ .require(have_vhost_user, @@ -637,10 +637,10 @@ have_vhost_net =3D have_vhost_net_kernel or have_vhos= t_net_user or have_vhost_net_ =20 # Target-specific configuration of accelerators accelerators =3D [] -if get_option('kvm').allowed() and targetos =3D=3D 'linux' +if get_option('kvm').allowed() and host_os =3D=3D 'linux' accelerators +=3D 'CONFIG_KVM' endif -if get_option('whpx').allowed() and targetos =3D=3D 'windows' +if get_option('whpx').allowed() and host_os =3D=3D 'windows' if get_option('whpx').enabled() and host_machine.cpu() !=3D 'x86_64' error('WHPX requires 64-bit host') elif cc.has_header('winhvplatform.h', required: get_option('whpx')) and \ @@ -655,7 +655,7 @@ if get_option('hvf').allowed() accelerators +=3D 'CONFIG_HVF' endif endif -if targetos =3D=3D 'netbsd' +if host_os =3D=3D 'netbsd' nvmm =3D cc.find_library('nvmm', required: get_option('nvmm')) if nvmm.found() accelerators +=3D 'CONFIG_NVMM' @@ -721,7 +721,7 @@ midl =3D not_found widl =3D not_found pathcch =3D not_found host_dsosuf =3D '.so' -if targetos =3D=3D 'windows' +if host_os =3D=3D 'windows' midl =3D find_program('midl', required: false) widl =3D find_program('widl', required: false) pathcch =3D cc.find_library('pathcch') @@ -733,19 +733,19 @@ if targetos =3D=3D 'windows' depend_files: files('pc-bios/qemu-ns= is.ico'), include_directories: include_directo= ries('.')) host_dsosuf =3D '.dll' -elif targetos =3D=3D 'darwin' +elif host_os =3D=3D 'darwin' coref =3D dependency('appleframeworks', modules: 'CoreFoundation') iokit =3D dependency('appleframeworks', modules: 'IOKit', required: fals= e) host_dsosuf =3D '.dylib' -elif targetos =3D=3D 'sunos' +elif host_os =3D=3D 'sunos' socket =3D [cc.find_library('socket'), cc.find_library('nsl'), cc.find_library('resolv')] -elif targetos =3D=3D 'haiku' +elif host_os =3D=3D 'haiku' socket =3D [cc.find_library('posix_error_mapper'), cc.find_library('network'), cc.find_library('bsd')] -elif targetos =3D=3D 'openbsd' +elif host_os =3D=3D 'openbsd' if get_option('tcg').allowed() and target_dirs.length() > 0 # Disable OpenBSD W^X if available emulator_link_args =3D cc.get_supported_link_arguments('-Wl,-z,wxneede= d') @@ -774,7 +774,7 @@ endif =20 # This workaround is required due to a bug in pkg-config file for glib as = it # doesn't define GLIB_STATIC_COMPILATION for pkg-config --static -if targetos =3D=3D 'windows' and get_option('prefer_static') +if host_os =3D=3D 'windows' and get_option('prefer_static') glib_cflags +=3D ['-DGLIB_STATIC_COMPILATION'] endif =20 @@ -1035,12 +1035,12 @@ if vde.found() and not cc.links(''' endif =20 pulse =3D not_found -if not get_option('pa').auto() or (targetos =3D=3D 'linux' and have_system) +if not get_option('pa').auto() or (host_os =3D=3D 'linux' and have_system) pulse =3D dependency('libpulse', required: get_option('pa'), method: 'pkg-config') endif alsa =3D not_found -if not get_option('alsa').auto() or (targetos =3D=3D 'linux' and have_syst= em) +if not get_option('alsa').auto() or (host_os =3D=3D 'linux' and have_syste= m) alsa =3D dependency('alsa', required: get_option('alsa'), method: 'pkg-config') endif @@ -1050,7 +1050,7 @@ if not get_option('jack').auto() or have_system method: 'pkg-config') endif pipewire =3D not_found -if not get_option('pipewire').auto() or (targetos =3D=3D 'linux' and have_= system) +if not get_option('pipewire').auto() or (host_os =3D=3D 'linux' and have_s= ystem) pipewire =3D dependency('libpipewire-0.3', version: '>=3D0.3.60', required: get_option('pipewire'), method: 'pkg-config') @@ -1095,7 +1095,7 @@ if not get_option('zstd').auto() or have_block endif virgl =3D not_found =20 -have_vhost_user_gpu =3D have_tools and targetos =3D=3D 'linux' and pixman.= found() +have_vhost_user_gpu =3D have_tools and host_os =3D=3D 'linux' and pixman.f= ound() if not get_option('virglrenderer').auto() or have_system or have_vhost_use= r_gpu virgl =3D dependency('virglrenderer', method: 'pkg-config', @@ -1120,7 +1120,7 @@ if not get_option('curl').auto() or have_block required: get_option('curl')) endif libudev =3D not_found -if targetos =3D=3D 'linux' and (have_system or have_tools) +if host_os =3D=3D 'linux' and (have_system or have_tools) libudev =3D dependency('libudev', method: 'pkg-config', required: get_option('libudev')) @@ -1128,7 +1128,7 @@ endif =20 mpathlibs =3D [libudev] mpathpersist =3D not_found -if targetos =3D=3D 'linux' and have_tools and get_option('mpath').allowed() +if host_os =3D=3D 'linux' and have_tools and get_option('mpath').allowed() mpath_test_source =3D ''' #include #include @@ -1199,7 +1199,7 @@ if have_system and get_option('curses').allowed() return 0; }''' =20 - curses_dep_list =3D targetos =3D=3D 'windows' ? ['ncurses', 'ncursesw'] = : ['ncursesw'] + curses_dep_list =3D host_os =3D=3D 'windows' ? ['ncurses', 'ncursesw'] := ['ncursesw'] curses =3D dependency(curses_dep_list, required: false, method: 'pkg-config') @@ -1216,13 +1216,13 @@ if have_system and get_option('curses').allowed() endif if not curses.found() has_curses_h =3D cc.has_header('curses.h', args: curses_compile_args) - if targetos !=3D 'windows' and not has_curses_h + if host_os !=3D 'windows' and not has_curses_h message('Trying with /usr/include/ncursesw') curses_compile_args +=3D ['-I/usr/include/ncursesw'] has_curses_h =3D cc.has_header('curses.h', args: curses_compile_args) endif if has_curses_h - curses_libname_list =3D (targetos =3D=3D 'windows' ? ['pdcurses'] : = ['ncursesw', 'cursesw']) + curses_libname_list =3D (host_os =3D=3D 'windows' ? ['pdcurses'] : [= 'ncursesw', 'cursesw']) foreach curses_libname : curses_libname_list libcurses =3D cc.find_library(curses_libname, required: false) @@ -1445,7 +1445,7 @@ oss =3D not_found if get_option('oss').allowed() and have_system if not cc.has_header('sys/soundcard.h') # not found - elif targetos =3D=3D 'netbsd' + elif host_os =3D=3D 'netbsd' oss =3D cc.find_library('ossaudio', required: get_option('oss')) else oss =3D declare_dependency() @@ -1458,7 +1458,7 @@ if get_option('oss').allowed() and have_system endif endif dsound =3D not_found -if not get_option('dsound').auto() or (targetos =3D=3D 'windows' and have_= system) +if not get_option('dsound').auto() or (host_os =3D=3D 'windows' and have_s= ystem) if cc.has_header('dsound.h') dsound =3D declare_dependency(link_args: ['-lole32', '-ldxguid']) endif @@ -1471,7 +1471,7 @@ if not get_option('dsound').auto() or (targetos =3D= =3D 'windows' and have_system) endif =20 coreaudio =3D not_found -if not get_option('coreaudio').auto() or (targetos =3D=3D 'darwin' and hav= e_system) +if not get_option('coreaudio').auto() or (host_os =3D=3D 'darwin' and have= _system) coreaudio =3D dependency('appleframeworks', modules: 'CoreAudio', required: get_option('coreaudio')) endif @@ -1811,7 +1811,7 @@ endif have_xen_pci_passthrough =3D get_option('xen_pci_passthrough') \ .require(xen.found(), error_message: 'Xen PCI passthrough requested but Xen not enabl= ed') \ - .require(targetos =3D=3D 'linux', + .require(host_os =3D=3D 'linux', error_message: 'Xen PCI passthrough not available on this platf= orm') \ .require(cpu =3D=3D 'x86' or cpu =3D=3D 'x86_64', error_message: 'Xen PCI passthrough not available on this platf= orm') \ @@ -1906,7 +1906,7 @@ has_statx =3D cc.has_header_symbol('sys/stat.h', 'STA= TX_BASIC_STATS', prefix: gnu_ has_statx_mnt_id =3D cc.has_header_symbol('sys/stat.h', 'STATX_MNT_ID', pr= efix: gnu_source_prefix) =20 have_vhost_user_blk_server =3D get_option('vhost_user_blk_server') \ - .require(targetos =3D=3D 'linux', + .require(host_os =3D=3D 'linux', error_message: 'vhost_user_blk_server requires linux') \ .require(have_vhost_user, error_message: 'vhost_user_blk_server requires vhost-user suppo= rt') \ @@ -1934,18 +1934,18 @@ if get_option('fuse_lseek').allowed() endif endif =20 -have_libvduse =3D (targetos =3D=3D 'linux') +have_libvduse =3D (host_os =3D=3D 'linux') if get_option('libvduse').enabled() - if targetos !=3D 'linux' + if host_os !=3D 'linux' error('libvduse requires linux') endif elif get_option('libvduse').disabled() have_libvduse =3D false endif =20 -have_vduse_blk_export =3D (have_libvduse and targetos =3D=3D 'linux') +have_vduse_blk_export =3D (have_libvduse and host_os =3D=3D 'linux') if get_option('vduse_blk_export').enabled() - if targetos !=3D 'linux' + if host_os !=3D 'linux' error('vduse_blk_export requires linux') elif not have_libvduse error('vduse_blk_export requires libvduse support') @@ -2013,7 +2013,7 @@ if have_system # Default to native drivers first, OSS second, SDL third audio_drivers_priority =3D \ [ 'pa', 'coreaudio', 'dsound', 'sndio', 'oss' ] + \ - (targetos =3D=3D 'linux' ? [] : [ 'sdl' ]) + (host_os =3D=3D 'linux' ? [] : [ 'sdl' ]) audio_drivers_default =3D [] foreach k: audio_drivers_priority if audio_drivers_available[k] @@ -2034,7 +2034,7 @@ endif config_host_data.set('CONFIG_AUDIO_DRIVERS', '"' + '", "'.join(audio_drivers_selected) + '", ') =20 -have_host_block_device =3D (targetos !=3D 'darwin' or +have_host_block_device =3D (host_os !=3D 'darwin' or cc.has_header('IOKit/storage/IOMedia.h')) =20 dbus_display =3D get_option('dbus_display') \ @@ -2045,17 +2045,17 @@ dbus_display =3D get_option('dbus_display') \ .allowed() =20 have_virtfs =3D get_option('virtfs') \ - .require(targetos =3D=3D 'linux' or targetos =3D=3D 'darwin', + .require(host_os =3D=3D 'linux' or host_os =3D=3D 'darwin', error_message: 'virtio-9p (virtfs) requires Linux or macOS') \ - .require(targetos =3D=3D 'linux' or cc.has_function('pthread_fchdir_np= '), + .require(host_os =3D=3D 'linux' or cc.has_function('pthread_fchdir_np'= ), error_message: 'virtio-9p (virtfs) on macOS requires the pres= ence of pthread_fchdir_np') \ - .require(targetos =3D=3D 'darwin' or libattr.found(), + .require(host_os =3D=3D 'darwin' or libattr.found(), error_message: 'virtio-9p (virtfs) on Linux requires libattr-= devel') \ .disable_auto_if(not have_tools and not have_system) \ .allowed() =20 have_virtfs_proxy_helper =3D get_option('virtfs_proxy_helper') \ - .require(targetos !=3D 'darwin', error_message: 'the virtfs proxy help= er is incompatible with macOS') \ + .require(host_os !=3D 'darwin', error_message: 'the virtfs proxy helpe= r is incompatible with macOS') \ .require(have_virtfs, error_message: 'the virtfs proxy helper requires= that virtfs is enabled') \ .disable_auto_if(not have_tools) \ .require(libcap_ng.found(), error_message: 'the virtfs proxy helper re= quires libcap-ng') \ @@ -2110,12 +2110,12 @@ if enable_modules endif =20 have_slirp_smbd =3D get_option('slirp_smbd') \ - .require(targetos !=3D 'windows', error_message: 'Host smbd not supporte= d on this platform.') \ + .require(host_os !=3D 'windows', error_message: 'Host smbd not supported= on this platform.') \ .allowed() if have_slirp_smbd smbd_path =3D get_option('smbd') if smbd_path =3D=3D '' - smbd_path =3D (targetos =3D=3D 'sunos' ? '/usr/sfw/sbin/smbd' : '/usr/= sbin/smbd') + smbd_path =3D (host_os =3D=3D 'sunos' ? '/usr/sfw/sbin/smbd' : '/usr/s= bin/smbd') endif config_host_data.set_quoted('CONFIG_SMBD_COMMAND', smbd_path) endif @@ -2123,7 +2123,7 @@ endif config_host_data.set('HOST_' + host_arch.to_upper(), 1) =20 kvm_targets_c =3D '""' -if get_option('kvm').allowed() and targetos =3D=3D 'linux' +if get_option('kvm').allowed() and host_os =3D=3D 'linux' kvm_targets_c =3D '"' + '" ,"'.join(kvm_targets) + '"' endif config_host_data.set('CONFIG_KVM_TARGETS', kvm_targets_c) @@ -2136,16 +2136,16 @@ config_host_data.set('CONFIG_MODULE_UPGRADES', get_= option('module_upgrades')) config_host_data.set('CONFIG_ATTR', libattr.found()) config_host_data.set('CONFIG_BDRV_WHITELIST_TOOLS', get_option('block_drv_= whitelist_in_tools')) config_host_data.set('CONFIG_BRLAPI', brlapi.found()) -config_host_data.set('CONFIG_BSD', targetos in bsd_oses) +config_host_data.set('CONFIG_BSD', host_os in bsd_oses) config_host_data.set('CONFIG_CAPSTONE', capstone.found()) config_host_data.set('CONFIG_COCOA', cocoa.found()) -config_host_data.set('CONFIG_DARWIN', targetos =3D=3D 'darwin') +config_host_data.set('CONFIG_DARWIN', host_os =3D=3D 'darwin') config_host_data.set('CONFIG_FUZZ', get_option('fuzzing')) config_host_data.set('CONFIG_GCOV', get_option('b_coverage')) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) -config_host_data.set('CONFIG_LINUX', targetos =3D=3D 'linux') -config_host_data.set('CONFIG_POSIX', targetos !=3D 'windows') -config_host_data.set('CONFIG_WIN32', targetos =3D=3D 'windows') +config_host_data.set('CONFIG_LINUX', host_os =3D=3D 'linux') +config_host_data.set('CONFIG_POSIX', host_os !=3D 'windows') +config_host_data.set('CONFIG_WIN32', host_os =3D=3D 'windows') config_host_data.set('CONFIG_LZO', lzo.found()) config_host_data.set('CONFIG_MPATH', mpathpersist.found()) config_host_data.set('CONFIG_BLKIO', blkio.found()) @@ -2203,7 +2203,7 @@ endif config_host_data.set('CONFIG_PIXMAN', pixman.found()) config_host_data.set('CONFIG_SLIRP', slirp.found()) config_host_data.set('CONFIG_SNAPPY', snappy.found()) -config_host_data.set('CONFIG_SOLARIS', targetos =3D=3D 'sunos') +config_host_data.set('CONFIG_SOLARIS', host_os =3D=3D 'sunos') if get_option('tcg').allowed() config_host_data.set('CONFIG_TCG', 1) config_host_data.set('CONFIG_TCG_INTERPRETER', tcg_arch =3D=3D 'tci') @@ -2304,7 +2304,7 @@ config_host_data.set('HAVE_PTY_H', cc.has_header('pty= .h')) config_host_data.set('HAVE_SYS_DISK_H', cc.has_header('sys/disk.h')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h')) config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header('sys/kcov.h')) -if targetos =3D=3D 'windows' +if host_os =3D=3D 'windows' config_host_data.set('HAVE_AFUNIX_H', cc.has_header('afunix.h')) endif =20 @@ -2686,7 +2686,7 @@ config_host_data.set('CONFIG_USBFS', have_linux_user = and cc.compiles(''' int main(void) { return 0; }''')) =20 have_keyring =3D get_option('keyring') \ - .require(targetos =3D=3D 'linux', error_message: 'keyring is only availa= ble on Linux') \ + .require(host_os =3D=3D 'linux', error_message: 'keyring is only availab= le on Linux') \ .require(cc.compiles(''' #include #include @@ -2795,9 +2795,9 @@ endif =20 if get_option('membarrier').disabled() have_membarrier =3D false -elif targetos =3D=3D 'windows' +elif host_os =3D=3D 'windows' have_membarrier =3D true -elif targetos =3D=3D 'linux' +elif host_os =3D=3D 'linux' have_membarrier =3D cc.compiles(''' #include #include @@ -2834,7 +2834,7 @@ config_host_data.set('CONFIG_AF_VSOCK', cc.has_header= _symbol( =20 have_vss =3D false have_vss_sdk =3D false # old xp/2003 SDK -if targetos =3D=3D 'windows' and 'cpp' in all_languages +if host_os =3D=3D 'windows' and 'cpp' in all_languages have_vss =3D cxx.compiles(''' #define __MIDL_user_allocate_free_DEFINED__ #include @@ -2845,7 +2845,7 @@ config_host_data.set('HAVE_VSS_SDK', have_vss_sdk) =20 # Older versions of MinGW do not import _lock_file and _unlock_file proper= ly. # This was fixed for v6.0.0 with commit b48e3ac8969d. -if targetos =3D=3D 'windows' +if host_os =3D=3D 'windows' config_host_data.set('HAVE__LOCK_FILE', cc.links(''' #include int main(void) { @@ -2855,7 +2855,7 @@ if targetos =3D=3D 'windows' }''', name: '_lock_file and _unlock_file')) endif =20 -if targetos =3D=3D 'windows' +if host_os =3D=3D 'windows' mingw_has_setjmp_longjmp =3D cc.links(''' #include int main(void) { @@ -2925,7 +2925,7 @@ host_kconfig =3D \ (have_vhost_vdpa ? ['CONFIG_VHOST_VDPA=3Dy'] : []) + \ (have_vhost_kernel ? ['CONFIG_VHOST_KERNEL=3Dy'] : []) + \ (have_virtfs ? ['CONFIG_VIRTFS=3Dy'] : []) + \ - (targetos =3D=3D 'linux' ? ['CONFIG_LINUX=3Dy'] : []) + \ + (host_os =3D=3D 'linux' ? ['CONFIG_LINUX=3Dy'] : []) + \ (have_pvrdma ? ['CONFIG_PVRDMA=3Dy'] : []) + \ (multiprocess_allowed ? ['CONFIG_MULTIPROCESS_ALLOWED=3Dy'] : []) + \ (vfio_user_server_allowed ? ['CONFIG_VFIO_USER_SERVER_ALLOWED=3Dy'] : []= ) + \ @@ -2939,7 +2939,7 @@ fdt_required =3D [] foreach target : target_dirs config_target =3D { 'TARGET_NAME': target.split('-')[0] } if target.endswith('linux-user') - if targetos !=3D 'linux' + if host_os !=3D 'linux' if default_targets continue endif @@ -2947,7 +2947,7 @@ foreach target : target_dirs endif config_target +=3D { 'CONFIG_LINUX_USER': 'y' } elif target.endswith('bsd-user') - if targetos not in bsd_oses + if host_os not in bsd_oses if default_targets continue endif @@ -3128,7 +3128,7 @@ endif config_host_data.set('CONFIG_FDT', fdt.found()) =20 vhost_user =3D not_found -if targetos =3D=3D 'linux' and have_vhost_user +if host_os =3D=3D 'linux' and have_vhost_user libvhost_user =3D subproject('libvhost-user') vhost_user =3D libvhost_user.get_variable('vhost_user_dep') endif @@ -3452,7 +3452,7 @@ if have_block =20 # os-posix.c contains POSIX-specific functions used by qemu-storage-daem= on, # os-win32.c does not - if targetos =3D=3D 'windows' + if host_os =3D=3D 'windows' system_ss.add(files('os-win32.c')) else blockdev_ss.add(files('os-posix.c')) @@ -3740,7 +3740,7 @@ common_all =3D static_library('common', =20 feature_to_c =3D find_program('scripts/feature_to_c.py') =20 -if targetos =3D=3D 'darwin' +if host_os =3D=3D 'darwin' entitlement =3D find_program('scripts/entitlement.sh') endif =20 @@ -3757,7 +3757,7 @@ foreach target : target_dirs link_args =3D emulator_link_args =20 target_inc =3D [include_directories('target' / config_target['TARGET_BAS= E_ARCH'])] - if targetos =3D=3D 'linux' + if host_os =3D=3D 'linux' target_inc +=3D include_directories('linux-headers', is_system: true) endif if target.endswith('-softmmu') @@ -3787,7 +3787,7 @@ foreach target : target_dirs endif if 'CONFIG_BSD_USER' in config_target base_dir =3D 'bsd-user' - target_inc +=3D include_directories('bsd-user/' / targetos) + target_inc +=3D include_directories('bsd-user/' / host_os) target_inc +=3D include_directories('bsd-user/host/' / host_arch) dir =3D base_dir / abi arch_srcs +=3D files(dir / 'signal.c', dir / 'target_arch_cpu.c') @@ -3844,7 +3844,7 @@ foreach target : target_dirs 'sources': files('system/main.c'), 'dependencies': [] }] - if targetos =3D=3D 'windows' and (sdl.found() or gtk.found()) + if host_os =3D=3D 'windows' and (sdl.found() or gtk.found()) execs +=3D [{ 'name': 'qemu-system-' + target_name + 'w', 'win_subsystem': 'windows', @@ -3871,7 +3871,7 @@ foreach target : target_dirs endif foreach exe: execs exe_name =3D exe['name'] - if targetos =3D=3D 'darwin' + if host_os =3D=3D 'darwin' exe_name +=3D '-unsigned' endif =20 @@ -3884,7 +3884,7 @@ foreach target : target_dirs link_args: link_args, win_subsystem: exe['win_subsystem']) =20 - if targetos =3D=3D 'darwin' + if host_os =3D=3D 'darwin' icon =3D 'pc-bios/qemu.rsrc' build_input =3D [emulator, files(icon)] install_input =3D [ @@ -3940,7 +3940,7 @@ endforeach =20 if get_option('plugins') install_headers('include/qemu/qemu-plugin.h') - if targetos =3D=3D 'windows' + if host_os =3D=3D 'windows' # On windows, we want to deliver the qemu_plugin_api.lib file in the q= emu installer, # so that plugin authors can compile against it. install_data(win32_qemu_plugin_api_lib, install_dir: 'lib') @@ -3981,7 +3981,7 @@ if have_tools subdir('contrib/vhost-user-scsi') endif =20 - if targetos =3D=3D 'linux' + if host_os =3D=3D 'linux' executable('qemu-bridge-helper', files('qemu-bridge-helper.c'), dependencies: [qemuutil, libcap_ng], install: true, @@ -4048,7 +4048,7 @@ summary(summary_info, bool_yn: true, section: 'Build = environment') # Directories summary_info +=3D {'Install prefix': get_option('prefix')} summary_info +=3D {'BIOS directory': qemu_datadir} -pathsep =3D targetos =3D=3D 'windows' ? ';' : ':' +pathsep =3D host_os =3D=3D 'windows' ? ';' : ':' summary_info +=3D {'firmware path': pathsep.join(get_option('qemu_firm= warepath'))} summary_info +=3D {'binary directory': get_option('prefix') / get_option(= 'bindir')} summary_info +=3D {'library directory': get_option('prefix') / get_option(= 'libdir')} @@ -4056,7 +4056,7 @@ summary_info +=3D {'module directory': qemu_moddir} summary_info +=3D {'libexec directory': get_option('prefix') / get_option(= 'libexecdir')} summary_info +=3D {'include directory': get_option('prefix') / get_option(= 'includedir')} summary_info +=3D {'config directory': get_option('prefix') / get_option(= 'sysconfdir')} -if targetos !=3D 'windows' +if host_os !=3D 'windows' summary_info +=3D {'local state directory': get_option('prefix') / get_o= ption('localstatedir')} summary_info +=3D {'Manual directory': get_option('prefix') / get_o= ption('mandir')} else @@ -4079,7 +4079,7 @@ if config_host.has_key('GDB') endif summary_info +=3D {'iasl': iasl} summary_info +=3D {'genisoimage': config_host['GENISOIMAGE']} -if targetos =3D=3D 'windows' and have_ga +if host_os =3D=3D 'windows' and have_ga summary_info +=3D {'wixl': wixl} endif if slirp.found() and have_system @@ -4177,7 +4177,7 @@ if get_option('cfi') endif summary_info +=3D {'strip binaries': get_option('strip')} summary_info +=3D {'sparse': sparse} -summary_info +=3D {'mingw32 support': targetos =3D=3D 'windows'} +summary_info +=3D {'mingw32 support': host_os =3D=3D 'windows'} summary(summary_info, bool_yn: true, section: 'Compilation') =20 # snarf the cross-compilation information for tests @@ -4276,7 +4276,7 @@ summary(summary_info, bool_yn: true, section: 'Crypto= ') =20 # UI summary_info =3D {} -if targetos =3D=3D 'darwin' +if host_os =3D=3D 'darwin' summary_info +=3D {'Cocoa support': cocoa} endif summary_info +=3D {'SDL support': sdl} @@ -4300,15 +4300,15 @@ summary(summary_info, bool_yn: true, section: 'User= interface') =20 # Audio backends summary_info =3D {} -if targetos not in ['darwin', 'haiku', 'windows'] +if host_os not in ['darwin', 'haiku', 'windows'] summary_info +=3D {'OSS support': oss} summary_info +=3D {'sndio support': sndio} -elif targetos =3D=3D 'darwin' +elif host_os =3D=3D 'darwin' summary_info +=3D {'CoreAudio support': coreaudio} -elif targetos =3D=3D 'windows' +elif host_os =3D=3D 'windows' summary_info +=3D {'DirectSound support': dsound} endif -if targetos =3D=3D 'linux' +if host_os =3D=3D 'linux' summary_info +=3D {'ALSA support': alsa} summary_info +=3D {'PulseAudio support': pulse} endif @@ -4318,7 +4318,7 @@ summary(summary_info, bool_yn: true, section: 'Audio = backends') =20 # Network backends summary_info =3D {} -if targetos =3D=3D 'darwin' +if host_os =3D=3D 'darwin' summary_info +=3D {'vmnet.framework support': vmnet} endif summary_info +=3D {'AF_XDP support': libxdp} @@ -4355,7 +4355,7 @@ summary_info +=3D {'OpenGL support (epoxy)': opengl} summary_info +=3D {'GBM': gbm} summary_info +=3D {'libiscsi support': libiscsi} summary_info +=3D {'libnfs support': libnfs} -if targetos =3D=3D 'windows' +if host_os =3D=3D 'windows' if have_ga summary_info +=3D {'QGA VSS support': have_qga_vss} endif @@ -4397,20 +4397,20 @@ if host_arch =3D=3D 'unknown' endif endif =20 -if not supported_oses.contains(targetos) +if not supported_oses.contains(host_os) message() warning('UNSUPPORTED HOST OS') message() - message('Support for host OS ' + targetos + 'is not currently maintained= .') + message('Support for host OS ' + host_os + 'is not currently maintained.= ') message('configure has succeeded and you can continue to build, but') message('the QEMU project does not guarantee that QEMU will compile or') message('work on this operating system. You can help by volunteering') message('to maintain it and providing a build host for our continuous') message('integration setup. This will ensure that future versions of QEM= U') - message('will keep working on ' + targetos + '.') + message('will keep working on ' + host_os + '.') endif =20 -if host_arch =3D=3D 'unknown' or not supported_oses.contains(targetos) +if host_arch =3D=3D 'unknown' or not supported_oses.contains(host_os) message() message('If you want to help supporting QEMU on this platform, please') message('contact the developers at qemu-devel@nongnu.org.') @@ -4424,8 +4424,8 @@ if get_option('relocatable') and \ warning('bindir not included within prefix, the installation will not be= relocatable.') actually_reloc =3D false endif -if not actually_reloc and (targetos =3D=3D 'windows' or get_option('reloca= table')) - if targetos =3D=3D 'windows' +if not actually_reloc and (host_os =3D=3D 'windows' or get_option('relocat= able')) + if host_os =3D=3D 'windows' message() warning('Windows installs should usually be relocatable.') endif diff --git a/net/can/meson.build b/net/can/meson.build index bdf6f8eee16..af3b27921cd 100644 --- a/net/can/meson.build +++ b/net/can/meson.build @@ -1,6 +1,6 @@ can_ss =3D ss.source_set() can_ss.add(files('can_core.c', 'can_host.c')) -if targetos =3D=3D 'linux' +if host_os =3D=3D 'linux' can_ss.add(files('can_socketcan.c')) endif =20 diff --git a/net/meson.build b/net/meson.build index a53f18ad7b4..9432a588e4e 100644 --- a/net/meson.build +++ b/net/meson.build @@ -43,13 +43,13 @@ if have_vhost_net_user system_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'),= if_false: files('vhost-user-stub.c')) endif =20 -if targetos =3D=3D 'windows' +if host_os =3D=3D 'windows' system_ss.add(files('tap-win32.c')) -elif targetos =3D=3D 'linux' +elif host_os =3D=3D 'linux' system_ss.add(files('tap.c', 'tap-linux.c')) -elif targetos in bsd_oses +elif host_os in bsd_oses system_ss.add(files('tap.c', 'tap-bsd.c')) -elif targetos =3D=3D 'sunos' +elif host_os =3D=3D 'sunos' system_ss.add(files('tap.c', 'tap-solaris.c')) else system_ss.add(files('tap.c', 'tap-stub.c')) diff --git a/plugins/meson.build b/plugins/meson.build index 6b2d7a92926..51b4350c2a0 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -1,7 +1,7 @@ plugin_ldflags =3D [] # Modules need more symbols than just those in plugins/qemu-plugins.symbols if not enable_modules - if targetos =3D=3D 'darwin' + if host_os =3D=3D 'darwin' configure_file( input: files('qemu-plugins.symbols'), output: 'qemu-plugins-ld64.symbols', @@ -14,7 +14,7 @@ if not enable_modules endif =20 if get_option('plugins') - if targetos =3D=3D 'windows' + if host_os =3D=3D 'windows' dlltool =3D find_program('dlltool', required: true) =20 # Generate a .lib file for plugins to link against. diff --git a/qga/meson.build b/qga/meson.build index 66c0f1e56f8..1c3d2a3d1b7 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -7,7 +7,7 @@ if not have_ga endif =20 have_qga_vss =3D get_option('qga_vss') \ - .require(targetos =3D=3D 'windows', + .require(host_os =3D=3D 'windows', error_message: 'VSS support requires Windows') \ .require('cpp' in all_languages, error_message: 'VSS support requires a C++ compiler') \ @@ -67,7 +67,7 @@ qga_ss.add(files( 'main.c', 'cutils.c', )) -if targetos =3D=3D 'windows' +if host_os =3D=3D 'windows' qga_ss.add(files( 'channel-win32.c', 'commands-win32.c', @@ -80,9 +80,9 @@ else 'commands-posix.c', 'commands-posix-ssh.c', )) - if targetos =3D=3D 'linux' + if host_os =3D=3D 'linux' qga_ss.add(files('commands-linux.c')) - elif targetos in bsd_oses + elif host_os in bsd_oses qga_ss.add(files('commands-bsd.c')) endif endif @@ -91,7 +91,7 @@ qga_ss =3D qga_ss.apply({}) =20 gen_tlb =3D [] qga_libs =3D [] -if targetos =3D=3D 'windows' +if host_os =3D=3D 'windows' qga_libs +=3D ['-lws2_32', '-lwinmm', '-lpowrprof', '-lwtsapi32', '-lwin= inet', '-liphlpapi', '-lnetapi32', '-lsetupapi', '-lcfgmgr32'] if have_qga_vss @@ -101,7 +101,7 @@ if targetos =3D=3D 'windows' endif =20 qga_objs =3D [] -if targetos =3D=3D 'windows' +if host_os =3D=3D 'windows' windmc =3D find_program('windmc', required: true) windres =3D find_program('windres', required: true) =20 @@ -123,7 +123,7 @@ qga =3D executable('qemu-ga', qga_ss.sources() + qga_ob= js, install: true) all_qga +=3D qga =20 -if targetos =3D=3D 'windows' +if host_os =3D=3D 'windows' qemu_ga_msi_arch =3D { 'x86': ['-D', 'Arch=3D32'], 'x86_64': ['-a', 'x64', '-D', 'Arch=3D64'] @@ -185,7 +185,7 @@ test_env.set('G_TEST_BUILDDIR', meson.current_build_dir= ()) # the leak detector in build-oss-fuzz Gitlab CI test. we should re-enable # this when an alternative is implemented or when the underlying glib # issue is identified/fix -#if targetos !=3D 'windows' +#if host_os !=3D 'windows' if false srcs =3D [files('commands-posix-ssh.c')] i =3D 0 diff --git a/scsi/meson.build b/scsi/meson.build index 0ff2b3affe0..cdb91e11b0e 100644 --- a/scsi/meson.build +++ b/scsi/meson.build @@ -1,5 +1,5 @@ block_ss.add(files('utils.c')) -if targetos =3D=3D 'linux' +if host_os =3D=3D 'linux' block_ss.add(files('pr-manager.c', 'pr-manager-helper.c')) else block_ss.add(files('pr-manager-stub.c')) diff --git a/system/meson.build b/system/meson.build index 0632a3daa8a..25e21172505 100644 --- a/system/meson.build +++ b/system/meson.build @@ -33,6 +33,6 @@ endif =20 system_ss.add(when: seccomp, if_true: files('qemu-seccomp.c')) system_ss.add(when: fdt, if_true: files('device_tree.c')) -if targetos =3D=3D 'linux' - system_ss.add('async-teardown.c') +if host_os =3D=3D 'linux' + system_ss.add(files('async-teardown.c')) endif diff --git a/tests/fp/meson.build b/tests/fp/meson.build index 9ef322afc42..4ab89aaa960 100644 --- a/tests/fp/meson.build +++ b/tests/fp/meson.build @@ -3,7 +3,7 @@ if 'CONFIG_TCG' not in config_all_accel endif # There are namespace pollution issues on Windows, due to osdep.h # bringing in Windows headers that define a FLOAT128 type. -if targetos =3D=3D 'windows' +if host_os =3D=3D 'windows' subdir_done() endif =20 diff --git a/tests/meson.build b/tests/meson.build index 32cc15a3ef7..0a6f96f8f84 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -68,7 +68,7 @@ test_deps =3D { 'test-qht-par': qht_bench, } =20 -if have_tools and have_vhost_user and targetos =3D=3D 'linux' +if have_tools and have_vhost_user and host_os =3D=3D 'linux' executable('vhost-user-bridge', sources: files('vhost-user-bridge.c'), dependencies: [qemuutil, vhost_user]) diff --git a/tests/plugin/meson.build b/tests/plugin/meson.build index 28a929dbcc0..e18183aaeda 100644 --- a/tests/plugin/meson.build +++ b/tests/plugin/meson.build @@ -1,7 +1,7 @@ t =3D [] if get_option('plugins') foreach i : ['bb', 'empty', 'insn', 'mem', 'syscall'] - if targetos =3D=3D 'windows' + if host_os =3D=3D 'windows' t +=3D shared_module(i, files(i + '.c') + '../../contrib/plugins/win= 32_linker.c', include_directories: '../../include/qemu', link_depends: [win32_qemu_plugin_api_lib], diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build index 53847cb98fc..fad340ad595 100644 --- a/tests/qemu-iotests/meson.build +++ b/tests/qemu-iotests/meson.build @@ -1,4 +1,4 @@ -if not have_tools or targetos =3D=3D 'windows' +if not have_tools or host_os =3D=3D 'windows' subdir_done() endif =20 diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 565eff4c0a2..f25bffcc20a 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -38,8 +38,8 @@ qtests_cxl =3D \ # for the availability of the default NICs in the tests qtests_filter =3D \ (get_option('default_devices') and slirp.found() ? ['test-netfilter'] : = []) + \ - (get_option('default_devices') and targetos !=3D 'windows' ? ['test-filt= er-mirror'] : []) + \ - (get_option('default_devices') and targetos !=3D 'windows' ? ['test-filt= er-redirector'] : []) + (get_option('default_devices') and host_os !=3D 'windows' ? ['test-filte= r-mirror'] : []) + \ + (get_option('default_devices') and host_os !=3D 'windows' ? ['test-filte= r-redirector'] : []) =20 qtests_i386 =3D \ (slirp.found() ? ['pxe-test'] : []) + \ @@ -48,7 +48,7 @@ qtests_i386 =3D \ (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] = : []) + \ (config_all_devices.has_key('CONFIG_SGA') ? ['boot-serial-test'] : []) += \ (config_all_devices.has_key('CONFIG_ISA_IPMI_KCS') ? ['ipmi-kcs-test'] := []) + \ - (targetos =3D=3D 'linux' and = \ + (host_os =3D=3D 'linux' and = \ config_all_devices.has_key('CONFIG_ISA_IPMI_BT') and config_all_devices.has_key('CONFIG_IPMI_EXTERN') ? ['ipmi-bt-test'] : [= ]) + \ (config_all_devices.has_key('CONFIG_WDT_IB700') ? ['wdt_ib700-test'] : [= ]) + \ @@ -74,7 +74,7 @@ qtests_i386 =3D \ (config_all_devices.has_key('CONFIG_SB16') ? ['fuzz-sb16-test'] : []) + = \ (config_all_devices.has_key('CONFIG_SDHCI_PCI') ? ['fuzz-sdcard-test'] := []) + \ (config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) = + \ - (targetos !=3D 'windows' and = \ + (host_os !=3D 'windows' and = \ config_all_devices.has_key('CONFIG_ACPI_ERST') ? ['erst-test'] : []) + = \ (config_all_devices.has_key('CONFIG_PCIE_PORT') and = \ config_all_devices.has_key('CONFIG_VIRTIO_NET') and = \ @@ -277,7 +277,7 @@ if config_all_devices.has_key('CONFIG_VIRTIO_SERIAL') qos_test_ss.add(files('virtio-serial-test.c')) endif =20 -if targetos !=3D 'windows' +if host_os !=3D 'windows' qos_test_ss.add(files('e1000e-test.c')) endif if have_virtfs diff --git a/tests/unit/meson.build b/tests/unit/meson.build index a05d4710904..69f9c050504 100644 --- a/tests/unit/meson.build +++ b/tests/unit/meson.build @@ -100,7 +100,7 @@ if have_block } if gnutls.found() and \ tasn1.found() and \ - targetos !=3D 'windows' + host_os !=3D 'windows' tests +=3D { 'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1= _tab.c', tasn1, crypto, gnutls], @@ -115,7 +115,7 @@ if have_block if xts =3D=3D 'private' tests +=3D {'test-crypto-xts': [crypto, io]} endif - if targetos !=3D 'windows' + if host_os !=3D 'windows' tests +=3D { 'test-image-locking': [testblock], 'test-nested-aio-poll': [testblock], @@ -150,7 +150,7 @@ if have_system # are not runnable under TSan due to a known issue. # https://github.com/google/sanitizers/issues/1116 if not get_option('tsan') - if targetos !=3D 'windows' + if host_os !=3D 'windows' tests +=3D { 'test-char': ['socket-helpers.c', qom, io, chardev] } @@ -162,7 +162,7 @@ if have_system endif endif =20 -if have_ga and targetos =3D=3D 'linux' +if have_ga and host_os =3D=3D 'linux' tests +=3D {'test-qga': ['../qtest/libqmp.c']} test_deps +=3D {'test-qga': qga} endif diff --git a/ui/dbus-display1.xml b/ui/dbus-display1.xml index f0e2fac2127..ce35d64eea1 100644 --- a/ui/dbus-display1.xml +++ b/ui/dbus-display1.xml @@ -71,7 +71,7 @@ :dbus:iface:`org.qemu.Display1.Listener` interface. --> - + @@ -370,7 +370,7 @@ =20 - + - + @@ -715,7 +715,7 @@ :dbus:iface:`org.qemu.Display1.AudioInListener` interface. --> - + @@ -976,7 +976,7 @@ The current handler, if any, will be replaced. --> - + diff --git a/ui/meson.build b/ui/meson.build index a370494c4ab..376e0d771ba 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -25,7 +25,7 @@ endif system_ss.add([spice_headers, files('spice-module.c')]) system_ss.add(when: spice_protocol, if_true: files('vdagent.c')) =20 -if targetos =3D=3D 'linux' +if host_os =3D=3D 'linux' system_ss.add(files('input-linux.c', 'udmabuf.c')) endif system_ss.add(when: cocoa, if_true: files('cocoa.m')) @@ -75,7 +75,7 @@ endif if dbus_display dbus_ss =3D ss.source_set() env =3D environment() - env.set('TARGETOS', targetos) + env.set('HOST_OS', host_os) xml =3D custom_target('dbus-display preprocess', input: 'dbus-display1.xml', output: 'dbus-display1.xml', @@ -105,7 +105,7 @@ if dbus_display endif =20 if gtk.found() - if targetos =3D=3D 'windows' + if host_os =3D=3D 'windows' system_ss.add(files('win32-kbd-hook.c')) endif =20 @@ -121,7 +121,7 @@ if gtk.found() endif =20 if sdl.found() - if targetos =3D=3D 'windows' + if host_os =3D=3D 'windows' system_ss.add(files('win32-kbd-hook.c')) endif =20 diff --git a/util/meson.build b/util/meson.build index 4e970d2b488..af3bf5692d8 100644 --- a/util/meson.build +++ b/util/meson.build @@ -3,7 +3,7 @@ util_ss.add(files('thread-context.c'), numa) if not config_host_data.get('CONFIG_ATOMIC64') util_ss.add(files('atomic64.c')) endif -if targetos !=3D 'windows' +if host_os !=3D 'windows' util_ss.add(files('aio-posix.c')) util_ss.add(files('fdmon-poll.c')) if config_host_data.get('CONFIG_EPOLL_CREATE1') @@ -13,7 +13,7 @@ if targetos !=3D 'windows' util_ss.add(files('event_notifier-posix.c')) util_ss.add(files('mmap-alloc.c')) freebsd_dep =3D [] - if targetos =3D=3D 'freebsd' + if host_os =3D=3D 'freebsd' freebsd_dep =3D util endif util_ss.add(files('oslib-posix.c'), freebsd_dep) @@ -73,7 +73,7 @@ endif if have_system util_ss.add(files('crc-ccitt.c')) util_ss.add(when: gio, if_true: files('dbus.c')) - if targetos =3D=3D 'linux' + if host_os =3D=3D 'linux' util_ss.add(files('userfaultfd.c')) endif endif @@ -108,7 +108,7 @@ if have_block else util_ss.add(files('filemonitor-stub.c')) endif - if targetos =3D=3D 'linux' + if host_os =3D=3D 'linux' util_ss.add(files('vhost-user-server.c'), vhost_user) util_ss.add(files('vfio-helpers.c')) util_ss.add(files('chardev_open.c')) --=20 2.43.0