From nobody Sun Feb 8 12:43:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1611346485; cv=none; d=zohomail.com; s=zohoarc; b=TePgsgYCXp1nJrHg/5Zjifd81ep6ycugYS0KCu+kZtxQf06jqP/BCu5keUnOP+UdTrt0tzD6zL8AscdQIcKo1xIwk+dPb2M/DZv/puPJ19eFVnOfqYCTBXzQtVq4TpNu8ZWcRIM5D8vER/c80ZQBqczkaBWcbsny0IEdi67lj2w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611346485; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qVqRMnh8npYh0Rc9gcDpg3IYcVv+P2nL9eIHhLcj2Fs=; b=j0euKdJdAqlx3m19h77RzB4sL4Ob3jeXBdgRMPpzL0VncJ7s/5clf9YN9nS1uyH32ucK3U0RbZOlB7ghw3OLz/MmiT35mTVsT6rAa9XC3UBRpf5W96tYA+AqgNPNq5ypqf7oxyvR3ucmN9jI5VLebwBLv6OK+UFZ9ogLoW2I8J0= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611346485506107.62323558695061; Fri, 22 Jan 2021 12:14:45 -0800 (PST) Received: from localhost ([::1]:54150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32pQ-0000x9-7s for importer@patchew.org; Fri, 22 Jan 2021 15:14:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32m9-0004nm-6z; Fri, 22 Jan 2021 15:11:21 -0500 Received: from mail-pj1-f54.google.com ([209.85.216.54]:38677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32m7-0004ZI-AG; Fri, 22 Jan 2021 15:11:20 -0500 Received: by mail-pj1-f54.google.com with SMTP id x20so4597113pjh.3; Fri, 22 Jan 2021 12:11:18 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qVqRMnh8npYh0Rc9gcDpg3IYcVv+P2nL9eIHhLcj2Fs=; b=QQRUtw+RPKtbsHH4FF3GQHtYtXRyDCDN/KKI64VjOJhQQvwWhjHmHV+0hUWK0V9+P2 uXRt1ZTfCYyOYAjY5vhl2of7RV3gj4QAOQkjE98/aCaJ9k58+gPLjuB+L3tWnLFpeNzO OMEQTU1L8qjBOX4a4IrqDq5mVxV4yGgPi1ACJWAxhvf7zs0LHann1xmLrRukge5aPufM mjNH9wgLn0SoQBFa7nALNdMcDA3C7HnVj58z+WYy5KJPH+8CaCNhhGGPIsZn3HP9Fl3W L56eqv1OSMWzYgSQ4fm3nXXN/8YwTfC2I1Ns4tcX5H4fOPfNmWr1iFJmesk+opoL/bEm t1OA== X-Gm-Message-State: AOAM533PcU3tFt/wWALbTlzQhYHBKOsByZUprpykMtdFzCUL23M/7anX 1+RVl7M/xUX4F9vIgtQglHqtiyKnUik= X-Google-Smtp-Source: ABdhPJzyz4jwOLz51/IlbaZvOQJ5oWXVpzcT7/gao6MZN9we0rYDoDYBNIXkUTL1twdv/zX92VCWTQ== X-Received: by 2002:a17:90a:c787:: with SMTP id gn7mr351239pjb.222.1611346277183; Fri, 22 Jan 2021 12:11:17 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 01/11] block: feature detection for host block support Date: Fri, 22 Jan 2021 12:11:03 -0800 Message-Id: <20210122201113.63788-2-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> 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=209.85.216.54; envelope-from=osy86github@gmail.com; helo=mail-pj1-f54.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "open list:raw" , Markus Armbruster , Max Reitz , Joelle van Dyne Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" On Darwin (iOS), there are no system level APIs for directly accessing host block devices. We detect this at configure time. Signed-off-by: Joelle van Dyne --- configure | 13 +++++++++++++ meson.build | 2 +- qapi/block-core.json | 10 +++++++--- block/file-posix.c | 33 ++++++++++++++++++++++----------- 4 files changed, 43 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 6f6a319c2f..acf7f7414a 100755 --- a/configure +++ b/configure @@ -5283,6 +5283,16 @@ but not implemented on your system" fi fi =20 +########################################## +# check for host block device +# assume always true for non-Darwin hosts + +if ! test "$darwin" =3D=3D "yes" || check_include "IOKit/storage/IOMedia.h= " ; then + have_host_block_device=3Dyes +else + have_host_block_device=3Dno +fi + ########################################## # End of CC checks # After here, no more $cc or $ld runs @@ -5513,6 +5523,9 @@ echo "GIT_UPDATE=3D$git_update" >> $config_host_mak =20 echo "ARCH=3D$ARCH" >> $config_host_mak =20 +if test "$have_host_block_device" =3D "yes" ; then + echo "HAVE_HOST_BLOCK_DEVICE=3Dy" >> $config_host_mak +fi if test "$debug_tcg" =3D "yes" ; then echo "CONFIG_DEBUG_TCG=3Dy" >> $config_host_mak fi diff --git a/meson.build b/meson.build index af2bc89741..6c3ee7f8ca 100644 --- a/meson.build +++ b/meson.build @@ -180,7 +180,7 @@ if targetos =3D=3D 'windows' include_directories: include_directo= ries('.')) elif targetos =3D=3D 'darwin' coref =3D dependency('appleframeworks', modules: 'CoreFoundation') - iokit =3D dependency('appleframeworks', modules: 'IOKit') + iokit =3D dependency('appleframeworks', modules: 'IOKit', required: 'HAV= E_HOST_BLOCK_DEVICE' in config_host) elif targetos =3D=3D 'sunos' socket =3D [cc.find_library('socket'), cc.find_library('nsl'), diff --git a/qapi/block-core.json b/qapi/block-core.json index 3484986d1c..1a9576de8d 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -959,7 +959,8 @@ 'discriminator': 'driver', 'data': { 'file': 'BlockStatsSpecificFile', - 'host_device': 'BlockStatsSpecificFile', + 'host_device': { 'type': 'BlockStatsSpecificFile', + 'if': 'defined(HAVE_HOST_BLOCK_DEVICE)' }, 'nvme': 'BlockStatsSpecificNvme' } } =20 ## @@ -2827,7 +2828,9 @@ { 'enum': 'BlockdevDriver', 'data': [ 'blkdebug', 'blklogwrites', 'blkreplay', 'blkverify', 'bochs', 'cloop', 'compress', 'copy-on-read', 'dmg', 'file', 'ftp', 'ft= ps', - 'gluster', 'host_cdrom', 'host_device', 'http', 'https', 'iscs= i', + 'gluster', 'host_cdrom', + {'name': 'host_device', 'if': 'defined(HAVE_HOST_BLOCK_DEVICE)= ' }, + 'http', 'https', 'iscsi', 'luks', 'nbd', 'nfs', 'null-aio', 'null-co', 'nvme', 'parallel= s', 'preallocate', 'qcow', 'qcow2', 'qed', 'quorum', 'raw', 'rbd', { 'name': 'replication', 'if': 'defined(CONFIG_REPLICATION)' }, @@ -4012,7 +4015,8 @@ 'ftps': 'BlockdevOptionsCurlFtps', 'gluster': 'BlockdevOptionsGluster', 'host_cdrom': 'BlockdevOptionsFile', - 'host_device':'BlockdevOptionsFile', + 'host_device': { 'type': 'BlockdevOptionsFile', + 'if': 'defined(HAVE_HOST_BLOCK_DEVICE)' }, 'http': 'BlockdevOptionsCurlHttp', 'https': 'BlockdevOptionsCurlHttps', 'iscsi': 'BlockdevOptionsIscsi', diff --git a/block/file-posix.c b/block/file-posix.c index 00cdaaa2d4..11d2021346 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -42,6 +42,8 @@ #include "scsi/constants.h" =20 #if defined(__APPLE__) && (__MACH__) +#include +#if defined(HAVE_HOST_BLOCK_DEVICE) #include #include #include @@ -52,6 +54,7 @@ //#include #include #include +#endif /* defined(HAVE_HOST_BLOCK_DEVICE) */ #endif =20 #ifdef __sun__ @@ -181,7 +184,17 @@ typedef struct BDRVRawReopenState { bool check_cache_dropped; } BDRVRawReopenState; =20 -static int fd_open(BlockDriverState *bs); +static int fd_open(BlockDriverState *bs) +{ + BDRVRawState *s =3D bs->opaque; + + /* this is just to ensure s->fd is sane (its called by io ops) */ + if (s->fd >=3D 0) { + return 0; + } + return -EIO; +} + static int64_t raw_getlength(BlockDriverState *bs); =20 typedef struct RawPosixAIOData { @@ -3014,6 +3027,7 @@ static BlockStatsSpecific *raw_get_specific_stats(Blo= ckDriverState *bs) return stats; } =20 +#if defined(HAVE_HOST_BLOCK_DEVICE) static BlockStatsSpecific *hdev_get_specific_stats(BlockDriverState *bs) { BlockStatsSpecific *stats =3D g_new(BlockStatsSpecific, 1); @@ -3023,6 +3037,7 @@ static BlockStatsSpecific *hdev_get_specific_stats(Bl= ockDriverState *bs) =20 return stats; } +#endif /* HAVE_HOST_BLOCK_DEVICE */ =20 static QemuOptsList raw_create_opts =3D { .name =3D "raw-create-opts", @@ -3247,6 +3262,8 @@ BlockDriver bdrv_file =3D { /***********************************************/ /* host device */ =20 +#if defined(HAVE_HOST_BLOCK_DEVICE) + #if defined(__APPLE__) && defined(__MACH__) static kern_return_t GetBSDPath(io_iterator_t mediaIterator, char *bsdPath, CFIndex maxPathSize, int flags); @@ -3539,16 +3556,6 @@ hdev_co_ioctl(BlockDriverState *bs, unsigned long in= t req, void *buf) } #endif /* linux */ =20 -static int fd_open(BlockDriverState *bs) -{ - BDRVRawState *s =3D bs->opaque; - - /* this is just to ensure s->fd is sane (its called by io ops) */ - if (s->fd >=3D 0) - return 0; - return -EIO; -} - static coroutine_fn int hdev_co_pdiscard(BlockDriverState *bs, int64_t offset, int bytes) { @@ -3872,6 +3879,8 @@ static BlockDriver bdrv_host_cdrom =3D { }; #endif /* __FreeBSD__ */ =20 +#endif /* HAVE_HOST_BLOCK_DEVICE */ + static void bdrv_file_init(void) { /* @@ -3879,6 +3888,7 @@ static void bdrv_file_init(void) * registered last will get probed first. */ bdrv_register(&bdrv_file); +#if defined(HAVE_HOST_BLOCK_DEVICE) bdrv_register(&bdrv_host_device); #ifdef __linux__ bdrv_register(&bdrv_host_cdrom); @@ -3886,6 +3896,7 @@ static void bdrv_file_init(void) #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) bdrv_register(&bdrv_host_cdrom); #endif +#endif /* HAVE_HOST_BLOCK_DEVICE */ } =20 block_init(bdrv_file_init); --=20 2.28.0 From nobody Sun Feb 8 12:43:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1611346685; cv=none; d=zohomail.com; s=zohoarc; b=jSBRRmipOwJF5f/Xel/0Ip2u1at7nV1x7LT85g2jUjNacOhmEj6jUb63+euwrahBlP4PLyH/f+uioJNN9A3a7Xb2WGY1tcOap+ajzd+pk7ntt8sZYJ11gWgW6sE07hm2Lmy32/IPjt0/29WN9XilsEyc0fHsxfsebL8EAVFUfPU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611346685; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=01jOHlrAizpaDPxT12d+5+vOSGTC56CIKtFWQ2QTb8E=; b=Z4oUHQKGJKAksdBTCIN/rWErj6fDM0B6VCZ2nihTrTCLEXuFPjT0lf8mVvUQ4v2BdlbkI4FNgwSWKwFx6Rs7/hsrF+bXP9t4jCklCW6H4v2TDfiTC4N+Ay/+QIbj3Qx/yzoJR83Lta0uH0ph50ql0z5xp1ZSjrzseAbdipenPTo= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611346685747820.7020365447631; Fri, 22 Jan 2021 12:18:05 -0800 (PST) Received: from localhost ([::1]:35252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32se-0004yf-MB for importer@patchew.org; Fri, 22 Jan 2021 15:18:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32m9-0004o4-Dc for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:21 -0500 Received: from mail-pg1-f178.google.com ([209.85.215.178]:35470) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32m7-0004ZO-QO for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:21 -0500 Received: by mail-pg1-f178.google.com with SMTP id n7so4569778pgg.2 for ; Fri, 22 Jan 2021 12:11:19 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=01jOHlrAizpaDPxT12d+5+vOSGTC56CIKtFWQ2QTb8E=; b=sCGh2+RbouDK2koYmDYmWdwl8RLOcFkNQ6v8xdrXy1Ecak70/L/3zP7Culs1k2cBtu qt2r4V1ML58E31rJXHLK47ES5q+oBItrWGkaei9VYN3nzEmibR/wuvsq2G4J3E30jaW2 71oG0VkEZjlKSojGB6VAoMUPTD54gVO0KHToUgwK1L8k60JeVx0Lc8wsnJIT9o1H6EJv sytH0o1BHgCstH44l8FN5P7Zz4DpGF9SPJeE0eBjnujFweLZGMYhS5MuhaVxFoU2MNeL Bj27E3hCSTSWwjK5tKuBgxU15/DOzGK/JkF4Wct4sCqV9bM5J6FjB2i3FgMkmgJ4xoOA JHuQ== X-Gm-Message-State: AOAM531uNXokt+nKDgLcOvLqSbBncDNxA25Ho0X2xRQOGKNyajgYH4l2 HY40dgI2s4o0dow5vsH6gV4Cw8LcKmc= X-Google-Smtp-Source: ABdhPJz28lWzUzpz9iA0RY6T1LHup14VYA3XVUVEckKn2+3xtasGUJcKbIamcPIaUnk0FTxGokLChQ== X-Received: by 2002:a62:7c86:0:b029:1b7:cf7b:7d79 with SMTP id x128-20020a627c860000b02901b7cf7b7d79mr6668419pfc.48.1611346278161; Fri, 22 Jan 2021 12:11:18 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 02/11] configure: cross-compiling with empty cross_prefix Date: Fri, 22 Jan 2021 12:11:04 -0800 Message-Id: <20210122201113.63788-3-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=209.85.215.178; envelope-from=osy86github@gmail.com; helo=mail-pg1-f178.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Joelle van Dyne Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" The iOS toolchain does not use the host prefix naming convention. So we need to enable cross-compile options while allowing the PREFIX to be blank. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Joelle van Dyne --- configure | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure b/configure index acf7f7414a..32be5d225d 100755 --- a/configure +++ b/configure @@ -238,6 +238,7 @@ cpu=3D"" iasl=3D"iasl" interp_prefix=3D"/usr/gnemul/qemu-%M" static=3D"no" +cross_compile=3D"no" cross_prefix=3D"" audio_drv_list=3D"" block_drv_rw_whitelist=3D"" @@ -469,6 +470,7 @@ for opt do optarg=3D$(expr "x$opt" : 'x[^=3D]*=3D\(.*\)') case "$opt" in --cross-prefix=3D*) cross_prefix=3D"$optarg" + cross_compile=3D"yes" ;; --cc=3D*) CC=3D"$optarg" ;; @@ -1696,7 +1698,7 @@ $(echo Deprecated targets: $deprecated_targets_list |= \ --target-list-exclude=3DLIST exclude a set of targets from the default t= arget-list =20 Advanced options (experts only): - --cross-prefix=3DPREFIX use PREFIX for compile tools [$cross_prefix] + --cross-prefix=3DPREFIX use PREFIX for compile tools, PREFIX can be b= lank [$cross_prefix] --cc=3DCC use C compiler CC [$cc] --iasl=3DIASL use ACPI compiler IASL [$iasl] --host-cc=3DCC use C compiler CC [$host_cc] for code run at @@ -6403,7 +6405,7 @@ if has $sdl2_config; then fi echo "strip =3D [$(meson_quote $strip)]" >> $cross echo "windres =3D [$(meson_quote $windres)]" >> $cross -if test -n "$cross_prefix"; then +if test "$cross_compile" =3D "yes"; then cross_arg=3D"--cross-file config-meson.cross" echo "[host_machine]" >> $cross if test "$mingw32" =3D "yes" ; then --=20 2.28.0 From nobody Sun Feb 8 12:43:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1611346415; cv=none; d=zohomail.com; s=zohoarc; b=D59GZCbWp63UE8dwSIDmYl5MlFvRHs807X/i6w/mkXLUUCtCrvxBg0Iq2Ev3sSva4jWSdT0Q/NHF/6phyQSG32zoY2T04e/oLIOCkb6lZDiWHIhbjhlOldp23vwNJP4kZcVBYuo3L0bQgx/bZFOK6Lv7Aa8Ra5YvQc2Z9L5JELc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611346415; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nuZqkg4b5JSpteTWXviT3GF9Ync2kiIqSXzXQk/xAZU=; b=EAddIK1cPMs6MLFIQhSfIXMgk1aCGWOUvSEEyLjG0qYhD7+JO0kEhGnw9DGn2upY4VDLmA/YR85yaQUjiRf97aKAxZZPBtkqHD82uqD2fOBf65HgiNs5n2j4c3zHHJ57wTbinuSWBZvOp4uf6jdfizlls+WZdCMB5D0orvX97gw= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611346415268833.5206530978213; Fri, 22 Jan 2021 12:13:35 -0800 (PST) Received: from localhost ([::1]:47674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32oH-0006eV-96 for importer@patchew.org; Fri, 22 Jan 2021 15:13:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mB-0004rB-1y; Fri, 22 Jan 2021 15:11:23 -0500 Received: from mail-pl1-f176.google.com ([209.85.214.176]:33671) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32m9-0004a9-G2; Fri, 22 Jan 2021 15:11:22 -0500 Received: by mail-pl1-f176.google.com with SMTP id b8so3948962plx.0; Fri, 22 Jan 2021 12:11:20 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nuZqkg4b5JSpteTWXviT3GF9Ync2kiIqSXzXQk/xAZU=; b=c0o2+m3Saka6qSTMp/SOiy4vjNO1WE5SRMyDxnkmfImZatJadgJN26nq9aqMTyXKxa RTPiKHMFkwZC0Ar15U71sUhnKUW3U8vqKzwWAazHg9C/kQSwlep3y2EGzf8Z9zWSNK5Z pLlHszY5ojTahVUpvjbRqY2N0zDX/x32fFD3iPjFuj+02y46nsIlKaTtcRaskTOcTWt4 SZZnRjOJfwXdDqQjpDEePL4Po4ZzbHQ753fG7vTD9HuHb5eOBt+OMGkLu2r8b98ttvji 12MwZm9GUpqAIkkcPDGyxpErBh4lYaCUpdJEH1HvNAvqFZm5zO5DMS7KfHPXq2muWr0c cchA== X-Gm-Message-State: AOAM531h3zSQ6/ryVenquHtQjq7h2bAmVXJCAXgs/Q4cDeOhCly7qIc3 3hNn4GdMvhAd7QqMADozCJDmN2ejhvA= X-Google-Smtp-Source: ABdhPJyNxnJ+s4WMURFI7m76eKjus8lO/g0PYV1cv6TWjmumQ8KSfuJIvE9/mpeSqxObwon7TiYwGA== X-Received: by 2002:a17:90a:8006:: with SMTP id b6mr3779153pjn.108.1611346279349; Fri, 22 Jan 2021 12:11:19 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 03/11] configure: check for sys/disk.h Date: Fri, 22 Jan 2021 12:11:05 -0800 Message-Id: <20210122201113.63788-4-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> 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=209.85.214.176; envelope-from=osy86github@gmail.com; helo=mail-pl1-f176.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Joelle van Dyne , "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Some BSD platforms do not have this header. Signed-off-by: Joelle van Dyne --- configure | 9 +++++++++ block.c | 2 +- block/file-posix.c | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 32be5d225d..951de427bb 100755 --- a/configure +++ b/configure @@ -5295,6 +5295,12 @@ else have_host_block_device=3Dno fi =20 +if check_include "sys/disk.h" ; then + sys_disk_h=3Dyes +else + sys_disk_h=3Dno +fi + ########################################## # End of CC checks # After here, no more $cc or $ld runs @@ -5528,6 +5534,9 @@ echo "ARCH=3D$ARCH" >> $config_host_mak if test "$have_host_block_device" =3D "yes" ; then echo "HAVE_HOST_BLOCK_DEVICE=3Dy" >> $config_host_mak fi +if test "$sys_disk_h" =3D "yes" ; then + echo "HAVE_SYS_DISK_H=3Dy" >> $config_host_mak +fi if test "$debug_tcg" =3D "yes" ; then echo "CONFIG_DEBUG_TCG=3Dy" >> $config_host_mak fi diff --git a/block.c b/block.c index 8b9d457546..c4cf391dea 100644 --- a/block.c +++ b/block.c @@ -54,7 +54,7 @@ #ifdef CONFIG_BSD #include #include -#ifndef __DragonFly__ +#if defined(HAVE_SYS_DISK_H) #include #endif #endif diff --git a/block/file-posix.c b/block/file-posix.c index 11d2021346..666d3e7504 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -2320,7 +2320,7 @@ again: } if (size =3D=3D 0) #endif -#if defined(__APPLE__) && defined(__MACH__) +#if defined(HAVE_SYS_DISK_H) && defined(__APPLE__) && defined(__MACH__) { uint64_t sectors =3D 0; uint32_t sector_size =3D 0; --=20 2.28.0 From nobody Sun Feb 8 12:43:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1611346542; cv=none; d=zohomail.com; s=zohoarc; b=Y8Ox6j4YPn4sivvhtWVFpaw7wqv7kSL3O/IS1fgY0jyLh3ezyGrxXnWkSBlDRZ2bhuPFdzomcNyZMHWubhvpu9YB1rRhmY//+6Shogi904lafnFn47Y0rBemdS0llRdzOfY+9nTWm2k5VoWwTgO61vs47UUhqAM0X6znUULDmNg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611346542; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yu6KCnRp4TF93vQKDhTQrY7grXtKJlR4pp+WyzMSBD0=; b=IdpKwh1OMfqCIiwcBCGmNNM9n25iSDY2eq+ipGjLLpUngxW38qD7Ttjct2SC9ZiSeCLCH30N9oT8qNEsVE94MuephyA7rtJFisFp0VY4vNKY54FmnHmWsFUx/7uWtiGkaI8dkFa74U9CqSBl59NMaMMq82gg7ylUIV4jPgZhRf4= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611346542524429.10599465335383; Fri, 22 Jan 2021 12:15:42 -0800 (PST) Received: from localhost ([::1]:56660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32qK-0001yB-TV for importer@patchew.org; Fri, 22 Jan 2021 15:15:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mB-0004sO-Q1 for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:23 -0500 Received: from mail-pg1-f169.google.com ([209.85.215.169]:40942) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32m9-0004ap-Tx for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:23 -0500 Received: by mail-pg1-f169.google.com with SMTP id 15so4544095pgx.7 for ; Fri, 22 Jan 2021 12:11:21 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yu6KCnRp4TF93vQKDhTQrY7grXtKJlR4pp+WyzMSBD0=; b=Whvj0R3PmeKXyPvnxeOafsT44umiA4AuLy+ua2/CCTJ19KdoAl7+oyQR95/7Zf7dY5 CXgK6+ddowyah40btBLVALzlKPTM+2t0gyemEpmsRVNmiAbDdaTFMaghAa7ID5Mk+Fw4 iSKV3lttKJHS9nqFOZW5VKTfJ+N9Vp5FqY+NYDl0DJBPjjW+c7mlI+9WakY72iJIV3zH aruLOj3EBSaDOsXpVI2SBVqB/alcbPcYmVsmlNta9KYs7jB5muKDtsau3Y90x4VULlfl uaXroMie+8ql1AewXQmCLbKO7e7DOVgSfnC01uAMriWxJ09cLADkq7ZGwqn7NiiH9w5e cYyA== X-Gm-Message-State: AOAM533697Z0zkcj9ymmaI146ksxSpfDQ8FJx3SlzEALEcCF4MUMIMPP GQLFoOQo5GX1Diw/Fqpic1d+MPyh7hg= X-Google-Smtp-Source: ABdhPJwA1FltyV8wseisPJjCuRclTVg/ZkGtl7aqy3CQsLDndYvfE7vPrf00pD5WYffVYr3Hb5QUeA== X-Received: by 2002:a63:7885:: with SMTP id t127mr6302928pgc.15.1611346280342; Fri, 22 Jan 2021 12:11:20 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 04/11] slirp: feature detection for smbd Date: Fri, 22 Jan 2021 12:11:06 -0800 Message-Id: <20210122201113.63788-5-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> 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=209.85.215.169; envelope-from=osy86github@gmail.com; helo=mail-pg1-f169.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Thibault , Jason Wang , Joelle van Dyne Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Replace Windows specific macro with a more generic feature detection macro. Allows slirp smb feature to be disabled manually as well. Signed-off-by: Joelle van Dyne --- configure | 22 +++++++++++++++++++++- meson.build | 2 +- net/slirp.c | 16 ++++++++-------- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/configure b/configure index 951de427bb..92da27846e 100755 --- a/configure +++ b/configure @@ -464,6 +464,7 @@ fuse=3D"auto" fuse_lseek=3D"auto" =20 malloc_trim=3D"auto" +slirp_smbd=3D"auto" =20 # parse CC options second for opt do @@ -845,7 +846,18 @@ do fi done =20 +# Check for smbd dupport : ${smbd=3D${SMBD-/usr/sbin/smbd}} +if test "$slirp_smbd" !=3D "no" ; then + if test "$mingw32" =3D "yes" ; then + if test "$slirp_smbd" =3D "yes" ; then + error_exit "Host smbd not supported on this platform." + fi + slirp_smbd=3Dno + else + slirp_smbd=3Dyes + fi +fi =20 # Default objcc to clang if available, otherwise use CC if has clang; then @@ -1560,6 +1572,10 @@ for opt do ;; --disable-fuse-lseek) fuse_lseek=3D"disabled" ;; + --enable-slirp-smbd) slirp_smbd=3Dyes + ;; + --disable-slirp-smbd) slirp_smbd=3Dno + ;; *) echo "ERROR: unknown option $opt" echo "Try '$0 --help' for more information" @@ -1899,6 +1915,7 @@ disabled with --disable-FEATURE, default is enabled i= f available libdaxctl libdaxctl support fuse FUSE block device export fuse-lseek SEEK_HOLE/SEEK_DATA support for FUSE exports + slirp-smbd use smbd (at path --smbd=3D*) in slirp networking =20 NOTE: The object files are built at the place where configure is launched EOF @@ -5595,7 +5612,10 @@ fi if test "$guest_agent" =3D "yes" ; then echo "CONFIG_GUEST_AGENT=3Dy" >> $config_host_mak fi -echo "CONFIG_SMBD_COMMAND=3D\"$smbd\"" >> $config_host_mak +if test "$slirp_smbd" =3D "yes" ; then + echo "CONFIG_SLIRP_SMBD=3Dy" >> $config_host_mak + echo "CONFIG_SMBD_COMMAND=3D\"$smbd\"" >> $config_host_mak +fi if test "$vde" =3D "yes" ; then echo "CONFIG_VDE=3Dy" >> $config_host_mak echo "VDE_LIBS=3D$vde_libs" >> $config_host_mak diff --git a/meson.build b/meson.build index 6c3ee7f8ca..9577138d7f 100644 --- a/meson.build +++ b/meson.build @@ -2331,7 +2331,7 @@ summary_info +=3D {'sphinx-build': sphinx_build.= found()} summary_info +=3D {'genisoimage': config_host['GENISOIMAGE']} # TODO: add back version summary_info +=3D {'slirp support': slirp_opt =3D=3D 'disabled' ? fals= e : slirp_opt} -if slirp_opt !=3D 'disabled' +if slirp_opt !=3D 'disabled' and 'HAVE_HOST_SMBD' in config_host summary_info +=3D {'smbd': config_host['CONFIG_SMBD_COMMAND']} endif summary_info +=3D {'module support': config_host.has_key('CONFIG_MODULE= S')} diff --git a/net/slirp.c b/net/slirp.c index 8350c6d45f..4348e74805 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -27,7 +27,7 @@ #include "net/slirp.h" =20 =20 -#ifndef _WIN32 +#if defined(CONFIG_SLIRP_SMBD) #include #include #endif @@ -90,7 +90,7 @@ typedef struct SlirpState { Slirp *slirp; Notifier poll_notifier; Notifier exit_notifier; -#ifndef _WIN32 +#if defined(CONFIG_SLIRP_SMBD) gchar *smb_dir; #endif GSList *fwd; @@ -103,7 +103,7 @@ static QTAILQ_HEAD(, SlirpState) slirp_stacks =3D static int slirp_hostfwd(SlirpState *s, const char *redir_str, Error **err= p); static int slirp_guestfwd(SlirpState *s, const char *config_str, Error **e= rrp); =20 -#ifndef _WIN32 +#if defined(CONFIG_SLIRP_SMBD) static int slirp_smb(SlirpState *s, const char *exported_dir, struct in_addr vserver_addr, Error **errp); static void slirp_smb_cleanup(SlirpState *s); @@ -367,7 +367,7 @@ static int net_slirp_init(NetClientState *peer, const c= har *model, struct in6_addr ip6_prefix; struct in6_addr ip6_host; struct in6_addr ip6_dns; -#ifndef _WIN32 +#if defined(CONFIG_SLIRP_SMBD) struct in_addr smbsrv =3D { .s_addr =3D 0 }; #endif NetClientState *nc; @@ -477,7 +477,7 @@ static int net_slirp_init(NetClientState *peer, const c= har *model, return -1; } =20 -#ifndef _WIN32 +#if defined(CONFIG_SLIRP_SMBD) if (vsmbserver && !inet_aton(vsmbserver, &smbsrv)) { error_setg(errp, "Failed to parse SMB address"); return -1; @@ -592,7 +592,7 @@ static int net_slirp_init(NetClientState *peer, const c= har *model, } } } -#ifndef _WIN32 +#if defined(CONFIG_SLIRP_SMBD) if (smb_export) { if (slirp_smb(s, smb_export, smbsrv, errp) < 0) { goto error; @@ -784,7 +784,7 @@ void hmp_hostfwd_add(Monitor *mon, const QDict *qdict) =20 } =20 -#ifndef _WIN32 +#if defined(CONFIG_SLIRP_SMBD) =20 /* automatic user mode samba server configuration */ static void slirp_smb_cleanup(SlirpState *s) @@ -899,7 +899,7 @@ static int slirp_smb(SlirpState* s, const char *exporte= d_dir, return 0; } =20 -#endif /* !defined(_WIN32) */ +#endif /* defined(CONFIG_SLIRP_SMBD) */ =20 static int guestfwd_can_read(void *opaque) { --=20 2.28.0 From nobody Sun Feb 8 12:43:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1611346416; cv=none; d=zohomail.com; s=zohoarc; b=RnJZn9ajtO0YdQlW2u/t6C9aklENJR2u0VzC6Sl7d+ZiqG5nDbCSvenx0HbKy2p5x+CcDq8fWkIeQievFuc8hbDIYsxoCYr1POh/grwkHnLvmewM4xfyNiq0wVVdRdlFe0Y+UomUoKoweXoIu4dmsRsF4O4DBHRW00xR6sPO5IA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611346416; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=O/ETCdKXydJNzx0rW+CikghF8e1mV5AV5I0qUIMj/2g=; b=nB628DFTXsh8Eipimjl0Uq67TKgvncF+iT8KZxNtPUrghlmuBGnryZUPdGGpr/vzo5Nj5WOXhnUDK3s9VKkazPUnZHQxi80m1PLEiacC+5blh7/vzoUrmq4C0vI+emSZQI/+4PA5iXWEK0wgNe7N6amuwDNbh0Krefvj9EqYiHM= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611346416323904.3653288892349; Fri, 22 Jan 2021 12:13:36 -0800 (PST) Received: from localhost ([::1]:47940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32oJ-0006lG-8r for importer@patchew.org; Fri, 22 Jan 2021 15:13:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mC-0004tl-FM for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:24 -0500 Received: from mail-pl1-f171.google.com ([209.85.214.171]:41204) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32mA-0004b3-My for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:24 -0500 Received: by mail-pl1-f171.google.com with SMTP id h15so1435813pli.8 for ; Fri, 22 Jan 2021 12:11:22 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O/ETCdKXydJNzx0rW+CikghF8e1mV5AV5I0qUIMj/2g=; b=QgREHlsctRHMzxIZro4TmfsvePHZpMhGpDuzTf/HIEooe2Y+cV65w6sMwL+XBWw0QP U4dJhKVAnV40fERchJ4lbPDO1K60ayBEyZudarQCPnREkmR1Rr3AqfEX1NbJd3HjFcGS xPO8dDtD0ypDjrMoalmc3ImU5qEUHWuQZPTeDj8Bae2SM/4+nCcey4rFmDNioglbDUpz Ifkyvr0xtVC1epYjwb4SF5RL2ybIlTqwGI4rtMK+fZL+5pmaq1DqZarQMV851cVMSgBN atxWZkhGn+QxY7Ja0KjDey0iBd9JzZ8Ej+neJ6dCcQyy+YfsAgHrbNB3OyMMFPmhoQED jFaQ== X-Gm-Message-State: AOAM533J6fSIjggwnY9m4Z2/LvLFTOF9aLO+rtrPJaOL90kzNfcv6qtl 1CsU52RGFhPYw1cvt8hj5O+HdCnya0Q= X-Google-Smtp-Source: ABdhPJzwr9pxoM2ImHWMN1X1mChTynUMRGscZA1C0Dg0YpkIThwBFnIhCHfatCRD0D95Soa6G8zq7g== X-Received: by 2002:a17:90a:6bc3:: with SMTP id w61mr7353832pjj.214.1611346281281; Fri, 22 Jan 2021 12:11:21 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 05/11] osdep: build with non-working system() function Date: Fri, 22 Jan 2021 12:11:07 -0800 Message-Id: <20210122201113.63788-6-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> 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=209.85.214.171; envelope-from=osy86github@gmail.com; helo=mail-pl1-f171.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joelle van Dyne Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Build without error on hosts without a working system(). An assertion will trigger if system() is called. Signed-off-by: Joelle van Dyne --- configure | 19 +++++++++++++++++++ include/qemu/osdep.h | 11 +++++++++++ 2 files changed, 30 insertions(+) diff --git a/configure b/configure index 92da27846e..82ce28c660 100755 --- a/configure +++ b/configure @@ -5318,6 +5318,21 @@ else sys_disk_h=3Dno fi =20 +########################################## +# check for system() + +have_system_function=3Dno +cat > $TMPC << EOF +#include +int main(void) { + return system(""); +} +EOF +if compile_prog "" "" ; then + have_system_function=3Dyes +fi + + ########################################## # End of CC checks # After here, no more $cc or $ld runs @@ -6222,6 +6237,10 @@ if test "$secret_keyring" =3D "yes" ; then echo "CONFIG_SECRET_KEYRING=3Dy" >> $config_host_mak fi =20 +if test "$have_system_function" =3D "yes" ; then + echo "HAVE_SYSTEM_FUNCTION=3Dy" >> $config_host_mak +fi + echo "ROMS=3D$roms" >> $config_host_mak echo "MAKE=3D$make" >> $config_host_mak echo "PYTHON=3D$python" >> $config_host_mak diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index a434382c58..73346c4349 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -682,4 +682,15 @@ char *qemu_get_host_name(Error **errp); */ size_t qemu_get_host_physmem(void); =20 +/** + * Platforms which do not support system() gets an assertion failure. + */ +#ifndef HAVE_SYSTEM_FUNCTION +#define system platform_does_not_support_system +static inline int platform_does_not_support_system(const char *command) +{ + assert(0); +} +#endif /* !HAVE_SYSTEM_FUNCTION */ + #endif --=20 2.28.0 From nobody Sun Feb 8 12:43:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1611346811; cv=none; d=zohomail.com; s=zohoarc; b=NBaGd03b5VPOLHCa3MRoPxjQBCQE9S19C3sfj/dQl4JPyD4R7pATHgbl3dqJsqDdtM42Zes1dDVI1mSFB5BztaraVck6ExpdG+DLoKVv739qLp68TC2im/IZpSt2WqqSd7gKJ7bSgT3e0CbH10um6wJMarWnM07nCqmxhVI+DaY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611346811; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZTqB4ZeZsgg10vvjHd/dHMK/cst2I6BNOY0xcUjrQ/0=; b=gh644d2/OGcI9hTpvPbxCrb4/4007HPJfMLadZF19kIGFlPCgF3FgDvLgnJwrUrl4LyREa1phAXdz0Dm12d2C7MqeHDIzzHqpUYJKPh+7NTvPXv6+xIiajkuqDpcOSfhYUnlSWZJxJ9yTs9HvgNmDdV3uNRuxRVK/6pGPKA/3Fk= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611346810999786.3881981179338; Fri, 22 Jan 2021 12:20:10 -0800 (PST) Received: from localhost ([::1]:41130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32uf-0007Wp-Tn for importer@patchew.org; Fri, 22 Jan 2021 15:20:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mD-0004ud-1l for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:25 -0500 Received: from mail-pj1-f47.google.com ([209.85.216.47]:34694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32mB-0004bB-HW for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:24 -0500 Received: by mail-pj1-f47.google.com with SMTP id my11so6857081pjb.1 for ; Fri, 22 Jan 2021 12:11:23 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZTqB4ZeZsgg10vvjHd/dHMK/cst2I6BNOY0xcUjrQ/0=; b=tHyQ7TkYHSPynZ31t+9yJr7FOe5W16FuItLqpBqL/+T6CHcSEYY8hEBN6b9g/nbBP6 3Jd+e+k+txd/RAsJ2ASboSeebQIMiEa2V2fC+fAjTUYoJgN7jzVQKy9JLgJ4YO/kyArH 64ySiSr6ag8+ENX52pbvv3V/1+7P4v+t51KawaaOkEPDI8ViVJOTAnC0PQJ0QaJKgaeJ W06s1sUD1kLA7PdkoFESvQWXe+ritCB9v+5VsOpoLRX1XGEXQXqUifFFZX7asU/zmaTo 2yXYN7PGDxtAZ8VBmQc30N1aFSDdDXI1lbrM8K5OtAKuL+M13D0ZBw8UiMTdZ5aGkpT6 MQEA== X-Gm-Message-State: AOAM530bbbhf+Ysw0DSE4tfAWw+OhdIfOiPLv3RByq54eeGN9usExYcT kkyh4slE3b9L/tLf90aYZIayMpO1ds4= X-Google-Smtp-Source: ABdhPJzIkz6LJLGXd4szxF7PRQbC5oquLFv7yLgR8H1l7kHspeLWU9Al7V5SRO4XWHJf8aHhmw30+w== X-Received: by 2002:a17:90a:b296:: with SMTP id c22mr7621321pjr.142.1611346282050; Fri, 22 Jan 2021 12:11:22 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 06/11] darwin: remove redundant dependency declaration Date: Fri, 22 Jan 2021 12:11:08 -0800 Message-Id: <20210122201113.63788-7-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> 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=209.85.216.47; envelope-from=osy86github@gmail.com; helo=mail-pj1-f47.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joelle van Dyne Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Meson will find CoreFoundation, IOKit, and Cocoa as needed. Signed-off-by: Joelle van Dyne Reviewed-by: Peter Maydell --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index 82ce28c660..4c485dd962 100755 --- a/configure +++ b/configure @@ -781,7 +781,6 @@ Darwin) fi audio_drv_list=3D"coreaudio try-sdl" audio_possible_drivers=3D"coreaudio sdl" - QEMU_LDFLAGS=3D"-framework CoreFoundation -framework IOKit $QEMU_LDFLAGS" # 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. QEMU_CFLAGS=3D"-DOS_OBJECT_USE_OBJC=3D0 $QEMU_CFLAGS" --=20 2.28.0 From nobody Sun Feb 8 12:43:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1611346710; cv=none; d=zohomail.com; s=zohoarc; b=nfKzvGTdwUlHcry+iC5zqwNVdfGphIexEMIUp18JJSREnTk2DCa3xTIwf/qfgKh5tuseWEKU5EePveYWndtgiLESuEsz2lFKJnrXRYLGhBumNR8+ShFtmx6V5fYYpLuzI3lW2HRaYoC7btWJJoWFIKYN4gpeWQVFTEJOH5Shjdg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611346710; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kWegMfg0i0hDDWGoVKdg+A4xiQ6lvBugKe41iD56/ps=; b=Vz2MUdTIkKZQlcK6FdU00ZJCmCIue8FIcsibJkO4P/7dC5pFRsiPCf5InlkFh/HFSAyxKRMz9wzm5aguyov+ifmrYbYAZCdl+2c4ZmyAVU0hX5FxfSNLnGGDVVj4T9a/vy6kX90pcJEayn3qoclOGAKmObIQv6BBKc79xruGjus= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611346710455236.72306690374444; Fri, 22 Jan 2021 12:18:30 -0800 (PST) Received: from localhost ([::1]:36884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32t1-0005gi-Dl for importer@patchew.org; Fri, 22 Jan 2021 15:18:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mE-0004wH-2V for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:26 -0500 Received: from mail-pj1-f46.google.com ([209.85.216.46]:36109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32mC-0004cT-Hj for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:25 -0500 Received: by mail-pj1-f46.google.com with SMTP id e6so4609260pjj.1 for ; Fri, 22 Jan 2021 12:11:24 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kWegMfg0i0hDDWGoVKdg+A4xiQ6lvBugKe41iD56/ps=; b=PI50yaKP199bbgUxUXnkvNxEvBNOKbf3pnTG9Dk5D9J0khCs6SiDT8zklIv2WSmVnW Unsv1FnkmPdh0Ru+PtfHNMkZg/qowgLgB9EAA1aZO1Oir4u5Vx05SjAT+Yc7EUbQYgwS 6CnbcWKa4H0RFKAaUZ0bPQ3PCxW1bah+Mczr8Zcxlcw3cZSejLckqsITmuQtpe6s9rfp DtZ2FJs3QQhzoko4UkVILWx3f3dL1/jIhG+myMhPJmCrEcvPkyae9QCHpnJoaiIfKK5a iya8V4yfhCP6GyAmXz2Otm6aeiggekaNqMGEZxqL0VrenQIFJN6Qy7LNMOjpFJZoWrAV Y8Fw== X-Gm-Message-State: AOAM531tDJgWzBuRChUMGn0SYYSa4b6OpmWa4Y7B7zANXOOUDUMxPZIj bnMlm5Y0YqNUUPrs90JpqDA0JNwE+xg= X-Google-Smtp-Source: ABdhPJxj2YQPmDPrJtNRcu9zsj4pAkNI8jloVc0VFwYNuz9rz1rh0/NIwcYWHLVImpEu6cUx63gpLA== X-Received: by 2002:a17:90a:b28f:: with SMTP id c15mr7110896pjr.79.1611346282949; Fri, 22 Jan 2021 12:11:22 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 07/11] darwin: fix cross-compiling for Darwin Date: Fri, 22 Jan 2021 12:11:09 -0800 Message-Id: <20210122201113.63788-8-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> 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=209.85.216.46; envelope-from=osy86github@gmail.com; helo=mail-pj1-f46.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joelle van Dyne Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Add objc to the Meson cross file as well as detection of Darwin. Signed-off-by: Joelle van Dyne Reviewed-by: Peter Maydell --- configure | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure b/configure index 4c485dd962..7e5ec7a5a1 100755 --- a/configure +++ b/configure @@ -6443,6 +6443,7 @@ echo "cpp_link_args =3D [${LDFLAGS:+$(meson_quote $LD= FLAGS)}]" >> $cross echo "[binaries]" >> $cross echo "c =3D [$(meson_quote $cc)]" >> $cross test -n "$cxx" && echo "cpp =3D [$(meson_quote $cxx)]" >> $cross +test -n "$objcc" && echo "objc =3D [$(meson_quote $objcc)]" >> $cross echo "ar =3D [$(meson_quote $ar)]" >> $cross echo "nm =3D [$(meson_quote $nm)]" >> $cross echo "pkgconfig =3D [$(meson_quote $pkg_config_exe)]" >> $cross @@ -6461,6 +6462,9 @@ if test "$cross_compile" =3D "yes"; then if test "$linux" =3D "yes" ; then echo "system =3D 'linux'" >> $cross fi + if test "$darwin" =3D "yes" ; then + echo "system =3D 'darwin'" >> $cross + fi case "$ARCH" in i386|x86_64) echo "cpu_family =3D 'x86'" >> $cross --=20 2.28.0 From nobody Sun Feb 8 12:43:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1611346897; cv=none; d=zohomail.com; s=zohoarc; b=LgapTPneMK/Apai5mLaRaG4qaTyv43OU2wQkxdyFbh6IMdnhx58uZcaUMLXv9KB8j4mye4tzJVHpAhmvVg5iBSWZ5jfkD+9hMUoC4JsHev6/cOTv9+FYqJ8saKsVkvvHqqfvxgu0YVPVGzC2fFgk0r5MSeIEtC2iSI13ILsg5pU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611346897; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yEwtq74+KSEBVLDQzC0rm5JCviDvE1WzfYDdBlTdUe0=; b=F8C2zt/JeYGLwZNe3e/zq4F5A4lmEAcP+M1bfsQSUkzOaqHJIWPrQ0HhS+RJzhomb8im9uzvobe6b19LHUNzQcokk8vcQsWWGWKrjkvgob/xi1TthFwDE6I47191G4p3Vz9CJFIlunFnRfp9idXbOOTBToKQdjSqsqepz9BoebI= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611346897907760.1902352476503; Fri, 22 Jan 2021 12:21:37 -0800 (PST) Received: from localhost ([::1]:45644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32w4-0001WK-Oh for importer@patchew.org; Fri, 22 Jan 2021 15:21:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mF-0004yy-11 for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:27 -0500 Received: from mail-pj1-f48.google.com ([209.85.216.48]:55245) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32mD-0004cn-Ew for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:26 -0500 Received: by mail-pj1-f48.google.com with SMTP id cq1so4522506pjb.4 for ; Fri, 22 Jan 2021 12:11:25 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yEwtq74+KSEBVLDQzC0rm5JCviDvE1WzfYDdBlTdUe0=; b=fqYj4keDSBHmRkTlgy8N4k8bT6t+y1jBPIr2crTH9CUXK3epBQgbfa9oAk/joVlAVY S9zE8UdhuNp+JS5BvACOO7cbD2DWDn7k5/NJ1HeuD+NzjUAv4E3yexuLf0nJYBGb1BV/ x6J3MZ4tEe4Cx/oXJyNFIXz+tmPhwohzivLD6QKdwxO8g+1RlAFziR+WN1Mmob0bqHEr 6SqW8AjVwB4cNdLdlK9DWn+yy5op8ojZhCCw8H5UqpTjdagiroddoDD3ZOrXVh82rbVV HtoHQVU2P8dLkTedX2BaNox5nHVjuGXfNUaXEW0khE1KU1ci2RnCxZfH58vxi1EkjHSi FTNQ== X-Gm-Message-State: AOAM530ut5Y/v07yMLw2ulDpBqvHZSJy5cZflZh3MsQAskxhWTThB8IJ CKEVxhiGdWrdbN2Hfo7KUWTEEKygMcA= X-Google-Smtp-Source: ABdhPJyQxaHMRlPIqGQ/dDIZg5hnQlu2bqTpwxwHG2rCM2ZyVPbXXLDSI7Oi9lm9lGwOpEdnqX7hBg== X-Received: by 2002:a17:90b:3892:: with SMTP id mu18mr316112pjb.143.1611346283908; Fri, 22 Jan 2021 12:11:23 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 08/11] configure: cross compile should use x86_64 cpu_family Date: Fri, 22 Jan 2021 12:11:10 -0800 Message-Id: <20210122201113.63788-9-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=209.85.216.48; envelope-from=osy86github@gmail.com; helo=mail-pj1-f48.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Joelle van Dyne Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Joelle van Dyne --- configure | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 7e5ec7a5a1..f487be3cfe 100755 --- a/configure +++ b/configure @@ -6466,9 +6466,12 @@ if test "$cross_compile" =3D "yes"; then echo "system =3D 'darwin'" >> $cross fi case "$ARCH" in - i386|x86_64) + i386) echo "cpu_family =3D 'x86'" >> $cross ;; + x86_64) + echo "cpu_family =3D 'x86_64'" >> $cross + ;; ppc64le) echo "cpu_family =3D 'ppc64'" >> $cross ;; --=20 2.28.0 From nobody Sun Feb 8 12:43:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1611346609; cv=none; d=zohomail.com; s=zohoarc; b=izuUJ1+npIysYkboBIdKiI9HtF/mOpxFDSkVDBqtlEXch5QpA5ybb2FBCwHpjDydqXUJXu2Wgos9r40Z/oxgg8/PU9qTYgSRuFXm0xGbAPe/ndCBl96oMZKD7698cJ/CCWFN0arzglDtgDq2Jp5l8TRpbwIQ9QCdxKuuTi+0HWM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611346609; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=B3bgTvyMVaMNKOvbfkCeAjPnu2P94ObpQ3L4Z8LkPIk=; b=kHbQjkQXZvqKeL8CJGBFFu734U06/UwcruLnNS/gl0X1x09Kbx4KPdApQRM88QncCSs101v1dibLqbmliyjs2o+vImaqEQMf+fWvKfHiuHZF41BMu4mW8v9GbNnU0vMdAqFuxCWcZraCqvgKHXxpPtDs436XprSRtGWuKLb4Vls= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611346609819557.9761208244967; Fri, 22 Jan 2021 12:16:49 -0800 (PST) Received: from localhost ([::1]:59324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32rQ-00034D-HL for importer@patchew.org; Fri, 22 Jan 2021 15:16:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mG-000511-Bi; Fri, 22 Jan 2021 15:11:28 -0500 Received: from mail-pf1-f182.google.com ([209.85.210.182]:40943) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32mE-0004cv-QX; Fri, 22 Jan 2021 15:11:28 -0500 Received: by mail-pf1-f182.google.com with SMTP id i63so4549951pfg.7; Fri, 22 Jan 2021 12:11:26 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B3bgTvyMVaMNKOvbfkCeAjPnu2P94ObpQ3L4Z8LkPIk=; b=Y0J4RsFAifHC2lIaWdIBucyYGnMM5ATHnp9xlJsOMyzXElk8htBtXtGc8dPzIYQbBJ iTyma/aliTf24pBt2CWPlvPUedIumRZrUGcy8PTk2rDN2iZXGUtnwKg7mIF68KnJ+eg9 YDGxJsbnVA+7R5cog1uiLJ7EpqLpbXcvj8cqT4HqvDWxJmoQcmkQHROrIb6McWfiAef8 /UIRl4SixaeYA75z4NXxYfa15LS1bfyljmN7paVydfInt8abw7YWBiZMMc1EeYlCotNd 7/CV8Yq0RntoQXaqxiuFQswz12wFtaVMxsGSDBWVTLsEzgh633Qzpz14BqZEZYXJS+fg tUgg== X-Gm-Message-State: AOAM533TSvR28oJ51wyvCZ7HvTfEoxptVQaP09Qu/zrJED4WDZ3LUIEZ r0H63nhcN2V7Qz3tjGpJwAICgoyZd0U= X-Google-Smtp-Source: ABdhPJxBrXNtWSd3gd/yJoTymIBbNHd6W04dZW2VpE6niu6fkfTktaNFOPMSuEyTG/zGiyXI8K+QGg== X-Received: by 2002:a63:749:: with SMTP id 70mr6469704pgh.182.1611346284972; Fri, 22 Jan 2021 12:11:24 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 09/11] block: check availablity for preadv/pwritev on mac Date: Fri, 22 Jan 2021 12:11:11 -0800 Message-Id: <20210122201113.63788-10-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> 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=209.85.210.182; envelope-from=osy86github@gmail.com; helo=mail-pf1-f182.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Joelle van Dyne , "open list:raw" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" macOS 11/iOS 14 added preadv/pwritev APIs. Due to weak linking, configure will succeed with CONFIG_PREADV even when targeting a lower OS version. We therefore need to check at run time if we can actually use these APIs. Signed-off-by: Joelle van Dyne --- block/file-posix.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c index 666d3e7504..6473f84db8 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -1386,17 +1386,50 @@ static int handle_aiocb_flush(void *opaque) #ifdef CONFIG_PREADV =20 static bool preadv_present =3D true; +static bool preadv_checked; =20 static ssize_t qemu_preadv(int fd, const struct iovec *iov, int nr_iov, off_t offset) { +#ifdef CONFIG_DARWIN /* preadv introduced in macOS 11 */ + if (unlikely(!preadv_checked)) { + if (__builtin_available(macOS 11, iOS 14, watchOS 7, tvOS 14, *)) { + preadv_checked =3D true; + } else { + preadv_present =3D false; + return -ENOSYS; + } + } + /* Now we suppress the availability warning since we use the cached ch= eck */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunguarded-availability-new" + return preadv(fd, iov, nr_iov, offset); +#pragma clang diagnostic pop +#else /* CONFIG_DARWIN */ return preadv(fd, iov, nr_iov, offset); +#endif } =20 static ssize_t qemu_pwritev(int fd, const struct iovec *iov, int nr_iov, off_t offset) { +#ifdef CONFIG_DARWIN /* preadv introduced in macOS 11 */ + if (unlikely(!preadv_checked)) { + if (__builtin_available(macOS 11, iOS 14, watchOS 7, tvOS 14, *)) { + preadv_checked =3D true; + } else { + preadv_present =3D false; + return -ENOSYS; + } + } + /* Now we suppress the availability warning since we use the cached ch= eck */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunguarded-availability-new" + return pwritev(fd, iov, nr_iov, offset); +#pragma clang diagnostic pop +#else /* CONFIG_DARWIN */ return pwritev(fd, iov, nr_iov, offset); +#endif } =20 #else --=20 2.28.0 From nobody Sun Feb 8 12:43:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1611346836; cv=none; d=zohomail.com; s=zohoarc; b=AZuYshT3vBRV16aFz+W9kWrUvieKQ1thkAQJJV8bW8OiY3k8VYdmUHig0t7pJQaqohRbPlpuxvkh0fEp2OqQXdhKGLVcGuThRQ+PLDLAYBpurrKy1AV2FNLaovBsPc0SCtTP7oLvJhF0dQGuaQD//qZ/gFj/liusmvAvbMbYkxE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611346836; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cjf3zkEzdC7Sji+ngGUJT+yhUPJZ6w/w5ucvRluKxqY=; b=N9mllobl74Rl1Jur6gLAo05tA14wP2Cp9nvUHTqAQ/e1IHoqmuCQFP47wW0uJD1IOUxZrOzWNq8NqWSFvqIj5Om61u5bxhzkbQxxtRlbxhyOL0aLphja+K2tCMnG00vLoqhJ8j47GKoeBLkHkbpad0DEIKRuWwKwC1Y+/nKZm+Y= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611346836014682.6099589509646; Fri, 22 Jan 2021 12:20:36 -0800 (PST) Received: from localhost ([::1]:41730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32v4-0007mJ-U5 for importer@patchew.org; Fri, 22 Jan 2021 15:20:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mH-000529-2z for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:29 -0500 Received: from mail-pj1-f51.google.com ([209.85.216.51]:38682) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32mF-0004dN-HB for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:28 -0500 Received: by mail-pj1-f51.google.com with SMTP id x20so4597303pjh.3 for ; Fri, 22 Jan 2021 12:11:27 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cjf3zkEzdC7Sji+ngGUJT+yhUPJZ6w/w5ucvRluKxqY=; b=P8TkNNVmRno25WfJBJFbT6Ux9PDTKBuxIj3wLGssyhb/8MJAu/1QtFPNg6BZifTglz gRsYr+aVRmHZM4yHkFQ6Jieqk8kFTV5sJh4uJA3RyQXM87V+DyYERh9XPe8C+VhGMZ0i ew8se/KgV/FJFnxmCcWJN4i8BOC6QGaPUl/aGZCq8qW+b7BNBRCzS7TSsjkzrYtTv9CB rzOE4ZCxPceTCxAkB7KmQgLxKadwVbdkBTfJocYNOdcJopWFRVCsUFsZUk+2y6oe/OUj J4S7GT+TEaAVEOAwUfO5NnwMFV2e17cUyYbhfO/FHwB/ibMdqpEc4ABhfw3l1XXkvSNA Rsrw== X-Gm-Message-State: AOAM533nJDFF/YnhPsm8raGWvhg+JzNHknRpuY35D/KZ8PWFSwOEf3YB g8eBIhYZl5JrAPC5eTC4/T8sq1llXrc= X-Google-Smtp-Source: ABdhPJzFcl8V6+Owu0LGAT2J5bXXiioKXD8FkUDb0qukZ3F1y1jNtIQAnqSY6bK6AvOkKF+RlqMNQA== X-Received: by 2002:a17:90a:1182:: with SMTP id e2mr7157800pja.152.1611346285901; Fri, 22 Jan 2021 12:11:25 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 10/11] darwin: detect CoreAudio for build Date: Fri, 22 Jan 2021 12:11:12 -0800 Message-Id: <20210122201113.63788-11-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> 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=209.85.216.51; envelope-from=osy86github@gmail.com; helo=mail-pj1-f51.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joelle van Dyne Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" On iOS there is no CoreAudio, so we should not assume Darwin always has it. Signed-off-by: Joelle van Dyne --- configure | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/configure b/configure index f487be3cfe..fb671258e6 100755 --- a/configure +++ b/configure @@ -319,6 +319,7 @@ fdt=3D"auto" netmap=3D"no" sdl=3D"auto" sdl_image=3D"auto" +coreaudio=3D"auto" virtiofsd=3D"auto" virtfs=3D"auto" libudev=3D"auto" @@ -779,7 +780,7 @@ Darwin) QEMU_CFLAGS=3D"-arch x86_64 $QEMU_CFLAGS" QEMU_LDFLAGS=3D"-arch x86_64 $QEMU_LDFLAGS" fi - audio_drv_list=3D"coreaudio try-sdl" + audio_drv_list=3D"try-coreaudio try-sdl" audio_possible_drivers=3D"coreaudio sdl" # 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. @@ -3162,6 +3163,24 @@ EOF fi fi =20 +########################################## +# detect CoreAudio +if test "$coreaudio" !=3D "no" ; then + coreaudio_libs=3D"-framework CoreAudio" + cat > $TMPC << EOF +#include +int main(void) +{ + return (int)AudioGetCurrentHostTime(); +} +EOF + if compile_prog "" "$coreaudio_libs" ; then + coreaudio=3Dyes + else + coreaudio=3Dno + fi +fi + ########################################## # Sound support libraries probe =20 @@ -3218,8 +3237,20 @@ for drv in $audio_drv_list; do fi ;; =20 - coreaudio) + coreaudio | try-coreaudio) + if test "$coreaudio" =3D "no"; then + if test "$drv" =3D "try-coreaudio"; then + audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-coreaudi= o//') + else + error_exit "$drv check failed" \ + "Make sure to have the $drv is available." + fi + else coreaudio_libs=3D"-framework CoreAudio" + if test "$drv" =3D "try-coreaudio"; then + audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-coreaudi= o/coreaudio/') + fi + fi ;; =20 dsound) --=20 2.28.0 From nobody Sun Feb 8 12:43:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1611346548; cv=none; d=zohomail.com; s=zohoarc; b=E5iaaZ1BuSkbM5HJhjut9x+rQczu6JLn3aFthWd2qNKqM05rDeoZkJJooSABgGafWI2vUn/BfPwbTkHHg17XWYdhew2GxAVzp528QJtbuykGn0FyVRzgD1Ntflbmoq9slSNEY3TgrLYm446iPjMNa3wiT3wyK1F9vGt67/e1uyc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611346548; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bH12qTm3+UAqqzcs6td+zXs9uTHKta6X9jVQRa8WiS8=; b=kgZf+TGG5Ski9x73EwnKX1RZ69w/kBDe3eDnueAlLPi8exm199MaYz7nRKXvnIsZzyoFQDQmY6UZOyznqOm//dcdJOfeJYuS/XYsTjzzwj9XMJX09tajbGSseU9yShBPBOM4bGUxC/zGEq1LLP4CY1r5Ltg8dnnx34olscQmYPc= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611346548498367.8848095369243; Fri, 22 Jan 2021 12:15:48 -0800 (PST) Received: from localhost ([::1]:57094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32qR-00028n-DE for importer@patchew.org; Fri, 22 Jan 2021 15:15:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mI-00053s-1s for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:30 -0500 Received: from mail-pf1-f177.google.com ([209.85.210.177]:45876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32mG-0004eM-B7 for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:29 -0500 Received: by mail-pf1-f177.google.com with SMTP id j12so4537555pfj.12 for ; Fri, 22 Jan 2021 12:11:27 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bH12qTm3+UAqqzcs6td+zXs9uTHKta6X9jVQRa8WiS8=; b=Db84YV5NdlHGTao1Gi1WzhDBGRcbroezfYJe/iF7r7PugpfKF35D3u3/HwceVaBY0/ SaF1A71P7smxX1XPAGmSuhghSBQ8jZBlE5p7YbwrGwlX3EdTcmRacpSmguiAgy9C2crT i97KWMd9p0jjLXFYHQlriZZkVxyve8HJDn4dCUFxIxDzQWrqbI5tVIO+8i+5iUz8i7Mk eQB2U33rGdTMKtUkFvkyUTspuT9QijgHlmJNrMjs3JqG2wggrU37YL+ZmJ2MSY0rZcwy MsSNaB02BKQ6QvyxWGYFgYFSxCaPUTsvlczKv87WABk1SLmc2/sPcG16cOMMambnJZ69 sJVw== X-Gm-Message-State: AOAM531FXuCSPQGJrUc+YOjcpf5i3xUOAp3BTX/JinY1qIHphBPUzZgI fLekwZVFK9cMwrIePKfH7iiByZRgArE= X-Google-Smtp-Source: ABdhPJzlJ8++8mqDEgPOYVefa8aKiKgiZ3y4NXp9ujXvGcMr3Wpb/4qx2RN2HRRheadfc3b531Sr8Q== X-Received: by 2002:a65:47c7:: with SMTP id f7mr6188459pgs.305.1611346286803; Fri, 22 Jan 2021 12:11:26 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 11/11] darwin: remove 64-bit build detection on 32-bit OS Date: Fri, 22 Jan 2021 12:11:13 -0800 Message-Id: <20210122201113.63788-12-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> 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=209.85.210.177; envelope-from=osy86github@gmail.com; helo=mail-pf1-f177.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joelle van Dyne Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" A workaround added in early days of 64-bit OSX forced x86_64 if the host machine had 64-bit support. This creates issues when cross- compiling for ARM64. Additionally, the user can always use --cpu=3D* to manually set the host CPU and therefore this workaround should be removed. Signed-off-by: Joelle van Dyne Reviewed-by: Peter Maydell --- configure | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/configure b/configure index fb671258e6..c7fbda22b9 100755 --- a/configure +++ b/configure @@ -626,13 +626,6 @@ fi # the correct CPU with the --cpu option. case $targetos in Darwin) - # on Leopard most of the system is 32-bit, so we have to ask the kernel = if we can - # run 64-bit userspace code. - # If the user didn't specify a CPU explicitly and the kernel says this is - # 64 bit hw, then assume x86_64. Otherwise fall through to the usual det= ection code. - if test -z "$cpu" && test "$(sysctl -n hw.optional.x86_64)" =3D "1"; then - cpu=3D"x86_64" - fi HOST_DSOSUF=3D".dylib" ;; SunOS) @@ -776,10 +769,6 @@ OpenBSD) Darwin) bsd=3D"yes" darwin=3D"yes" - if [ "$cpu" =3D "x86_64" ] ; then - QEMU_CFLAGS=3D"-arch x86_64 $QEMU_CFLAGS" - QEMU_LDFLAGS=3D"-arch x86_64 $QEMU_LDFLAGS" - fi audio_drv_list=3D"try-coreaudio try-sdl" audio_possible_drivers=3D"coreaudio sdl" # Disable attempts to use ObjectiveC features in os/object.h since they --=20 2.28.0