From nobody Sun Feb 8 13:53:35 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=1611377884; cv=none; d=zohomail.com; s=zohoarc; b=mdDpHWe2TKftorx3wChRi+6YRcF92j/vrPLhl3/ii6RgQq+ROpckxLwb8fOfXywZcfnRXc/rVLKITeW1RnLSgIOeQ0EMuvFpKIfSjguKuM5/1J6LK2Ag4msBGL54OGcfGnXDjZwlHAbCjVMsFUSQoP5ZI8OQH9GvuPcWpiohoJk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611377884; 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=lr0g9cBtE48tU4EJmSiiQmz+iS86Z7gy8ZRT7zhMcpo=; b=OQO6Wy7u9x9Y1htBP5bpXCH4X0OrueN6t8TyIhNF6NWHvvrmiE54EooEITah8rsrbA/qOcoQ6L3JBtj+GdZJ9In6FGa3L8yswJ9svRW5NpRcRD9uqQs5Edgmt/ummof0Un3oIOoxjZO3oSAsMvcOuOeiHlrUen6cJc+GXS579iw= 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 1611377884942843.9318462496168; Fri, 22 Jan 2021 20:58:04 -0800 (PST) Received: from localhost ([::1]:55960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3Azr-00005A-QZ for importer@patchew.org; Fri, 22 Jan 2021 23:58:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3AyV-0006pN-UG; Fri, 22 Jan 2021 23:56:39 -0500 Received: from mail-pj1-f43.google.com ([209.85.216.43]:54561) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3AyU-0005nw-6z; Fri, 22 Jan 2021 23:56:39 -0500 Received: by mail-pj1-f43.google.com with SMTP id cq1so5068552pjb.4; Fri, 22 Jan 2021 20:56:37 -0800 (PST) Received: from localhost.localdomain ([73.93.154.229]) by smtp.gmail.com with ESMTPSA id c62sm9872772pfa.116.2021.01.22.20.56.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 20:56:36 -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=lr0g9cBtE48tU4EJmSiiQmz+iS86Z7gy8ZRT7zhMcpo=; b=pTsdKKUldjVNKuR4GUW/m07JlAXiSil0kDbjIkAFepkVTF0/gN7827gPvRxC8ZdTR0 592jX2dqz2hgoA+5+vFkkPuKVe7JWqecnn0Lzq3uf46Gsv+HJ4YCkXNNl+713TOQC5mF nEtor0T+W6qR84OdysZSE/rQ6JC5XKeQ5a3GEgzlTxAO8s2DHUEKH0pMX57U1a+muTHZ 21ziioA7hErdomZS261hxfVQS7ADTeEh+bMeM252DHsrS9hbAIwy91rj2RXFJmXLZSUn gtt/ph7Q1skVZObFzv5ybIFIhV9xArx5SsAvOic7u5qRg+8XrjGIpbNXAbm/HqKe9EMu bd0Q== X-Gm-Message-State: AOAM532u724QScvDGu6GEUs7VeIyyy7VBWj0tewYi8d7FaJbOchdLUwv Lp1ILj5X+T1k/NWnyEAO50hD2I1VJ8U= X-Google-Smtp-Source: ABdhPJykaqXVK26vUry1DtYqtUt9QwGWJXSE8nBsyomf01+7prSvL/ezE0Xmuwm4Pkshydy6RXZBxg== X-Received: by 2002:a17:90a:de06:: with SMTP id m6mr1555925pjv.167.1611377796442; Fri, 22 Jan 2021 20:56:36 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v8 01/11] block: feature detection for host block support Date: Fri, 22 Jan 2021 20:56:22 -0800 Message-Id: <20210123045632.18482-2-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210123045632.18482-1-j@getutm.app> References: <20210123045632.18482-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.43; envelope-from=osy86github@gmail.com; helo=mail-pj1-f43.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 --- meson.build | 6 +++++- qapi/block-core.json | 10 +++++++--- block/file-posix.c | 33 ++++++++++++++++++++++----------- 3 files changed, 34 insertions(+), 15 deletions(-) diff --git a/meson.build b/meson.build index af2bc89741..27110075df 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: fals= e) elif targetos =3D=3D 'sunos' socket =3D [cc.find_library('socket'), cc.find_library('nsl'), @@ -1023,6 +1023,9 @@ if get_option('cfi') add_project_link_arguments(cfi_flags, native: false, language: ['c', 'cp= p', 'objc']) endif =20 +have_host_block_device =3D (targetos !=3D 'darwin' or + cc.has_header('IOKit/storage/IOMedia.h')) + ################# # config-host.h # ################# @@ -1113,6 +1116,7 @@ config_host_data.set('HAVE_DRM_H', cc.has_header('lib= drm/drm.h')) config_host_data.set('HAVE_PTY_H', cc.has_header('pty.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')) +config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_host_block_device) =20 ignored =3D ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target arrays =3D ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BD= RV_RO_WHITELIST'] 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 13:53:35 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=1611377889; cv=none; d=zohomail.com; s=zohoarc; b=lBfxNoVtQaP/7ayKgMTTNUtgXzbzgBTBaIQ5TdstYkG1jU7c9oux7rsCgfIehx0paiFDk0VCj3PHZpMtyeQh5bYyzRTr/diQhcq5l43px6E7RtVOzKUUl+JxR32uJClMA1LnMUkYK/OGD4h7yEcfzrPhXnsvL76AsVr7RznnKcA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611377889; 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=eMRwurTuLuNX0gT374+MwlAcTFDPiYipqZcijLZJHhI=; b=bQweMg/wfvsd5tmk3FQ+DamlsqnVvFHTqgmWmxZ+Sjs1GXt+afRokcSgCWe5WP7M2bCWEKMAPxJERuvyVh3MWIslw9YI623/X3H3j0poP27iiQgYGfI1t11SOArv42SOYBZU28+MGpaWn2Do4oFPEQnEGcrxzsHuOsFYPdUQOg0= 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 1611377889994355.76864358390606; Fri, 22 Jan 2021 20:58:09 -0800 (PST) Received: from localhost ([::1]:56580 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3Azw-0000LU-WB for importer@patchew.org; Fri, 22 Jan 2021 23:58:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3AyW-0006q7-JU for qemu-devel@nongnu.org; Fri, 22 Jan 2021 23:56:40 -0500 Received: from mail-pg1-f172.google.com ([209.85.215.172]:46021) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3AyV-0005og-1z for qemu-devel@nongnu.org; Fri, 22 Jan 2021 23:56:40 -0500 Received: by mail-pg1-f172.google.com with SMTP id v19so5213142pgj.12 for ; Fri, 22 Jan 2021 20:56:38 -0800 (PST) Received: from localhost.localdomain ([73.93.154.229]) by smtp.gmail.com with ESMTPSA id c62sm9872772pfa.116.2021.01.22.20.56.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 20:56:37 -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=eMRwurTuLuNX0gT374+MwlAcTFDPiYipqZcijLZJHhI=; b=VZ2f1I7rRWbEz6yHAfkWunTWZD3agF9Yg9JFYBx1qeyjBLPcdKaRcLN2iPFvTxul/+ VeO5uflU9qufUs8n4P0bzkQXb4O1jmCYUMe+fC1ml1MEIGoh+wkYRAmRMOfPDArk8r6a F/YDs9Q/WCTDtle2/9/3kSEC5vIEh3LyZdWT7GcBiNucK2ZQyEGz/vypJt+3YhU4Sbgo oUS544l4Xd2ekK7p9ZrTBzJ6ErjjCHttxypyCeMxAOV/JBfs8y4QPbJRklFWxmDqn/9o 7u7qYcAzauIuvWzC4wQkqlMxiV/lVEP8sbmgqFL/sr4P5OtMcq7f/ew3DJDRR106Fbwm it3g== X-Gm-Message-State: AOAM532myqxj7mcyp2EfDoIB/O4c3btiPvNKyHbZ5xSRxwJqV7+e/8r6 AHK3xTi3np5rvnAsymCVuZhkk5nTJy8= X-Google-Smtp-Source: ABdhPJzH3lXUHvSet/K+dyChrhLtSEJqmwDRZ3cXnc8UuBugm0T2TqNfRBnL54ucv1xQ2NdhTAOfoQ== X-Received: by 2002:a63:4204:: with SMTP id p4mr6931577pga.246.1611377797447; Fri, 22 Jan 2021 20:56:37 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v8 02/11] configure: cross-compiling with empty cross_prefix Date: Fri, 22 Jan 2021 20:56:23 -0800 Message-Id: <20210123045632.18482-3-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210123045632.18482-1-j@getutm.app> References: <20210123045632.18482-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.172; envelope-from=osy86github@gmail.com; helo=mail-pg1-f172.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: =?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 6f6a319c2f..8d8a4733d7 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 @@ -6390,7 +6392,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 13:53:35 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=1611378011; cv=none; d=zohomail.com; s=zohoarc; b=cQ6GIT99S4WkiJV1RsToA/1BTY3YzGR2vrMdYNc/DDEljKntACZbyBimqMtX+3bp2SwDjD8wlOcWkicM7mKXcoJGd8L8XS5WGNjHJt+/H7NgPHnkBfD+jjCjw3qyqZGolIACOGwBYDypCLK16G7oDwB4IdG0VzZMjJY7vjGgTqQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611378011; 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=RdGbdMFIUd62J0vMmSPnX8R1crlr0ThF2wH5cyxIl8s=; b=DYwQ0QYZZEdNqCfRSt7TtqvOzIzUewqRFmsH1P2c/Q/xQdaqK9c059zpZyhshf2Vy4sv9CMCgnPaeCRUv87hoL88gZrrAMGzTGbC+AIW3SVWCeNojTGgAVVeZQ7QSkcIEhLqPe4kByxqMxs0CHCq/T/87KOB6mQuRHiVy2GThwc= 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 1611378011708999.8553027273152; Fri, 22 Jan 2021 21:00:11 -0800 (PST) Received: from localhost ([::1]:36968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3B1u-0003qk-Hf for importer@patchew.org; Sat, 23 Jan 2021 00:00:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3AyY-0006sb-7t; Fri, 22 Jan 2021 23:56:42 -0500 Received: from mail-pl1-f181.google.com ([209.85.214.181]:40938) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3AyW-0005pQ-N7; Fri, 22 Jan 2021 23:56:41 -0500 Received: by mail-pl1-f181.google.com with SMTP id q4so4444905plr.7; Fri, 22 Jan 2021 20:56:39 -0800 (PST) Received: from localhost.localdomain ([73.93.154.229]) by smtp.gmail.com with ESMTPSA id c62sm9872772pfa.116.2021.01.22.20.56.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 20:56:38 -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=RdGbdMFIUd62J0vMmSPnX8R1crlr0ThF2wH5cyxIl8s=; b=GD5SEnjRe9BVnqPKdbeYO1Y+eoayRFyNSzt2tXX/h+s5sNpig9hdCscUaeZGePmDOz abZXqbJh7iNbIoSEmn2Cp4Stv94wg1eJO6nRl/W8px8F+L9dweRk01IjpuJUCfhX8n8L dcrKCdCuaeWwE0pVvxRLoIikHoJocscFqx58202Y9jIqdVr6Z6dk2xYAFMvYi/4v3VsG Tllaj6c0/KAcz2meRw/1EtoC88YjASoGne2vTjzoYYU58I4DX0EMtzcLnfTwmjDjmdN0 phIpvZRDggyeZte3lph2gOczN+zKye0JyHplUriew53TC666NSidD/Y2EJ36jQ73nCHm vsPw== X-Gm-Message-State: AOAM533wFzNukoFhb/wusDfG55AYFvGSZ7Bo+hh5FanD3lKS4FznxiTw c+8uY3EIPP5WymoIE0ap76wkRH+YCiE= X-Google-Smtp-Source: ABdhPJzN81wQYrhok7J58c5bfL9qiMvocce9sdgcwX+uDluNp5ENnRZscKCGPXShn6yZJPXzxkgyJw== X-Received: by 2002:a17:90a:8814:: with SMTP id s20mr9544223pjn.69.1611377798622; Fri, 22 Jan 2021 20:56:38 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v8 03/11] configure: check for sys/disk.h Date: Fri, 22 Jan 2021 20:56:24 -0800 Message-Id: <20210123045632.18482-4-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210123045632.18482-1-j@getutm.app> References: <20210123045632.18482-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.181; envelope-from=osy86github@gmail.com; helo=mail-pl1-f181.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: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 --- meson.build | 1 + block.c | 2 +- block/file-posix.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 27110075df..6818d97df5 100644 --- a/meson.build +++ b/meson.build @@ -1117,6 +1117,7 @@ config_host_data.set('HAVE_PTY_H', cc.has_header('pty= .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')) config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_host_block_device) +config_host_data.set('HAVE_SYS_DISK_H', cc.has_header('sys/disk.h')) =20 ignored =3D ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target arrays =3D ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BD= RV_RO_WHITELIST'] 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 13:53:35 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=1611377886; cv=none; d=zohomail.com; s=zohoarc; b=m/ZJB2gwGfy5T/dlOH2h0I5+UFOtkUrRvOuFJe2ShmkKkDUixp7scpdye4hjjNAe39ljiiYETjfKnqZVnNyQM+4aPt32N8Ploc9vQAKq+IKuFMt/5xlHKHPCTZF/M3UnyFvI2SDeSRQnxtXm4+oRaxpRQse9bnWrzRuAg5qKRSs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611377886; 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=t/s7LuKyWj4qS9lc8M/U0JqbBc0yM+MKS6B5tjJBzrs=; b=VxZw9uVVuKyqNTv2mEKKyf/WuRS9dO/miC2L3n3PLJOn4A7FB2IYqBUX5cxWni0gQ663qjc1x0/2+K0Wzw6aN3HXqEO6W0SQTG0d3/eFTbopI+ZvpgUerVFooLEPxqNZUjIQ/Gt1mQlTc/z9EddwPy5KhaUu4IOM6djF0y/jws0= 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 1611377886974458.5267427748918; Fri, 22 Jan 2021 20:58:06 -0800 (PST) Received: from localhost ([::1]:56246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3Azt-0000CZ-UC for importer@patchew.org; Fri, 22 Jan 2021 23:58:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3AyZ-0006uo-2G for qemu-devel@nongnu.org; Fri, 22 Jan 2021 23:56:43 -0500 Received: from mail-pg1-f181.google.com ([209.85.215.181]:41692) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3AyX-0005ph-Bi for qemu-devel@nongnu.org; Fri, 22 Jan 2021 23:56:42 -0500 Received: by mail-pg1-f181.google.com with SMTP id i7so5225718pgc.8 for ; Fri, 22 Jan 2021 20:56:40 -0800 (PST) Received: from localhost.localdomain ([73.93.154.229]) by smtp.gmail.com with ESMTPSA id c62sm9872772pfa.116.2021.01.22.20.56.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 20:56:39 -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=t/s7LuKyWj4qS9lc8M/U0JqbBc0yM+MKS6B5tjJBzrs=; b=dPhBGK13v3Es39JfNr0G4Hm/3kgl7JOWPYz+tUhqy/NA1uKxwkrq2Tk7vfpU1kDvOL XTPwax7r/9E/VSpwxgmO/1TSu0auOz1ZXetv/ygiioTQr6DPmRaJLQTkT7PW1y828zGb j7Z3W2hb8CbJsaqXmK4LzNkbgWyeBxHNFBAHIcQSWfNslwWbrBoXo/ftAX78EVdZcsqA W0FP9nvSZt1fWk+a0TkJiXZRhKzyu8rlFH8sITZTM/LzLX2jkpslpLiYK5NISm6U1u87 LDPfKYvxr0NLaVv7LLBB62wMhhV0QcfBBMh4YFR56LaDkEAYZv5c9Zk3woVf71YI+X2v vXpA== X-Gm-Message-State: AOAM532gmlhrq3YfV1z9OjiauUEQY3FrvI4Q2W2GKryQeSW1Q1rLg1Rt 8y5JorXaSUJaT39RiVaB+cXMj08M5SM= X-Google-Smtp-Source: ABdhPJyi2Ejo3dvI8x4jVNuMfwID+YJpVXbM+yxygI2KOKV8cf3SOvb+l6IauIEmeRqgOdRsMcVCpA== X-Received: by 2002:a63:f249:: with SMTP id d9mr45119pgk.109.1611377799757; Fri, 22 Jan 2021 20:56:39 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v8 04/11] slirp: feature detection for smbd Date: Fri, 22 Jan 2021 20:56:25 -0800 Message-Id: <20210123045632.18482-5-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210123045632.18482-1-j@getutm.app> References: <20210123045632.18482-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.181; envelope-from=osy86github@gmail.com; helo=mail-pg1-f181.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 8d8a4733d7..d72ab22da5 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 @@ -5573,7 +5590,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 6818d97df5..f1e67b8cd1 100644 --- a/meson.build +++ b/meson.build @@ -2336,7 +2336,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 'CONFIG_SLIRP_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 13:53:35 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=1611378012; cv=none; d=zohomail.com; s=zohoarc; b=bqltyhZEcpl6GTyArjgxtgZ7ZBCNKJUbdjL4LNIueXdPE4v8HjKZEU6yUlA34jp1FFPKQXXkygJsFMmqzCMmnG8MJs2yE3mvrJYpQ1Pb7yntdSJJ++eexs0XSRMLL1f6s5+JZZFVqtES/EzXdWEcHrHtKDEoUbFCOGkeqbkwsnw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611378012; 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=kIoUr2yR0KcUYoWG4DQ2Z71j4B+vjENfUsLTTDxw42w=; b=DENhpQp2ZzblHMu5AS+iBFImUtlYmsWuAzUBCeBKoMBsg6vbuyoYuMOBjIBXG16UEmwbGbeAGj6htc4IxXzgutKbj5w6nSVr0e3ebwiXF57uAaEwtxCyxm4PX4kbxdMjytnurhFfmI5D3Gzu5lMG1XjVmAsrwG2h9tPZ1If+Bso= 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 1611378012320369.23621000339824; Fri, 22 Jan 2021 21:00:12 -0800 (PST) Received: from localhost ([::1]:37046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3B1v-0003sU-AA for importer@patchew.org; Sat, 23 Jan 2021 00:00:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Aya-0006w9-CD for qemu-devel@nongnu.org; Fri, 22 Jan 2021 23:56:44 -0500 Received: from mail-pf1-f177.google.com ([209.85.210.177]:46237) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3AyZ-0005qg-06 for qemu-devel@nongnu.org; Fri, 22 Jan 2021 23:56:44 -0500 Received: by mail-pf1-f177.google.com with SMTP id f63so5153955pfa.13 for ; Fri, 22 Jan 2021 20:56:42 -0800 (PST) Received: from localhost.localdomain ([73.93.154.229]) by smtp.gmail.com with ESMTPSA id c62sm9872772pfa.116.2021.01.22.20.56.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 20:56:41 -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=kIoUr2yR0KcUYoWG4DQ2Z71j4B+vjENfUsLTTDxw42w=; b=AnxK4rezKyOD9GNi7pevCHb1MfqLWAG+gW6HeMYL+cUsIjWfb3f9+LGxzJvoQppvdr YhSDZSgQpGGjTqFNaj+s4YCv00aMKVHqlg7XeFmjqjsWqOgIKJubFBQ4WPBN2uOSiwiM 9pv93cquXnLqrPxGrZnnwyNDBjBcVY8ylEDOzFZJUL2NISS9+p9gzCT12ahUYwCvYZd/ UehsaHjwv+WBklOl+HhIRpc5d+mea4e22aHJffo7VaUjBeE+XjkMkNeOol6BPA8Kb2qw jx845Lvc8nfDabHZIosQyY0i/y7RB/3gM0waUgbUcF5co180NB9EDDfP4GieK6EVIS+h TAtw== X-Gm-Message-State: AOAM533STTzMV6SgiAWJPkiV6GqODQL7ZCbrceBoaT0WlqkcRBWyuZIS pO7ONUFBELG7HDiIEQ6KJMsTGncngZg= X-Google-Smtp-Source: ABdhPJyxPmwLq/bu8lSCIaiXPqEOkxQaFvvF09AP3Vxs1yzSBFrJor1uA9u/XWEbk1t125U2w8ORbg== X-Received: by 2002:a63:dc53:: with SMTP id f19mr7879889pgj.443.1611377801326; Fri, 22 Jan 2021 20:56:41 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v8 05/11] osdep: build with non-working system() function Date: Fri, 22 Jan 2021 20:56:26 -0800 Message-Id: <20210123045632.18482-6-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210123045632.18482-1-j@getutm.app> References: <20210123045632.18482-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" Build without error on hosts without a working system(). If system() is called, return -1 with ENOSYS. Signed-off-by: Joelle van Dyne --- configure | 20 ++++++++++++++++++++ include/qemu/osdep.h | 12 ++++++++++++ 2 files changed, 32 insertions(+) diff --git a/configure b/configure index d72ab22da5..de7487a0c7 100755 --- a/configure +++ b/configure @@ -5302,6 +5302,22 @@ but not implemented on your system" fi fi =20 +########################################## +# check for system() +# make sure there is no compile error + +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 @@ -6200,6 +6216,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..5bd1a67769 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -682,4 +682,16 @@ char *qemu_get_host_name(Error **errp); */ size_t qemu_get_host_physmem(void); =20 +/** + * Platforms which do not support system() return ENOSYS + */ +#ifndef HAVE_SYSTEM_FUNCTION +#define system platform_does_not_support_system +static inline int platform_does_not_support_system(const char *command) +{ + errno =3D ENOSYS; + return -1; +} +#endif /* !HAVE_SYSTEM_FUNCTION */ + #endif --=20 2.28.0 From nobody Sun Feb 8 13:53:35 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=1611378007; cv=none; d=zohomail.com; s=zohoarc; b=ZHjAKVDnDSoeMYKjxlIBMi6YPmYCteKLeY3C/K17BY7rkMBqKNfS7FC0hScZyugyHQmhQFbRbeUEjmbbdSzq1YYE+ogbYJpYAlK4PiN/dUzlpAYAVBEyIoWVNocV+F+qEDpPQoHjkiIMzPbdBhKvQmSkyZov6Ro6lry0W4N62Cg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611378007; 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=M6Dkfzz2uwZnsdtAWpa/2Lp0RFHpqr85gTbmXPeFpZw=; b=hxlf8me7ol2bYPjjFqPrAOkflEECnuumRTXbC/tgHvQp+Ez7XyHqip3ZaDEGy3IG5Rt4XdovTRRSPKjqizpZ12iiQsIhQ9bneUdT8E8jwAyDthk3hrZcuq65ctjE+rmgXrNcb652AzYXJP7IrMAvImGAUkpUFl9x8sTBt0hFe+0= 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 1611378007167621.0898379036252; Fri, 22 Jan 2021 21:00:07 -0800 (PST) Received: from localhost ([::1]:36642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3B1p-0003ia-Vi for importer@patchew.org; Sat, 23 Jan 2021 00:00:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Ayb-0006xO-Dw for qemu-devel@nongnu.org; Fri, 22 Jan 2021 23:56:47 -0500 Received: from mail-pf1-f177.google.com ([209.85.210.177]:37125) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3Aya-0005rE-6X for qemu-devel@nongnu.org; Fri, 22 Jan 2021 23:56:45 -0500 Received: by mail-pf1-f177.google.com with SMTP id 11so5182840pfu.4 for ; Fri, 22 Jan 2021 20:56:43 -0800 (PST) Received: from localhost.localdomain ([73.93.154.229]) by smtp.gmail.com with ESMTPSA id c62sm9872772pfa.116.2021.01.22.20.56.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 20:56:42 -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=M6Dkfzz2uwZnsdtAWpa/2Lp0RFHpqr85gTbmXPeFpZw=; b=mh+1VcYXvJdDL99Eyo3vK/P0EFt1t0Nct6OCXW22MJjdC7Kg0SGnIkKxQ9JmaPqElD +hG5wy0yd0DlqgbZ6eOIrtXcQqyo7Tg5GPk3h4pJxAC0JsD4pIRsiOmCTVdlEobmSO9g GMOXTEByoRYFw5/l2lJTzE7+DA3AroRoMHJNDOJhXFFAZiu6urio3JT2C0dYNlt1lF7t bVFe8Iy4q0Qz1SDvwh2rbJFPmaftz3uyXtHS6rIMXuchnqvjNk23oxkVKtEcFtaLgZEr I1lvkYwSuxVYOVKH0zUTqTfgENeZbRcWdRTAwH8110LhZRvDY0Ov5ElmXQV4Eri9itUW 3XQg== X-Gm-Message-State: AOAM530rI77qqrGG04s0pDDtwxz02Kl8KVyHOpwIf1EAdIAmmG0mveJz pa/MXkus9lgvy46mhJ+Il1iAn18/KFM= X-Google-Smtp-Source: ABdhPJxSghe+GMlCMuaick6kbpp9bYbykFMH7jvZER4T0OYvKcOzyOWck78K7q7HZ3GOgDu00NiMhg== X-Received: by 2002:a62:52cc:0:b029:1bd:e13a:fc1b with SMTP id g195-20020a6252cc0000b02901bde13afc1bmr5306670pfb.46.1611377802921; Fri, 22 Jan 2021 20:56:42 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v8 06/11] darwin: remove redundant dependency declaration Date: Fri, 22 Jan 2021 20:56:27 -0800 Message-Id: <20210123045632.18482-7-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210123045632.18482-1-j@getutm.app> References: <20210123045632.18482-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: Peter Maydell , 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. Reviewed-by: Peter Maydell Signed-off-by: Joelle van Dyne --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index de7487a0c7..0fd3f14c5e 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 13:53:35 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=1611377996; cv=none; d=zohomail.com; s=zohoarc; b=DMKAulf8veoAKam+4vKBdLkqRvoTaSpo9t4q/ktJx6P1tOz48TiFQoa6bTWJfDDBYYgLrLltSIU/1Y///kXzAQ1gzKLlAeJXAqb1WNKFNywGPK/gyBO0eYwVGOKIET0pNfg+8JXHbt2x1j1wv6ETgBuSFskBbcLagQX4qgQwhqg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611377996; 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=Evc3Shcq8rsCtOF7PANGsgPxIxxAPv8CQExUls7YgO4=; b=LmH5AtUOjGvxYIGjJ6Be8L156Y9ppe88PCT6o9vAdtHKQqG+575cHuA2wqcpJU0X6Ix9+Y8+JyezVTYz+lsyv2LL3lECBf7XcukAzmVN8+qcg3VlPn0F3SOozgmdFLt2yO++q7ZG5kw/P/jMsLscdXPlFgdJLEQLNKRV6+ZiNi0= 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 1611377995948550.7621540409519; Fri, 22 Jan 2021 20:59:55 -0800 (PST) Received: from localhost ([::1]:35936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3B1d-0003Qr-Tp for importer@patchew.org; Fri, 22 Jan 2021 23:59:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Ayf-0006yg-7A for qemu-devel@nongnu.org; Fri, 22 Jan 2021 23:56:50 -0500 Received: from mail-pf1-f180.google.com ([209.85.210.180]:37899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3Ayc-0005s1-Dr for qemu-devel@nongnu.org; Fri, 22 Jan 2021 23:56:47 -0500 Received: by mail-pf1-f180.google.com with SMTP id y205so5175714pfc.5 for ; Fri, 22 Jan 2021 20:56:45 -0800 (PST) Received: from localhost.localdomain ([73.93.154.229]) by smtp.gmail.com with ESMTPSA id c62sm9872772pfa.116.2021.01.22.20.56.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 20:56:44 -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=Evc3Shcq8rsCtOF7PANGsgPxIxxAPv8CQExUls7YgO4=; b=kTwjFgCC0CWn2k0yU/ofto2s6U054dwS7HdoHuVdIHriK1IXpmjYDh/BOOcGT9ZfpQ WTgpP/dcymT6r5l/jl7zUuwGFTPBONZyUQEiY/WaYOUM+LM3TjsLw3olVGRMhezd+CS4 9eLNOtCUnmaMZtMvQhKhJHfcrLuZ4aWfdE7eF5qYSgY14CKSqv9+Rt269T0jMrsMvxJw Jx977XU5/N8FfhaZG/Ac4/xbWU6H1gsK5RcUUZHYJFRiPFaGBsub00XcFy7eNSAUbE6W YcdT7Qg10z5ltM4bmxY8FiNDLSUPle0B1oxBDimFVpKx1jjSu4OZCOOLUu5UPCvTd7Rf WHLQ== X-Gm-Message-State: AOAM533dsnU5CN1hmAuq5zLTK+uOmHqIG3dsBw+vp8VBTKIY8w3XVmLI P1U52R7RKrVUGyVWbxgK2s7tVbT04P4= X-Google-Smtp-Source: ABdhPJxjaNAT7xnAWuxMbRa3Zv/PiI+t5aQqFjnUtyf48cFvh5aF+UXepxG8ebzARxI2nYSqJPWh1g== X-Received: by 2002:a65:6409:: with SMTP id a9mr7965431pgv.171.1611377804538; Fri, 22 Jan 2021 20:56:44 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v8 07/11] darwin: fix cross-compiling for Darwin Date: Fri, 22 Jan 2021 20:56:28 -0800 Message-Id: <20210123045632.18482-8-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210123045632.18482-1-j@getutm.app> References: <20210123045632.18482-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.180; envelope-from=osy86github@gmail.com; helo=mail-pf1-f180.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: Peter Maydell , 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. Reviewed-by: Peter Maydell Signed-off-by: Joelle van Dyne --- configure | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure b/configure index 0fd3f14c5e..d4588ed892 100755 --- a/configure +++ b/configure @@ -6422,6 +6422,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 @@ -6440,6 +6441,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 13:53:35 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=1611378180; cv=none; d=zohomail.com; s=zohoarc; b=kU6xjvxhabyGSpXJ/xogDAz4ygh0ztmS4PZ4IylZGIZm9krBMI4//r3AeWgyqS9q550mucrw2hB8IZGGrUSZF0UlrvixQuptbs9P5GR19Xc0WRkB1FxEJeKq264iarnuy49SWyKUG6PW74oLx1Ki8YkcWAqSpJ6ywEJCv1YMeeQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611378180; 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=+5VyG67cg0m7jFdStswHbTchlQ/RRRnpxZ5acd1A248=; b=kdUEtij/I50mBt/t8qsjzpXpDw0ymIxR9kJNK7ORW8/NbiHFzxxl38jeBju/nxW+KXoz8uchCGdXH2iC5Rz5XVeyXtFdC8dnFIUh9EpAWLUxgbe4XhtV/VGwRB3CpaldOAtX/t3Ol+6J9B+w6wpPyYvVrMUWn8WTeIoo2VdRHP0= 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 161137818026749.303921666307474; Fri, 22 Jan 2021 21:03:00 -0800 (PST) Received: from localhost ([::1]:44372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3B4d-0006zX-78 for importer@patchew.org; Sat, 23 Jan 2021 00:02:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Ayh-0006zO-69 for qemu-devel@nongnu.org; Fri, 22 Jan 2021 23:56:52 -0500 Received: from mail-pj1-f44.google.com ([209.85.216.44]:36792) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3Ayf-0005sg-0Q for qemu-devel@nongnu.org; Fri, 22 Jan 2021 23:56:50 -0500 Received: by mail-pj1-f44.google.com with SMTP id e6so5162144pjj.1 for ; Fri, 22 Jan 2021 20:56:47 -0800 (PST) Received: from localhost.localdomain ([73.93.154.229]) by smtp.gmail.com with ESMTPSA id c62sm9872772pfa.116.2021.01.22.20.56.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 20:56:45 -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=+5VyG67cg0m7jFdStswHbTchlQ/RRRnpxZ5acd1A248=; b=XrvZquNWnRwxclfXhFSEV+U2ePHcvLu6zdgVy/BzTR5vwFbaKf9lgkaL0Tna8OuUqR rV+g9zCz8fRrHsVqfKJu30YdOYqKKwSA/o/fIYv0ED7B67L89tYm3zA8WEK1XaZMUPLN hd+R8Ub2gSBSwbMXHo5x5B8x3ptAbz36k5ZDZCwNlKVquyzPvb+3eYFr4PjR1gPpplMp 49UVXlJUVwIFuoffmNMLJN27Htnvgscqp7SURSQTgxcpeUDbr7Iv1TnHp/9r5MhXKj6r UoDbsx+RlJCT1bR+7ExW6KFCehNlsud/h2lufPMM9d6ZvTtr1Bus1CkL986YCxVlV/4v g3rQ== X-Gm-Message-State: AOAM531SkVQjaDlXGhs5JZU3BMyPkm/5SbaXPfZkVA2KBhaUcNniCxNX R8nesjq6DmUJaVcr391x9j+N1q0LNfo= X-Google-Smtp-Source: ABdhPJwek/iojpGjShO/TdNXS99YkAE+ZnCkkeDAr3GHa/nQdDh3gTDlSDVuN+v4D0bsPlVBzyb+Lw== X-Received: by 2002:a17:902:44d:b029:de:c063:85c9 with SMTP id 71-20020a170902044db02900dec06385c9mr1109533ple.35.1611377806061; Fri, 22 Jan 2021 20:56:46 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v8 08/11] configure: cross compile should use x86_64 cpu_family Date: Fri, 22 Jan 2021 20:56:29 -0800 Message-Id: <20210123045632.18482-9-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210123045632.18482-1-j@getutm.app> References: <20210123045632.18482-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.44; envelope-from=osy86github@gmail.com; helo=mail-pj1-f44.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 d4588ed892..b8ae4609fd 100755 --- a/configure +++ b/configure @@ -6445,9 +6445,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 13:53:35 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=1611378177; cv=none; d=zohomail.com; s=zohoarc; b=CRJ+lArbOu7nQf1aN/IVXWTEq6qEgem4bDvOGKlkahQmdnStODopTDBtkjJQ7nrg+IDJ6icYwkidSGJNvlS2a0TWQXSKN+hQNY1Fgd5imRTD2tnnPpmElo8l1Zeznivy3xU2FSQ8uTDtujKP15VXwFWRN8tv5yg5ZzUtisbAt2c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611378177; 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=jZMAcWx+SSwUEdgI62VIjlb9Gx7deayTkbwxZ83PYWBudX7i/+sDK1vKBZDtQL1/+V7S30oRH1hm0YielYomm+nqF8cj9iYbapNq4KV3Wfx9PHoFtc9dFMBF89WvuEFj3mA8+M6QEnoiB8Lg+ylOpy8/0fnNujf4U3ZZ0lhy6fo= 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 1611378177607932.5006045172943; Fri, 22 Jan 2021 21:02:57 -0800 (PST) Received: from localhost ([::1]:44122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3B4a-0006tK-Cu for importer@patchew.org; Sat, 23 Jan 2021 00:02:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Ayh-0006zL-6B; Fri, 22 Jan 2021 23:56:52 -0500 Received: from mail-pj1-f54.google.com ([209.85.216.54]:55520) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3Ayf-0005sm-B0; Fri, 22 Jan 2021 23:56:50 -0500 Received: by mail-pj1-f54.google.com with SMTP id j12so5065549pjy.5; Fri, 22 Jan 2021 20:56:48 -0800 (PST) Received: from localhost.localdomain ([73.93.154.229]) by smtp.gmail.com with ESMTPSA id c62sm9872772pfa.116.2021.01.22.20.56.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 20:56:46 -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=ZCsBc1XZxUOkri0ark6D7AZQehDuWJ3fGobnAw2H4ywpUUzRGKDGBsVysajUhH/Jd0 hnlTxT6KUecVji875Ic+duUjwZJkFhcz1HHEiMAmu3/jQKImFjxILbn01Yv/0oMvnjXM lxfzrTwE7cCVrwGRXGR+2hto+y52gwVP1UWocr8lKVzI+i0xZT/ZxSfZ9HEgiYZ7xwmL fsoqczdA0asAO8nbUNFRWshilHATaDEfkepYERguT6/EKJTnvuwm/B5hU5vqzf6WB/a9 xHHvJK9setKbV1odZqAi4byiJ9MfWs9oROXqnbvh9dw5L7C0FtrWy8xDtkpVidCw1e0B 1/aw== X-Gm-Message-State: AOAM530EetZO2XeVsE91QeHWsEoBITw1DPTsDW9xR6p2cWbCAPqax4Jk WGxZZQnTw3oCuhLpci/81WotnnQrXLE= X-Google-Smtp-Source: ABdhPJzD0q0CY52pUgDEOAHJ8Uj1xt98INpqDD0Qyzx+4i3sX9UOek389ngBnv2pFNhrokT284L6EA== X-Received: by 2002:a17:90b:107:: with SMTP id p7mr9218673pjz.110.1611377807217; Fri, 22 Jan 2021 20:56:47 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v8 09/11] block: check availablity for preadv/pwritev on mac Date: Fri, 22 Jan 2021 20:56:30 -0800 Message-Id: <20210123045632.18482-10-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210123045632.18482-1-j@getutm.app> References: <20210123045632.18482-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 , 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 13:53:35 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=1611378180; cv=none; d=zohomail.com; s=zohoarc; b=hPAVcVOSGbMpi9OwxSjdOtKBjPup2g/8jnbd4Wd46JASVZDDoemOyYEF78k08c4R3UnXRzKbIkDzQRcfYYGs3Q1WsaO7z+GQSadL6KPm2Uhi+k34dZGQBU2qFUFUCM2q9XZOqCGrZeg6tC48OuSmfPLWjD3aqbQsWmpf0DgkZ2Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611378180; 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=ZuNtUUuWJqekvxHjRaYPevC4YtgExki/9b72IU/Xt8A=; b=ghZDMXjmK+RG3+z4n/Mf/ruin0Mv42HxMxD24oD/+M0ybQJ93v4NoSfruAHfsXaalzFscZ4MaRTZhFsY8w5FKn4TUKdT+wOuwuGGB24rkzOXkDdF/ao45YSlqgogFel5UDltWgpnwg02it3fHez1Fw36XrCT4xudq2ZQNP5XgdA= 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 1611378180898976.4933850267524; Fri, 22 Jan 2021 21:03:00 -0800 (PST) Received: from localhost ([::1]:44422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3B4d-00070p-UB for importer@patchew.org; Sat, 23 Jan 2021 00:02:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Ayh-0006zc-OG for qemu-devel@nongnu.org; Fri, 22 Jan 2021 23:56:52 -0500 Received: from mail-pl1-f170.google.com ([209.85.214.170]:44411) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3Ayf-0005sq-PK for qemu-devel@nongnu.org; Fri, 22 Jan 2021 23:56:51 -0500 Received: by mail-pl1-f170.google.com with SMTP id r4so4423774pls.11 for ; Fri, 22 Jan 2021 20:56:49 -0800 (PST) Received: from localhost.localdomain ([73.93.154.229]) by smtp.gmail.com with ESMTPSA id c62sm9872772pfa.116.2021.01.22.20.56.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 20:56:47 -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=ZuNtUUuWJqekvxHjRaYPevC4YtgExki/9b72IU/Xt8A=; b=sgIal8pO0h93xfoTEx9y0ewNvXVjn9MGD3Agp0faCwPfP7/PLu2C8VXTcyItsDvw+h Ed55+ssTRDqTaVW09fopZa3JqTY/8qQRxxCCHvcmaP2ZRaD5oBbx3oz64zABft6kqN4M vqcndhGWckeA/0U94i/dKCMZdJfvXc9YjzE6rRIMaoSyXaDyQhUFu5azNgL4IxyH9ZRd FmLRfH7MjbZx0Y11UNvIoWE65G4vPwaowLPDM+HNINtxxQzqka5EiADexXnenxJhl7qf c3dFAUPSInt3lro4PZA6vhjy9eNqKqzKzN5WapRbaXtzL38NkCbRhcgfum4DMBnqvj2O LUuA== X-Gm-Message-State: AOAM530w8vnVRCFfaEm+6TpPewYoyLLMjBIMNRJrUio7ZUDph17bN/CF ssEZl0h9143Tv27s5aOpiSJdMlw5/h4= X-Google-Smtp-Source: ABdhPJzZRUhwZylnjFiAwpQk0BvbdmjqulMndOhTx/sqtLPylmLkeUSCYRSVmhvCfl1vMpQ3PAeFAg== X-Received: by 2002:a17:902:d20e:b029:df:de2c:58f1 with SMTP id t14-20020a170902d20eb02900dfde2c58f1mr5895183ply.46.1611377808311; Fri, 22 Jan 2021 20:56:48 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v8 10/11] darwin: detect CoreAudio for build Date: Fri, 22 Jan 2021 20:56:31 -0800 Message-Id: <20210123045632.18482-11-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210123045632.18482-1-j@getutm.app> References: <20210123045632.18482-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.170; envelope-from=osy86github@gmail.com; helo=mail-pl1-f170.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 b8ae4609fd..70061e195d 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 13:53:35 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=1611378260; cv=none; d=zohomail.com; s=zohoarc; b=SLeHV+in5ZXaYX+LCDQGteByKcDQ9ia/tm6VI0ODS56rLGG82JwCfaLNoC1fiXglkL8yvJtMvNzAombMQPJbCXlVIZabEFY9RSWccaAy0IknM4eTgljdImIzZreRH4mD5oRTZQiuGums61Rm1WTfffEjDEezeOLJI563y8J99ao= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611378260; 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=yNEuNZPYpq9HLfo3nTTNg6MewMBOzTowV7vrFo97HmQ=; b=ciIXh69YdbVPnHfZmhPAgKXRrvwt4OyLiyg/kJTRc5yWKWGLXMpuKDWlPYvUvPnq3KNKRm61PGgCTJHcTmUCuxdIR5SLOmTJ1gCsQgx3oRTaK1ZtOL5dEg+6PzCqbrzMdjfk3OYDltg2JQnJra8K1BWDm8wpAgmwgdH0eEy+hR0= 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 161137826008430.28904306627817; Fri, 22 Jan 2021 21:04:20 -0800 (PST) Received: from localhost ([::1]:49840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3B5u-0000mv-UH for importer@patchew.org; Sat, 23 Jan 2021 00:04:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Ayj-000707-10 for qemu-devel@nongnu.org; Fri, 22 Jan 2021 23:56:54 -0500 Received: from mail-pg1-f177.google.com ([209.85.215.177]:39478) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3Ayg-0005tZ-U4 for qemu-devel@nongnu.org; Fri, 22 Jan 2021 23:56:52 -0500 Received: by mail-pg1-f177.google.com with SMTP id 30so5232183pgr.6 for ; Fri, 22 Jan 2021 20:56:50 -0800 (PST) Received: from localhost.localdomain ([73.93.154.229]) by smtp.gmail.com with ESMTPSA id c62sm9872772pfa.116.2021.01.22.20.56.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 20:56:49 -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=yNEuNZPYpq9HLfo3nTTNg6MewMBOzTowV7vrFo97HmQ=; b=ncyriNY7ybrqDj2uyitXoi8JBqSCiykKqI2h9IUTqwQ2Zi0BITLhYHA5WV14qzfsLh VBMCnUrcYHZq0GpZiMWTCK7TGn88RibWGzsWSsXnq5QtkuYreN3zVT6Cggp74OkzIHge jMBf7GJCQPpZCxuaHMQWVxaWO4UfGZsQ/MmYN117kNoKL0p1TPJhBRI8rvC829r7skcy NImVefNcs9gaoIaTISSOZY/vO/obfdF4WgVEHY06bNSpujY7w6MJkaHs5jc2s6J/yJk0 +yyU6GCJ+y/zqLy1D+L9HL9TncaxrbTZ9Q3hBRnVkrAHkxtDoLWgKDA12oOk8Xi9BNiD 8Rsg== X-Gm-Message-State: AOAM533BwcTGWn3Bkgtcbw0BcYi9sqIZCWdwUSTLwkhRcN5SF2/l6yao 3H2q/uR7gbsu/1U80CqiTe4Ealu5ZLw= X-Google-Smtp-Source: ABdhPJw+JEz15A9wpa23SpRpq3aOftGAJwUx04xb1Ejx7RXnLSCaigMVG/Bep3LAdc4CQo8Q0jcMhg== X-Received: by 2002:a63:4966:: with SMTP id y38mr7967178pgk.428.1611377809370; Fri, 22 Jan 2021 20:56:49 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v8 11/11] darwin: remove 64-bit build detection on 32-bit OS Date: Fri, 22 Jan 2021 20:56:32 -0800 Message-Id: <20210123045632.18482-12-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210123045632.18482-1-j@getutm.app> References: <20210123045632.18482-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.177; envelope-from=osy86github@gmail.com; helo=mail-pg1-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: Peter Maydell , 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. Reviewed-by: Peter Maydell Signed-off-by: Joelle van Dyne --- configure | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/configure b/configure index 70061e195d..5f23f5b907 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