From patchwork Fri Jan 22 20:11:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joelle van Dyne X-Patchwork-Id: 12040393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32AD7C433E0 for ; Fri, 22 Jan 2021 20:14:42 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B8D2323AFC for ; Fri, 22 Jan 2021 20:14:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B8D2323AFC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=getutm.app Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32pM-0000x9-JR for qemu-devel@archiver.kernel.org; Fri, 22 Jan 2021 15:14:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32m9-0004nm-6z; Fri, 22 Jan 2021 15:11:21 -0500 Received: from mail-pj1-f54.google.com ([209.85.216.54]:38677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32m7-0004ZI-AG; Fri, 22 Jan 2021 15:11:20 -0500 Received: by mail-pj1-f54.google.com with SMTP id x20so4597113pjh.3; Fri, 22 Jan 2021 12:11:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qVqRMnh8npYh0Rc9gcDpg3IYcVv+P2nL9eIHhLcj2Fs=; b=QQRUtw+RPKtbsHH4FF3GQHtYtXRyDCDN/KKI64VjOJhQQvwWhjHmHV+0hUWK0V9+P2 uXRt1ZTfCYyOYAjY5vhl2of7RV3gj4QAOQkjE98/aCaJ9k58+gPLjuB+L3tWnLFpeNzO OMEQTU1L8qjBOX4a4IrqDq5mVxV4yGgPi1ACJWAxhvf7zs0LHann1xmLrRukge5aPufM mjNH9wgLn0SoQBFa7nALNdMcDA3C7HnVj58z+WYy5KJPH+8CaCNhhGGPIsZn3HP9Fl3W L56eqv1OSMWzYgSQ4fm3nXXN/8YwTfC2I1Ns4tcX5H4fOPfNmWr1iFJmesk+opoL/bEm t1OA== X-Gm-Message-State: AOAM533PcU3tFt/wWALbTlzQhYHBKOsByZUprpykMtdFzCUL23M/7anX 1+RVl7M/xUX4F9vIgtQglHqtiyKnUik= X-Google-Smtp-Source: ABdhPJzyz4jwOLz51/IlbaZvOQJ5oWXVpzcT7/gao6MZN9we0rYDoDYBNIXkUTL1twdv/zX92VCWTQ== X-Received: by 2002:a17:90a:c787:: with SMTP id gn7mr351239pjb.222.1611346277183; Fri, 22 Jan 2021 12:11:17 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:16 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 01/11] block: feature detection for host block support Date: Fri, 22 Jan 2021 12:11:03 -0800 Message-Id: <20210122201113.63788-2-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.54; envelope-from=osy86github@gmail.com; helo=mail-pj1-f54.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "open list:raw" , Markus Armbruster , Max Reitz , Joelle van Dyne Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Darwin (iOS), there are no system level APIs for directly accessing host block devices. We detect this at configure time. Signed-off-by: Joelle van Dyne --- configure | 13 +++++++++++++ meson.build | 2 +- qapi/block-core.json | 10 +++++++--- block/file-posix.c | 33 ++++++++++++++++++++++----------- 4 files changed, 43 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 6f6a319c2f..acf7f7414a 100755 --- a/configure +++ b/configure @@ -5283,6 +5283,16 @@ but not implemented on your system" fi fi +########################################## +# check for host block device +# assume always true for non-Darwin hosts + +if ! test "$darwin" == "yes" || check_include "IOKit/storage/IOMedia.h" ; then + have_host_block_device=yes +else + have_host_block_device=no +fi + ########################################## # End of CC checks # After here, no more $cc or $ld runs @@ -5513,6 +5523,9 @@ echo "GIT_UPDATE=$git_update" >> $config_host_mak echo "ARCH=$ARCH" >> $config_host_mak +if test "$have_host_block_device" = "yes" ; then + echo "HAVE_HOST_BLOCK_DEVICE=y" >> $config_host_mak +fi if test "$debug_tcg" = "yes" ; then echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak fi diff --git a/meson.build b/meson.build index af2bc89741..6c3ee7f8ca 100644 --- a/meson.build +++ b/meson.build @@ -180,7 +180,7 @@ if targetos == 'windows' include_directories: include_directories('.')) elif targetos == 'darwin' coref = dependency('appleframeworks', modules: 'CoreFoundation') - iokit = dependency('appleframeworks', modules: 'IOKit') + iokit = dependency('appleframeworks', modules: 'IOKit', required: 'HAVE_HOST_BLOCK_DEVICE' in config_host) elif targetos == 'sunos' socket = [cc.find_library('socket'), cc.find_library('nsl'), diff --git a/qapi/block-core.json b/qapi/block-core.json index 3484986d1c..1a9576de8d 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -959,7 +959,8 @@ 'discriminator': 'driver', 'data': { 'file': 'BlockStatsSpecificFile', - 'host_device': 'BlockStatsSpecificFile', + 'host_device': { 'type': 'BlockStatsSpecificFile', + 'if': 'defined(HAVE_HOST_BLOCK_DEVICE)' }, 'nvme': 'BlockStatsSpecificNvme' } } ## @@ -2827,7 +2828,9 @@ { 'enum': 'BlockdevDriver', 'data': [ 'blkdebug', 'blklogwrites', 'blkreplay', 'blkverify', 'bochs', 'cloop', 'compress', 'copy-on-read', 'dmg', 'file', 'ftp', 'ftps', - 'gluster', 'host_cdrom', 'host_device', 'http', 'https', 'iscsi', + 'gluster', 'host_cdrom', + {'name': 'host_device', 'if': 'defined(HAVE_HOST_BLOCK_DEVICE)' }, + 'http', 'https', 'iscsi', 'luks', 'nbd', 'nfs', 'null-aio', 'null-co', 'nvme', 'parallels', '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" #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 #ifdef __sun__ @@ -181,7 +184,17 @@ typedef struct BDRVRawReopenState { bool check_cache_dropped; } BDRVRawReopenState; -static int fd_open(BlockDriverState *bs); +static int fd_open(BlockDriverState *bs) +{ + BDRVRawState *s = bs->opaque; + + /* this is just to ensure s->fd is sane (its called by io ops) */ + if (s->fd >= 0) { + return 0; + } + return -EIO; +} + static int64_t raw_getlength(BlockDriverState *bs); typedef struct RawPosixAIOData { @@ -3014,6 +3027,7 @@ static BlockStatsSpecific *raw_get_specific_stats(BlockDriverState *bs) return stats; } +#if defined(HAVE_HOST_BLOCK_DEVICE) static BlockStatsSpecific *hdev_get_specific_stats(BlockDriverState *bs) { BlockStatsSpecific *stats = g_new(BlockStatsSpecific, 1); @@ -3023,6 +3037,7 @@ static BlockStatsSpecific *hdev_get_specific_stats(BlockDriverState *bs) return stats; } +#endif /* HAVE_HOST_BLOCK_DEVICE */ static QemuOptsList raw_create_opts = { .name = "raw-create-opts", @@ -3247,6 +3262,8 @@ BlockDriver bdrv_file = { /***********************************************/ /* host device */ +#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 int req, void *buf) } #endif /* linux */ -static int fd_open(BlockDriverState *bs) -{ - BDRVRawState *s = bs->opaque; - - /* this is just to ensure s->fd is sane (its called by io ops) */ - if (s->fd >= 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 = { }; #endif /* __FreeBSD__ */ +#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 */ } block_init(bdrv_file_init); From patchwork Fri Jan 22 20:11:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joelle van Dyne X-Patchwork-Id: 12040401 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB1ABC433E0 for ; Fri, 22 Jan 2021 20:17:54 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 416DF23AFC for ; Fri, 22 Jan 2021 20:17:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 416DF23AFC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=getutm.app Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32sT-0004yf-0V for qemu-devel@archiver.kernel.org; Fri, 22 Jan 2021 15:17:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32m9-0004o4-Dc for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:21 -0500 Received: from mail-pg1-f178.google.com ([209.85.215.178]:35470) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32m7-0004ZO-QO for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:21 -0500 Received: by mail-pg1-f178.google.com with SMTP id n7so4569778pgg.2 for ; Fri, 22 Jan 2021 12:11:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=01jOHlrAizpaDPxT12d+5+vOSGTC56CIKtFWQ2QTb8E=; b=sCGh2+RbouDK2koYmDYmWdwl8RLOcFkNQ6v8xdrXy1Ecak70/L/3zP7Culs1k2cBtu qt2r4V1ML58E31rJXHLK47ES5q+oBItrWGkaei9VYN3nzEmibR/wuvsq2G4J3E30jaW2 71oG0VkEZjlKSojGB6VAoMUPTD54gVO0KHToUgwK1L8k60JeVx0Lc8wsnJIT9o1H6EJv sytH0o1BHgCstH44l8FN5P7Zz4DpGF9SPJeE0eBjnujFweLZGMYhS5MuhaVxFoU2MNeL Bj27E3hCSTSWwjK5tKuBgxU15/DOzGK/JkF4Wct4sCqV9bM5J6FjB2i3FgMkmgJ4xoOA JHuQ== X-Gm-Message-State: AOAM531uNXokt+nKDgLcOvLqSbBncDNxA25Ho0X2xRQOGKNyajgYH4l2 HY40dgI2s4o0dow5vsH6gV4Cw8LcKmc= X-Google-Smtp-Source: ABdhPJz28lWzUzpz9iA0RY6T1LHup14VYA3XVUVEckKn2+3xtasGUJcKbIamcPIaUnk0FTxGokLChQ== X-Received: by 2002:a62:7c86:0:b029:1b7:cf7b:7d79 with SMTP id x128-20020a627c860000b02901b7cf7b7d79mr6668419pfc.48.1611346278161; Fri, 22 Jan 2021 12:11:18 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:17 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 02/11] configure: cross-compiling with empty cross_prefix Date: Fri, 22 Jan 2021 12:11:04 -0800 Message-Id: <20210122201113.63788-3-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.215.178; envelope-from=osy86github@gmail.com; helo=mail-pg1-f178.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Joelle van Dyne Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.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é Signed-off-by: Joelle van Dyne --- configure | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure b/configure index acf7f7414a..32be5d225d 100755 --- a/configure +++ b/configure @@ -238,6 +238,7 @@ cpu="" iasl="iasl" interp_prefix="/usr/gnemul/qemu-%M" static="no" +cross_compile="no" cross_prefix="" audio_drv_list="" block_drv_rw_whitelist="" @@ -469,6 +470,7 @@ for opt do optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)') case "$opt" in --cross-prefix=*) cross_prefix="$optarg" + cross_compile="yes" ;; --cc=*) CC="$optarg" ;; @@ -1696,7 +1698,7 @@ $(echo Deprecated targets: $deprecated_targets_list | \ --target-list-exclude=LIST exclude a set of targets from the default target-list Advanced options (experts only): - --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix] + --cross-prefix=PREFIX use PREFIX for compile tools, PREFIX can be blank [$cross_prefix] --cc=CC use C compiler CC [$cc] --iasl=IASL use ACPI compiler IASL [$iasl] --host-cc=CC use C compiler CC [$host_cc] for code run at @@ -6403,7 +6405,7 @@ if has $sdl2_config; then fi echo "strip = [$(meson_quote $strip)]" >> $cross echo "windres = [$(meson_quote $windres)]" >> $cross -if test -n "$cross_prefix"; then +if test "$cross_compile" = "yes"; then cross_arg="--cross-file config-meson.cross" echo "[host_machine]" >> $cross if test "$mingw32" = "yes" ; then From patchwork Fri Jan 22 20:11:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joelle van Dyne X-Patchwork-Id: 12040387 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45F86C433E0 for ; Fri, 22 Jan 2021 20:13:31 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E860E23AFC for ; Fri, 22 Jan 2021 20:13:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E860E23AFC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=getutm.app Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32oD-0006eV-QR for qemu-devel@archiver.kernel.org; Fri, 22 Jan 2021 15:13:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mB-0004rB-1y; Fri, 22 Jan 2021 15:11:23 -0500 Received: from mail-pl1-f176.google.com ([209.85.214.176]:33671) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32m9-0004a9-G2; Fri, 22 Jan 2021 15:11:22 -0500 Received: by mail-pl1-f176.google.com with SMTP id b8so3948962plx.0; Fri, 22 Jan 2021 12:11:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nuZqkg4b5JSpteTWXviT3GF9Ync2kiIqSXzXQk/xAZU=; b=c0o2+m3Saka6qSTMp/SOiy4vjNO1WE5SRMyDxnkmfImZatJadgJN26nq9aqMTyXKxa RTPiKHMFkwZC0Ar15U71sUhnKUW3U8vqKzwWAazHg9C/kQSwlep3y2EGzf8Z9zWSNK5Z pLlHszY5ojTahVUpvjbRqY2N0zDX/x32fFD3iPjFuj+02y46nsIlKaTtcRaskTOcTWt4 SZZnRjOJfwXdDqQjpDEePL4Po4ZzbHQ753fG7vTD9HuHb5eOBt+OMGkLu2r8b98ttvji 12MwZm9GUpqAIkkcPDGyxpErBh4lYaCUpdJEH1HvNAvqFZm5zO5DMS7KfHPXq2muWr0c cchA== X-Gm-Message-State: AOAM531h3zSQ6/ryVenquHtQjq7h2bAmVXJCAXgs/Q4cDeOhCly7qIc3 3hNn4GdMvhAd7QqMADozCJDmN2ejhvA= X-Google-Smtp-Source: ABdhPJyNxnJ+s4WMURFI7m76eKjus8lO/g0PYV1cv6TWjmumQ8KSfuJIvE9/mpeSqxObwon7TiYwGA== X-Received: by 2002:a17:90a:8006:: with SMTP id b6mr3779153pjn.108.1611346279349; Fri, 22 Jan 2021 12:11:19 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:18 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 03/11] configure: check for sys/disk.h Date: Fri, 22 Jan 2021 12:11:05 -0800 Message-Id: <20210122201113.63788-4-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.214.176; envelope-from=osy86github@gmail.com; helo=mail-pl1-f176.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Joelle van Dyne , "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Some BSD platforms do not have this header. Signed-off-by: Joelle van Dyne --- configure | 9 +++++++++ block.c | 2 +- block/file-posix.c | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 32be5d225d..951de427bb 100755 --- a/configure +++ b/configure @@ -5295,6 +5295,12 @@ else have_host_block_device=no fi +if check_include "sys/disk.h" ; then + sys_disk_h=yes +else + sys_disk_h=no +fi + ########################################## # End of CC checks # After here, no more $cc or $ld runs @@ -5528,6 +5534,9 @@ echo "ARCH=$ARCH" >> $config_host_mak if test "$have_host_block_device" = "yes" ; then echo "HAVE_HOST_BLOCK_DEVICE=y" >> $config_host_mak fi +if test "$sys_disk_h" = "yes" ; then + echo "HAVE_SYS_DISK_H=y" >> $config_host_mak +fi if test "$debug_tcg" = "yes" ; then echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak fi diff --git a/block.c b/block.c index 8b9d457546..c4cf391dea 100644 --- a/block.c +++ b/block.c @@ -54,7 +54,7 @@ #ifdef CONFIG_BSD #include #include -#ifndef __DragonFly__ +#if defined(HAVE_SYS_DISK_H) #include #endif #endif diff --git a/block/file-posix.c b/block/file-posix.c index 11d2021346..666d3e7504 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -2320,7 +2320,7 @@ again: } if (size == 0) #endif -#if defined(__APPLE__) && defined(__MACH__) +#if defined(HAVE_SYS_DISK_H) && defined(__APPLE__) && defined(__MACH__) { uint64_t sectors = 0; uint32_t sector_size = 0; From patchwork Fri Jan 22 20:11:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joelle van Dyne X-Patchwork-Id: 12040395 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1932CC433DB for ; Fri, 22 Jan 2021 20:15:37 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A772C23AFC for ; Fri, 22 Jan 2021 20:15:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A772C23AFC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=getutm.app Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32qF-0001yB-GY for qemu-devel@archiver.kernel.org; Fri, 22 Jan 2021 15:15:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mB-0004sO-Q1 for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:23 -0500 Received: from mail-pg1-f169.google.com ([209.85.215.169]:40942) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32m9-0004ap-Tx for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:23 -0500 Received: by mail-pg1-f169.google.com with SMTP id 15so4544095pgx.7 for ; Fri, 22 Jan 2021 12:11:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yu6KCnRp4TF93vQKDhTQrY7grXtKJlR4pp+WyzMSBD0=; b=Whvj0R3PmeKXyPvnxeOafsT44umiA4AuLy+ua2/CCTJ19KdoAl7+oyQR95/7Zf7dY5 CXgK6+ddowyah40btBLVALzlKPTM+2t0gyemEpmsRVNmiAbDdaTFMaghAa7ID5Mk+Fw4 iSKV3lttKJHS9nqFOZW5VKTfJ+N9Vp5FqY+NYDl0DJBPjjW+c7mlI+9WakY72iJIV3zH aruLOj3EBSaDOsXpVI2SBVqB/alcbPcYmVsmlNta9KYs7jB5muKDtsau3Y90x4VULlfl uaXroMie+8ql1AewXQmCLbKO7e7DOVgSfnC01uAMriWxJ09cLADkq7ZGwqn7NiiH9w5e cYyA== X-Gm-Message-State: AOAM533697Z0zkcj9ymmaI146ksxSpfDQ8FJx3SlzEALEcCF4MUMIMPP GQLFoOQo5GX1Diw/Fqpic1d+MPyh7hg= X-Google-Smtp-Source: ABdhPJwA1FltyV8wseisPJjCuRclTVg/ZkGtl7aqy3CQsLDndYvfE7vPrf00pD5WYffVYr3Hb5QUeA== X-Received: by 2002:a63:7885:: with SMTP id t127mr6302928pgc.15.1611346280342; Fri, 22 Jan 2021 12:11:20 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:19 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 04/11] slirp: feature detection for smbd Date: Fri, 22 Jan 2021 12:11:06 -0800 Message-Id: <20210122201113.63788-5-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.215.169; envelope-from=osy86github@gmail.com; helo=mail-pg1-f169.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Thibault , Jason Wang , Joelle van Dyne Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Replace Windows specific macro with a more generic feature detection macro. Allows slirp smb feature to be disabled manually as well. Signed-off-by: Joelle van Dyne --- configure | 22 +++++++++++++++++++++- meson.build | 2 +- net/slirp.c | 16 ++++++++-------- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/configure b/configure index 951de427bb..92da27846e 100755 --- a/configure +++ b/configure @@ -464,6 +464,7 @@ fuse="auto" fuse_lseek="auto" malloc_trim="auto" +slirp_smbd="auto" # parse CC options second for opt do @@ -845,7 +846,18 @@ do fi done +# Check for smbd dupport : ${smbd=${SMBD-/usr/sbin/smbd}} +if test "$slirp_smbd" != "no" ; then + if test "$mingw32" = "yes" ; then + if test "$slirp_smbd" = "yes" ; then + error_exit "Host smbd not supported on this platform." + fi + slirp_smbd=no + else + slirp_smbd=yes + fi +fi # 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="disabled" ;; + --enable-slirp-smbd) slirp_smbd=yes + ;; + --disable-slirp-smbd) slirp_smbd=no + ;; *) echo "ERROR: unknown option $opt" echo "Try '$0 --help' for more information" @@ -1899,6 +1915,7 @@ disabled with --disable-FEATURE, default is enabled if 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=*) in slirp networking NOTE: The object files are built at the place where configure is launched EOF @@ -5595,7 +5612,10 @@ fi if test "$guest_agent" = "yes" ; then echo "CONFIG_GUEST_AGENT=y" >> $config_host_mak fi -echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak +if test "$slirp_smbd" = "yes" ; then + echo "CONFIG_SLIRP_SMBD=y" >> $config_host_mak + echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak +fi if test "$vde" = "yes" ; then echo "CONFIG_VDE=y" >> $config_host_mak echo "VDE_LIBS=$vde_libs" >> $config_host_mak diff --git a/meson.build b/meson.build index 6c3ee7f8ca..9577138d7f 100644 --- a/meson.build +++ b/meson.build @@ -2331,7 +2331,7 @@ summary_info += {'sphinx-build': sphinx_build.found()} summary_info += {'genisoimage': config_host['GENISOIMAGE']} # TODO: add back version summary_info += {'slirp support': slirp_opt == 'disabled' ? false : slirp_opt} -if slirp_opt != 'disabled' +if slirp_opt != 'disabled' and 'HAVE_HOST_SMBD' in config_host summary_info += {'smbd': config_host['CONFIG_SMBD_COMMAND']} endif summary_info += {'module support': config_host.has_key('CONFIG_MODULES')} 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" -#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 = static int slirp_hostfwd(SlirpState *s, const char *redir_str, Error **errp); static int slirp_guestfwd(SlirpState *s, const char *config_str, Error **errp); -#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 char *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 = { .s_addr = 0 }; #endif NetClientState *nc; @@ -477,7 +477,7 @@ static int net_slirp_init(NetClientState *peer, const char *model, return -1; } -#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 char *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) } -#ifndef _WIN32 +#if defined(CONFIG_SLIRP_SMBD) /* 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 *exported_dir, return 0; } -#endif /* !defined(_WIN32) */ +#endif /* defined(CONFIG_SLIRP_SMBD) */ static int guestfwd_can_read(void *opaque) { From patchwork Fri Jan 22 20:11:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joelle van Dyne X-Patchwork-Id: 12040389 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34442C433E0 for ; Fri, 22 Jan 2021 20:13:33 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D4A8D23AFC for ; Fri, 22 Jan 2021 20:13:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D4A8D23AFC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=getutm.app Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32oF-0006lG-Ue for qemu-devel@archiver.kernel.org; Fri, 22 Jan 2021 15:13:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mC-0004tl-FM for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:24 -0500 Received: from mail-pl1-f171.google.com ([209.85.214.171]:41204) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32mA-0004b3-My for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:24 -0500 Received: by mail-pl1-f171.google.com with SMTP id h15so1435813pli.8 for ; Fri, 22 Jan 2021 12:11:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O/ETCdKXydJNzx0rW+CikghF8e1mV5AV5I0qUIMj/2g=; b=QgREHlsctRHMzxIZro4TmfsvePHZpMhGpDuzTf/HIEooe2Y+cV65w6sMwL+XBWw0QP U4dJhKVAnV40fERchJ4lbPDO1K60ayBEyZudarQCPnREkmR1Rr3AqfEX1NbJd3HjFcGS xPO8dDtD0ypDjrMoalmc3ImU5qEUHWuQZPTeDj8Bae2SM/4+nCcey4rFmDNioglbDUpz Ifkyvr0xtVC1epYjwb4SF5RL2ybIlTqwGI4rtMK+fZL+5pmaq1DqZarQMV851cVMSgBN atxWZkhGn+QxY7Ja0KjDey0iBd9JzZ8Ej+neJ6dCcQyy+YfsAgHrbNB3OyMMFPmhoQED jFaQ== X-Gm-Message-State: AOAM533J6fSIjggwnY9m4Z2/LvLFTOF9aLO+rtrPJaOL90kzNfcv6qtl 1CsU52RGFhPYw1cvt8hj5O+HdCnya0Q= X-Google-Smtp-Source: ABdhPJzwr9pxoM2ImHWMN1X1mChTynUMRGscZA1C0Dg0YpkIThwBFnIhCHfatCRD0D95Soa6G8zq7g== X-Received: by 2002:a17:90a:6bc3:: with SMTP id w61mr7353832pjj.214.1611346281281; Fri, 22 Jan 2021 12:11:21 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:20 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 05/11] osdep: build with non-working system() function Date: Fri, 22 Jan 2021 12:11:07 -0800 Message-Id: <20210122201113.63788-6-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.214.171; envelope-from=osy86github@gmail.com; helo=mail-pl1-f171.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joelle van Dyne Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Build without error on hosts without a working system(). An assertion will trigger if system() is called. Signed-off-by: Joelle van Dyne --- configure | 19 +++++++++++++++++++ include/qemu/osdep.h | 11 +++++++++++ 2 files changed, 30 insertions(+) diff --git a/configure b/configure index 92da27846e..82ce28c660 100755 --- a/configure +++ b/configure @@ -5318,6 +5318,21 @@ else sys_disk_h=no fi +########################################## +# check for system() + +have_system_function=no +cat > $TMPC << EOF +#include +int main(void) { + return system(""); +} +EOF +if compile_prog "" "" ; then + have_system_function=yes +fi + + ########################################## # End of CC checks # After here, no more $cc or $ld runs @@ -6222,6 +6237,10 @@ if test "$secret_keyring" = "yes" ; then echo "CONFIG_SECRET_KEYRING=y" >> $config_host_mak fi +if test "$have_system_function" = "yes" ; then + echo "HAVE_SYSTEM_FUNCTION=y" >> $config_host_mak +fi + echo "ROMS=$roms" >> $config_host_mak echo "MAKE=$make" >> $config_host_mak echo "PYTHON=$python" >> $config_host_mak diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index a434382c58..73346c4349 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -682,4 +682,15 @@ char *qemu_get_host_name(Error **errp); */ size_t qemu_get_host_physmem(void); +/** + * Platforms which do not support system() gets an assertion failure. + */ +#ifndef HAVE_SYSTEM_FUNCTION +#define system platform_does_not_support_system +static inline int platform_does_not_support_system(const char *command) +{ + assert(0); +} +#endif /* !HAVE_SYSTEM_FUNCTION */ + #endif From patchwork Fri Jan 22 20:11:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joelle van Dyne X-Patchwork-Id: 12040405 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0527C433DB for ; Fri, 22 Jan 2021 20:19:59 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7CD2623AFC for ; Fri, 22 Jan 2021 20:19:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CD2623AFC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=getutm.app Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32uU-0007Wp-C8 for qemu-devel@archiver.kernel.org; Fri, 22 Jan 2021 15:19:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mD-0004ud-1l for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:25 -0500 Received: from mail-pj1-f47.google.com ([209.85.216.47]:34694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32mB-0004bB-HW for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:24 -0500 Received: by mail-pj1-f47.google.com with SMTP id my11so6857081pjb.1 for ; Fri, 22 Jan 2021 12:11:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZTqB4ZeZsgg10vvjHd/dHMK/cst2I6BNOY0xcUjrQ/0=; b=tHyQ7TkYHSPynZ31t+9yJr7FOe5W16FuItLqpBqL/+T6CHcSEYY8hEBN6b9g/nbBP6 3Jd+e+k+txd/RAsJ2ASboSeebQIMiEa2V2fC+fAjTUYoJgN7jzVQKy9JLgJ4YO/kyArH 64ySiSr6ag8+ENX52pbvv3V/1+7P4v+t51KawaaOkEPDI8ViVJOTAnC0PQJ0QaJKgaeJ W06s1sUD1kLA7PdkoFESvQWXe+ritCB9v+5VsOpoLRX1XGEXQXqUifFFZX7asU/zmaTo 2yXYN7PGDxtAZ8VBmQc30N1aFSDdDXI1lbrM8K5OtAKuL+M13D0ZBw8UiMTdZ5aGkpT6 MQEA== X-Gm-Message-State: AOAM530bbbhf+Ysw0DSE4tfAWw+OhdIfOiPLv3RByq54eeGN9usExYcT kkyh4slE3b9L/tLf90aYZIayMpO1ds4= X-Google-Smtp-Source: ABdhPJzIkz6LJLGXd4szxF7PRQbC5oquLFv7yLgR8H1l7kHspeLWU9Al7V5SRO4XWHJf8aHhmw30+w== X-Received: by 2002:a17:90a:b296:: with SMTP id c22mr7621321pjr.142.1611346282050; Fri, 22 Jan 2021 12:11:22 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:21 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 06/11] darwin: remove redundant dependency declaration Date: Fri, 22 Jan 2021 12:11:08 -0800 Message-Id: <20210122201113.63788-7-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.47; envelope-from=osy86github@gmail.com; helo=mail-pj1-f47.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joelle van Dyne Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Meson will find CoreFoundation, IOKit, and Cocoa as needed. Signed-off-by: Joelle van Dyne Reviewed-by: Peter Maydell --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index 82ce28c660..4c485dd962 100755 --- a/configure +++ b/configure @@ -781,7 +781,6 @@ Darwin) fi audio_drv_list="coreaudio try-sdl" audio_possible_drivers="coreaudio sdl" - QEMU_LDFLAGS="-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="-DOS_OBJECT_USE_OBJC=0 $QEMU_CFLAGS" From patchwork Fri Jan 22 20:11:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joelle van Dyne X-Patchwork-Id: 12040403 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C393C433DB for ; Fri, 22 Jan 2021 20:18:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 157C923A84 for ; Fri, 22 Jan 2021 20:18:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 157C923A84 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=getutm.app Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32sy-0005gi-7N for qemu-devel@archiver.kernel.org; Fri, 22 Jan 2021 15:18:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mE-0004wH-2V for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:26 -0500 Received: from mail-pj1-f46.google.com ([209.85.216.46]:36109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32mC-0004cT-Hj for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:25 -0500 Received: by mail-pj1-f46.google.com with SMTP id e6so4609260pjj.1 for ; Fri, 22 Jan 2021 12:11:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kWegMfg0i0hDDWGoVKdg+A4xiQ6lvBugKe41iD56/ps=; b=PI50yaKP199bbgUxUXnkvNxEvBNOKbf3pnTG9Dk5D9J0khCs6SiDT8zklIv2WSmVnW Unsv1FnkmPdh0Ru+PtfHNMkZg/qowgLgB9EAA1aZO1Oir4u5Vx05SjAT+Yc7EUbQYgwS 6CnbcWKa4H0RFKAaUZ0bPQ3PCxW1bah+Mczr8Zcxlcw3cZSejLckqsITmuQtpe6s9rfp DtZ2FJs3QQhzoko4UkVILWx3f3dL1/jIhG+myMhPJmCrEcvPkyae9QCHpnJoaiIfKK5a iya8V4yfhCP6GyAmXz2Otm6aeiggekaNqMGEZxqL0VrenQIFJN6Qy7LNMOjpFJZoWrAV Y8Fw== X-Gm-Message-State: AOAM531tDJgWzBuRChUMGn0SYYSa4b6OpmWa4Y7B7zANXOOUDUMxPZIj bnMlm5Y0YqNUUPrs90JpqDA0JNwE+xg= X-Google-Smtp-Source: ABdhPJxj2YQPmDPrJtNRcu9zsj4pAkNI8jloVc0VFwYNuz9rz1rh0/NIwcYWHLVImpEu6cUx63gpLA== X-Received: by 2002:a17:90a:b28f:: with SMTP id c15mr7110896pjr.79.1611346282949; Fri, 22 Jan 2021 12:11:22 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:22 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 07/11] darwin: fix cross-compiling for Darwin Date: Fri, 22 Jan 2021 12:11:09 -0800 Message-Id: <20210122201113.63788-8-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.46; envelope-from=osy86github@gmail.com; helo=mail-pj1-f46.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joelle van Dyne Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Add objc to the Meson cross file as well as detection of Darwin. Signed-off-by: Joelle van Dyne Reviewed-by: Peter Maydell --- configure | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure b/configure index 4c485dd962..7e5ec7a5a1 100755 --- a/configure +++ b/configure @@ -6443,6 +6443,7 @@ echo "cpp_link_args = [${LDFLAGS:+$(meson_quote $LDFLAGS)}]" >> $cross echo "[binaries]" >> $cross echo "c = [$(meson_quote $cc)]" >> $cross test -n "$cxx" && echo "cpp = [$(meson_quote $cxx)]" >> $cross +test -n "$objcc" && echo "objc = [$(meson_quote $objcc)]" >> $cross echo "ar = [$(meson_quote $ar)]" >> $cross echo "nm = [$(meson_quote $nm)]" >> $cross echo "pkgconfig = [$(meson_quote $pkg_config_exe)]" >> $cross @@ -6461,6 +6462,9 @@ if test "$cross_compile" = "yes"; then if test "$linux" = "yes" ; then echo "system = 'linux'" >> $cross fi + if test "$darwin" = "yes" ; then + echo "system = 'darwin'" >> $cross + fi case "$ARCH" in i386|x86_64) echo "cpu_family = 'x86'" >> $cross From patchwork Fri Jan 22 20:11:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joelle van Dyne X-Patchwork-Id: 12040409 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0502C433E0 for ; Fri, 22 Jan 2021 20:21:34 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3538323B00 for ; Fri, 22 Jan 2021 20:21:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3538323B00 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=getutm.app Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32w1-0001WK-5x for qemu-devel@archiver.kernel.org; Fri, 22 Jan 2021 15:21:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mF-0004yy-11 for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:27 -0500 Received: from mail-pj1-f48.google.com ([209.85.216.48]:55245) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32mD-0004cn-Ew for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:26 -0500 Received: by mail-pj1-f48.google.com with SMTP id cq1so4522506pjb.4 for ; Fri, 22 Jan 2021 12:11:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yEwtq74+KSEBVLDQzC0rm5JCviDvE1WzfYDdBlTdUe0=; b=fqYj4keDSBHmRkTlgy8N4k8bT6t+y1jBPIr2crTH9CUXK3epBQgbfa9oAk/joVlAVY S9zE8UdhuNp+JS5BvACOO7cbD2DWDn7k5/NJ1HeuD+NzjUAv4E3yexuLf0nJYBGb1BV/ x6J3MZ4tEe4Cx/oXJyNFIXz+tmPhwohzivLD6QKdwxO8g+1RlAFziR+WN1Mmob0bqHEr 6SqW8AjVwB4cNdLdlK9DWn+yy5op8ojZhCCw8H5UqpTjdagiroddoDD3ZOrXVh82rbVV HtoHQVU2P8dLkTedX2BaNox5nHVjuGXfNUaXEW0khE1KU1ci2RnCxZfH58vxi1EkjHSi FTNQ== X-Gm-Message-State: AOAM530ut5Y/v07yMLw2ulDpBqvHZSJy5cZflZh3MsQAskxhWTThB8IJ CKEVxhiGdWrdbN2Hfo7KUWTEEKygMcA= X-Google-Smtp-Source: ABdhPJyQxaHMRlPIqGQ/dDIZg5hnQlu2bqTpwxwHG2rCM2ZyVPbXXLDSI7Oi9lm9lGwOpEdnqX7hBg== X-Received: by 2002:a17:90b:3892:: with SMTP id mu18mr316112pjb.143.1611346283908; Fri, 22 Jan 2021 12:11:23 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:23 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 08/11] configure: cross compile should use x86_64 cpu_family Date: Fri, 22 Jan 2021 12:11:10 -0800 Message-Id: <20210122201113.63788-9-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.48; envelope-from=osy86github@gmail.com; helo=mail-pj1-f48.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Joelle van Dyne Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Joelle van Dyne --- configure | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 7e5ec7a5a1..f487be3cfe 100755 --- a/configure +++ b/configure @@ -6466,9 +6466,12 @@ if test "$cross_compile" = "yes"; then echo "system = 'darwin'" >> $cross fi case "$ARCH" in - i386|x86_64) + i386) echo "cpu_family = 'x86'" >> $cross ;; + x86_64) + echo "cpu_family = 'x86_64'" >> $cross + ;; ppc64le) echo "cpu_family = 'ppc64'" >> $cross ;; From patchwork Fri Jan 22 20:11:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joelle van Dyne X-Patchwork-Id: 12040399 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4067C433DB for ; Fri, 22 Jan 2021 20:16:22 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 43C3D23AFC for ; Fri, 22 Jan 2021 20:16:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 43C3D23AFC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=getutm.app Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32qz-00034D-AR for qemu-devel@archiver.kernel.org; Fri, 22 Jan 2021 15:16:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mG-000511-Bi; Fri, 22 Jan 2021 15:11:28 -0500 Received: from mail-pf1-f182.google.com ([209.85.210.182]:40943) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32mE-0004cv-QX; Fri, 22 Jan 2021 15:11:28 -0500 Received: by mail-pf1-f182.google.com with SMTP id i63so4549951pfg.7; Fri, 22 Jan 2021 12:11:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B3bgTvyMVaMNKOvbfkCeAjPnu2P94ObpQ3L4Z8LkPIk=; b=Y0J4RsFAifHC2lIaWdIBucyYGnMM5ATHnp9xlJsOMyzXElk8htBtXtGc8dPzIYQbBJ iTyma/aliTf24pBt2CWPlvPUedIumRZrUGcy8PTk2rDN2iZXGUtnwKg7mIF68KnJ+eg9 YDGxJsbnVA+7R5cog1uiLJ7EpqLpbXcvj8cqT4HqvDWxJmoQcmkQHROrIb6McWfiAef8 /UIRl4SixaeYA75z4NXxYfa15LS1bfyljmN7paVydfInt8abw7YWBiZMMc1EeYlCotNd 7/CV8Yq0RntoQXaqxiuFQswz12wFtaVMxsGSDBWVTLsEzgh633Qzpz14BqZEZYXJS+fg tUgg== X-Gm-Message-State: AOAM533TSvR28oJ51wyvCZ7HvTfEoxptVQaP09Qu/zrJED4WDZ3LUIEZ r0H63nhcN2V7Qz3tjGpJwAICgoyZd0U= X-Google-Smtp-Source: ABdhPJxBrXNtWSd3gd/yJoTymIBbNHd6W04dZW2VpE6niu6fkfTktaNFOPMSuEyTG/zGiyXI8K+QGg== X-Received: by 2002:a63:749:: with SMTP id 70mr6469704pgh.182.1611346284972; Fri, 22 Jan 2021 12:11:24 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:24 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 09/11] block: check availablity for preadv/pwritev on mac Date: Fri, 22 Jan 2021 12:11:11 -0800 Message-Id: <20210122201113.63788-10-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.210.182; envelope-from=osy86github@gmail.com; helo=mail-pf1-f182.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Joelle van Dyne , "open list:raw" , Max Reitz Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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 static bool preadv_present = true; +static bool preadv_checked; 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 = true; + } else { + preadv_present = false; + return -ENOSYS; + } + } + /* Now we suppress the availability warning since we use the cached check */ +#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 } 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 = true; + } else { + preadv_present = false; + return -ENOSYS; + } + } + /* Now we suppress the availability warning since we use the cached check */ +#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 } #else From patchwork Fri Jan 22 20:11:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joelle van Dyne X-Patchwork-Id: 12040407 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0AB26C433DB for ; Fri, 22 Jan 2021 20:20:29 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9DFF923AFC for ; Fri, 22 Jan 2021 20:20:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DFF923AFC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=getutm.app Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32ux-0007mJ-JH for qemu-devel@archiver.kernel.org; Fri, 22 Jan 2021 15:20:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mH-000529-2z for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:29 -0500 Received: from mail-pj1-f51.google.com ([209.85.216.51]:38682) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32mF-0004dN-HB for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:28 -0500 Received: by mail-pj1-f51.google.com with SMTP id x20so4597303pjh.3 for ; Fri, 22 Jan 2021 12:11:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cjf3zkEzdC7Sji+ngGUJT+yhUPJZ6w/w5ucvRluKxqY=; b=P8TkNNVmRno25WfJBJFbT6Ux9PDTKBuxIj3wLGssyhb/8MJAu/1QtFPNg6BZifTglz gRsYr+aVRmHZM4yHkFQ6Jieqk8kFTV5sJh4uJA3RyQXM87V+DyYERh9XPe8C+VhGMZ0i ew8se/KgV/FJFnxmCcWJN4i8BOC6QGaPUl/aGZCq8qW+b7BNBRCzS7TSsjkzrYtTv9CB rzOE4ZCxPceTCxAkB7KmQgLxKadwVbdkBTfJocYNOdcJopWFRVCsUFsZUk+2y6oe/OUj J4S7GT+TEaAVEOAwUfO5NnwMFV2e17cUyYbhfO/FHwB/ibMdqpEc4ABhfw3l1XXkvSNA Rsrw== X-Gm-Message-State: AOAM533nJDFF/YnhPsm8raGWvhg+JzNHknRpuY35D/KZ8PWFSwOEf3YB g8eBIhYZl5JrAPC5eTC4/T8sq1llXrc= X-Google-Smtp-Source: ABdhPJzFcl8V6+Owu0LGAT2J5bXXiioKXD8FkUDb0qukZ3F1y1jNtIQAnqSY6bK6AvOkKF+RlqMNQA== X-Received: by 2002:a17:90a:1182:: with SMTP id e2mr7157800pja.152.1611346285901; Fri, 22 Jan 2021 12:11:25 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:25 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 10/11] darwin: detect CoreAudio for build Date: Fri, 22 Jan 2021 12:11:12 -0800 Message-Id: <20210122201113.63788-11-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.51; envelope-from=osy86github@gmail.com; helo=mail-pj1-f51.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joelle van Dyne Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On iOS there is no CoreAudio, so we should not assume Darwin always has it. Signed-off-by: Joelle van Dyne --- configure | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/configure b/configure index f487be3cfe..fb671258e6 100755 --- a/configure +++ b/configure @@ -319,6 +319,7 @@ fdt="auto" netmap="no" sdl="auto" sdl_image="auto" +coreaudio="auto" virtiofsd="auto" virtfs="auto" libudev="auto" @@ -779,7 +780,7 @@ Darwin) QEMU_CFLAGS="-arch x86_64 $QEMU_CFLAGS" QEMU_LDFLAGS="-arch x86_64 $QEMU_LDFLAGS" fi - audio_drv_list="coreaudio try-sdl" + audio_drv_list="try-coreaudio try-sdl" audio_possible_drivers="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 +########################################## +# detect CoreAudio +if test "$coreaudio" != "no" ; then + coreaudio_libs="-framework CoreAudio" + cat > $TMPC << EOF +#include +int main(void) +{ + return (int)AudioGetCurrentHostTime(); +} +EOF + if compile_prog "" "$coreaudio_libs" ; then + coreaudio=yes + else + coreaudio=no + fi +fi + ########################################## # Sound support libraries probe @@ -3218,8 +3237,20 @@ for drv in $audio_drv_list; do fi ;; - coreaudio) + coreaudio | try-coreaudio) + if test "$coreaudio" = "no"; then + if test "$drv" = "try-coreaudio"; then + audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-coreaudio//') + else + error_exit "$drv check failed" \ + "Make sure to have the $drv is available." + fi + else coreaudio_libs="-framework CoreAudio" + if test "$drv" = "try-coreaudio"; then + audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-coreaudio/coreaudio/') + fi + fi ;; dsound) From patchwork Fri Jan 22 20:11:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joelle van Dyne X-Patchwork-Id: 12040397 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C98FEC433DB for ; Fri, 22 Jan 2021 20:15:42 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4A10F23AFC for ; Fri, 22 Jan 2021 20:15:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A10F23AFC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=getutm.app Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l32qL-00028n-1A for qemu-devel@archiver.kernel.org; Fri, 22 Jan 2021 15:15:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l32mI-00053s-1s for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:30 -0500 Received: from mail-pf1-f177.google.com ([209.85.210.177]:45876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l32mG-0004eM-B7 for qemu-devel@nongnu.org; Fri, 22 Jan 2021 15:11:29 -0500 Received: by mail-pf1-f177.google.com with SMTP id j12so4537555pfj.12 for ; Fri, 22 Jan 2021 12:11:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bH12qTm3+UAqqzcs6td+zXs9uTHKta6X9jVQRa8WiS8=; b=Db84YV5NdlHGTao1Gi1WzhDBGRcbroezfYJe/iF7r7PugpfKF35D3u3/HwceVaBY0/ SaF1A71P7smxX1XPAGmSuhghSBQ8jZBlE5p7YbwrGwlX3EdTcmRacpSmguiAgy9C2crT i97KWMd9p0jjLXFYHQlriZZkVxyve8HJDn4dCUFxIxDzQWrqbI5tVIO+8i+5iUz8i7Mk eQB2U33rGdTMKtUkFvkyUTspuT9QijgHlmJNrMjs3JqG2wggrU37YL+ZmJ2MSY0rZcwy MsSNaB02BKQ6QvyxWGYFgYFSxCaPUTsvlczKv87WABk1SLmc2/sPcG16cOMMambnJZ69 sJVw== X-Gm-Message-State: AOAM531FXuCSPQGJrUc+YOjcpf5i3xUOAp3BTX/JinY1qIHphBPUzZgI fLekwZVFK9cMwrIePKfH7iiByZRgArE= X-Google-Smtp-Source: ABdhPJzlJ8++8mqDEgPOYVefa8aKiKgiZ3y4NXp9ujXvGcMr3Wpb/4qx2RN2HRRheadfc3b531Sr8Q== X-Received: by 2002:a65:47c7:: with SMTP id f7mr6188459pgs.305.1611346286803; Fri, 22 Jan 2021 12:11:26 -0800 (PST) Received: from localhost.localdomain ([73.93.152.129]) by smtp.gmail.com with ESMTPSA id u12sm8741839pgi.91.2021.01.22.12.11.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 12:11:26 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v7 11/11] darwin: remove 64-bit build detection on 32-bit OS Date: Fri, 22 Jan 2021 12:11:13 -0800 Message-Id: <20210122201113.63788-12-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210122201113.63788-1-j@getutm.app> References: <20210122201113.63788-1-j@getutm.app> MIME-Version: 1.0 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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=* to manually set the host CPU and therefore this workaround should be removed. Signed-off-by: Joelle van Dyne Reviewed-by: Peter Maydell --- configure | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/configure b/configure index fb671258e6..c7fbda22b9 100755 --- a/configure +++ b/configure @@ -626,13 +626,6 @@ fi # the correct CPU with the --cpu option. case $targetos in Darwin) - # on Leopard most of the system is 32-bit, so we have to ask the kernel if we can - # run 64-bit userspace code. - # If the user didn't specify a CPU explicitly and the kernel says this is - # 64 bit hw, then assume x86_64. Otherwise fall through to the usual detection code. - if test -z "$cpu" && test "$(sysctl -n hw.optional.x86_64)" = "1"; then - cpu="x86_64" - fi HOST_DSOSUF=".dylib" ;; SunOS) @@ -776,10 +769,6 @@ OpenBSD) Darwin) bsd="yes" darwin="yes" - if [ "$cpu" = "x86_64" ] ; then - QEMU_CFLAGS="-arch x86_64 $QEMU_CFLAGS" - QEMU_LDFLAGS="-arch x86_64 $QEMU_LDFLAGS" - fi audio_drv_list="try-coreaudio try-sdl" audio_possible_drivers="coreaudio sdl" # Disable attempts to use ObjectiveC features in os/object.h since they