From nobody Mon May 13 14:18:43 2024 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=1611624510; cv=none; d=zohomail.com; s=zohoarc; b=VmhCa4kQIze+2psTiRAP7y7xLJBiqpiizlWyLt0Za2Lku6XaLlXhkwfEQTBKyvsIvAc5bSkVZFugcUyjYLOzAjGJayd01yTCqtCdZaE+q8EhxTjzT3fMULo4w1khhG4rq5+ZwtHMTdTFUusq4bM5Aplt+vT8J2qii5eWNSj6BYQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611624510; 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=CEvFOUnyKbJgTF2furcEJPKXA7lOGzqKjRl+WCWUgaeBf2EubKab7XTWqYqdeuDQSRArIs3Q/mG0+6nQmSZyhneizeWlA3CogQyrXYqx7V2FUYpmAhWsgaq14RiaIpF2vFTN+kA7zChbeqXnSjsQ5CEhvvbdZ6nh4g7JWW+OvjY= 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 1611624510015350.19935018748004; Mon, 25 Jan 2021 17:28:30 -0800 (PST) Received: from localhost ([::1]:41600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4D9g-0007SS-Ql for importer@patchew.org; Mon, 25 Jan 2021 20:28:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4D6T-0005eg-Em; Mon, 25 Jan 2021 20:25:11 -0500 Received: from mail-pl1-f171.google.com ([209.85.214.171]:39312) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4D6N-00069e-86; Mon, 25 Jan 2021 20:25:06 -0500 Received: by mail-pl1-f171.google.com with SMTP id b17so2232137plz.6; Mon, 25 Jan 2021 17:25:02 -0800 (PST) Received: from Yifans-Mac-Mini.hsd1.ca.comcast.net. ([98.35.5.7]) by smtp.gmail.com with ESMTPSA id o14sm536921pjf.12.2021.01.25.17.24.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jan 2021 17:25:00 -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=fkw8DXgRPvCeUy+moiuhOWqTWLrwy+Kv6RR5V0KxofVvFuD68wjHAL3bAHRPGIOb1Q zUSfoDQX97Xhf5pBQidwEL4pun6XyjH3/h4oQkCNGDnfIVGZHY8zvMBhZwGI2FhX58d+ Ymq+mBbBW4VQkwTp2Y49GDlKDSntg4s4hAa9B58+4pMeXPAESUEVjxIT+o1wQWkAoqaL H9+pwK2nR+v5JbLnryQ+kmER1JnbxxWstb/K6WQUTwJi2rFMdmrOpZ//4nP1wjF7jQN2 3W8FYbsKaxTuTjAOuLBj4Rx+FO95NmBwjS2m0NStTt/i2nwqGZmgBpQ6EStjYk+sD/Ql MKFw== X-Gm-Message-State: AOAM532F1qgba4zMGXgZFkNa8NEEBwCbt2IGiKk4lIB6L4l3mT0d9LxE j2JaDDJj1i2Ss+IprmLuWXp6LY5Wh4k= X-Google-Smtp-Source: ABdhPJwdjOZBf0U/Kw/ZKJtT1vge3CYDw1ZwTOk9BQ3YlGNi3p38e7sSxMV59SASqQIg6oDKE+5lig== X-Received: by 2002:a17:902:8bcc:b029:dc:45d9:f8b2 with SMTP id r12-20020a1709028bccb02900dc45d9f8b2mr3382329plo.62.1611624300896; Mon, 25 Jan 2021 17:25:00 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v9 01/11] block: feature detection for host block support Date: Mon, 25 Jan 2021 17:24:47 -0800 Message-Id: <20210126012457.39046-2-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210126012457.39046-1-j@getutm.app> References: <20210126012457.39046-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.25, 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 , "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 Mon May 13 14:18:43 2024 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=1611624510; cv=none; d=zohomail.com; s=zohoarc; b=YMxISQCLLjy8w5Ovacih/Su5oR0a3z60y150gT46zKC0Ms1sBh/VoldIHfzdiuujaMYq3tfKGhNQGBdsESeMqjskuqHDK2wxBMcLe3Huk/C5glvPDvtdBh8A956m/1NLmo0AA/CAaEK7pPsKrQvgQIX7c7b+7yV0zqQZY7d0Edg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611624510; 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=H/+iLy9z+s6Q7jcFCxB8BhYoYcEmgo72LXtqXOgXn/i+QO+KC9Fi92x8bkm+mLQUxmIZH7+zbwXMNahA9k+PLthPLJ7ErMASCSJyVOoWVfGRauhBwQChE6HWG/nB/36v1zR7L4PmoJv03Vum/0+YS9s8SSExNYtQ0lDHjHmXAKQ= 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 1611624510906957.8899804921366; Mon, 25 Jan 2021 17:28:30 -0800 (PST) Received: from localhost ([::1]:41628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4D9h-0007T4-Q7 for importer@patchew.org; Mon, 25 Jan 2021 20:28:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35390) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4D6T-0005eh-FM for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:11 -0500 Received: from mail-pf1-f177.google.com ([209.85.210.177]:37582) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4D6O-00069o-ST for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:06 -0500 Received: by mail-pf1-f177.google.com with SMTP id 11so9465937pfu.4 for ; Mon, 25 Jan 2021 17:25:02 -0800 (PST) Received: from Yifans-Mac-Mini.hsd1.ca.comcast.net. ([98.35.5.7]) by smtp.gmail.com with ESMTPSA id o14sm536921pjf.12.2021.01.25.17.25.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jan 2021 17:25:01 -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=dX6U0cuOZb/kuyYG2OKMgHrXo76h9L5pny+JeRE/KfrT6yBLz0kYoXzIgisIgmsUhM RZCqCt4iulOJSyEZMEYB+mKOJxCxPPgxzVllNmo4FCZL4YphO2KLomC/WMzZvExuap2O MlLTZWKYnEB0IbKzWDEFU6WlefKeq1tOqMHaGoWyBBFk4oGVc4BN9rTWN0AoF6ccCfyC ZO9An/g7jsbgjRdmjFDd9n55gdVJEeplVigWe55RypzqkK5+dbO9+I1Lyb3Aeg6Dm1fX WjFdSpKrs1qn7MeE1+j7nDoZgPpaeRo6wNDdUzVvNA+MD0kQnIfs6p+DUgepM3ZZmYpV 2Vtg== X-Gm-Message-State: AOAM533Dt5UUCe4NVpOeLWSLRKCmpAp8zeufBop/gDgmeTj965g7/je7 +E7x07mUniZla0lRMjmtwX064GTmyCI= X-Google-Smtp-Source: ABdhPJxBQYydGCtQPtB3meEjjVrhJNtkH0G4TWvH+ZttCrjLT9r+tG20GG/Bkd9tCYiT+p1f+Bhjag== X-Received: by 2002:a62:7c86:0:b029:1b7:cf7b:7d79 with SMTP id x128-20020a627c860000b02901b7cf7b7d79mr2988559pfc.48.1611624301831; Mon, 25 Jan 2021 17:25:01 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v9 02/11] configure: cross-compiling with empty cross_prefix Date: Mon, 25 Jan 2021 17:24:48 -0800 Message-Id: <20210126012457.39046-3-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210126012457.39046-1-j@getutm.app> References: <20210126012457.39046-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.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.25, 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 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 Mon May 13 14:18:43 2024 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=1611624815; cv=none; d=zohomail.com; s=zohoarc; b=BRjI1IQP/OjI+TkducViVyd/dpwlt6lRFCAN15zLcCoRN3uQGULhekJWNTzT1yQC2UcQPCQOZ8cKepQaHQPPmBJ69SW60n9R9mgtNfsQNk4o38O5YN1tPMStq7hTtOiJiBuCmUr5QI4xxSstfVtnx7Sap0DzgCO3uQrtat9/q+U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611624815; 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=bYT8CpL0ITfvusYCzEx2HAmSCStJQMVgZW9IRB+uiG1tjUR5MKsxw91b28YvXXpdtkJItCzGKJ0b6v4ufGKm/6F7tptc54apEsOc+F1AKmvxSg1cEi7G3FOThBgUggaxslCWqr5jynK3oX2Z80jMl+Z1Ko1KhP1bGYwXHcipPu0= 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 1611624815934623.4320287469935; Mon, 25 Jan 2021 17:33:35 -0800 (PST) Received: from localhost ([::1]:50702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4DEc-0002xO-ML for importer@patchew.org; Mon, 25 Jan 2021 20:33:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4D6V-0005ew-Bb; Mon, 25 Jan 2021 20:25:13 -0500 Received: from mail-pg1-f176.google.com ([209.85.215.176]:37832) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4D6P-00069x-7w; Mon, 25 Jan 2021 20:25:09 -0500 Received: by mail-pg1-f176.google.com with SMTP id z21so10190721pgj.4; Mon, 25 Jan 2021 17:25:03 -0800 (PST) Received: from Yifans-Mac-Mini.hsd1.ca.comcast.net. ([98.35.5.7]) by smtp.gmail.com with ESMTPSA id o14sm536921pjf.12.2021.01.25.17.25.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jan 2021 17:25:02 -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=bQMOBszsfGjl8QHtcmc4AVX1fRh1pUXSQvpmWnt9IyRmdxfqfuhZ7l9IvLHxAK9EWz pWY7CzFHNOnP7ofFTUjMXso+xNMPtStTL9kcV/JqjivnGo36MwFBATW5o/7Lucn3TgBl ddOQ2QUWaGoMmD9AMhY5Fdu3CHXAEMfXYIB6SrWE4D3aBfPRbJS7OuMNdYHyhGTt4kYF 468zVVGG7bDP6jRH+Hq9QMoMOe+QyDdYLYMYCULrpQE+HMg0vuSRrpb2xokKW2xTd9Cc YLSmYL8MFW4c+S+fNxOZ1yW15Ijk2BiHVEmY2NtZ5hAJjn/QpJMaCoKoEtBgg4c4KAnh jIAw== X-Gm-Message-State: AOAM533wjMIKTzWfoGLC3dI+1h4pt9vmnxC6LCOvj44YSV3b4voJzcO1 Zl01UOx1on5zrtADm3Y7QuZu2KXkWeY= X-Google-Smtp-Source: ABdhPJwjdQmY9GmrKfN0aGbd/iEtRBi/aPYsy+N9Af+U/+KdVAT7NVKdVl4cxxmhnFJfd0il0R31qQ== X-Received: by 2002:a63:c743:: with SMTP id v3mr3206061pgg.316.1611624302912; Mon, 25 Jan 2021 17:25:02 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v9 03/11] configure: check for sys/disk.h Date: Mon, 25 Jan 2021 17:24:49 -0800 Message-Id: <20210126012457.39046-4-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210126012457.39046-1-j@getutm.app> References: <20210126012457.39046-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.176; envelope-from=osy86github@gmail.com; helo=mail-pg1-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.25, 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 --- 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 Mon May 13 14:18:43 2024 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=1611625094; cv=none; d=zohomail.com; s=zohoarc; b=a1IPAjv1r8skakoBGBUZsh9FwFDzKSjDAT48svUnVuLVhTWkLF2Rf0kjBqhp1WGWBvDGJ377v6sZQeMUIiWQ2ZzglRZuU4+UqF8/Df4VvRd02OhnkehABzuc+r42hWGUbOsL88PyiMeuHH71PxlsbJaf5jBl5kajUF2EKQ+1Tos= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611625094; 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=ft6HA8yPyUfgWXlocSz/a+abXPwFqWWk+fwv+wI1JZhEd622/I/kspD64Z1xu7zjT/YWNLAeKgE9tO2NYAC4KhAFXjeHyv08HlImYumM6WqFLMZ+jHnlp05kMbZwLyujZXnSVf2Ul7afAimRMdsSZUb1XbAp9i2KqQsR94LVH/E= 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 1611625094720486.3826804556502; Mon, 25 Jan 2021 17:38:14 -0800 (PST) Received: from localhost ([::1]:59606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4DJ7-0006g9-L7 for importer@patchew.org; Mon, 25 Jan 2021 20:38:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4D6V-0005ex-BG for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:13 -0500 Received: from mail-pg1-f176.google.com ([209.85.215.176]:39987) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4D6R-0006A6-9K for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:10 -0500 Received: by mail-pg1-f176.google.com with SMTP id b21so3349919pgk.7 for ; Mon, 25 Jan 2021 17:25:04 -0800 (PST) Received: from Yifans-Mac-Mini.hsd1.ca.comcast.net. ([98.35.5.7]) by smtp.gmail.com with ESMTPSA id o14sm536921pjf.12.2021.01.25.17.25.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jan 2021 17:25:03 -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=PCvg5em+KKJtp/hS7ijSagLFGKI8NU/8NuevmVZkqYjeRRjj9XNzL57NyzYW5dNFrL dOqFXV6MmFsgavGN6iweai98RTWCqxHETJPOjKEhbS0zjYLjlI8rPYLGUZjn1l5UXKE6 2YOEL6VjjNTzw30g7KybGYiVIsLLyytlJUE4sPhKMWBJ7M/Z7SO8MwF44th2lcRuqnat cbDtT++Nqqz+aKXR3j7ab2hPXI2Onl+sNDPOdfGn2hmhyB4zudPniYjtcQgEixKp5pEX ZBu8n3kez8IT8BURBuHcC1AX+Ya4uD5wHlNcwlGcPUnB0k9zGQ3/oMUXeshx6tQt0nP8 LMAg== X-Gm-Message-State: AOAM53218Lu9aWij55GiuedB5GhFQKjPSnzDBoMxPTEzoC4WlYWqKS8W xEnD9C5M9VesGoPZJDUq0i05EtdFDTs= X-Google-Smtp-Source: ABdhPJz1JcDqyMEUpNa+xSKgyEPYy+whh1pNKabLi530dX5qIl1rQEPOaZ+q9oSHCvDsQAz8usAQaA== X-Received: by 2002:a05:6a00:8d0:b029:1b6:3581:4f41 with SMTP id s16-20020a056a0008d0b02901b635814f41mr2836117pfu.56.1611624303912; Mon, 25 Jan 2021 17:25:03 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v9 04/11] slirp: feature detection for smbd Date: Mon, 25 Jan 2021 17:24:50 -0800 Message-Id: <20210126012457.39046-5-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210126012457.39046-1-j@getutm.app> References: <20210126012457.39046-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.176; envelope-from=osy86github@gmail.com; helo=mail-pg1-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.25, 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: 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 Mon May 13 14:18:43 2024 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=1611625037; cv=none; d=zohomail.com; s=zohoarc; b=LB3L/6szf5B+wlfOxne/xtoJ9FZB3+wgim8t2tuM8dGC3M78coo4DyXIPJmiaFuRFSuplR0vtYHGQTvPcJqbiHCLVgZhg+pGViuyrXhxFWwO+IErKv4ENSZ304A7JC9lJI3k/ZHPtyRruh+y3SVRpQ0S6K3CUriat+Q5vkH72sY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611625037; 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=JWajNuHMbFLeCYP/PsxYbKNIiTAbIrYsUJE7nhjw6p4=; b=FSZirIbqQ5gLv79/WxMPeSF2va5PBde91OZTmh/UWVE7ibsN5XwEzMNydCZIjxM8R5Sigqp34+1g8RcEGXDRXn2BjMnXZ7DfrrnYRB0Uy0urALy29ebrjysYLoNpRTdbV0vaI/Hc9rx4W8nium3Oi1W87pvNr1lRGTr5hWkhhFk= 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 1611625037645802.0796641056914; Mon, 25 Jan 2021 17:37:17 -0800 (PST) Received: from localhost ([::1]:58874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4DIC-0006MJ-JF for importer@patchew.org; Mon, 25 Jan 2021 20:37:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4D6X-0005f4-7Q for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:22 -0500 Received: from mail-pf1-f181.google.com ([209.85.210.181]:37588) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4D6T-0006AM-7v for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:12 -0500 Received: by mail-pf1-f181.google.com with SMTP id 11so9465998pfu.4 for ; Mon, 25 Jan 2021 17:25:05 -0800 (PST) Received: from Yifans-Mac-Mini.hsd1.ca.comcast.net. ([98.35.5.7]) by smtp.gmail.com with ESMTPSA id o14sm536921pjf.12.2021.01.25.17.25.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jan 2021 17:25:04 -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=JWajNuHMbFLeCYP/PsxYbKNIiTAbIrYsUJE7nhjw6p4=; b=URjtkS4D/99uFCzVzbTq57SnczbbqaATQqLGartrTcpslicFMD35rKHC2kELBdD9fI Kfs8emaWUKulUJS1v53vq93o0/vF/QqXYKqTzlQ36etZQhdh3YMlpVBXl3mAsE/7MPFE HzVI6gWfgiGl6wCiPykJfUo50MVwf+P/7EzwgbQrQjVvGLixXW0ifMlw5iMUqoaF+fAV azpmPkCc3HvVjDhA55WIjg2n5k2DkZ1jc8FsP6XVhuWHfkGmEribh2n/F4tG3WJvCUvu GLRtv3uKLcabjYdUVRsaN6ziWt7ziXKA5rXWWyFPNTMlc3jDHgJoTboLU2PMSRycG1z6 UTEQ== X-Gm-Message-State: AOAM530Am7xTLUEyH9h4kszEHd1kp+JjlZJ2/elkrDt67/u8DWP6xwsn IoIqzhmzh1KNujZA/rKBgXVzIfXC+pQ= X-Google-Smtp-Source: ABdhPJzESxjDW7OI6bjAG2H8Z85ei7exnSES4mtAt/RuKmIdEvYW2HOduaSaMM7LwX5xa/nHH2oL5Q== X-Received: by 2002:a63:1d47:: with SMTP id d7mr3266859pgm.251.1611624304726; Mon, 25 Jan 2021 17:25:04 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v9 05/11] osdep: build with non-working system() function Date: Mon, 25 Jan 2021 17:24:51 -0800 Message-Id: <20210126012457.39046-6-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210126012457.39046-1-j@getutm.app> References: <20210126012457.39046-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.181; envelope-from=osy86github@gmail.com; helo=mail-pf1-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.25, 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 --- meson.build | 1 + include/qemu/osdep.h | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/meson.build b/meson.build index f1e67b8cd1..a7650956d3 100644 --- a/meson.build +++ b/meson.build @@ -1118,6 +1118,7 @@ config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_head= er('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')) +config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', pre= fix: '#include ')) =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/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 Mon May 13 14:18:43 2024 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=1611624820; cv=none; d=zohomail.com; s=zohoarc; b=TDXrOXf2CWrl+XhFsIUxTIqKb8gmRtV4EiP3+To3dNteSHZWRm2iHevdpi03bYAUaHJVCMkufp4E2jIFFPGwDaXsqpK8EilhGNfH98azbwnQWDMMH+v1bs1ntpoXw7SBMTg26sRIpDPIeU8KvJvmlJ257W7D6qo2QvgDlrSIAfg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611624820; 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=9j7Jyu3wauLM62/41PRZiedCHY3SfQgNILuQd61JwcM=; b=dMNu4ipJdLcq7+kI+QS3pM4WMOhzZpMdUlqZvtynj/0oaSChGqcNW7CS4cG/+iCkGpoQDra+QyXYPCCiByPvvX4bSraDAdlHyzG6zxlW1MjZ85Dsv0jTGzD9P/T3HQhokvAAqsnApwp3Qn0DqZSwunuHHshZcILGP7UfB+CZwGM= 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 1611624820141958.2800218495855; Mon, 25 Jan 2021 17:33:40 -0800 (PST) Received: from localhost ([::1]:51048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4DEh-000367-0s for importer@patchew.org; Mon, 25 Jan 2021 20:33:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4D6V-0005ev-BB for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:13 -0500 Received: from mail-pj1-f43.google.com ([209.85.216.43]:53227) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4D6S-0006AT-Qz for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:10 -0500 Received: by mail-pj1-f43.google.com with SMTP id kx7so714350pjb.2 for ; Mon, 25 Jan 2021 17:25:06 -0800 (PST) Received: from Yifans-Mac-Mini.hsd1.ca.comcast.net. ([98.35.5.7]) by smtp.gmail.com with ESMTPSA id o14sm536921pjf.12.2021.01.25.17.25.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jan 2021 17:25:05 -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=9j7Jyu3wauLM62/41PRZiedCHY3SfQgNILuQd61JwcM=; b=ijBS+iWqvfB6EDU0UfAHTwks//Rt5wZ4h97z2l7Jf1SFF1N48ItYvMXTcguhiHExzn Y9nvqvILZyb/NTCi6NnaMs2wMX9wkTxthFzOLo3iPSd2xTsz66doV4OGYtXbcdktAWly xCegxjb7RFQ88K//dpePzZO9i1xmpj10aeTV/OKoiKD0TxPvonO4SXqVPEaNcLb/iYlZ oUIYgmKqMhBhLd8lrqqbNyLBR5Jn5deB8B4Jri8dSilm2MlmBxxkx70P5Yeqo6sC2l5u AT0zLTmdiyha/Xj3UptbvRtliLGkyRSHxszbKIq7kSFGEwad5cYk26OrWW+h3pgWG4zN h6TQ== X-Gm-Message-State: AOAM532AzkRfkHWum4sA4FuPcG6/DP9lolpzv+KT36zVtxKOIq54T9d7 cx+l5RDis71YhESxUz3nbPpCnDNb1XM= X-Google-Smtp-Source: ABdhPJzXFID/qf+AAHrsFCvuVeAbAdqS6Z54hy0eDPl8BiY1RoJ0cKnscDV03wibVvc1Wne56201Rg== X-Received: by 2002:a17:90a:f98c:: with SMTP id cq12mr3073749pjb.191.1611624305563; Mon, 25 Jan 2021 17:25:05 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v9 06/11] darwin: remove redundant dependency declaration Date: Mon, 25 Jan 2021 17:24:52 -0800 Message-Id: <20210126012457.39046-7-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210126012457.39046-1-j@getutm.app> References: <20210126012457.39046-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.25, 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 d72ab22da5..1b2fc502ea 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 Mon May 13 14:18:43 2024 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=1611624792; cv=none; d=zohomail.com; s=zohoarc; b=QaScF8N343jGfLeUq9WQAWboqYN55erHCEyKbRSsxwkIGrliIs5KfK5lEQXnyLarm4GIEbj5tq5x716AqWocPmqeVdFTr4TJptENHJXqY/5VugiHVtpQPTbLDDW8rRa1MgE5Z3INaR4JiNQQ43eb2zB2iEPIN55EinKeTBtdy6M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611624792; 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=lNNbPBcVDZh5ROvOnWqk8OSUdw/QY2HR5+MLl73XwI8=; b=n0gUwjS32uPOo/ti3rT4UFB4dS23LwmWw9HRtk3B3B1otV0RRbu4ZGk9ieQCW5xvlnFckX9sF0Aw2AB+hiaSzcSdWGQHplsiPyNijlfznSqYGSi2YwOx+xXJlr6SAuD+6L0jIA0SDsVHo2yWAAqOZCA7HnxPi6vlCAqdZrmW+9s= 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 1611624792674144.39196505375241; Mon, 25 Jan 2021 17:33:12 -0800 (PST) Received: from localhost ([::1]:50290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4DEF-0002lM-DB for importer@patchew.org; Mon, 25 Jan 2021 20:33:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4D6X-0005f6-8L for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:22 -0500 Received: from mail-pf1-f173.google.com ([209.85.210.173]:33638) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4D6T-0006Aa-BZ for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:12 -0500 Received: by mail-pf1-f173.google.com with SMTP id o20so9480600pfu.0 for ; Mon, 25 Jan 2021 17:25:07 -0800 (PST) Received: from Yifans-Mac-Mini.hsd1.ca.comcast.net. ([98.35.5.7]) by smtp.gmail.com with ESMTPSA id o14sm536921pjf.12.2021.01.25.17.25.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jan 2021 17:25:06 -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=lNNbPBcVDZh5ROvOnWqk8OSUdw/QY2HR5+MLl73XwI8=; b=Oh8SeeOD0/uh6BEuZCLu35Ac6+FhI+GsBkDR7fE0oFVIZXgrURs3mgJb5wmuQL4yQy EAJeF8bphAMdOm4KaC6Av+FiyKR3ldN8hrSCLiq2KjIwrzZJVli5CFzZ+bp0pU8zEZ9V sxLm78CoN//rARBQyBGGUwUqFsg1XFUNEadRq0k5RLLVas4/P6g4usC91pfcsiYXLqw5 Vgp/NxRfoRntTwcP/pDmBpwVm9mgWd8Tqb5JgxmXKsZHBDO/JEIn7rgafmt9J3a2cy7V X24fT7mvBIfgMTl8tkBfzJK1wgWjsYlOtGkUsC6lA9Mfnw4PlpzngV/rhJ6GXWbr5OqB 3nOA== X-Gm-Message-State: AOAM532ZjRjT7/T0t7+ckeSAcM1NS7N8tTMoz462MVsZJOlMpntbiSIf hyj00Q/BhwCroHfirme37PlNHyV0uvY= X-Google-Smtp-Source: ABdhPJwXGfL0MMxzUTHdTeDTp6M8HdUxJNTeoPIbjI08upAwpIqocHI8sgmDz/L+Q85K9EKdsNJqqQ== X-Received: by 2002:aa7:90cf:0:b029:1a3:a176:f4d0 with SMTP id k15-20020aa790cf0000b02901a3a176f4d0mr2894037pfk.8.1611624306473; Mon, 25 Jan 2021 17:25:06 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v9 07/11] darwin: fix cross-compiling for Darwin Date: Mon, 25 Jan 2021 17:24:53 -0800 Message-Id: <20210126012457.39046-8-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210126012457.39046-1-j@getutm.app> References: <20210126012457.39046-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.173; envelope-from=osy86github@gmail.com; helo=mail-pf1-f173.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.25, 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 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- configure | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure b/configure index 1b2fc502ea..96738a19bc 100755 --- a/configure +++ b/configure @@ -6402,6 +6402,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 @@ -6420,6 +6421,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 Mon May 13 14:18:43 2024 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=1611624509; cv=none; d=zohomail.com; s=zohoarc; b=n0Q7iFNYw6YhTCm00EcoEPSxazkhNXG7fUfwI5tybCI+lPnZrvtgMMjyQrgMfUiPinkFQmD7zjPAUl1+jrQoesrkx2rvGYmjuWSNrOWQ65jrA7FDWG1NsgTI9G0yrQ47C1gM2JvEt+GxEEtszmCEw3P3WNetOKtGIarLLx94+aU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611624509; 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=ojsbSRb9TUYaNkY9UYZiHJyegurKeDmFzBKNM7XQRCs=; b=nVhWvOK571L0e1Ix3K2roSmh50FEQtuQUcr3TAM/2ONImKFJEgjYN6YhxSXqC58OO7zbIf+A3Nv+NCJHy/GJW8t1IeyrjJbr0rNcwgryTzTsQzGuhJMchoomtQzlcLY6d3TSK+R3xexGi8WTchMMgizlsSlhvp3yPhrXbDzFNoI= 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 1611624509879871.3388014831888; Mon, 25 Jan 2021 17:28:29 -0800 (PST) Received: from localhost ([::1]:41656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4D9g-0007TY-NX for importer@patchew.org; Mon, 25 Jan 2021 20:28:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4D6X-0005f7-7v for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:22 -0500 Received: from mail-pg1-f174.google.com ([209.85.215.174]:36158) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4D6T-0006Ag-7n for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:12 -0500 Received: by mail-pg1-f174.google.com with SMTP id c132so10189417pga.3 for ; Mon, 25 Jan 2021 17:25:08 -0800 (PST) Received: from Yifans-Mac-Mini.hsd1.ca.comcast.net. ([98.35.5.7]) by smtp.gmail.com with ESMTPSA id o14sm536921pjf.12.2021.01.25.17.25.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jan 2021 17:25:07 -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=ojsbSRb9TUYaNkY9UYZiHJyegurKeDmFzBKNM7XQRCs=; b=WyhHwrpwfh6Ea/M/BiBN/rSgZwF5rQbmBY9HGma/n+nFdhfHwScZTrz8BYqBUSwKMj X+LAWS0wkskz7YE42gMzmXMXhNHq91XfO1EFhoIylUJ3vFshuGWK5t1IoPhd554UU+JE THe1/Dii0JQggtjUd6sSurGYhXYdORbrqF/WctffC1eX43UESTfqLEgLrh5gLsuQuIZd 3pcgzO4Nme4aEf6G5WEq1gkQxKlirwQSgs84QrdXNufyT77FRdDrxrtEYxoHH4w4kwc4 JkJfx+1vjFzf0dxZKRvIkNk6mvI0ljARmJ/S01ogybZ3PPH0c5E4y0OaqA9QosKplcbQ dztA== X-Gm-Message-State: AOAM532sx+/P5bDkojP2TJaxAAbeGHhLcWvYK27oxUWEIIwWve2JDs3E c5AhIdpMXk2qLe4NIDx5YeFo9m26E1o= X-Google-Smtp-Source: ABdhPJwcH9dqrbmC3xFLAJf5NRINWrh5UGZ25N53PL71dcnFpK6xfc86OUoOJa9gaKCYC2pQk8Y24A== X-Received: by 2002:a62:7b8a:0:b029:1bb:4a06:bb57 with SMTP id w132-20020a627b8a0000b02901bb4a06bb57mr2845829pfc.47.1611624307657; Mon, 25 Jan 2021 17:25:07 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v9 08/11] configure: cross compile should use x86_64 cpu_family Date: Mon, 25 Jan 2021 17:24:54 -0800 Message-Id: <20210126012457.39046-9-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210126012457.39046-1-j@getutm.app> References: <20210126012457.39046-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.174; envelope-from=osy86github@gmail.com; helo=mail-pg1-f174.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.25, 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 96738a19bc..fddd11fed9 100755 --- a/configure +++ b/configure @@ -6425,9 +6425,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 Mon May 13 14:18:43 2024 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=1611625083; cv=none; d=zohomail.com; s=zohoarc; b=asgstz5KK/ewDJDQ2UJe8sDxbazoIe1EPLLe3A9MkxgNuyH07M9my42yX9GF1ewlm4//M4AHiq+erkx9KmZiuN15uMso9ivv7vs0t87hFvWBc0oZCCOTub9bPWohaQWCst4sQNtjF67jjQdw+GyqNM3J+mMzwRXTwiqCleaNzv8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611625083; 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=ZzmHFyXlP5/KrRaHfZyIdZ8AtHEAE4XS8ZnHs3BGWFho+wYR6IwZkvAkc/LTFEpnhtBHUsxeKPIS9iOWUPF4gC3UbA9SM19L6edY+UupZze5iH03Nt0+xJzkUJ5lxFYqHSHsCVFJRt7jwK6YAP/i7W/YHgDuV5OKSzaWDBYxSmY= 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 1611625083794823.6627023563462; Mon, 25 Jan 2021 17:38:03 -0800 (PST) Received: from localhost ([::1]:59236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4DIw-0006XM-7C for importer@patchew.org; Mon, 25 Jan 2021 20:38:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4D6Z-0005gR-9H; Mon, 25 Jan 2021 20:25:23 -0500 Received: from mail-pl1-f177.google.com ([209.85.214.177]:42719) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4D6V-0006Am-GA; Mon, 25 Jan 2021 20:25:14 -0500 Received: by mail-pl1-f177.google.com with SMTP id s15so8752881plr.9; Mon, 25 Jan 2021 17:25:09 -0800 (PST) Received: from Yifans-Mac-Mini.hsd1.ca.comcast.net. ([98.35.5.7]) by smtp.gmail.com with ESMTPSA id o14sm536921pjf.12.2021.01.25.17.25.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jan 2021 17:25:08 -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=SYnXUtKRB7/LC1fOxpyz84XTZ/oSDUqH0qLueMEyrOoRg5/eus797NHb+4k02JJMit 1sMSmUQa/hE4PmGXxVXE2GeZRBtj/J/zf8GuZmdXw/bfObAU1PNL1szScE0ZMAgGe+39 N+oYxgGxdlF87rrkgoZCT+8JH/B8dZCL5QkKbIZJKyDPBw3fCBPNYfdAG21fsLQiTJPz BuSb6+WmFmwB/Xmt6ecDrbSTF83WO1r0RXjBWxTsI9ordgQ2mOBaqnP+QkYsGmd1N7/B u45VW2sdK7fQq1ZuCvYZLvlP85XNTOV4WHRQS9GyIC6iUO/Sszj/WztlIskM55zMUcy4 Alzw== X-Gm-Message-State: AOAM530nw+KIKymNI9vxMdabG/40aJXYclTk5mqW0uZa2mHDQYmAl+xE XtbTNbhLTl7osXUPP02r8HDjH3GrUMI= X-Google-Smtp-Source: ABdhPJyKKMRn0HYFtKap+uZVeCjOIwGAZolK2QJ18x5mqYpRdFw1dEpjbuixpWXJ54LThVzzo5gxrA== X-Received: by 2002:a17:90b:224f:: with SMTP id hk15mr3161546pjb.31.1611624308711; Mon, 25 Jan 2021 17:25:08 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v9 09/11] block: check availablity for preadv/pwritev on mac Date: Mon, 25 Jan 2021 17:24:55 -0800 Message-Id: <20210126012457.39046-10-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210126012457.39046-1-j@getutm.app> References: <20210126012457.39046-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.177; envelope-from=osy86github@gmail.com; helo=mail-pl1-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.25, 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 Mon May 13 14:18:43 2024 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=1611624791; cv=none; d=zohomail.com; s=zohoarc; b=HQH4JZrhMy3GE0gPHDqcCLAODEafwhjQ47V7egAXkwopF5u8lH+8wD/SUV6HZRfdIiMB0lpWgq4FJfC+dcYgKVptFOzPQsPCp+qAPRKCKKQZjjDFDBcO3U7pitcYBSycXqc9UaSBbv9AsA6yr0KveypGN6d28RT7nsO3CiMmKvE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611624791; 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=QgHwr+XWD/Cd3L80cQ4A0uAggOcUqWGoJtisPtR4O0c=; b=RmdibQwDghJwVAxFI6eIlJnRJuEFu+sNgkVfz6+chd1Y8Uw+ZzUTtZ3qkZDGxruTjt6V1nhOt8PAURGS+KujZSCNSNA0c9CCDr8BvO9lTRdVsdsvVy5dMnTv5XrsT7yV3iAQO+hBctSqtObxWI+Cw9TqwnFU/nRaiymW6Fd55QY= 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 161162479139994.17552657117778; Mon, 25 Jan 2021 17:33:11 -0800 (PST) Received: from localhost ([::1]:50274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4DEE-0002ks-8a for importer@patchew.org; Mon, 25 Jan 2021 20:33:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4D6X-0005f5-7h for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:22 -0500 Received: from mail-pg1-f171.google.com ([209.85.215.171]:36157) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4D6V-0006B1-2Z for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:12 -0500 Received: by mail-pg1-f171.google.com with SMTP id c132so10189459pga.3 for ; Mon, 25 Jan 2021 17:25:10 -0800 (PST) Received: from Yifans-Mac-Mini.hsd1.ca.comcast.net. ([98.35.5.7]) by smtp.gmail.com with ESMTPSA id o14sm536921pjf.12.2021.01.25.17.25.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jan 2021 17:25:09 -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=QgHwr+XWD/Cd3L80cQ4A0uAggOcUqWGoJtisPtR4O0c=; b=rfGnKTOqMXxQQWc/9Tte6vLT1D9n9/BsGEV32vaO+qbuzarqjVbaJnNVXO1kQfPUoX QebKY9HuTq2XV02Al6obDMCCLWPDGabSkn6M6Tem7yBjN6KkfYsjN1S5N7fsr1gDvn6C sa0faL4ilek/zNspqOdwxXCsoGUxFNiednJfA//vVwsOZp0HbJ6KeFj8md9QAwGjtx9i Wr5hmSJCQ3B/gyqU4dEqGD1x66PfuhqTHYBvGAwJY5Max8MtNrZJzijMdg2muhz3kKye EUJfi2ZszTWGVx0FFWgiZ/mkSsGBO5DIWeMXDX7fObDw7P8R+GNrUo6bu3oRoQ7GbFLq dzGg== X-Gm-Message-State: AOAM533bwIU6K+zf6I3CqMqnafRCN/N4vSzII4t56hBAHQcF680Slkr7 S+hOOGDf9DVdwIdWIcCh05zVbRVyxeE= X-Google-Smtp-Source: ABdhPJzCeBDu8AeicKtmEGN5VZygwjeATZZQ3fCFvDG9uSi6LeI+DN6cB84q+/ZdkNRxoUIhFfMJpw== X-Received: by 2002:aa7:9d84:0:b029:1bc:cebe:a15b with SMTP id f4-20020aa79d840000b02901bccebea15bmr2960367pfq.57.1611624309593; Mon, 25 Jan 2021 17:25:09 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v9 10/11] darwin: detect CoreAudio for build Date: Mon, 25 Jan 2021 17:24:56 -0800 Message-Id: <20210126012457.39046-11-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210126012457.39046-1-j@getutm.app> References: <20210126012457.39046-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.171; envelope-from=osy86github@gmail.com; helo=mail-pg1-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.25, 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" On iOS there is no CoreAudio, so we should not assume Darwin always has it. Signed-off-by: Joelle van Dyne Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- configure | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/configure b/configure index fddd11fed9..89836f8692 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 Mon May 13 14:18:43 2024 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=1611625038; cv=none; d=zohomail.com; s=zohoarc; b=JJgmfOEEP9BYMk/S45Yv4glzHJWu3GlGSHtNX1GumQ3FIidPFNdzuDc/hj1+XJwpzI3Rw+KTYl7EHus/E4pJMZDXdVQkO1msIHuva1F/uKK34R94JPBbkBH0p2B30XaDXmiHEjMlQqNtS2MmXcsvvfT5hj7CkTfpTq6O3WV+uRw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611625038; 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=glvJaTkRow5yPoqo300OxC089acIdJu9cw0YZy+8mg0=; b=YySqsjR855JuFZmLAfaHqeozoARqtlxgT5sWia50YDjtZpShmYY+nT0NdskjzvjqjpIDWjjWic5pewlwkM0rK5cSrWw3+qrZMuPouhTaegbLV9X1tMHafr5+2UwnoDLqeQWSYneXrw+uHCuubUyZH98mPj719VTB+RPO99Ke9rg= 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 1611625038423659.43648072316; Mon, 25 Jan 2021 17:37:18 -0800 (PST) Received: from localhost ([::1]:58856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4DID-0006Lv-DS for importer@patchew.org; Mon, 25 Jan 2021 20:37:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4D6Z-0005gQ-90 for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:22 -0500 Received: from mail-pg1-f182.google.com ([209.85.215.182]:33951) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4D6X-0006BI-0h for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:14 -0500 Received: by mail-pg1-f182.google.com with SMTP id o7so143915pgl.1 for ; Mon, 25 Jan 2021 17:25:11 -0800 (PST) Received: from Yifans-Mac-Mini.hsd1.ca.comcast.net. ([98.35.5.7]) by smtp.gmail.com with ESMTPSA id o14sm536921pjf.12.2021.01.25.17.25.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jan 2021 17:25:10 -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=glvJaTkRow5yPoqo300OxC089acIdJu9cw0YZy+8mg0=; b=RuZd/iTyadShvr99Q3pq4nMEKKaOm+WD6BAXr8SLdCskzDdpBB+pIFoa0dxuiYo45Q 6sV9hXTAXLoA7D5B7kL/cVufMVfKvpIlLBS6+EvD+MixW5iGE1A7NjZsOChuQMw5FDSl lm6T09uPbrxngQca4qcYsPyDqTOE/ORwc50Ss+VhjIxipWTUyzqtT/Fzc9ciMEw380MH fy2H2kJE70TG0LmrwN9xwxYCk0YE4CIXMu9UMhaAGH9eggxxDIQGMl+Sz2vI2Scgj1bq muIYb3nyLoQP1KtKv5u1fxf3lGwegl7r70L+++dGQ4LaBndXfWapD6dy44HIeta169Ks 0uhQ== X-Gm-Message-State: AOAM53115SUazTbyEfVWOXZAq1C9kQWK/bzHlodoAv0XIk1J2UAAVbPd Kn3t274EbFUWWL7AbqKxgFE8tTpTku0= X-Google-Smtp-Source: ABdhPJw//at56Hmf+LgqIeNvwDYamL98vCqblhYxOLfHKEfjDb3jEQLuB/yeBMK4YVbCtQMAKeeU8w== X-Received: by 2002:a62:52cc:0:b029:1bd:e13a:fc1b with SMTP id g195-20020a6252cc0000b02901bde13afc1bmr2976095pfb.46.1611624310615; Mon, 25 Jan 2021 17:25:10 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v9 11/11] darwin: remove 64-bit build detection on 32-bit OS Date: Mon, 25 Jan 2021 17:24:57 -0800 Message-Id: <20210126012457.39046-12-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210126012457.39046-1-j@getutm.app> References: <20210126012457.39046-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.182; envelope-from=osy86github@gmail.com; helo=mail-pg1-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.25, 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 89836f8692..537ed111d8 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