From patchwork Tue Jun 6 14:30:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791237 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Zn8rqmNj; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCbM3Q29z20X0 for ; Wed, 7 Jun 2023 00:31:43 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xia-00052b-Mv; Tue, 06 Jun 2023 10:31:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6XiY-000513-Gt for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6XiW-0001DD-Rd for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BHfLiXVp97JLQcvOUWVEcSgCuNPPISjI6L4XOmlDQjQ=; b=Zn8rqmNjcZ3ELOys+vfm5oFgt6RY+9y36oKr6f+yB/sY36IsGE5URJleepL2X0tjUGm4oH w/8I+FyA0O8kPxiSoauDf1mLlOhAX/Bcv6kJHKE2APSYn3ecH3q9tvxhJQQUOmmSgiYXjq mM8IEd5dMltCS+NQHplXrEzS4GUUhRQ= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-440-QtndTbh8PpG5SZHeY6K56g-1; Tue, 06 Jun 2023 10:31:21 -0400 X-MC-Unique: QtndTbh8PpG5SZHeY6K56g-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-94a356c74e0so453561466b.2 for ; Tue, 06 Jun 2023 07:31:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061879; x=1688653879; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BHfLiXVp97JLQcvOUWVEcSgCuNPPISjI6L4XOmlDQjQ=; b=HSKn5IgF83iHKfWo6uDRHvUAYH63iu85tmCWf3lbD0i03bWarxfM3blNL5IThy97GK tFYMKLk6/2vF3vT75DFZFhhQaq2aWE94wJ9+fjxWX6KlC+Z2mH59NNKbT26PkH3TpB+o Bx3awV9zpCPJlO+4DC9HB8CCUIrqrW4XkbmdHZy1wne7N5BMRW8JXkAs7P1LgHz/Bafl Me+2KtzLuV2wpGKTNRh1cpEwlH4j8xgNWEEixpFui7C52jyGtdVXAwj89/wASNiYTmOl jwmoIUct3FOkT5gWuGTG/CF3Pw+m1YKkk26uN1rHEGskr8zSQ9ERr9jDUSMmv4Ugvzr0 NlYg== X-Gm-Message-State: AC+VfDwHwOCCkT1FNX+EwCkZu+kAZ+fE0UUl228uUrDx1P2i6PmfinWJ Suo1/fkEKpEnYLNovZn3v8qWddzMUpfJ889dx25BdhNH7yZYg8k+JI0iqvI9McuGgTaYfg3pnQS c5MQ22HKUR2ad19qzZSFEKNWD8Dm8iAV766iza5vxPbqRHemgZ5Zk6CLzNp8Oq6E2vCOJRBZvHY w= X-Received: by 2002:a17:907:6ea1:b0:94f:73db:b390 with SMTP id sh33-20020a1709076ea100b0094f73dbb390mr2863289ejc.65.1686061879477; Tue, 06 Jun 2023 07:31:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Rh7l037PNkCSqDaQORqaRs6Xg4pPbnDDcfBm1YcG3nXbRoXNAWT904BFAzDVl2O1DUQo1QA== X-Received: by 2002:a17:907:6ea1:b0:94f:73db:b390 with SMTP id sh33-20020a1709076ea100b0094f73dbb390mr2863252ejc.65.1686061878983; Tue, 06 Jun 2023 07:31:18 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id o16-20020a17090611d000b00974630b1e85sm5517967eja.155.2023.06.06.07.31.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:18 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Michal Privoznik Subject: [PULL 01/21] meson: Avoid implicit declaration of absent functions Date: Tue, 6 Jun 2023 16:30:56 +0200 Message-Id: <20230606143116.685644-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Michal Privoznik While detecting a presence of a function via 'cc.links()' gives desired result (i.e. detects whether function is present), it also produces a warning on systems where the function is not present (into meson-log.txt), e.g.: qemu.git/build/meson-private/tmph74x3p38/testfile.c:2:34: \ warning: implicit declaration of function 'malloc_trim' [-Wimplicit-function-declaration] And some distributions (e.g. Gentoo) parse the meson log and consider these erroneous because it can lead to feature misdetection (see [1]). We can check whether given function exists via 'cc.has_function()' or whether STATX_* macros exist via 'cc.has_header_symbol()'. 1: https://wiki.gentoo.org/wiki/Modern_C_porting Resolves: https://bugs.gentoo.org/898810 Signed-off-by: Michal Privoznik Message-Id: <8e02776d18595a1c575c90a189ff65f1785f76ca.1685442612.git.mprivozn@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/meson.build b/meson.build index a61d3e9b06a..969a84f2a44 100644 --- a/meson.build +++ b/meson.build @@ -1797,8 +1797,7 @@ malloc = [] if get_option('malloc') == 'system' has_malloc_trim = \ get_option('malloc_trim').allowed() and \ - cc.links('''#include - int main(void) { malloc_trim(0); return 0; }''') + cc.has_function('malloc_trim', prefix: '#include ') else has_malloc_trim = false malloc = cc.find_library(get_option('malloc'), required: true) @@ -1811,34 +1810,19 @@ if not has_malloc_trim and get_option('malloc_trim').enabled() endif endif -# Check whether the glibc provides statx() - gnu_source_prefix = ''' #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif ''' -statx_test = gnu_source_prefix + ''' - #include - int main(void) { - struct statx statxbuf; - statx(0, "", 0, STATX_BASIC_STATS, &statxbuf); - return 0; - }''' -has_statx = cc.links(statx_test) +# Check whether the glibc provides STATX_BASIC_STATS + +has_statx = cc.has_header_symbol('sys/stat.h', 'STATX_BASIC_STATS', prefix: gnu_source_prefix) # Check whether statx() provides mount ID information -statx_mnt_id_test = gnu_source_prefix + ''' - #include - int main(void) { - struct statx statxbuf; - statx(0, "", 0, STATX_BASIC_STATS | STATX_MNT_ID, &statxbuf); - return statxbuf.stx_mnt_id; - }''' - -has_statx_mnt_id = cc.links(statx_mnt_id_test) +has_statx_mnt_id = cc.has_header_symbol('sys/stat.h', 'STATX_MNT_ID', prefix: gnu_source_prefix) have_vhost_user_blk_server = get_option('vhost_user_blk_server') \ .require(targetos == 'linux', From patchwork Tue Jun 6 14:30:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791239 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=K53HZ48T; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCbd3sZsz20Ty for ; Wed, 7 Jun 2023 00:31:57 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xic-00052e-Bz; Tue, 06 Jun 2023 10:31:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xia-000520-3p for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6XiY-0001Dj-3y for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jH0KcXHYqMwMAiwsZIxHsgDaYtU76N2Q6FR8CaYtlyQ=; b=K53HZ48T5VDWvfd3G5p46nHl2Hg9NqdffCROAXYRG/shNFbGoJlOEVHGNT4aUqPlqhAxXz sRdgvqrJnd74HCtAVWwxopT9vBwVN4xoF2WQ4Q+86/eE72988ueKhFOUG/9wgtlqyG8khr 3bQctw+CuJtUi6zGGhPWG2nrKMXuU1g= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-515-XCDRK_3XNRm1Uwb8ac4B0w-1; Tue, 06 Jun 2023 10:31:23 -0400 X-MC-Unique: XCDRK_3XNRm1Uwb8ac4B0w-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-94a341efd9aso521883466b.0 for ; Tue, 06 Jun 2023 07:31:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061881; x=1688653881; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jH0KcXHYqMwMAiwsZIxHsgDaYtU76N2Q6FR8CaYtlyQ=; b=R2cOt5u0KKDPnyw47T1Ro9QgAf69C0SWoQIs+uGgLy/DOxzaZywkE/vtOrp57feL5D 2cWl+gjlSVOnysS6AKtxf6guJPC9YTzcriKMj4OCi5ph8yq3Uci1bPkTvQTz5EF/SJUO FxC456PyeGHCMYrpNnLPj/7RC/xPLw3cdmNkaCssZOSR3GQNXKav/VNDKupH3MoPJ87l SWNIJhzguvzRk0g9VRPP0PaJ5uDTeuFaap6FYi+P/Qxtu19QIAM7c5pNwQ1mppnEawAI dFqf+rHzt0H75uVaQt9GHMWi3X2bRnGtBWOO0fWOAsVllAK7/RPSlxccvTU7fsA43r7h nK4w== X-Gm-Message-State: AC+VfDy1II0I3gwBgAEB0wRbdXwmdQl3NyjFgMlhNzLhIIDM07A1wzkQ Qeqr+ZzX5clXYv6cTwEAvswgGXt+sQ+hlscR63vy+RvXUWMVy39Xz2Ig3swqpcNtbHKv2A/C/wj pM07sG7QYeV07KJiof5r54iiXxzY9eCdphB/GJDFaYZmIrbMGPg+CQWXbykcorx7sCLGtZ1Hd9y g= X-Received: by 2002:a17:907:2ce5:b0:973:cb21:8479 with SMTP id hz5-20020a1709072ce500b00973cb218479mr2806953ejc.70.1686061881101; Tue, 06 Jun 2023 07:31:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5paUGpeGlswCqVtb/7yCLIP/UWUXR+1n4k87WrzHGz90m9I+QvlR/xc2KWt61AsmIoVOhZWQ== X-Received: by 2002:a17:907:2ce5:b0:973:cb21:8479 with SMTP id hz5-20020a1709072ce500b00973cb218479mr2806930ejc.70.1686061880721; Tue, 06 Jun 2023 07:31:20 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id v13-20020a17090606cd00b00977da0f14ffsm2751583ejb.171.2023.06.06.07.31.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:20 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 02/21] atomics: eliminate mb_read/mb_set Date: Tue, 6 Jun 2023 16:30:57 +0200 Message-Id: <20230606143116.685644-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org qatomic_mb_read and qatomic_mb_set were the very first atomic primitives introduced for QEMU; their semantics are unclear and they provide a false sense of safety. The last use of qatomic_mb_read() has been removed, so delete it. qatomic_mb_set() instead can survive as an optimized qatomic_set()+smp_mb(), similar to Linux's smp_store_mb(), but rename it to qatomic_set_mb() to match the order of the two operations. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- accel/tcg/cpu-exec.c | 2 +- accel/tcg/tcg-accel-ops-mttcg.c | 2 +- accel/tcg/tcg-accel-ops-rr.c | 4 ++-- docs/devel/atomics.rst | 27 ++++----------------------- include/qemu/atomic.h | 17 +++++------------ monitor/qmp.c | 2 +- softmmu/cpus.c | 2 +- softmmu/physmem.c | 2 +- target/arm/hvf/hvf.c | 2 +- tests/unit/test-aio-multithread.c | 2 +- util/qemu-coroutine-lock.c | 4 ++-- 11 files changed, 20 insertions(+), 46 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 1cf4f1fa227..42086525d7a 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -774,7 +774,7 @@ static inline bool cpu_handle_interrupt(CPUState *cpu, * Ensure zeroing happens before reading cpu->exit_request or * cpu->interrupt_request (see also smp_wmb in cpu_exit()) */ - qatomic_mb_set(&cpu_neg(cpu)->icount_decr.u16.high, 0); + qatomic_set_mb(&cpu_neg(cpu)->icount_decr.u16.high, 0); if (unlikely(qatomic_read(&cpu->interrupt_request))) { int interrupt_request; diff --git a/accel/tcg/tcg-accel-ops-mttcg.c b/accel/tcg/tcg-accel-ops-mttcg.c index 5d72c9b1bd3..b320ff00373 100644 --- a/accel/tcg/tcg-accel-ops-mttcg.c +++ b/accel/tcg/tcg-accel-ops-mttcg.c @@ -119,7 +119,7 @@ static void *mttcg_cpu_thread_fn(void *arg) } } - qatomic_mb_set(&cpu->exit_request, 0); + qatomic_set_mb(&cpu->exit_request, 0); qemu_wait_io_event(cpu); } while (!cpu->unplug || cpu_can_run(cpu)); diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c index 70b9b89073c..23e4d0f4527 100644 --- a/accel/tcg/tcg-accel-ops-rr.c +++ b/accel/tcg/tcg-accel-ops-rr.c @@ -244,7 +244,7 @@ static void *rr_cpu_thread_fn(void *arg) while (cpu && cpu_work_list_empty(cpu) && !cpu->exit_request) { /* Store rr_current_cpu before evaluating cpu_can_run(). */ - qatomic_mb_set(&rr_current_cpu, cpu); + qatomic_set_mb(&rr_current_cpu, cpu); current_cpu = cpu; @@ -287,7 +287,7 @@ static void *rr_cpu_thread_fn(void *arg) qatomic_set(&rr_current_cpu, NULL); if (cpu && cpu->exit_request) { - qatomic_mb_set(&cpu->exit_request, 0); + qatomic_set_mb(&cpu->exit_request, 0); } if (icount_enabled() && all_cpu_threads_idle()) { diff --git a/docs/devel/atomics.rst b/docs/devel/atomics.rst index 248076375bf..ff9b5ee30c8 100644 --- a/docs/devel/atomics.rst +++ b/docs/devel/atomics.rst @@ -102,28 +102,10 @@ Similar operations return the new value of ``*ptr``:: typeof(*ptr) qatomic_or_fetch(ptr, val) typeof(*ptr) qatomic_xor_fetch(ptr, val) -``qemu/atomic.h`` also provides loads and stores that cannot be reordered -with each other:: +``qemu/atomic.h`` also provides an optimized shortcut for +``qatomic_set`` followed by ``smp_mb``:: - typeof(*ptr) qatomic_mb_read(ptr) - void qatomic_mb_set(ptr, val) - -However these do not provide sequential consistency and, in particular, -they do not participate in the total ordering enforced by -sequentially-consistent operations. For this reason they are deprecated. -They should instead be replaced with any of the following (ordered from -easiest to hardest): - -- accesses inside a mutex or spinlock - -- lightweight synchronization primitives such as ``QemuEvent`` - -- RCU operations (``qatomic_rcu_read``, ``qatomic_rcu_set``) when publishing - or accessing a new version of a data structure - -- other atomic accesses: ``qatomic_read`` and ``qatomic_load_acquire`` for - loads, ``qatomic_set`` and ``qatomic_store_release`` for stores, ``smp_mb`` - to forbid reordering subsequent loads before a store. + void qatomic_set_mb(ptr, val) Weak atomic access and manual memory barriers @@ -523,8 +505,7 @@ and memory barriers, and the equivalents in QEMU: | :: | | | | a = qatomic_read(&x); | - | qatomic_set(&x, a + 2); | - | smp_mb(); | + | qatomic_set_mb(&x, a + 2); | | b = qatomic_read(&y); | +--------------------------------+ diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h index f85834ee8b2..d95612f7a08 100644 --- a/include/qemu/atomic.h +++ b/include/qemu/atomic.h @@ -259,24 +259,17 @@ # define smp_mb__after_rmw() smp_mb() #endif -/* qatomic_mb_read/set semantics map Java volatile variables. They are - * less expensive on some platforms (notably POWER) than fully - * sequentially consistent operations. - * - * As long as they are used as paired operations they are safe to - * use. See docs/devel/atomics.rst for more discussion. +/* + * On some architectures, qatomic_set_mb is more efficient than a store + * plus a fence. */ -#define qatomic_mb_read(ptr) \ - qatomic_load_acquire(ptr) - #if !defined(QEMU_SANITIZE_THREAD) && \ (defined(__i386__) || defined(__x86_64__) || defined(__s390x__)) -/* This is more efficient than a store plus a fence. */ -# define qatomic_mb_set(ptr, i) \ +# define qatomic_set_mb(ptr, i) \ ({ (void)qatomic_xchg(ptr, i); smp_mb__after_rmw(); }) #else -# define qatomic_mb_set(ptr, i) \ +# define qatomic_set_mb(ptr, i) \ ({ qatomic_store_release(ptr, i); smp_mb(); }) #endif diff --git a/monitor/qmp.c b/monitor/qmp.c index c8e0156974d..6eee450fe40 100644 --- a/monitor/qmp.c +++ b/monitor/qmp.c @@ -246,7 +246,7 @@ static QMPRequest *monitor_qmp_dispatcher_pop_any(void) * * Clear qmp_dispatcher_co_busy before reading request. */ - qatomic_mb_set(&qmp_dispatcher_co_busy, false); + qatomic_set_mb(&qmp_dispatcher_co_busy, false); WITH_QEMU_LOCK_GUARD(&monitor_lock) { QMPRequest *req_obj; diff --git a/softmmu/cpus.c b/softmmu/cpus.c index 9cbc8172b5f..fed20ffb5dd 100644 --- a/softmmu/cpus.c +++ b/softmmu/cpus.c @@ -405,7 +405,7 @@ static void qemu_cpu_stop(CPUState *cpu, bool exit) void qemu_wait_io_event_common(CPUState *cpu) { - qatomic_mb_set(&cpu->thread_kicked, false); + qatomic_set_mb(&cpu->thread_kicked, false); if (cpu->stop) { qemu_cpu_stop(cpu, false); } diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 9d7e172260f..588d0d166b9 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -3132,7 +3132,7 @@ void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len, bounce.buffer = NULL; memory_region_unref(bounce.mr); /* Clear in_use before reading map_client_list. */ - qatomic_mb_set(&bounce.in_use, false); + qatomic_set_mb(&bounce.in_use, false); cpu_notify_map_clients(); } diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index ad65603445e..5900dc788f4 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1229,7 +1229,7 @@ static void hvf_wait_for_ipi(CPUState *cpu, struct timespec *ts) * Use pselect to sleep so that other threads can IPI us while we're * sleeping. */ - qatomic_mb_set(&cpu->thread_kicked, false); + qatomic_set_mb(&cpu->thread_kicked, false); qemu_mutex_unlock_iothread(); pselect(0, 0, 0, 0, ts, &cpu->hvf->unblock_ipi_mask); qemu_mutex_lock_iothread(); diff --git a/tests/unit/test-aio-multithread.c b/tests/unit/test-aio-multithread.c index 80c5d4e2e6e..08d4570ccb1 100644 --- a/tests/unit/test-aio-multithread.c +++ b/tests/unit/test-aio-multithread.c @@ -154,7 +154,7 @@ static coroutine_fn void test_multi_co_schedule_entry(void *opaque) n = g_test_rand_int_range(0, NUM_CONTEXTS); schedule_next(n); - qatomic_mb_set(&to_schedule[id], qemu_coroutine_self()); + qatomic_set_mb(&to_schedule[id], qemu_coroutine_self()); /* finish_cb can run here. */ qemu_coroutine_yield(); g_assert(to_schedule[id] == NULL); diff --git a/util/qemu-coroutine-lock.c b/util/qemu-coroutine-lock.c index 84a50a9e911..2534435388f 100644 --- a/util/qemu-coroutine-lock.c +++ b/util/qemu-coroutine-lock.c @@ -202,7 +202,7 @@ static void coroutine_fn qemu_co_mutex_lock_slowpath(AioContext *ctx, push_waiter(mutex, &w); /* - * Add waiter before reading mutex->handoff. Pairs with qatomic_mb_set + * Add waiter before reading mutex->handoff. Pairs with qatomic_set_mb * in qemu_co_mutex_unlock. */ smp_mb__after_rmw(); @@ -310,7 +310,7 @@ void coroutine_fn qemu_co_mutex_unlock(CoMutex *mutex) our_handoff = mutex->sequence; /* Set handoff before checking for waiters. */ - qatomic_mb_set(&mutex->handoff, our_handoff); + qatomic_set_mb(&mutex->handoff, our_handoff); if (!has_waiters(mutex)) { /* The concurrent lock has not added itself yet, so it * will be able to pick our handoff. From patchwork Tue Jun 6 14:30:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791242 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Avws7ktq; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCc52gHLz20Ty for ; Wed, 7 Jun 2023 00:32:21 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xic-00053K-N1; Tue, 06 Jun 2023 10:31:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6XiZ-00051l-Jf for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6XiY-0001Do-5P for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bJmPl67EZdGS0u4wblM0LBTqwsJ039UKge02/qw8oPk=; b=Avws7ktqAZ9nLPLO6kqoN2Zeqa8dFtR6cAA7hM4rCgTGzhONmWQeZWbHH++WCQLVAT/qxi QrrgNHNN5i7rA/+f6m8wxxyvSpYIt4ht1QWLZ9ZX1VJwCFkq2NnfkdCo9C0jAd9NfrisOh RuQIxYZgDivpH5LPP4LAe5O6QZ7eKPs= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-511-ZyDPOfB3OtCVvf_6ZX2msQ-1; Tue, 06 Jun 2023 10:31:24 -0400 X-MC-Unique: ZyDPOfB3OtCVvf_6ZX2msQ-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-513f5318ff2so3935482a12.3 for ; Tue, 06 Jun 2023 07:31:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061883; x=1688653883; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bJmPl67EZdGS0u4wblM0LBTqwsJ039UKge02/qw8oPk=; b=L+Y/DCvOoPU05LsovYsq3ThSt5rVhHU+1Bjus6+CsSkZ28RVCoTL7JbvyXRuHG+8jE Xs/KSTPxZJOcWEn4bdf527UpEbqGzcgc5MKd74+MuJqJ81kXW467WVuHgl6nIPbM7C12 C+YJbVXwo9emrcAorU2H31BPcYFkdPZpC/Oz1qZQeY7mIBKoyAvDVNsq86pDo4+T9rhl mMRmCvra6KF8IMjHeAkr1vOyOFWDJmf6eg+7AwX2vZxR2POr7xILMK4KsLQV1A/SInN2 HvmN9b6nDZGnNLvZnurb+L9he327Pbaihbc3k7eV922VtpQWmpBZhXZNmPhy3fwZAqXB bYJw== X-Gm-Message-State: AC+VfDwl1UFcc/ltdxmTsPkz6JWxyWdIe2wsJO4Mj5nazeG2okaPMM/l DT66jM7SlAL3wn4zW3p+zHWi2gMxwM5yxBA/9awgKVtjDtMSN931GrIJUjyTOCNFTu8MdNdROQM rc0Hj9AxgqpTEAcQzCxR18An+5LCHNAHB3weEv5agGAUiWZVMUwYYNDOI5iY+semlqPK5WpF4Si w= X-Received: by 2002:a17:907:7e84:b0:958:4c75:705e with SMTP id qb4-20020a1709077e8400b009584c75705emr2400938ejc.17.1686061882692; Tue, 06 Jun 2023 07:31:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6KkVBhgBRmp/sPHKTqpUKRw3bdLgcQ73OWon2ve3xC4CIMXg1gMA5ek5tAZpjQ+VV1yPmOog== X-Received: by 2002:a17:907:7e84:b0:958:4c75:705e with SMTP id qb4-20020a1709077e8400b009584c75705emr2400918ejc.17.1686061882320; Tue, 06 Jun 2023 07:31:22 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id lx5-20020a170906af0500b00965c6c63ea3sm5694972ejb.35.2023.06.06.07.31.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:21 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 03/21] scripts: remove dead file Date: Tue, 6 Jun 2023 16:30:58 +0200 Message-Id: <20230606143116.685644-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org scripts/test-driver.py was used when "make check" was already using meson introspection data, but it did not execute "meson test". It is dead since commit 3d2f73ef75e ("build: use "meson test" as the test harness", 2021-12-23). Signed-off-by: Paolo Bonzini --- scripts/test-driver.py | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 scripts/test-driver.py diff --git a/scripts/test-driver.py b/scripts/test-driver.py deleted file mode 100644 index eef74b29a8f..00000000000 --- a/scripts/test-driver.py +++ /dev/null @@ -1,35 +0,0 @@ -#! /usr/bin/env python3 - -# Wrapper for tests that hides the output if they succeed. -# Used by "make check" -# -# Copyright (C) 2020 Red Hat, Inc. -# -# Author: Paolo Bonzini - -import subprocess -import sys -import os -import argparse - -parser = argparse.ArgumentParser(description='Test driver for QEMU') -parser.add_argument('-C', metavar='DIR', dest='dir', default='.', - help='change to DIR before doing anything else') -parser.add_argument('-v', '--verbose', dest='verbose', action='store_true', - help='be more verbose') -parser.add_argument('test_args', nargs=argparse.REMAINDER) - -args = parser.parse_args() -os.chdir(args.dir) - -test_args = args.test_args -if test_args[0] == '--': - test_args = test_args[1:] - -if args.verbose: - result = subprocess.run(test_args, stdout=None, stderr=None) -else: - result = subprocess.run(test_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - if result.returncode: - sys.stdout.buffer.write(result.stdout) -sys.exit(result.returncode) From patchwork Tue Jun 6 14:30:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791247 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bqU2Kzhb; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCcd1hgFz20Ty for ; Wed, 7 Jun 2023 00:32:49 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xid-00053h-HS; Tue, 06 Jun 2023 10:31:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xib-00052j-HI for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6XiZ-0001EM-Vx for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lj5av3UWNj/kMdqtmsrtAvKOk0fFWaXs4jRvcp/aN6I=; b=bqU2KzhbNps9Atrqa6ZDjScK+7uwtOvFF6U4A6IoU0+2M91BR7oR/utdsw0eGBBtpWAUN3 QwHFzaDxeXNmQUHbO2xa0F8MwXdY/G4cBf+Ml0MwF+hl3nGpcadkUa4fP+MG/WCTlTsJ3C jtIpwThBCznSDt5PkTYGin6Vs1rfzOo= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-92-t-7BObwnMhuVCPaoZ8ifCQ-1; Tue, 06 Jun 2023 10:31:25 -0400 X-MC-Unique: t-7BObwnMhuVCPaoZ8ifCQ-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-94a356c74e0so453568566b.2 for ; Tue, 06 Jun 2023 07:31:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061884; x=1688653884; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lj5av3UWNj/kMdqtmsrtAvKOk0fFWaXs4jRvcp/aN6I=; b=OWkzwqKVJ0+tZX+IO7bQtchc6kfSG16tL1AsS29f5aEcajqAp43Rw3P3+QkM81emM+ QiZHEhiGZKqPWojXNJ+doqOpUBzQnGNhIMxGmjMoAQkrWGr55qsErZF6fpG25/n5MmJe cU9FUvVyrYPNylPs3bSPwkIBZHbWtF8GhAeg0jKQQCB+UG+fZQ9yjZ4FcfDZTSpu7Pg8 KumLzMl/awiNCGEO55dCpiI7VxLPUf7hWZNLT+6K9RPm9sosdcCp+sTfe2qylowC1ACt 2KcWa5QUb2CxidaO94IC3cWLnj78mjljDi4xUb0V4YCvy2KVOv0qlzYjEVj9n3PBZjIS FHzw== X-Gm-Message-State: AC+VfDyrzbV0OaKGt9Xj/BhDYEPSMZYxVvfmQUKyEKJ1smOe/mNjpv2c o9G8XAq5I6gZRq/I+/D7ou1OFZ0UoFuOeUD+GzJFfUeK4Jbah/6/yPrCgpD9k+q4KN/MczAJimm Km7QWUDalnjwbaTbHyOV9I8ezMG4fSg99nq371l7DfW/P+h/CSx7f1ATdijm1c7EW3I5I2/IDn6 k= X-Received: by 2002:a17:907:724c:b0:977:d048:ff9c with SMTP id ds12-20020a170907724c00b00977d048ff9cmr2279893ejc.31.1686061884197; Tue, 06 Jun 2023 07:31:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4DVI5uV1xnPukl5n1C+KIV86y9YzmAF2oYd8dyTOV5Az3ldiOux1n1Q/XReJLAJSMDzsxNRg== X-Received: by 2002:a17:907:724c:b0:977:d048:ff9c with SMTP id ds12-20020a170907724c00b00977d048ff9cmr2279876ejc.31.1686061883926; Tue, 06 Jun 2023 07:31:23 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id lu26-20020a170906fada00b009663115c8f8sm5632414ejb.152.2023.06.06.07.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:23 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 04/21] meson.build: Group the UI entries in a separate summary section Date: Tue, 6 Jun 2023 16:30:59 +0200 Message-Id: <20230606143116.685644-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Thomas Huth Let's make it easier for the users to spot UI-related entries in the summary of the meson output. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230602171832.533739-2-thuth@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/meson.build b/meson.build index 969a84f2a44..cfacd662edb 100644 --- a/meson.build +++ b/meson.build @@ -4227,32 +4227,43 @@ summary_info += {'rng-none': get_option('rng_none')} summary_info += {'Linux keyring': have_keyring} summary(summary_info, bool_yn: true, section: 'Crypto') -# Libraries +# UI summary_info = {} if targetos == 'darwin' summary_info += {'Cocoa support': cocoa} - summary_info += {'vmnet.framework support': vmnet} endif summary_info += {'SDL support': sdl} summary_info += {'SDL image support': sdl_image} summary_info += {'GTK support': gtk} summary_info += {'pixman': pixman} summary_info += {'VTE support': vte} -summary_info += {'slirp support': slirp} -summary_info += {'libtasn1': tasn1} -summary_info += {'PAM': pam} -summary_info += {'iconv support': iconv} -summary_info += {'curses support': curses} -summary_info += {'virgl support': virgl} -summary_info += {'blkio support': blkio} -summary_info += {'curl support': curl} -summary_info += {'Multipath support': mpathpersist} summary_info += {'PNG support': png} summary_info += {'VNC support': vnc} if vnc.found() summary_info += {'VNC SASL support': sasl} summary_info += {'VNC JPEG support': jpeg} endif +summary_info += {'spice protocol support': spice_protocol} +if spice_protocol.found() + summary_info += {' spice server support': spice} +endif +summary_info += {'curses support': curses} +summary_info += {'brlapi support': brlapi} +summary(summary_info, bool_yn: true, section: 'User interface') + +# Libraries +summary_info = {} +if targetos == 'darwin' + summary_info += {'vmnet.framework support': vmnet} +endif +summary_info += {'slirp support': slirp} +summary_info += {'libtasn1': tasn1} +summary_info += {'PAM': pam} +summary_info += {'iconv support': iconv} +summary_info += {'virgl support': virgl} +summary_info += {'blkio support': blkio} +summary_info += {'curl support': curl} +summary_info += {'Multipath support': mpathpersist} if targetos not in ['darwin', 'haiku', 'windows'] summary_info += {'OSS support': oss} summary_info += {'sndio support': sndio} @@ -4267,7 +4278,6 @@ if targetos == 'linux' endif summary_info += {'Pipewire support': pipewire} summary_info += {'JACK support': jack} -summary_info += {'brlapi support': brlapi} summary_info += {'vde support': vde} summary_info += {'netmap support': have_netmap} summary_info += {'l2tpv3 support': have_l2tpv3} @@ -4279,10 +4289,6 @@ summary_info += {'PVRDMA support': have_pvrdma} summary_info += {'fdt support': fdt_opt == 'disabled' ? false : fdt_opt} summary_info += {'libcap-ng support': libcap_ng} summary_info += {'bpf support': libbpf} -summary_info += {'spice protocol support': spice_protocol} -if spice_protocol.found() - summary_info += {' spice server support': spice} -endif summary_info += {'rbd support': rbd} summary_info += {'smartcard support': cacard} summary_info += {'U2F support': u2f} From patchwork Tue Jun 6 14:31:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791257 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WM4Eyc29; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCf34v5Wz20WK for ; Wed, 7 Jun 2023 00:34:03 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xif-00054H-1m; Tue, 06 Jun 2023 10:31:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xid-00053W-3K for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xib-0001Eh-Jb for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vmO1dxEW5DiludHAYzbG2AOT8q3ojt10yczPYkAfhME=; b=WM4Eyc29VjRUEulhofZuwaBpRzS2o80RtlXLfIOkPWUcCjxTe6OtUxi34Q9yb2WfPXE8zf sGGxrbs1N/WbKwGlkP3vsBK/9WqBLbA3DX+mihE0VcaM10cHYhqalOcghiQlXCSYhGA9h+ s5AQA/6wZSbxcg2gGjbHD1xSwtZqnt8= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-371-luaByrUhOKqsS3QwWo5v8A-1; Tue, 06 Jun 2023 10:31:27 -0400 X-MC-Unique: luaByrUhOKqsS3QwWo5v8A-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5128dcbdfc1so3937464a12.1 for ; Tue, 06 Jun 2023 07:31:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061886; x=1688653886; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vmO1dxEW5DiludHAYzbG2AOT8q3ojt10yczPYkAfhME=; b=ddpdH+KlKhdAiAblmTRJ55CpFJXyjRUEnaLLw0kIGAvKaDgzz4Xj6G68YYzzSiIcXy +CRlmJENX2DJN8QREw/dIIHligKorrBNjj+b8cWZyuL0HBarYAw4ynz/b1s1ggnVUsd8 vCwtOmuDCv9ux/kxUqha9PE6T09qA9FErQ3ZvP7PSwHbQGo3AbRK+aH/uTwKHwUNRAU/ Ez25q8V7ENfzRrEzm1jRaYH+MIYftMpYJm91rPHsxQ3IO9ItYtLFaqDrjn3jnGxFsaJp FP2tbHS/n2U7oA3nGVNk3i0gFDIaniIA3UpR5+mRMg+G/EIEW7R7FoQBWKytDL9ZWqaX tgMQ== X-Gm-Message-State: AC+VfDzoQYZre0F2BCurnMsK1Q8wiQIkZxANivAf/Yj322A8Xa429Kpm uxClIGC3/DnF/2XWZfOIfGPk4EDXGwNcFoxz4AxbWAOXSqhbaOZ0wlPw/rob9U7JLsbFgz0yd/g nX0tDUpR3CLWkhP4s6M3wd+Sh7zfTb9I03zLCl9nKwCyAbP7n+PpTvieYSsY4sqAFVlwFtEOHGZ A= X-Received: by 2002:aa7:da0c:0:b0:514:7f39:aa81 with SMTP id r12-20020aa7da0c000000b005147f39aa81mr1696317eds.20.1686061885772; Tue, 06 Jun 2023 07:31:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4/pXQlGFQMfO8JrnvowagJN1u3Y0gWxCkEuWjwNC+2DNXc0DuGSxLREX9IQT83YEb5QFoWow== X-Received: by 2002:aa7:da0c:0:b0:514:7f39:aa81 with SMTP id r12-20020aa7da0c000000b005147f39aa81mr1696303eds.20.1686061885489; Tue, 06 Jun 2023 07:31:25 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id o20-20020aa7dd54000000b00514b044ec41sm5193692edw.35.2023.06.06.07.31.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:25 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 05/21] meson.build: Group the network backend entries in a separate summary section Date: Tue, 6 Jun 2023 16:31:00 +0200 Message-Id: <20230606143116.685644-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Thomas Huth Let's make it easier for the users to spot network-related entries in the summary of the meson output. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230602171832.533739-3-thuth@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index cfacd662edb..b0adf5b4617 100644 --- a/meson.build +++ b/meson.build @@ -4251,12 +4251,19 @@ summary_info += {'curses support': curses} summary_info += {'brlapi support': brlapi} summary(summary_info, bool_yn: true, section: 'User interface') -# Libraries +# Network backends summary_info = {} if targetos == 'darwin' summary_info += {'vmnet.framework support': vmnet} endif summary_info += {'slirp support': slirp} +summary_info += {'vde support': vde} +summary_info += {'netmap support': have_netmap} +summary_info += {'l2tpv3 support': have_l2tpv3} +summary(summary_info, bool_yn: true, section: 'Network backends') + +# Libraries +summary_info = {} summary_info += {'libtasn1': tasn1} summary_info += {'PAM': pam} summary_info += {'iconv support': iconv} @@ -4278,9 +4285,6 @@ if targetos == 'linux' endif summary_info += {'Pipewire support': pipewire} summary_info += {'JACK support': jack} -summary_info += {'vde support': vde} -summary_info += {'netmap support': have_netmap} -summary_info += {'l2tpv3 support': have_l2tpv3} summary_info += {'Linux AIO support': libaio} summary_info += {'Linux io_uring support': linux_io_uring} summary_info += {'ATTR/XATTR support': libattr} From patchwork Tue Jun 6 14:31:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791256 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WPCytQDE; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCf34Qddz20Ty for ; Wed, 7 Jun 2023 00:34:03 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xif-00054G-18; Tue, 06 Jun 2023 10:31:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xie-00053y-2B for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xic-0001F1-FG for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R9sT329MwhjttK5gufv0DfeLuufewMVeQtMouKLf8OM=; b=WPCytQDExu7oAFqw/XOJXyBgOZcWG4p6kVzOWzhSUwdTAmEpxp+ob8j090ufmGWlhXClJM ejQDTWTng2xaN0kxgCTb68ElxuzBMn8N+zIKkerRev5RzE3Nmx3spwA9G+xbaU2idmV51K ulGEdah+Dv+usI1+vipTEN8IOkK98MU= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-394-uwrfJiYIMsWkimpsYSLlCw-1; Tue, 06 Jun 2023 10:31:28 -0400 X-MC-Unique: uwrfJiYIMsWkimpsYSLlCw-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-9715654aba1so675455566b.0 for ; Tue, 06 Jun 2023 07:31:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061887; x=1688653887; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R9sT329MwhjttK5gufv0DfeLuufewMVeQtMouKLf8OM=; b=UZv5K1UKdVLPNnpWVYtnuE2CGvHHZAZreMqClTa7XqVJrsLeRehqKM7Qm7hrm3U2DP TEdFLRSfgqcvXbYw/UCwDoLt0/exZxzgCH2mrHZGCPX8tj2fcMphvvfcLnhypu5epQpc 2mk4yv46dXjCoJzT0kK6xx3yckZ8xzBKrDZwpw+/hiXCpG5u7ZoD06baGv52Qa5+b6LD JxkoDo8C6/Y1zaYUEFuBQ5wmkd26rj2ANv6npV3WI/eYnPetS3+GvxjCGGJeDCQ5DpDP 8ZECuTDwMkENdtvzDX1PfNnXV4XOSfiRQWHU4VM67HkD+fsdZUKa2Bt12pu67c2Kx+Ag rxRw== X-Gm-Message-State: AC+VfDwLOpuCBZL+OFnTlSBStq2KN2rDQelT+VNatR5TutJZvYkyL8Nr bd36nxrNpngwtBIPtiKgV7qfDQXRQOF0oVWexMUgc5lolnyBKkaEbqXF4q8Maio+1f/FVo02+WO I+JvcAKlq0DHKbX1ybQAqmLS480rBak/xGIjJ3jkOyQoxk5YaTJrQLvwkqjzW8JqkrdgP8riOwT Q= X-Received: by 2002:a17:907:6293:b0:932:f88c:c2ff with SMTP id nd19-20020a170907629300b00932f88cc2ffmr9632535ejc.34.1686061887342; Tue, 06 Jun 2023 07:31:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4i+jsKriV0b8m1/UZC3qcwf+m+vN5gPUcA02hq6JvRpC6RIU0GlB5Ok2FiXiVpisurh02CpQ== X-Received: by 2002:a17:907:6293:b0:932:f88c:c2ff with SMTP id nd19-20020a170907629300b00932f88cc2ffmr9632512ejc.34.1686061887015; Tue, 06 Jun 2023 07:31:27 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id i15-20020a170906114f00b009545230e682sm5595129eja.91.2023.06.06.07.31.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:26 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 06/21] meson.build: Group the audio backend entries in a separate summary section Date: Tue, 6 Jun 2023 16:31:01 +0200 Message-Id: <20230606143116.685644-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Thomas Huth Let's make it easier for the users to spot audio-related entries in the summary of the meson output. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230602171832.533739-4-thuth@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/meson.build b/meson.build index b0adf5b4617..97b32e9beb5 100644 --- a/meson.build +++ b/meson.build @@ -4251,6 +4251,24 @@ summary_info += {'curses support': curses} summary_info += {'brlapi support': brlapi} summary(summary_info, bool_yn: true, section: 'User interface') +# Audio backends +summary_info = {} +if targetos not in ['darwin', 'haiku', 'windows'] + summary_info += {'OSS support': oss} + summary_info += {'sndio support': sndio} +elif targetos == 'darwin' + summary_info += {'CoreAudio support': coreaudio} +elif targetos == 'windows' + summary_info += {'DirectSound support': dsound} +endif +if targetos == 'linux' + summary_info += {'ALSA support': alsa} + summary_info += {'PulseAudio support': pulse} +endif +summary_info += {'Pipewire support': pipewire} +summary_info += {'JACK support': jack} +summary(summary_info, bool_yn: true, section: 'Audio backends') + # Network backends summary_info = {} if targetos == 'darwin' @@ -4271,20 +4289,6 @@ summary_info += {'virgl support': virgl} summary_info += {'blkio support': blkio} summary_info += {'curl support': curl} summary_info += {'Multipath support': mpathpersist} -if targetos not in ['darwin', 'haiku', 'windows'] - summary_info += {'OSS support': oss} - summary_info += {'sndio support': sndio} -elif targetos == 'darwin' - summary_info += {'CoreAudio support': coreaudio} -elif targetos == 'windows' - summary_info += {'DirectSound support': dsound} -endif -if targetos == 'linux' - summary_info += {'ALSA support': alsa} - summary_info += {'PulseAudio support': pulse} -endif -summary_info += {'Pipewire support': pipewire} -summary_info += {'JACK support': jack} summary_info += {'Linux AIO support': libaio} summary_info += {'Linux io_uring support': linux_io_uring} summary_info += {'ATTR/XATTR support': libattr} From patchwork Tue Jun 6 14:31:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791243 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=GD8CBEV5; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCc61zGPz20Ty for ; Wed, 7 Jun 2023 00:32:22 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xij-00055A-8W; Tue, 06 Jun 2023 10:31:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xih-00054w-Q2 for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xig-0001Fj-4p for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FD6a498aoDtqiiIhkSM6jMTT9LT3DOi6SlHQJkDwt/E=; b=GD8CBEV5In+VxEYR0KtIbQWddFduRxDne/81+CyFytkcHV8bn71Gmjp/0A3Cp8+8KSmxvq VbEWJNUiPSZwUDm+nEjja1AflATO5tu6mLRoovDKbuKvzCK76brlYCMxqIGMUPDYBdhWy0 /uo7sAkJ4DpIEp24TSAom6HlWi1uFas= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-323-o45vb37PPjadK5GIbHWZRg-1; Tue, 06 Jun 2023 10:31:32 -0400 X-MC-Unique: o45vb37PPjadK5GIbHWZRg-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-977c516686aso335300466b.1 for ; Tue, 06 Jun 2023 07:31:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061889; x=1688653889; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FD6a498aoDtqiiIhkSM6jMTT9LT3DOi6SlHQJkDwt/E=; b=ZHnO5E9K5gVLS6JyCLq0QM+WDPMsY8m/NbFPCd0OpAY6/t/KfpXl7tR/d7BBmzLHBJ D3gUDb82ui4ApSH6UoZkvZ9y3h2EtzNMm/2WlgnMTmL23NjBaHGcpAb7pesiNdYcpQYP vX7qZKUijJqN2VGDtZnT/r9HvKVKL8S2Hzvpc+Mht0hGyjI4+dPrFj6xf9U9fAUWomSx IXYvhvkLuscTf/HpvIrFxqRopCgw3QN6/LbeA7DdFtMAw3RoDQkaWGOOp/n4l9faim7a 0aWTnNKIi6GFAh0xZAMpJ/iStDew+ok2GOyUMi4R+za9+j0agqVKjrps8YdnYXKE+ktX TN3A== X-Gm-Message-State: AC+VfDy8fHXaC0AYaMvOq34BKrJvFtQuxfPxCXN2qXOVjaMNeda5VGJB JYHRUlTYTrq76/+7NqQ7cYUoMGnW4FT/HMhvLmdjik9uPpP+6Y2k/5BAwjmvmzUuBGVUCkbt+wv cN+vP+WCq6cTK9E8JJni6y7Ds2Fr9f+HswJ+7NswE+CTsQWZ2xyaMj9gyhRHXPfJyocEfyZFVee A= X-Received: by 2002:a17:906:58d2:b0:96f:a935:8997 with SMTP id e18-20020a17090658d200b0096fa9358997mr3216642ejs.12.1686061888841; Tue, 06 Jun 2023 07:31:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ62zwwrdTZWdgJiWQg+bBX/K4WNmJjgE5TG7+rFm6T2+8wxX+mnCknG6baj0YuaCs5JGpX2UQ== X-Received: by 2002:a17:906:58d2:b0:96f:a935:8997 with SMTP id e18-20020a17090658d200b0096fa9358997mr3216629ejs.12.1686061888558; Tue, 06 Jun 2023 07:31:28 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id g15-20020a1709061c8f00b00965a52d2bf6sm5649488ejh.88.2023.06.06.07.31.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:28 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Thomas Huth Subject: [PULL 07/21] meson.build: Use -Wno-undef only for SDL2 versions that need it Date: Tue, 6 Jun 2023 16:31:02 +0200 Message-Id: <20230606143116.685644-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Thomas Huth There is no need to disable this useful compiler warning for all versions of the SDL. Unfortunately, various versions are buggy (beside SDL 2.0.8, the version 2.26.0 and 2.26.1 are broken, too, see https://github.com/libsdl-org/SDL/issues/6619 ), but we can use a simple compiler check to see whether we need the -Wno-undef or not. This also enables the printing of the version number with good versions of the SDL in the summary of the meson output again. Signed-off-by: Thomas Huth Message-Id: <20230605114523.282987-1-thuth@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 97b32e9beb5..6bbeffe5711 100644 --- a/meson.build +++ b/meson.build @@ -1273,10 +1273,16 @@ if not get_option('sdl').auto() or have_system sdl_image = not_found endif if sdl.found() - # work around 2.0.8 bug - sdl = declare_dependency(compile_args: '-Wno-undef', - dependencies: sdl, - version: sdl.version()) + # Some versions of SDL have problems with -Wundef + if not cc.compiles(''' + #include + #include + int main(int argc, char *argv[]) { return 0; } + ''', dependencies: sdl, args: '-Werror=undef') + sdl = declare_dependency(compile_args: '-Wno-undef', + dependencies: sdl, + version: sdl.version()) + endif sdl_image = dependency('SDL2_image', required: get_option('sdl_image'), method: 'pkg-config') else From patchwork Tue Jun 6 14:31:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791248 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Ve4oKCDi; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCd86bpLz20Ty for ; Wed, 7 Jun 2023 00:33:16 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xii-000558-Qg; Tue, 06 Jun 2023 10:31:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xih-00054p-Dp for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xif-0001Fg-SQ for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zqk+QExzrBAqR8/1ekneq8mDE9m3pRgVPOwGF6GaSgk=; b=Ve4oKCDizWxyaSKW2AZcibJLGzkVmupJVMBy6gUNPHEJhIdnGJwvCpRbLt8ZoWBJLPMVp7 gEolTJHvH2hSovPUMmWW4OfSu0erjowH7LgRoZJ/DBgk0aOHfzFA97Qg6Xr424GdRf4yBY FotAFBXT7UjacgypGkHU9K71enO3ehQ= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-122-ClFcDMnTNvGJv-FA5UvKQQ-1; Tue, 06 Jun 2023 10:31:32 -0400 X-MC-Unique: ClFcDMnTNvGJv-FA5UvKQQ-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-4edc5526c5fso4064507e87.2 for ; Tue, 06 Jun 2023 07:31:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061890; x=1688653890; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zqk+QExzrBAqR8/1ekneq8mDE9m3pRgVPOwGF6GaSgk=; b=a5JYh/1HjK5xYMHnbC4TxevTMI6h+VlPivoLBebcU6qLhrrVz/fypvwO68l+pN3C6c sEh4lzqhW16gHIWwPwu6cIaaXqnH8S/D3nW9Ib/FWJ3P8cL4KZKFxxTk3Vyo0IPl1pgN j0Pi85QLGYJWbck8N4zRGs9JLJpeiBJYdHxDgVVqk6gxN2kKclUxantPtqAFxgLLSZ+n NGZCeSzWqtuWFObfoqFKqpoC7VZVHGgcyTKAiV1xypGphNNl2iYeYRdL85MnkpVXei2U ufqT/Uzv6ysSG32hzscLbrUsxcO+0Fg6I7RTJUWF7mdGqAa1JgGP9TJ8m6ON4F3Fd/hN Cjqw== X-Gm-Message-State: AC+VfDybNuuEN6qUBvxHSp7pNqbf1nE4pqGToJWIDXVXTFNDbPzxmWLw Ea5urK2JTW6jnUjjvnabqxpi0YdGHRUqxoC7ZIFoSkJ6/fRrwBawubW4TssK0iBANnmlcdtrb+U b0W+8NDvaugNok85zFE+zUBwPrMPi7h4DergdOuhkTzeiz0u0jSWUcdeAbAk8lIBXQKnWBRzN0x o= X-Received: by 2002:a19:ae05:0:b0:4f3:dd96:bf55 with SMTP id f5-20020a19ae05000000b004f3dd96bf55mr1113336lfc.11.1686061890314; Tue, 06 Jun 2023 07:31:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4LoSdYThBPSINmEIH/kalRYWNDTtDOO1sZfXQyIrereG5VyMp4WBABU1u/jTmTLSU8uLzxIQ== X-Received: by 2002:a19:ae05:0:b0:4f3:dd96:bf55 with SMTP id f5-20020a19ae05000000b004f3dd96bf55mr1113324lfc.11.1686061889926; Tue, 06 Jun 2023 07:31:29 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id r9-20020a056402018900b0051056dc47e0sm5258559edv.8.2023.06.06.07.31.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:29 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 08/21] scsi/qemu-pr-helper: Drop support for 'old' libmultipath API Date: Tue, 6 Jun 2023 16:31:03 +0200 Message-Id: <20230606143116.685644-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé Commit 1b0578f5c4 ("qemu-pr-helper: Fix build on CentOS 7") added code to probe for 'old' libmultipath API on CentOS 7. However since merge commit 8c345b3e6a (June 2021) we don't build/test CentOS 7 as it felt out of our list of supported distrib versions. Therefore we can safely remove the 'old' API check (mostly reverting commit 1b0578f5c4, except the code got converted to meson in commit 6ec0e15d95 "meson: move libmpathpersist test"). Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230605174146.87440-2-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- meson.build | 19 ++----------------- scsi/qemu-pr-helper.c | 4 ---- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/meson.build b/meson.build index 6bbeffe5711..6767a0d3faa 100644 --- a/meson.build +++ b/meson.build @@ -1092,9 +1092,8 @@ endif mpathlibs = [libudev] mpathpersist = not_found -mpathpersist_new_api = false if targetos == 'linux' and have_tools and get_option('mpath').allowed() - mpath_test_source_new = ''' + mpath_test_source = ''' #include #include unsigned mpath_mx_alloc_len = 1024; @@ -1111,16 +1110,6 @@ if targetos == 'linux' and have_tools and get_option('mpath').allowed() multipath_conf = mpath_lib_init(); return 0; }''' - mpath_test_source_old = ''' - #include - #include - unsigned mpath_mx_alloc_len = 1024; - int logsink; - int main(void) { - struct udev *udev = udev_new(); - mpath_lib_init(udev); - return 0; - }''' libmpathpersist = cc.find_library('mpathpersist', required: get_option('mpath')) if libmpathpersist.found() @@ -1139,10 +1128,7 @@ if targetos == 'linux' and have_tools and get_option('mpath').allowed() endforeach if mpathlibs.length() == 0 msg = 'Dependencies missing for libmpathpersist' - elif cc.links(mpath_test_source_new, dependencies: mpathlibs) - mpathpersist = declare_dependency(dependencies: mpathlibs) - mpathpersist_new_api = true - elif cc.links(mpath_test_source_old, dependencies: mpathlibs) + elif cc.links(mpath_test_source, dependencies: mpathlibs) mpathpersist = declare_dependency(dependencies: mpathlibs) else msg = 'Cannot detect libmpathpersist API' @@ -2094,7 +2080,6 @@ config_host_data.set('CONFIG_GCOV', get_option('b_coverage')) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) config_host_data.set('CONFIG_LZO', lzo.found()) config_host_data.set('CONFIG_MPATH', mpathpersist.found()) -config_host_data.set('CONFIG_MPATH_NEW_API', mpathpersist_new_api) config_host_data.set('CONFIG_BLKIO', blkio.found()) if blkio.found() config_host_data.set('CONFIG_BLKIO_VHOST_VDPA_FD', diff --git a/scsi/qemu-pr-helper.c b/scsi/qemu-pr-helper.c index a857e80c038..ae44a816e17 100644 --- a/scsi/qemu-pr-helper.c +++ b/scsi/qemu-pr-helper.c @@ -280,11 +280,7 @@ void put_multipath_config(struct config *conf) static void multipath_pr_init(void) { udev = udev_new(); -#ifdef CONFIG_MPATH_NEW_API multipath_conf = mpath_lib_init(); -#else - mpath_lib_init(udev); -#endif } static int is_mpath(int fd) From patchwork Tue Jun 6 14:31:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791245 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=X41gItp9; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCcM5CfRz20Ty for ; Wed, 7 Jun 2023 00:32:35 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xio-0005Gg-O0; Tue, 06 Jun 2023 10:31:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xij-00055v-Aa for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xih-0001Fx-Lr for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wufvntv52Bzssb0ok2muONHrebyhsMD/4yTVZxAaVxU=; b=X41gItp9k54MXmEy2WOiMZhPpbp/Rh+RtSa9bmD9u7/IEM4duTWPHORCf7yaIMqr6iZwJO EePgdCbE9DJ9Pq4dVFyMii9W7lI85PP4ccCxXNHmgYaN64Ekv++qZ88jbXwPaugSLL3XSG lwWRi/ABWSFVz79mWtPYV5b0Yzo+CRk= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-642-AS8NQmJ2P0GchQZmrptHDA-1; Tue, 06 Jun 2023 10:31:33 -0400 X-MC-Unique: AS8NQmJ2P0GchQZmrptHDA-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-977c516686aso335302766b.1 for ; Tue, 06 Jun 2023 07:31:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061891; x=1688653891; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wufvntv52Bzssb0ok2muONHrebyhsMD/4yTVZxAaVxU=; b=du2AIjNNFAvWYHE+YdXbGQZqZ2zuV/rW/F/5ooI7hh066INEzZVo7mc8oX7zmkFdoR 3r+tjiy0Wdf0UD4kYcXGP8sn6jzQWje/YHSenGWVvZ3CUyGEmeuweR78mOKm6qcj/PbL fNwH/nY7wrFsdGIPSsQqjcq11loTHxuz1wTC/HltwgcsLEa2vPxjA/OxgWuuygxN8QTV et/i2/CPs4GBJVa+AxmQ+Ebbo1o1r2vzSxn1mqyJ1IrW6NMKOgzmE+THw1mzCyo658Cn rDSNkldWaw11yETKwFNHqIaF6lj/89hFGnwUvFI2VWjW0lW0cdJghd/kzSMU7RdPCHdt gk1Q== X-Gm-Message-State: AC+VfDyhLyQcEHepcv3XaK9/rxHXmkVGCjxrWE3udeYKvG64ioLGfRtO fMIm99OCFZsZNj2HReUGJerqXrYdz4zYqkFHTQWheLJOCUcZ9dMxhFyQfF1wLvaIgVhSKTHVa+R ml0xNImr7fwfpKUsPHy9CJjMQ752yFGXg1VX/h1HjMKS7UYxPRn53aaPZ12TDW3CP+zCdYMnDls w= X-Received: by 2002:a17:907:80c:b0:974:218d:c048 with SMTP id wv12-20020a170907080c00b00974218dc048mr2880652ejb.26.1686061891638; Tue, 06 Jun 2023 07:31:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5VX3W8OFTx6SEbtgwUQMaFEDIyV5XdDhrRO7va9xHGbs/ldpZEqT7QYYa9M+K/FSO+Uc0lhA== X-Received: by 2002:a17:907:80c:b0:974:218d:c048 with SMTP id wv12-20020a170907080c00b00974218dc048mr2880635ejb.26.1686061891349; Tue, 06 Jun 2023 07:31:31 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id p5-20020a170906a00500b0096f641c6167sm5627555ejy.181.2023.06.06.07.31.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:30 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 09/21] Revert "tests/requirements.txt: bump up avocado-framework version to 101.0" Date: Tue, 6 Jun 2023 16:31:04 +0200 Message-Id: <20230606143116.685644-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This reverts commit ec5ffa0056389c3c10ea2de1e78366f66f4e5abc. Bumping avocado to version 101 has two issues. First, there are problems where Avocado is not logging of command lines or terminal output, and not collecting Python logs outside the avocado namespace. Second, the recent changes to Python handling mean that there is a single virtual environment for all the build, instead of a separate one for testing. Requiring a too-new version of avocado causes conflicts with any avocado plugins installed on the host: $ make check-venv make[1]: Entering directory '/home/berrange/src/virt/qemu/build' GIT ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc VENVPIP install -e /home/berrange/src/virt/qemu/python/ VENVPIP install -r /home/berrange/src/virt/qemu/tests/requirements.txt ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. avocado-framework-plugin-varianter-yaml-to-mux 98.0 requires avocado-framework==98.0, but you have avocado-framework 101.0 which is incompatible. avocado-framework-plugin-result-html 98.0 requires avocado-framework==98.0, but you have avocado-framework 101.0 which is incompatible. make[1]: Leaving directory '/home/berrange/src/virt/qemu/build' To avoid this issue, tests/requirements.txt should use a ">=" constraint and the version of Avocado should be limited to what distros provide in the system packages. Only Fedora has Avocado, and more specifically version 92.0 (though 98.0 is also available as a module). As a first step, this patch reverts the introduction of a too-new Avocado. Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 18 +++++++----------- tests/requirements.txt | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 0184ef22373..8294a44816c 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -136,18 +136,14 @@ get-vm-image-fedora-31-%: check-venv # download all vm images, according to defined targets get-vm-images: check-venv $(patsubst %,get-vm-image-fedora-31-%, $(FEDORA_31_DOWNLOAD)) -JOBS_OPTION=$(lastword -j1 $(filter-out -j, $(filter -j%,$(MAKEFLAGS)))) - check-avocado: check-venv $(TESTS_RESULTS_DIR) get-vm-images - $(call quiet-command, \ - $(PYTHON) -m avocado \ - --show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \ - $(if $(AVOCADO_TAGS),, \ - --filter-by-tags-include-empty \ - --filter-by-tags-include-empty-key) \ - --max-parallel-tasks $(JOBS_OPTION:-j%=%) \ - $(AVOCADO_CMDLINE_TAGS) \ - $(if $(GITLAB_CI),,--failfast) $(AVOCADO_TESTS), \ + $(call quiet-command, \ + $(PYTHON) -m avocado \ + --show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \ + $(if $(AVOCADO_TAGS),, --filter-by-tags-include-empty \ + --filter-by-tags-include-empty-key) \ + $(AVOCADO_CMDLINE_TAGS) \ + $(if $(GITLAB_CI),,--failfast) $(AVOCADO_TESTS), \ "AVOCADO", "tests/avocado") check-acceptance-deprecated-warning: diff --git a/tests/requirements.txt b/tests/requirements.txt index 0e008b9aec3..07e713ef5ac 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -5,5 +5,5 @@ # Note that qemu.git/python/ is implicitly installed to this venv when # 'make check-venv' is run, and will persist until configure is run # again. -avocado-framework==101.0 +avocado-framework==88.1 pycdlib==1.11.0 From patchwork Tue Jun 6 14:31:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791250 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=XX08/u/v; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCdL3GQMz20Ty for ; Wed, 7 Jun 2023 00:33:26 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xip-0005HY-CY; Tue, 06 Jun 2023 10:31:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xim-0005AE-09 for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xij-0001GI-6Q for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e5elWgXnBAgSsq0WG5je9LQlvQACUGHo+A0AiWYgrn4=; b=XX08/u/vouBSvQAWLb2wstJBPXlrL0fj/wqPMQOfWBQz6CSM2UlFmpWkd7ICsK6aTKlA82 QR+EHYVdsuKEk+9p72sNNW6TeYrsw08d6Z3ZEDVDWSpFoBNzmUw5KXEafTmfSExwckHTIS AURBaZQYuXeBww42WeiROcR+PuoUtac= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-358-nm9A853fMTCoCu0RQj_ksA-1; Tue, 06 Jun 2023 10:31:34 -0400 X-MC-Unique: nm9A853fMTCoCu0RQj_ksA-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-94a355c9028so471402266b.3 for ; Tue, 06 Jun 2023 07:31:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061893; x=1688653893; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e5elWgXnBAgSsq0WG5je9LQlvQACUGHo+A0AiWYgrn4=; b=JWrDGDmpM9ZRg6GlZirbJzVr4v3CmkWHqzJtAtojAWKWKJ5CBl9pn+otZideiz/N1m FEfC7inmj7H3FjL9+TZvI9dRi5xNQDfZhqOL6HN5qRm5wzXYan/meSG4Z4iNZM/zJ4kd G0APiMR/lXSXnGt+CRCPO8Tdu/QWgyAEker8VRcBJDzUG5Yla9OhrNLnyVXk02813bZv rNd4SDveIkXiSGtkTwsGu8tY8Z2liJLBQBhmwf1YycSxeSrG1Tfr6R0EmjIXsRhE50lw PQtZsb97/2jKwafeT/MwP7mlDNuEdiNmyQdSzxsfoRQhpu1XnjUoGwDNAcGCb3zQlAJP xCCA== X-Gm-Message-State: AC+VfDwZodWGTVHgClDLQMCA8sZEywClxk134IQ/cOYAgrQDnUFyXAWG EsoASykIXns7QbYBdXPk8H+T1XYxOtLB1MWD31Gabqhy4Wen50pq+7Bk1DMW+d1zTBy184WUms3 aYN8I565pJV+JZnvxgM1rOgDzav1Ky/Tq1gV+TsLoDOxG7W/YAUlJD5DZxdAaSdMGjUG7T4GQKQ 0= X-Received: by 2002:a17:907:7282:b0:974:31:ed74 with SMTP id dt2-20020a170907728200b009740031ed74mr2496740ejc.65.1686061893075; Tue, 06 Jun 2023 07:31:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4+/Ayd/q0ya1PcjrUXS7lMXJNu/AlLnw/bnsra/BZyFTdhmkfwaMM1+K4EDRLxzQPn14MztQ== X-Received: by 2002:a17:907:7282:b0:974:31:ed74 with SMTP id dt2-20020a170907728200b009740031ed74mr2496721ejc.65.1686061892607; Tue, 06 Jun 2023 07:31:32 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id n3-20020a170906118300b0096a6bf89259sm5665204eja.167.2023.06.06.07.31.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 10/21] tests: Use separate virtual environment for avocado Date: Tue, 6 Jun 2023 16:31:05 +0200 Message-Id: <20230606143116.685644-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This reverts commits eea2d141179 ("Makefile: remove $(TESTS_PYTHON)", 2023-05-26) and 9c6692db550 ("tests: Use configure-provided pyvenv for tests", 2023-05-18). Right now, there is a conflict between wanting a ">=" constraint when using a distro-provided package and wanting a "==" constraint when installing Avocado from PyPI; this would provide the best of both worlds in terms of resiliency for both distros that have required packages and distros that don't. The conflict is visible also for meson, where we would like to install the latest 0.63.x version but also accept a distro 1.1.x version. But it is worse for avocado, for two reasons: 1) we cannot use an "==" constraint to install avocado if the venv includes a system avocado. The distro will package plugins that have "==" constraints on the version that is included in the distro, and, using "pip install avocado==88.1" on a venv that includes system packages will result in this error: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. avocado-framework-plugin-varianter-yaml-to-mux 98.0 requires avocado-framework==98.0, but you have avocado-framework 88.1 which is incompatible. avocado-framework-plugin-result-html 98.0 requires avocado-framework==98.0, but you have avocado-framework 88.1 which is incompatible. make[1]: Leaving directory '/home/berrange/src/virt/qemu/build' 2) we cannot use ">=" either if the venv does _not_ include a system avocado, because that would result in the installation of v101.0 which is the one we've just reverted. So the idea is to encode the dependencies as an (acceptable, locked) tuple, like this hypothetical TOML that would be committed inside python/ and used by mkvenv.py: [meson] meson = { minimum = "0.63.0", install = "0.63.3", canary = "meson" } [docs] # 6.0 drops support for Python 3.7 sphinx = { minimum = "1.6", install = "<6.0", canary = "sphinx-build" } sphinx_rtd_theme = { minimum = "0.5" } [avocado] avocado-framework = { minimum = "88.1", install = "88.1", canary = "avocado" } Once this is implemented, it would also be possible to install avocado in pyvenv/ using "mkvenv.py ensure", thus using the distro package on Fedora and CentOS Stream (the only distros where it's available). But until this is implemented, keep avocado in a separate venv. There is still the benefit of using a single python for meson custom_targets and for sphinx. Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/buildtest.yml | 6 +++--- docs/devel/acpi-bits.rst | 6 +++--- docs/devel/testing.rst | 14 +++++++------- .../ci/org.centos/stream/8/x86_64/test-avocado | 4 ++-- scripts/device-crash-test | 2 +- tests/Makefile.include | 16 +++++++++------- tests/requirements.txt | 7 ++----- tests/vm/Makefile.include | 2 +- 8 files changed, 28 insertions(+), 29 deletions(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 0f1be14cb62..1922caf5363 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -103,7 +103,7 @@ crash-test-debian: script: - cd build - make NINJA=":" check-venv - - pyvenv/bin/python3 scripts/device-crash-test -q --tcg-only ./qemu-system-i386 + - tests/venv/bin/python3 scripts/device-crash-test -q --tcg-only ./qemu-system-i386 build-system-fedora: extends: @@ -146,8 +146,8 @@ crash-test-fedora: script: - cd build - make NINJA=":" check-venv - - pyvenv/bin/python3 scripts/device-crash-test -q ./qemu-system-ppc - - pyvenv/bin/python3 scripts/device-crash-test -q ./qemu-system-riscv32 + - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-ppc + - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-riscv32 build-system-centos: extends: diff --git a/docs/devel/acpi-bits.rst b/docs/devel/acpi-bits.rst index 9677b0098f4..22e2580200c 100644 --- a/docs/devel/acpi-bits.rst +++ b/docs/devel/acpi-bits.rst @@ -61,19 +61,19 @@ Under ``tests/avocado/`` as the root we have: :: $ make check-venv (needed only the first time to create the venv) - $ ./pyvenv/bin/avocado run -t acpi tests/avocado + $ ./tests/venv/bin/avocado run -t acpi tests/avocado The above will run all acpi avocado tests including this one. In order to run the individual tests, perform the following: :: - $ ./pyvenv/bin/avocado run tests/avocado/acpi-bits.py --tap - + $ ./tests/venv/bin/avocado run tests/avocado/acpi-bits.py --tap - The above will produce output in tap format. You can omit "--tap -" in the end and it will produce output like the following: :: - $ ./pyvenv/bin/avocado run tests/avocado/acpi-bits.py + $ ./tests/venv/bin/avocado run tests/avocado/acpi-bits.py Fetching asset from tests/avocado/acpi-bits.py:AcpiBitsTest.test_acpi_smbios_bits JOB ID : eab225724da7b64c012c65705dc2fa14ab1defef JOB LOG : /home/anisinha/avocado/job-results/job-2022-10-10T17.58-eab2257/job.log diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 2cafec41782..203facb417b 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -888,9 +888,9 @@ You can run the avocado tests simply by executing: make check-avocado -This involves the automatic installation, from PyPI, of all the -necessary avocado-framework dependencies into the QEMU venv within the -build tree (at ``./pyvenv``). Test results are also saved within the +This involves the automatic creation of Python virtual environment +within the build tree (at ``tests/venv``) which will have all the +right dependencies, and will save tests results also within the build tree (at ``tests/results``). Note: the build environment must be using a Python 3 stack, and have @@ -947,7 +947,7 @@ may be invoked by running: .. code:: - pyvenv/bin/avocado run $OPTION1 $OPTION2 tests/avocado/ + tests/venv/bin/avocado run $OPTION1 $OPTION2 tests/avocado/ Note that if ``make check-avocado`` was not executed before, it is possible to create the Python virtual environment with the dependencies @@ -962,20 +962,20 @@ a test file. To run tests from a single file within the build tree, use: .. code:: - pyvenv/bin/avocado run tests/avocado/$TESTFILE + tests/venv/bin/avocado run tests/avocado/$TESTFILE To run a single test within a test file, use: .. code:: - pyvenv/bin/avocado run tests/avocado/$TESTFILE:$TESTCLASS.$TESTNAME + tests/venv/bin/avocado run tests/avocado/$TESTFILE:$TESTCLASS.$TESTNAME Valid test names are visible in the output from any previous execution of Avocado or ``make check-avocado``, and can also be queried using: .. code:: - pyvenv/bin/avocado list tests/avocado + tests/venv/bin/avocado list tests/avocado Manual Installation ~~~~~~~~~~~~~~~~~~~ diff --git a/scripts/ci/org.centos/stream/8/x86_64/test-avocado b/scripts/ci/org.centos/stream/8/x86_64/test-avocado index 73e7a1a3126..e0443fc8ae8 100755 --- a/scripts/ci/org.centos/stream/8/x86_64/test-avocado +++ b/scripts/ci/org.centos/stream/8/x86_64/test-avocado @@ -4,7 +4,7 @@ # KVM and x86_64, or tests that are generic enough to be valid for all # targets. Such a test list can be generated with: # -# ./pyvenv/bin/avocado list --filter-by-tags-include-empty \ +# ./tests/venv/bin/avocado list --filter-by-tags-include-empty \ # --filter-by-tags-include-empty-key -t accel:kvm,arch:x86_64 \ # tests/avocado/ # @@ -22,7 +22,7 @@ # - tests/avocado/virtio_check_params.py:VirtioMaxSegSettingsCheck.test_machine_types # make get-vm-images -./pyvenv/bin/avocado run \ +./tests/venv/bin/avocado run \ --job-results-dir=tests/results/ \ tests/avocado/boot_linux.py:BootLinuxX8664.test_pc_i440fx_kvm \ tests/avocado/boot_linux.py:BootLinuxX8664.test_pc_q35_kvm \ diff --git a/scripts/device-crash-test b/scripts/device-crash-test index 353aa575d7b..b74d887331d 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -43,7 +43,7 @@ except ModuleNotFoundError as exc: print(f"Module '{exc.name}' not found.") print(" Try 'make check-venv' from your build directory,") print(" and then one way to run this script is like so:") - print(f' > $builddir/pyvenv/bin/python3 "{path}"') + print(f' > $builddir/tests/venv/bin/python3 "{path}"') sys.exit(1) logger = logging.getLogger('device-crash-test') diff --git a/tests/Makefile.include b/tests/Makefile.include index 8294a44816c..9422ddaece5 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -89,9 +89,10 @@ distclean-tcg: $(DISTCLEAN_TCG_TARGET_RULES) # Build up our target list from the filtered list of ninja targets TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa, $(ninja-targets))) -TESTS_VENV_TOKEN=$(BUILD_DIR)/pyvenv/tests.group +TESTS_VENV_DIR=$(BUILD_DIR)/tests/venv TESTS_VENV_REQ=$(SRC_PATH)/tests/requirements.txt TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results +TESTS_PYTHON=$(TESTS_VENV_DIR)/bin/python3 ifndef AVOCADO_TESTS AVOCADO_TESTS=tests/avocado endif @@ -107,10 +108,11 @@ else endif quiet-venv-pip = $(quiet-@)$(call quiet-command-run, \ - $(PYTHON) -m pip -q --disable-pip-version-check $1, \ + $(TESTS_PYTHON) -m pip -q --disable-pip-version-check $1, \ "VENVPIP","$1") -$(TESTS_VENV_TOKEN): $(TESTS_VENV_REQ) +$(TESTS_VENV_DIR): $(TESTS_VENV_REQ) + $(call quiet-command, $(PYTHON) -m venv $@, VENV, $@) $(call quiet-venv-pip,install -e "$(SRC_PATH)/python/") $(call quiet-venv-pip,install -r $(TESTS_VENV_REQ)) $(call quiet-command, touch $@) @@ -119,7 +121,7 @@ $(TESTS_RESULTS_DIR): $(call quiet-command, mkdir -p $@, \ MKDIR, $@) -check-venv: $(TESTS_VENV_TOKEN) +check-venv: $(TESTS_VENV_DIR) FEDORA_31_ARCHES_TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGETS))) FEDORA_31_ARCHES_CANDIDATES=$(patsubst ppc64,ppc64le,$(FEDORA_31_ARCHES_TARGETS)) @@ -129,7 +131,7 @@ FEDORA_31_DOWNLOAD=$(filter $(FEDORA_31_ARCHES),$(FEDORA_31_ARCHES_CANDIDATES)) # download one specific Fedora 31 image get-vm-image-fedora-31-%: check-venv $(call quiet-command, \ - $(PYTHON) -m avocado vmimage get \ + $(TESTS_PYTHON) -m avocado vmimage get \ --distro=fedora --distro-version=31 --arch=$*, \ "AVOCADO", "Downloading avocado tests VM image for $*") @@ -138,7 +140,7 @@ get-vm-images: check-venv $(patsubst %,get-vm-image-fedora-31-%, $(FEDORA_31_DOW check-avocado: check-venv $(TESTS_RESULTS_DIR) get-vm-images $(call quiet-command, \ - $(PYTHON) -m avocado \ + $(TESTS_PYTHON) -m avocado \ --show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \ $(if $(AVOCADO_TAGS),, --filter-by-tags-include-empty \ --filter-by-tags-include-empty-key) \ @@ -161,7 +163,7 @@ check: check-build: run-ninja check-clean: - rm -rf $(TESTS_RESULTS_DIR) + rm -rf $(TESTS_VENV_DIR) $(TESTS_RESULTS_DIR) clean: check-clean clean-tcg distclean: distclean-tcg diff --git a/tests/requirements.txt b/tests/requirements.txt index 07e713ef5ac..0ba561b6bdf 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,9 +1,6 @@ # Add Python module requirements, one per line, to be installed -# in the qemu build_dir/pyvenv Python virtual environment. For more info, +# in the tests/venv Python virtual environment. For more info, # refer to: https://pip.pypa.io/en/stable/user_guide/#id1 -# -# Note that qemu.git/python/ is implicitly installed to this venv when -# 'make check-venv' is run, and will persist until configure is run -# again. +# Note that qemu.git/python/ is always implicitly installed. avocado-framework==88.1 pycdlib==1.11.0 diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index f0f5d32fb0f..c2a8ca1c175 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -5,7 +5,7 @@ ifeq ($(realpath $(SRC_PATH)),$(realpath .)) VM_PYTHON = PYTHONPATH=$(SRC_PATH)/python /usr/bin/env python3 VM_VENV = else -VM_PYTHON = $(PYTHON) +VM_PYTHON = $(TESTS_PYTHON) VM_VENV = check-venv endif From patchwork Tue Jun 6 14:31:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791246 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=eWZfAdU6; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCcN56cFz20WK for ; Wed, 7 Jun 2023 00:32:36 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xit-0005S9-DH; Tue, 06 Jun 2023 10:31:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xim-0005AF-7F for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xik-0001H8-CV for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=snbjKiGCVkmSnpzphIqvKnweusS7BHB5lXHlF1VeWLY=; b=eWZfAdU6SJ4HcQpqISJWofAr6eP8hcNeTbX7i5vlpcoxhjNSOaqPs+LQRsI17XzunTHEfA QT6XFoDIS0kQqI+N/Ue5si0QYxo2pOel0l3m/Rjv+Q02b9kuBSLDMHTw0/98gfMY4L2VLH M2p+DyVxDH036exzeb9foVmbk/OxLsw= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-497-L2c5LHyRPLWtDYLpDxvn6A-1; Tue, 06 Jun 2023 10:31:36 -0400 X-MC-Unique: L2c5LHyRPLWtDYLpDxvn6A-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-9744659b7b5so521302366b.3 for ; Tue, 06 Jun 2023 07:31:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061894; x=1688653894; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=snbjKiGCVkmSnpzphIqvKnweusS7BHB5lXHlF1VeWLY=; b=QDG9qj8hHo8hqhLz1API7sv02IRjXApT4XqUt/5iaHT7TKmWUeYQTEbkvhCqDPId2r CAVygS+gCAu3gqKRNaSxhuKkAq5ONSkm4sulnTG4MzGgQX7Kbh5Dcy/CzvHhC1HZ2JSy HU4TxwOruzLvejzmYdtKKiFwOXydj9qmr0sSnJGmOMXq07MVE6d7aZp7jYwX2z/pRQQH P62eyPm+lxpCchplD+/hwSRXdcEq4uUgMdVvF2ehwqHRC5wusMqj0qkYjLZvkSVJfNud 3DJelbUSPa4FIUDGt4c6RZPD1mUMQuQOLdSXSeB/+vAhvCdrMK94jpCbgK+nQbLUolN/ vJXA== X-Gm-Message-State: AC+VfDxuFl0vRLXyLu8rW1IebMmG9JTeXewnrL0cRN7wSidlCTMMolhb ixhnPGbZi+F1lphgdkOqlQjf0lOgi++M6mss05sASD1ZOfs67BOYPxT3hqG5wvKCVOyBku1MqXP W3S3edTSAxLB6P+zmdUxRt9DcMPZRXRR/1YeLwmIg6+hG04YPbB6LbgtNlRRv5qR/+wADNNuFdk 0= X-Received: by 2002:a17:907:6eaa:b0:96f:e7cf:5015 with SMTP id sh42-20020a1709076eaa00b0096fe7cf5015mr2537426ejc.17.1686061894578; Tue, 06 Jun 2023 07:31:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5jxsf/CK4KKfoFcYmXPgyHeq18QfEpUkJSTl9C4Lv/ChpWVP+Ry5SGfzXQ44Q7LDCrUHdN1Q== X-Received: by 2002:a17:907:6eaa:b0:96f:e7cf:5015 with SMTP id sh42-20020a1709076eaa00b0096fe7cf5015mr2537405ejc.17.1686061894242; Tue, 06 Jun 2023 07:31:34 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id fx22-20020a170906b75600b00977da5d3350sm2634967ejb.107.2023.06.06.07.31.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:33 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Peter Maydell , John Snow Subject: [PULL 11/21] mkvenv: always pass locally-installed packages to pip Date: Tue, 6 Jun 2023 16:31:06 +0200 Message-Id: <20230606143116.685644-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Let pip decide whether a new version should be installed or the current one is okay. This ensures that the virtual environment is updated (either upgraded or downgraded) whenever a new version of a package is requested. The hardest part here is figuring out if a package is installed in the venv (which also has to be done twice to account for the presence of either setuptools in Python <3.8, or importlib in Python >=3.8). Suggested-by: Peter Maydell Cc: John Snow Signed-off-by: Paolo Bonzini --- python/scripts/mkvenv.py | 76 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 74 insertions(+), 2 deletions(-) diff --git a/python/scripts/mkvenv.py b/python/scripts/mkvenv.py index 3a9aef46a51..a47f1eaf5d6 100644 --- a/python/scripts/mkvenv.py +++ b/python/scripts/mkvenv.py @@ -553,6 +553,74 @@ def pkgname_from_depspec(dep_spec: str) -> str: return match.group(0) +def _get_path_importlib(package: str) -> Optional[str]: + # pylint: disable=import-outside-toplevel + # pylint: disable=no-name-in-module + # pylint: disable=import-error + try: + # First preference: Python 3.8+ stdlib + from importlib.metadata import ( # type: ignore + PackageNotFoundError, + distribution, + ) + except ImportError as exc: + logger.debug("%s", str(exc)) + # Second preference: Commonly available PyPI backport + from importlib_metadata import ( # type: ignore + PackageNotFoundError, + distribution, + ) + + try: + return str(distribution(package).locate_file(".")) + except PackageNotFoundError: + return None + + +def _get_path_pkg_resources(package: str) -> Optional[str]: + # pylint: disable=import-outside-toplevel + # Bundled with setuptools; has a good chance of being available. + import pkg_resources + + try: + return str(pkg_resources.get_distribution(package).location) + except pkg_resources.DistributionNotFound: + return None + + +def _get_path(package: str) -> Optional[str]: + try: + return _get_path_importlib(package) + except ImportError as exc: + logger.debug("%s", str(exc)) + + try: + return _get_path_pkg_resources(package) + except ImportError as exc: + logger.debug("%s", str(exc)) + raise Ouch( + "Neither importlib.metadata nor pkg_resources found. " + "Use Python 3.8+, or install importlib-metadata or setuptools." + ) from exc + + +def _path_is_prefix(prefix: Optional[str], path: str) -> bool: + try: + return ( + prefix is not None and os.path.commonpath([prefix, path]) == prefix + ) + except ValueError: + return False + + +def _is_system_package(package: str) -> bool: + path = _get_path(package) + return path is not None and not ( + _path_is_prefix(sysconfig.get_path("purelib"), path) + or _path_is_prefix(sysconfig.get_path("platlib"), path) + ) + + def _get_version_importlib(package: str) -> Optional[str]: # pylint: disable=import-outside-toplevel # pylint: disable=no-name-in-module @@ -741,8 +809,12 @@ def _do_ensure( for spec in dep_specs: matcher = distlib.version.LegacyMatcher(spec) ver = _get_version(matcher.name) - if ver is None or not matcher.match( - distlib.version.LegacyVersion(ver) + if ( + ver is None + # Always pass installed package to pip, so that they can be + # updated if the requested version changes + or not _is_system_package(matcher.name) + or not matcher.match(distlib.version.LegacyVersion(ver)) ): absent.append(spec) else: From patchwork Tue Jun 6 14:31:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791249 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=BzVUdua1; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCdF4wXQz20Ty for ; Wed, 7 Jun 2023 00:33:21 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xir-0005Ig-0u; Tue, 06 Jun 2023 10:31:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xin-0005E4-Vn for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xil-0001In-Vh for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l5A5k8ghhStsyG0BKgmrZJoAIDnNGDnFFzBVWayPDwU=; b=BzVUdua1GYhR/fX1dtlYMW+0Gkv3aEzgTXqcCjl9Fu1gDZmrXQab6zENBiOMi1DvpR5JlX f3RQebFFKV26nWaGI+3QuOzWsohPQgbWKqBwqIcjZtabUZQ2y/X3IU3YR5W6H61KgM1q92 pW3I0xpGk24ipfxutJPzk8frOyzBVdA= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-190-vwPhnsSWPRmN7iRJWqvIgw-1; Tue, 06 Jun 2023 10:31:38 -0400 X-MC-Unique: vwPhnsSWPRmN7iRJWqvIgw-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-977c8170b52so321296166b.0 for ; Tue, 06 Jun 2023 07:31:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061896; x=1688653896; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=l5A5k8ghhStsyG0BKgmrZJoAIDnNGDnFFzBVWayPDwU=; b=b6dIGNcXA6MZ98QqyH/gHE1rrv3w3VdYIF8oVxiwrRXvKeoVhJqGEppWThmoQ2yNf2 AHQkBxJJ9wlpyTQ8Q9CfBXS/EMOWCBsgpJv9vB3ga485UOOtp1bWXPU4HxnqxHOK2mUT AhIvdudf1l7OkbjRY3YesI+0aXuoqJB9aW8u1NHym5B7QIXnkh/5HLMSw8OUrCFhxL0c lJJa/yDLpAB5q37SmAwMlJQT12Ak+pK7LVuhHvpI8xhChrJIB4weFwzJ/Y+3mtSjt1x2 P5Zg6IfhPixZCXmasmLPpPCWBUBYbdmb9Tutg/6KYoslJqyAV0ATQ+yUU8iwmqw8Co2d cuWA== X-Gm-Message-State: AC+VfDzxphnfqgdmoLyRE4oEULNN+DQdlfw6gSSkDMzsK/T/x1M9CsaN IEOf6J2llwb+kM8JqsybtkCoTyYmOQQJikNKDON5QW5maPds11V9l1/r1ZtiOhFKd6pCENgTAkt b3Yn3ZKCY2A3nLE6Ecm0CmLAijizm7LCW18SzpfC6uengqA/St8USxrUeIb4H2Z2kOqxpKSB6TH M= X-Received: by 2002:a17:907:7f16:b0:977:cd26:7bbf with SMTP id qf22-20020a1709077f1600b00977cd267bbfmr3261668ejc.64.1686061896470; Tue, 06 Jun 2023 07:31:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ66qGtF7l87mnZ4yhb9Y5fRhnCn/iYvbPz/Jk2At5x0Y3AW4mceBgLI1yuJ8K77evwlGeTRzA== X-Received: by 2002:a17:907:7f16:b0:977:cd26:7bbf with SMTP id qf22-20020a1709077f1600b00977cd267bbfmr3261649ejc.64.1686061896167; Tue, 06 Jun 2023 07:31:36 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id h22-20020a1709063b5600b0097382ed45cbsm5598815ejf.108.2023.06.06.07.31.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:35 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 12/21] configure: remove --with-git= option Date: Tue, 6 Jun 2023 16:31:07 +0200 Message-Id: <20230606143116.685644-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The scenario for which --with-git= was introduced was to use a SOCKS proxy such as tsocks. However, this was back in 2017 when QEMU's submodules used the git:// protocol, and it is not as important when using the "smart HTTP" backend; for example, neither "meson subprojects download" nor scripts/checkpatch.pl obey the GIT environment variable. So remove the knob, but test for the presence of git in the configure and git-submodule.sh scripts, and suggest using --with-git-submodules=validate + a manual invocation of git-submodule.sh when git does not work. Hopefully in the future the GIT environment variable will be supported by Meson. Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini --- Makefile | 2 +- configure | 8 ++------ meson.build | 1 - .../ci/org.centos/stream/8/x86_64/configure | 2 -- scripts/git-submodule.sh | 19 ++++++++++--------- 5 files changed, 13 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 08fb6a3b058..8005f1cc53e 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ Makefile: .git-submodule-status git-submodule-update: ifneq ($(GIT_SUBMODULES_ACTION),ignore) $(call quiet-command, \ - (GIT="$(GIT)" "$(SRC_PATH)/scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES)), \ + (GIT=git "$(SRC_PATH)/scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES)), \ "GIT","$(GIT_SUBMODULES)") endif diff --git a/configure b/configure index d674a966731..92bacc756c0 100755 --- a/configure +++ b/configure @@ -751,8 +751,6 @@ for opt do ;; --enable-fdt=*) fdt="$optarg" ;; - --with-git=*) git="$optarg" - ;; --with-git-submodules=*) git_submodules_action="$optarg" ;; @@ -791,7 +789,7 @@ fi case $git_submodules_action in update|validate) - if test ! -e "$source_path/.git"; then + if test ! -e "$source_path/.git" || ! has git; then echo "ERROR: cannot $git_submodules_action git submodules without .git" exit 1 fi @@ -892,7 +890,6 @@ Advanced options (experts only): --python=PYTHON use specified python [$python] --ninja=NINJA use specified ninja [$ninja] --smbd=SMBD use specified smbd [$smbd] - --with-git=GIT use specified git [$git] --with-git-submodules=update update git submodules (default if .git dir exists) --with-git-submodules=validate fail if git submodules are not up to date --with-git-submodules=ignore do not update or check git submodules (default if no .git dir) @@ -1699,7 +1696,7 @@ fi ####################################### # generate config-host.mak -if ! (GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then +if ! (GIT=git "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then exit 1 fi @@ -1709,7 +1706,6 @@ echo "# Automatically generated by configure - do not modify" > $config_host_mak echo >> $config_host_mak echo all: >> $config_host_mak -echo "GIT=$git" >> $config_host_mak echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak echo "GIT_SUBMODULES_ACTION=$git_submodules_action" >> $config_host_mak diff --git a/meson.build b/meson.build index 6767a0d3faa..4302c019237 100644 --- a/meson.build +++ b/meson.build @@ -4011,7 +4011,6 @@ summary(summary_info, bool_yn: true, section: 'Directories') # Host binaries summary_info = {} -summary_info += {'git': config_host['GIT']} summary_info += {'python': '@0@ (version: @1@)'.format(python.full_path(), python.language_version())} summary_info += {'sphinx-build': sphinx_build} if config_host.has_key('HAVE_GDB_BIN') diff --git a/scripts/ci/org.centos/stream/8/x86_64/configure b/scripts/ci/org.centos/stream/8/x86_64/configure index 6e8983f39cd..de76510978f 100755 --- a/scripts/ci/org.centos/stream/8/x86_64/configure +++ b/scripts/ci/org.centos/stream/8/x86_64/configure @@ -29,14 +29,12 @@ --extra-cflags="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection" \ --with-suffix="qemu-kvm" \ --firmwarepath=/usr/share/qemu-firmware \ ---with-git=meson \ --with-git-submodules=update \ --target-list="x86_64-softmmu" \ --block-drv-rw-whitelist="qcow2,raw,file,host_device,nbd,iscsi,rbd,blkdebug,luks,null-co,nvme,copy-on-read,throttle,gluster" \ --audio-drv-list="" \ --block-drv-ro-whitelist="vmdk,vhdx,vpc,https,ssh" \ --with-coroutine=ucontext \ ---with-git=git \ --tls-priority=@QEMU,SYSTEM \ --disable-attr \ --disable-auth-pam \ diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh index 7be41f59483..0ce1efc44e5 100755 --- a/scripts/git-submodule.sh +++ b/scripts/git-submodule.sh @@ -12,7 +12,7 @@ maybe_modules="$@" # if --with-git-submodules=ignore, do nothing test "$command" = "ignore" && exit 0 -test -z "$GIT" && GIT=git +test -z "$GIT" && GIT=$(command -v git) cd "$(dirname "$0")/.." @@ -21,19 +21,14 @@ update_error() { echo echo "Unable to automatically checkout GIT submodules '$modules'." echo "If you require use of an alternative GIT binary (for example to" - echo "enable use of a transparent proxy), then please specify it by" - echo "running configure by with the '--with-git' argument. e.g." - echo - echo " $ ./configure --with-git='tsocks git'" - echo - echo "Alternatively you may disable automatic GIT submodule checkout" - echo "with:" + echo "enable use of a transparent proxy), please disable automatic" + echo "GIT submodule checkout with:" echo echo " $ ./configure --with-git-submodules=validate" echo echo "and then manually update submodules prior to running make, with:" echo - echo " $ scripts/git-submodule.sh update $modules" + echo " $ GIT='tsocks git' scripts/git-submodule.sh update $modules" echo exit 1 } @@ -57,6 +52,12 @@ then exit 1 fi +if test -n "$maybe_modules" && test -z "$GIT" +then + echo "$0: unexpectedly called with submodules but git binary not found" + exit 1 +fi + modules="" for m in $maybe_modules do From patchwork Tue Jun 6 14:31:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791254 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bW1+hr2E; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCdj5jSxz20WK for ; Wed, 7 Jun 2023 00:33:45 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xir-0005MK-Nr; Tue, 06 Jun 2023 10:31:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xip-0005Hv-Jk for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xin-0001J7-PJ for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LglmaneiM/Lbpcn+O0faPg/sVlbIK7inueVGywwXhgc=; b=bW1+hr2EO2FFSxl83mpQd5Q5Wv57HtevieV3t0f74A2IQlaWCsxVDJYzIG9WKTbpDsP9Fb hGjLEH9z1v9yZEJH9JumjImfYtGY92AFwtSdDA+bEu1JRU+sWBJ0lt5rviRBS50Q3/60OO RJSH2+FmPtEbtd5od0pCohQITodtSr4= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-356-dcobVCyHOvm7rVkiVgS3yg-1; Tue, 06 Jun 2023 10:31:39 -0400 X-MC-Unique: dcobVCyHOvm7rVkiVgS3yg-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5149e1bd242so4120598a12.3 for ; Tue, 06 Jun 2023 07:31:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061898; x=1688653898; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LglmaneiM/Lbpcn+O0faPg/sVlbIK7inueVGywwXhgc=; b=dU22JyX2l/8BjGy+DGjqql7YTmO46JvKfVM9YmoN76RCIdKip4wFqHh/MXiBIkKYWe g+QZK9RY9LL5khY+9QTSCdUHSENYFt7nLW2W1W8YGXx8mTRo6/Gfvmawjdtx/FYUvaOB s1/QxTyHlV3MHX5QlG90w0x9Fu1QXznNbd738jPH2Le7X11lUchGRIUeun/gzndiqgSZ NGE2FjTBgnkA61md+JflYv/DcAE8GCfAZpVBEfpT1UH1fs9vJL6wm5ba8C5RxKPuRx6t KNTFm+r+NlOs9aE0sxuZKTpG0Xrx83aoQKBWK8NQ5nuLGt+2EDjwAEA6SFl0B0JJeck5 6cLg== X-Gm-Message-State: AC+VfDybB0E+hqUk4JIcBCT2ayl3W37hZnY9BOq0qwruUGLlLPBwbE84 FEh5jC+ctT4eHzsMzjf+ZhpASQNfxCDgIzZ5guGLVEm2z5J+yHTUOIuxHQz4Ez84BK3SK8qUD+5 HyEwuRgc2y4eVoehmiz5RodXrSxLMbZv3PKXCM/fen8NXS6jF8ipa81+ePjLIce8RSw8qSv5eKR E= X-Received: by 2002:a17:907:6d0c:b0:977:d932:cde2 with SMTP id sa12-20020a1709076d0c00b00977d932cde2mr2915771ejc.62.1686061898157; Tue, 06 Jun 2023 07:31:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5PBBSiXnbPpeYC1peKcjCaeEQxp6LGTtAdR9wXe90aEtAoWcYKuYOlhjPqhzz19QNiNlrI9Q== X-Received: by 2002:a17:907:6d0c:b0:977:d932:cde2 with SMTP id sa12-20020a1709076d0c00b00977d932cde2mr2915753ejc.62.1686061897870; Tue, 06 Jun 2023 07:31:37 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id bv13-20020a170906b1cd00b00978743b54bdsm486595ejb.78.2023.06.06.07.31.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:37 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 13/21] configure: rename --enable-pypi to --enable-download, control subprojects too Date: Tue, 6 Jun 2023 16:31:08 +0200 Message-Id: <20230606143116.685644-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The behavior of --{enable,disable}-pypi is similar to that of -Dwrapmode={default,nodownload} respectively. In particular, in both cases a feature needs to be explicitly enabled for the dependency to be downloaded. So, use a single option to control both cases. Now, --enable-slirp will trigger cloning and building of libslirp if the .pc file is not found on the machine. Reviewed-by: Daniel P. Berrangé Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini --- .gitignore | 2 -- configure | 17 +++++++---------- meson.build | 12 ++++++++---- subprojects/.gitignore | 3 +++ 4 files changed, 18 insertions(+), 16 deletions(-) create mode 100644 subprojects/.gitignore diff --git a/.gitignore b/.gitignore index 1ea59f48192..61fa39967b5 100644 --- a/.gitignore +++ b/.gitignore @@ -20,5 +20,3 @@ GTAGS *.swp *.patch *.gcov - -/subprojects/slirp diff --git a/configure b/configure index 92bacc756c0..52274212310 100755 --- a/configure +++ b/configure @@ -266,7 +266,7 @@ bsd_user="" plugins="$default_feature" ninja="" python= -pypi="enabled" +download="enabled" bindir="bin" skip_meson=no vfio_user_server="disabled" @@ -754,9 +754,9 @@ for opt do --with-git-submodules=*) git_submodules_action="$optarg" ;; - --disable-pypi) pypi="disabled" + --disable-download) download="disabled" ;; - --enable-pypi) pypi="enabled" + --enable-download) download="enabled" ;; --enable-plugins) if test "$mingw32" = "yes"; then error_exit "TCG plugins not currently supported on Windows platforms" @@ -960,7 +960,7 @@ python="$(command -v "$python")" # - venv is allowed to use system packages; # - all setup can be performed offline; # - missing packages may be fetched from PyPI, -# unless --disable-pypi is passed. +# unless --disable-download is passed. # - pip is not installed into the venv when possible, # but ensurepip is called as a fallback when necessary. @@ -977,7 +977,7 @@ python="$python -B" mkvenv="$python ${source_path}/python/scripts/mkvenv.py" mkvenv_flags="" -if test "$pypi" = "enabled" ; then +if test "$download" = "enabled" ; then mkvenv_flags="--online" fi @@ -1000,7 +1000,7 @@ meson="$(cd pyvenv/bin; pwd)/meson" # Conditionally ensure Sphinx is installed. mkvenv_flags="" -if test "$pypi" = "enabled" -a "$docs" = "enabled" ; then +if test "$download" = "enabled" -a "$docs" = "enabled" ; then mkvenv_flags="--online" fi @@ -1940,11 +1940,8 @@ if test "$skip_meson" = no; then rm -rf meson-private meson-info meson-logs - # Prevent meson from automatically downloading wrapped subprojects when missing. - # You can use 'meson subprojects download' before running configure. - meson_option_add "--wrap-mode=nodownload" - # Built-in options + test "$download" = "disabled" && meson_option_add "--wrap-mode=nodownload" test "$bindir" != "bin" && meson_option_add "-Dbindir=$bindir" test "$default_feature" = no && meson_option_add -Dauto_features=disabled test "$static" = yes && meson_option_add -Dprefer_static=true diff --git a/meson.build b/meson.build index 4302c019237..f8af4b02e44 100644 --- a/meson.build +++ b/meson.build @@ -3985,8 +3985,15 @@ endif # Configuration summary # ######################### -# Directories +# Build environment summary_info = {} +summary_info += {'Build directory': meson.current_build_dir()} +summary_info += {'Source path': meson.current_source_dir()} +summary_info += {'GIT submodules': config_host['GIT_SUBMODULES']} +summary_info += {'Download dependencies': get_option('wrap_mode') != 'nodownload'} +summary(summary_info, bool_yn: true, section: 'Build environment') + +# Directories summary_info += {'Install prefix': get_option('prefix')} summary_info += {'BIOS directory': qemu_datadir} pathsep = targetos == 'windows' ? ';' : ':' @@ -4004,9 +4011,6 @@ else summary_info += {'local state directory': 'queried at runtime'} endif summary_info += {'Doc directory': get_option('prefix') / get_option('docdir')} -summary_info += {'Build directory': meson.current_build_dir()} -summary_info += {'Source path': meson.current_source_dir()} -summary_info += {'GIT submodules': config_host['GIT_SUBMODULES']} summary(summary_info, bool_yn: true, section: 'Directories') # Host binaries diff --git a/subprojects/.gitignore b/subprojects/.gitignore new file mode 100644 index 00000000000..7560ebb0b1a --- /dev/null +++ b/subprojects/.gitignore @@ -0,0 +1,3 @@ +/packagecache + +/slirp From patchwork Tue Jun 6 14:31:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791259 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=cIWYPYhv; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCf70KJFz20Ty for ; Wed, 7 Jun 2023 00:34:07 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xis-0005PA-Jt; Tue, 06 Jun 2023 10:31:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xir-0005MA-Kg for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xip-0001JY-4E for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Nw8ksEi1LGkbWGe7Q/Qk6dPKsCnk9x+sAV4iBE3crXc=; b=cIWYPYhvpaX43H03FahOqGLkk4aMjYUX+jgCIw2AmGYwUWvvNh6gzyfyrY+Czsj2AcWRFi m5jpK/2fJs6h5bhdrHmXwBFUPZzAyOTf2jGgm6v8YAoG4pYoB5PLYujI91GotNZnQEGOn1 2NF6TzI04JQtRdXp8ZxdtOAHwHUXtxs= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-633-fDKrQqXjN8WhHbNeQ-F7wA-1; Tue, 06 Jun 2023 10:31:41 -0400 X-MC-Unique: fDKrQqXjN8WhHbNeQ-F7wA-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-514abe67064so4244296a12.0 for ; Tue, 06 Jun 2023 07:31:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061900; x=1688653900; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Nw8ksEi1LGkbWGe7Q/Qk6dPKsCnk9x+sAV4iBE3crXc=; b=fzDraTGKIo9Msr+9/wnPzBLrZA+Le/9UIKtR9xYFSz+P0+JNndvtkV8GzYGrg2vElg nYfatshJwFSTrEHSq/0YOr6F+BVFClAE/V7e1mTVLY6NqnHXWdhyf3yI5JvTMisKon4J mefUmPkaZXxVwZGM2RRaaExWidDVUF4DxYn3rJ79rj2RQ0JeU8uw0w/FDhzi1DjhQObM lXfNLhVriFYX7NXPJRggdSPjIMZh4AO148RAxShH9v7qovr84pxIXR65eUiL+yCg58W5 UBhPH8S8dK73HNB2qyZatmOmhXdnbRMz2nBL+hIomCEM47PBIp42glAASnvk21IvC0S6 ZzyQ== X-Gm-Message-State: AC+VfDxgvnzu8L/vGU5BxoQp/Vof6dRssTCeeVCApFKQcBI0y7Hrdmtm lC65Uhoka3SILxQKm1AidQ+rW2gomc61XlhFoDCjMN9iv5pNCLuay1/JcUDFRO3QMdlUs1nvGaD fwQm6b/KCA8YYHTbM7uTMKGxPd2lkbmu43Dj5tXhR9qR+/94n6/pp75TA2i68S5fC2wkIDaeCjr Y= X-Received: by 2002:aa7:cacb:0:b0:50b:c3f0:fb9d with SMTP id l11-20020aa7cacb000000b0050bc3f0fb9dmr2081278edt.41.1686061899797; Tue, 06 Jun 2023 07:31:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6+ecvrBKy7Y4IG9jG08kL3nll0PG4PDSv5ggpHUODq41Xd0UxIe61Rptr4INIcC50HUXL8hw== X-Received: by 2002:aa7:cacb:0:b0:50b:c3f0:fb9d with SMTP id l11-20020aa7cacb000000b0050bc3f0fb9dmr2081261edt.41.1686061899421; Tue, 06 Jun 2023 07:31:39 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id a25-20020aa7d919000000b005163008c6b7sm5078344edr.27.2023.06.06.07.31.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:38 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 14/21] git-submodule: allow partial update of .git-submodule-status Date: Tue, 6 Jun 2023 16:31:09 +0200 Message-Id: <20230606143116.685644-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Allow a specific subdirectory to run git-submodule.sh with only a subset of submodules, without removing the others from the .git-submodule-status file. This also allows scripts/git-submodule.sh to be more lenient: validating an empty set of submodules is not a mistake. Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini --- scripts/git-submodule.sh | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh index 0ce1efc44e5..b7d8f05352c 100755 --- a/scripts/git-submodule.sh +++ b/scripts/git-submodule.sh @@ -72,12 +72,8 @@ done case "$command" in status|validate) - if test -z "$maybe_modules" - then - test -s ${substat} && validate_error "$command" || exit 0 - fi - test -f "$substat" || validate_error "$command" + test -z "$maybe_modules" && exit 0 for module in $modules; do CURSTATUS=$($GIT submodule status $module) OLDSTATUS=$(cat $substat | grep $module) @@ -88,17 +84,23 @@ status|validate) exit 0 ;; update) - if test -z "$maybe_modules" - then - test -e $substat || touch $substat - exit 0 - fi + test -e $substat || touch $substat + test -z "$maybe_modules" && exit 0 $GIT submodule update --init $modules 1>/dev/null test $? -ne 0 && update_error "failed to update modules" - $GIT submodule status $modules > "${substat}" - test $? -ne 0 && update_error "failed to save git submodule status" >&2 + (while read -r; do + for module in $modules; do + case $REPLY in + *" $module "*) continue 2 ;; + esac + done + printf '%s\n' "$REPLY" + done + $GIT submodule status $modules + test $? -ne 0 && update_error "failed to save git submodule status" >&2) < $substat > $substat.new + mv -f $substat.new $substat ;; esac From patchwork Tue Jun 6 14:31:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791244 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=MaNm7fjB; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCcF2QDqz20Ty for ; Wed, 7 Jun 2023 00:32:29 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xj1-0005aq-Ey; Tue, 06 Jun 2023 10:31:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xiw-0005ZQ-U4 for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xiv-0001KI-Cx for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DDldL0xhfPvoE8avQxYF9j/S/qjA1eexqMtZkHxm0IM=; b=MaNm7fjB1MH88LL7hvonCjVmbZvqBpPAT2VuPmzZ/blfhlb7StAyyknhl1izAjTbyqagLC dYM9nWE7kJoLEWUn2Y66z5AgX+BnkxGtIeC397z4TNHj9l/rohuOcoEhvmNGbyKKYN6aCX QFyBAaUOOX57uIqyLUo/Xbe5faLxyzg= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-534-ZzSdp60kOqajJ9Uj-LxbMA-1; Tue, 06 Jun 2023 10:31:47 -0400 X-MC-Unique: ZzSdp60kOqajJ9Uj-LxbMA-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-94a355c9028so471426566b.3 for ; Tue, 06 Jun 2023 07:31:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061904; x=1688653904; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DDldL0xhfPvoE8avQxYF9j/S/qjA1eexqMtZkHxm0IM=; b=QBFr4+oyxxhOpDw/dXqX3zi4u8WlRg4GJhpgjql3Sv1Rvd7GzWCIZIKCfjS9non3E2 8F6Ihnt8rdONQ1bB2mPNwY9AE2/Kr4BT+GXiPMUJbrisxWSYsDGYqD28Q/muMkaS9sz5 y2CPCHZHkvhk/m7SHWtAIXdIO+s3UboGR8tiXMm/mMkUaaQfv74uQU5OLchdHiql6wuH x/zWSP9NTvhmL+oZddA69+RCPxqyStRYNIVz4hsjmSwsgrO8dLian11/Tsmk8cyRDYw0 KfxYQ+tpyaAsxyXEKwg6v9WTAxgzQd+k1agPrwG6bVGq4OJqYY4iMZUAKvXB6f35v1bB EBtw== X-Gm-Message-State: AC+VfDyYlapR0YoUuu6msIIZDL6QfR1fya+3pYj5/rF7Vf6ULLlcpUEH uWou60DOymW2xILbyHNemsVrcsBKUAI4SMmLlr1SoyHqA3CTVjf98mYRVxN/oLrpbBtaehsg6/W sRj5a8b1P3IHSXVwCmpRtL4NDCNrGkapLeFIba+qDb4TVBI/PuCsFaH0BeEJ1PTGaqhJmqSxrOB Q= X-Received: by 2002:a17:907:72c9:b0:977:abac:9635 with SMTP id du9-20020a17090772c900b00977abac9635mr2572453ejc.20.1686061903160; Tue, 06 Jun 2023 07:31:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7DTLiNKN097Jw0UyEpwPlg2xhDNQL20uM7G2M0j03cRPlaFTAv075C1l+9kIHIQKaTjPksyQ== X-Received: by 2002:a17:907:72c9:b0:977:abac:9635 with SMTP id du9-20020a17090772c900b00977abac9635mr2572431ejc.20.1686061900998; Tue, 06 Jun 2023 07:31:40 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id h21-20020a170906261500b00977cad140a8sm3851899ejc.218.2023.06.06.07.31.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:40 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 15/21] build: log submodule update from git-submodule.sh Date: Tue, 6 Jun 2023 16:31:10 +0200 Message-Id: <20230606143116.685644-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Print exactly which submodules have been updated, by reusing the logic of "git-submodule.sh validate" after executing "git submodule update --init'. Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini --- Makefile | 4 +--- scripts/git-submodule.sh | 16 +++++++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 8005f1cc53e..d68196acb9e 100644 --- a/Makefile +++ b/Makefile @@ -52,9 +52,7 @@ Makefile: .git-submodule-status .PHONY: git-submodule-update git-submodule-update: ifneq ($(GIT_SUBMODULES_ACTION),ignore) - $(call quiet-command, \ - (GIT=git "$(SRC_PATH)/scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES)), \ - "GIT","$(GIT_SUBMODULES)") + $(quiet-@)GIT=git "$(SRC_PATH)/scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES) endif # 0. ensure the build tree is okay diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh index b7d8f05352c..38b55c90e11 100755 --- a/scripts/git-submodule.sh +++ b/scripts/git-submodule.sh @@ -46,6 +46,13 @@ validate_error() { exit 1 } +check_updated() { + local CURSTATUS OLDSTATUS + CURSTATUS=$($GIT submodule status $module) + OLDSTATUS=$(grep $module $substat) + test "$CURSTATUS" = "$OLDSTATUS" +} + if test -n "$maybe_modules" && ! test -e ".git" then echo "$0: unexpectedly called with submodules but no git checkout exists" @@ -75,11 +82,7 @@ status|validate) test -f "$substat" || validate_error "$command" test -z "$maybe_modules" && exit 0 for module in $modules; do - CURSTATUS=$($GIT submodule status $module) - OLDSTATUS=$(cat $substat | grep $module) - if test "$CURSTATUS" != "$OLDSTATUS"; then - validate_error "$command" - fi + check_updated $module || validate_error "$command" done exit 0 ;; @@ -89,6 +92,9 @@ update) $GIT submodule update --init $modules 1>/dev/null test $? -ne 0 && update_error "failed to update modules" + for module in $modules; do + check_updated $module || echo Updated "$module" + done (while read -r; do for module in $modules; do From patchwork Tue Jun 6 14:31:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791251 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=KtSOBRWe; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCdd42w8z20Ty for ; Wed, 7 Jun 2023 00:33:41 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xj5-0005dQ-6y; Tue, 06 Jun 2023 10:31:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xiv-0005Z0-WB for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xit-0001K6-Fw for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dlNlZVqUkkegEZ5hR5obdfjUHReNHqMPiz2trjaQCyg=; b=KtSOBRWexs18xYEvUtOJVu6+P2swpP9MigQcmW6M+eaSD2bcyh1kC/NinEB5ugTkuw+HT4 7/3uFNulRn7KnW4dpvbJFenfz5pkSlt9TP36T98yfO1stpzfMh/1XbiqlOAbOBi0oakgYM DVT+12BMF2ElN37lBvPKo3XrCKS+sC0= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-414-GNqXKKw8PS6mbqgfM3pe2g-1; Tue, 06 Jun 2023 10:31:45 -0400 X-MC-Unique: GNqXKKw8PS6mbqgfM3pe2g-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-94a341efd9aso521915466b.0 for ; Tue, 06 Jun 2023 07:31:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061903; x=1688653903; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dlNlZVqUkkegEZ5hR5obdfjUHReNHqMPiz2trjaQCyg=; b=LGIN8o6n/ckXH3GbS3D39slImUXYHP4KZ3xDAzQRwCksnbXn4u4vBxgcXPGpgKs43S wgflmP8s27/IJk5Js4mahKftKnx3dgvdbP8vlVET2rK0qfxRVagEgcKowvw4BWSTuNcz qVYexOxYERfs2AcXpHb3DW8SF7okuUQaelaDInHs3/LILrCNUw3RMCzsad61O5f02TTj q3xoOPvQ4BHjnsXQ/sg/jwgp+w9wNCQKizGhu0VSZTvLCn66DHzTwMhdOtpNsNEj6RrS A4oNqUm4eCE+hO7DxMnDpYdVKvC3vdpaYq8L+MSeWE6dNZZTCeEa6kPxMZSV1eQspMST ozYQ== X-Gm-Message-State: AC+VfDzGQ7QS+y8mi7gDznINkoLrOynVE06LxHJTkDegHGZy29gVyWSk JCbvl10DUIDLBB94zm4aOv1Z03Am2oAXhtpMLvVNR7zbUlHnvA4qFiLxkSHwUzd7Lui/gyJov0y jFqDJGG+VUbdT0HTjXUEuhYAA2fsAPXa9ut7D3lRgLnung17ULYISZVkjToRkWOIqnLFiZOG3Tn 0= X-Received: by 2002:a17:907:6eaa:b0:96f:e7cf:5015 with SMTP id sh42-20020a1709076eaa00b0096fe7cf5015mr2537794ejc.17.1686061903267; Tue, 06 Jun 2023 07:31:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5rwQV9Swx+lSX/cHIVj5DC2wqCVj1cVwGgOR/TU6IrR2phsFKdF3g4oD5+6UZFxXPNTJuLkQ== X-Received: by 2002:a17:907:6eaa:b0:96f:e7cf:5015 with SMTP id sh42-20020a1709076eaa00b0096fe7cf5015mr2537778ejc.17.1686061902951; Tue, 06 Jun 2023 07:31:42 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id b13-20020a17090636cd00b00977eec5bb2csm1754301ejc.156.2023.06.06.07.31.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:42 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= Subject: [PULL 16/21] meson: subprojects: replace submodules with wrap files Date: Tue, 6 Jun 2023 16:31:11 +0200 Message-Id: <20230606143116.685644-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Compared to submodules, .wrap files have several advantages: * option parsing and downloading is delegated to meson * the commit is stored in a text file instead of a magic entry in the git tree object * we could stop shipping external dependencies that are only used as a fallback, but not break compilation on platforms that lack them. For example it may make sense to download dtc at build time, controlled by --enable-download, even when building from a tarball. Right now, this patch does the opposite: make-release treats dtc like libvfio-user (which is not stable API and therefore hasn't found its way into any distros) and keycodemap (which is a copylib, for better or worse). dependency() can fall back to a wrap automatically. However, this is only possible for libraries that come with a .pc file, and this is not very common for libfdt even though the upstream project in principle provides it; it also removes the control that we provide with --enable-fdt={system,internal}. Therefore, the logic to pick system vs. internal libfdt is left untouched. --enable-fdt=git is removed; it was already a synonym for --enable-fdt=internal. Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/buildtest-template.yml | 1 + .gitmodules | 9 ---- configure | 77 ++++++++++++----------------- meson.build | 15 +----- scripts/archive-source.sh | 11 ++++- scripts/make-release | 5 ++ subprojects/.gitignore | 3 ++ subprojects/dtc | 1 - subprojects/dtc.wrap | 4 ++ subprojects/keycodemapdb | 1 - subprojects/keycodemapdb.wrap | 4 ++ subprojects/libvfio-user | 1 - subprojects/libvfio-user.wrap | 4 ++ 13 files changed, 63 insertions(+), 73 deletions(-) delete mode 160000 subprojects/dtc create mode 100644 subprojects/dtc.wrap delete mode 160000 subprojects/keycodemapdb create mode 100644 subprojects/keycodemapdb.wrap delete mode 160000 subprojects/libvfio-user create mode 100644 subprojects/libvfio-user.wrap diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml index c9f2e737c09..3c997d7265b 100644 --- a/.gitlab-ci.d/buildtest-template.yml +++ b/.gitlab-ci.d/buildtest-template.yml @@ -44,6 +44,7 @@ script: - scripts/git-submodule.sh update $(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak) + - meson subprojects download $(cd build/subprojects && echo *) - cd build - find . -type f -exec touch {} + # Avoid recompiling by hiding ninja with NINJA=":" diff --git a/.gitmodules b/.gitmodules index f8b2ddf3877..a934c85e4e4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,9 +13,6 @@ [submodule "roms/qemu-palcode"] path = roms/qemu-palcode url = https://gitlab.com/qemu-project/qemu-palcode.git -[submodule "subprojects/dtc"] - path = subprojects/dtc - url = https://gitlab.com/qemu-project/dtc.git [submodule "roms/u-boot"] path = roms/u-boot url = https://gitlab.com/qemu-project/u-boot.git @@ -25,9 +22,6 @@ [submodule "roms/QemuMacDrivers"] path = roms/QemuMacDrivers url = https://gitlab.com/qemu-project/QemuMacDrivers.git -[submodule "subprojects/keycodemapdb"] - path = subprojects/keycodemapdb - url = https://gitlab.com/qemu-project/keycodemapdb.git [submodule "roms/seabios-hppa"] path = roms/seabios-hppa url = https://gitlab.com/qemu-project/seabios-hppa.git @@ -55,6 +49,3 @@ [submodule "tests/lcitool/libvirt-ci"] path = tests/lcitool/libvirt-ci url = https://gitlab.com/libvirt/libvirt-ci.git -[submodule "subprojects/libvfio-user"] - path = subprojects/libvfio-user - url = https://gitlab.com/qemu-project/libvfio-user.git diff --git a/configure b/configure index 52274212310..45d43ddbd97 100755 --- a/configure +++ b/configure @@ -253,7 +253,7 @@ else git_submodules_action="ignore" fi -git_submodules="subprojects/keycodemapdb" +git_submodules="" git="git" debug_tcg="no" docs="auto" @@ -269,7 +269,6 @@ python= download="enabled" bindir="bin" skip_meson=no -vfio_user_server="disabled" use_containers="yes" gdb_bin=$(command -v "gdb-multiarch" || command -v "gdb") gdb_arches="" @@ -281,16 +280,13 @@ unset target_list_exclude # The following Meson options are handled manually (still they # are included in the automatically generated help message) - -# 1. Track which submodules are needed -fdt="auto" - -# 2. Automatically enable/disable other options +# because they automatically enable/disable other options tcg="auto" cfi="false" -# 3. Need to check for -static-pie before Meson runs. Also, -# Meson has PIE as a boolean rather than enabled/disabled/auto. +# Meson has PIE as a boolean rather than enabled/disabled/auto, +# and we also need to check for -static-pie before Meson runs +# which requires knowing whether --static is enabled. pie="" static="no" @@ -743,14 +739,6 @@ for opt do ;; --disable-cfi) cfi="false" ;; - --disable-fdt) fdt="disabled" - ;; - --enable-fdt) fdt="enabled" - ;; - --enable-fdt=git) fdt="internal" - ;; - --enable-fdt=*) fdt="$optarg" - ;; --with-git-submodules=*) git_submodules_action="$optarg" ;; @@ -772,10 +760,6 @@ for opt do ;; --gdb=*) gdb_bin="$optarg" ;; - --enable-vfio-user-server) vfio_user_server="enabled" - ;; - --disable-vfio-user-server) vfio_user_server="disabled" - ;; # everything else has the same name in configure and meson --*) meson_option_parse "$opt" "$optarg" ;; @@ -787,6 +771,32 @@ if test "$plugins" = "yes" -a "$tcg" = "disabled"; then error_exit "Can't enable plugins on non-TCG builds" fi +if ! test -f "$source_path/subprojects/keycodemapdb/README" \ + && test -f "$download" = disabled +then + echo + echo "ERROR: missing subprojects" + echo + if test -e "$source_path/.git"; then + echo "--disable-download specified but subprojects were not" + echo 'checked out. Please invoke "meson subprojects download"' + echo "before configuring QEMU, or remove --disable-download" + echo "from the command line." + else + echo "This is not a GIT checkout but subproject content appears to" + echo "be missing. Do not use 'git archive' or GitHub download links" + echo "to acquire QEMU source archives. Non-GIT builds are only" + echo "supported with source archives linked from:" + echo + echo " https://www.qemu.org/download/#source" + echo + echo "Developers working with GIT can use scripts/archive-source.sh" + echo "if they need to create valid source archives." + fi + echo + exit 1 +fi + case $git_submodules_action in update|validate) if test ! -e "$source_path/.git" || ! has git; then @@ -795,7 +805,7 @@ case $git_submodules_action in fi ;; ignore) - if ! test -f "$source_path/subprojects/keycodemapdb/README" + if ! test -f "$source_path/tests/fp/berkeley-testfloat-3/README.md" then echo echo "ERROR: missing GIT submodules" @@ -1164,16 +1174,6 @@ EOF fi fi -########################################## -# fdt probe - -case "$fdt" in - auto | enabled | internal) - # Simpler to always update submodule, even if not needed. - git_submodules="${git_submodules} subprojects/dtc" - ;; -esac - ######################################## # check if ccache is interfering with # semantic analysis of macros @@ -1609,17 +1609,6 @@ write_target_makefile() { fi } -########################################## -# check for vfio_user_server - -case "$vfio_user_server" in - enabled ) - if test "$git_submodules_action" != "ignore"; then - git_submodules="${git_submodules} subprojects/libvfio-user" - fi - ;; -esac - ####################################### # cross-compiled firmware targets @@ -1951,12 +1940,10 @@ if test "$skip_meson" = no; then # QEMU options test "$cfi" != false && meson_option_add "-Dcfi=$cfi" test "$docs" != auto && meson_option_add "-Ddocs=$docs" - test "$fdt" != auto && meson_option_add "-Dfdt=$fdt" test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add "-Dfuzzing_engine=$LIB_FUZZING_ENGINE" test "$qemu_suffix" != qemu && meson_option_add "-Dqemu_suffix=$qemu_suffix" test "$smbd" != '' && meson_option_add "-Dsmbd=$smbd" test "$tcg" != enabled && meson_option_add "-Dtcg=$tcg" - test "$vfio_user_server" != auto && meson_option_add "-Dvfio_user_server=$vfio_user_server" run_meson() { NINJA=$ninja $meson setup --prefix "$prefix" "$@" $cross_arg "$PWD" "$source_path" } diff --git a/meson.build b/meson.build index f8af4b02e44..74fb147fde3 100644 --- a/meson.build +++ b/meson.build @@ -3031,14 +3031,7 @@ endif libvfio_user_dep = not_found if have_system and vfio_user_server_allowed - have_internal = fs.exists(meson.current_source_dir() / 'subprojects/libvfio-user/meson.build') - - if not have_internal - error('libvfio-user source not found - please pull git submodule') - endif - - libvfio_user_proj = subproject('libvfio-user') - + libvfio_user_proj = subproject('libvfio-user', required: true) libvfio_user_dep = libvfio_user_proj.get_variable('libvfio_user_dep') endif @@ -3066,12 +3059,6 @@ if fdt_required.length() > 0 or fdt_opt == 'enabled' endif if not fdt.found() assert(fdt_opt == 'internal') - have_internal = fs.exists(meson.current_source_dir() / 'subprojects/dtc/meson.build') - - if not have_internal - error('libfdt source not found - please pull git submodule') - endif - libfdt_proj = subproject('dtc', required: true, default_options: ['tools=false', 'yaml=disabled', 'python=disabled', 'default_library=static']) diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index dba5ae05b67..b99cb66e412 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -26,8 +26,8 @@ sub_file="${sub_tdir}/submodule.tar" # independent of what the developer currently has initialized # in their checkout, because the build environment is completely # different to the host OS. -submodules="subprojects/dtc subprojects/keycodemapdb" -submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3" +subprojects="dtc keycodemapdb libvfio-user" +submodules="tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3" sub_deinit="" function cleanup() { @@ -70,4 +70,11 @@ for sm in $submodules; do tar --concatenate --file "$tar_file" "$sub_file" test $? -ne 0 && error "failed append submodule $sm to $tar_file" done + +for sp in $subprojects; do + meson subprojects download $sp + test $? -ne 0 && error "failed to download subproject $sp" + tar --append --file "$tar_file" --exclude=.git subprojects/$sp + test $? -ne 0 && error "failed to append subproject $sp to $tar_file" +done exit 0 diff --git a/scripts/make-release b/scripts/make-release index 44a9d86a04a..0604e61b814 100755 --- a/scripts/make-release +++ b/scripts/make-release @@ -16,6 +16,9 @@ if [ $# -ne 2 ]; then exit 0 fi +# Only include wraps that are invoked with subproject() +SUBPROJECTS="dtc libvfio-user keycodemapdb" + src="$1" version="$2" destination=qemu-${version} @@ -26,6 +29,8 @@ git clone --single-branch -b "v${version}" -c advice.detachedHead=false \ pushd ${destination} git submodule update --init --single-branch +meson subprojects download $SUBPROJECTS + (cd roms/seabios && git describe --tags --long --dirty > .version) (cd roms/skiboot && ./make_version.sh > .version) # Fetch edk2 submodule's submodules, since it won't have access to them via diff --git a/subprojects/.gitignore b/subprojects/.gitignore index 7560ebb0b1a..935e9a72a8f 100644 --- a/subprojects/.gitignore +++ b/subprojects/.gitignore @@ -1,3 +1,6 @@ /packagecache +/dtc +/keycodemapdb +/libvfio-user /slirp diff --git a/subprojects/dtc b/subprojects/dtc deleted file mode 160000 index b6910bec116..00000000000 --- a/subprojects/dtc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b6910bec11614980a21e46fbccc35934b671bd81 diff --git a/subprojects/dtc.wrap b/subprojects/dtc.wrap new file mode 100644 index 00000000000..d1bc9174e91 --- /dev/null +++ b/subprojects/dtc.wrap @@ -0,0 +1,4 @@ +[wrap-git] +url = https://gitlab.com/qemu-project/dtc.git +revision = b6910bec11614980a21e46fbccc35934b671bd81 +depth = 1 diff --git a/subprojects/keycodemapdb b/subprojects/keycodemapdb deleted file mode 160000 index f5772a62ec5..00000000000 --- a/subprojects/keycodemapdb +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f5772a62ec52591ff6870b7e8ef32482371f22c6 diff --git a/subprojects/keycodemapdb.wrap b/subprojects/keycodemapdb.wrap new file mode 100644 index 00000000000..dda7b0e5716 --- /dev/null +++ b/subprojects/keycodemapdb.wrap @@ -0,0 +1,4 @@ +[wrap-git] +url = https://gitlab.com/qemu-project/keycodemapdb.git +revision = f5772a62ec52591ff6870b7e8ef32482371f22c6 +depth = 1 diff --git a/subprojects/libvfio-user b/subprojects/libvfio-user deleted file mode 160000 index 0b28d205572..00000000000 --- a/subprojects/libvfio-user +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0b28d205572c80b568a1003db2c8f37ca333e4d7 diff --git a/subprojects/libvfio-user.wrap b/subprojects/libvfio-user.wrap new file mode 100644 index 00000000000..416955ca451 --- /dev/null +++ b/subprojects/libvfio-user.wrap @@ -0,0 +1,4 @@ +[wrap-git] +url = https://gitlab.com/qemu-project/libvfio-user.git +revision = 0b28d205572c80b568a1003db2c8f37ca333e4d7 +depth = 1 From patchwork Tue Jun 6 14:31:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791260 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=dF0nEtqN; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCfc4PMDz20Ty for ; Wed, 7 Jun 2023 00:34:32 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6XjV-0006Ha-Ak; Tue, 06 Jun 2023 10:32:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xj3-0005h4-Gb for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xj1-0001LD-CZ for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7mfp4JIbpnZmD+vI6YToqq1ibWR/osoRJjAfjzSDVCk=; b=dF0nEtqNL3HeOvzmGb+ww6mIuDtDgQUkdfrENKh3tRmXlH9QqrCnjqlrvoHWtGnjKkEhE+ QlSbIdY5Y6NKd1snaA+/R0Eo+99Z7YlVXu10+C9WYHmQv1oCUFNlEx8JMJ705mFhe/27P4 mGe/Ota/9ulSPCZmKKvPLw6rgevF0xI= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-295-lKX2oGl9MAubFvBoBamk9Q-1; Tue, 06 Jun 2023 10:31:46 -0400 X-MC-Unique: lKX2oGl9MAubFvBoBamk9Q-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-94f7a2b21fdso543831566b.2 for ; Tue, 06 Jun 2023 07:31:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061905; x=1688653905; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7mfp4JIbpnZmD+vI6YToqq1ibWR/osoRJjAfjzSDVCk=; b=TS+/J4oJdchR9r50LnO09bKBweoogL2Uj/iLRxYPg8g5QgxquvYVzFEjSS6rwVOxQ2 l9EbdB8/uDlVVnMIewNEHj7ryGaX7ANgFwWiHPsvOqIghxb89vJNKeHfas2+0qKWq1Sd vp8E7NdHLhaI7UWYfdq/sfMFBcyglhjOggfrXe+EvDxZCVOfrcAkIzBtrDDqpIvIwJj6 r9lf+8xhBkM6tCUtQxuoOFcBFlMIV7+eG9l+ySDRbbklXew/mCgGM445S5IAP0TeK9gZ T70Kz3fxdHSq/77CMP8TEWZmj1MrRPxoiDmZmpm4XpA1gwG+6ouivb7GhCaT26ts68sV QOqw== X-Gm-Message-State: AC+VfDx02/vEvQ9kc2l9pcyBHuNBkMOUCLwNMknXHGhroA7qHHnP/lGx o4Xz8P85dFJ/nIctwTcGrsohQasp+AMrlG/r134Z+tLb5DUprjVEDcyXCjEM7mi3SH6eK9g4evh +N4yft6TnCfybB8WhEViw/je8gu7rHbswsWUxCb3sv7wTLinv6Mo1me/eTE49iAxvqt7v61OaF4 k= X-Received: by 2002:a17:906:db06:b0:94f:7a8:a902 with SMTP id xj6-20020a170906db0600b0094f07a8a902mr2598719ejb.14.1686061905257; Tue, 06 Jun 2023 07:31:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6RATfo+iogObMNa4nwVwehbr3805UCLnPq0yAnQ0sTHLFObiSls72XhC6fgbPsHPWRjT4vlA== X-Received: by 2002:a17:906:db06:b0:94f:7a8:a902 with SMTP id xj6-20020a170906db0600b0094f07a8a902mr2598708ejb.14.1686061905043; Tue, 06 Jun 2023 07:31:45 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id fx22-20020a170906b75600b00977da5d3350sm2635118ejb.107.2023.06.06.07.31.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:44 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= Subject: [PULL 17/21] configure: move SLOF submodule handling to pc-bios/s390-ccw Date: Tue, 6 Jun 2023 16:31:12 +0200 Message-Id: <20230606143116.685644-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Move the handling of the roms/SLOF submodule out of the main Makefile, since we are going to remove submodules from the build process of QEMU. Acked-by: Thomas Huth Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/buildtest-template.yml | 2 +- configure | 7 +++---- pc-bios/s390-ccw/Makefile | 11 +++++++++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml index 3c997d7265b..d01d504ec5f 100644 --- a/.gitlab-ci.d/buildtest-template.yml +++ b/.gitlab-ci.d/buildtest-template.yml @@ -43,7 +43,7 @@ image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest script: - scripts/git-submodule.sh update - $(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak) + roms/SLOF $(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak) - meson subprojects download $(cd build/subprojects && echo *) - cd build - find . -type f -exec touch {} + diff --git a/configure b/configure index 45d43ddbd97..de3904fb59d 100755 --- a/configure +++ b/configure @@ -1662,7 +1662,8 @@ fi # Only build s390-ccw bios if the compiler has -march=z900 or -march=z10 # (which is the lowest architecture level that Clang supports) -if have_target s390x-softmmu && probe_target_compiler s390x-softmmu; then +if have_target s390x-softmmu && probe_target_compiler s390x-softmmu && \ + GIT=git "$source_path/scripts/git-submodule.sh" "$git_submodules_action" roms/SLOF >> config.log 2>&1; then write_c_skeleton do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC has_z900=$? @@ -1675,10 +1676,8 @@ if have_target s390x-softmmu && probe_target_compiler s390x-softmmu; then config_mak=pc-bios/s390-ccw/config-host.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_PATH=$source_path/pc-bios/s390-ccw" >> $config_mak + echo "GIT_SUBMODULES_ACTION=$git_submodules_action" >> $config_mak write_target_makefile >> $config_mak - # SLOF is required for building the s390-ccw firmware on s390x, - # since it is using the libnet code from SLOF for network booting. - git_submodules="${git_submodules} roms/SLOF" fi fi diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile index 10e8f5cb633..9c5276f8ade 100644 --- a/pc-bios/s390-ccw/Makefile +++ b/pc-bios/s390-ccw/Makefile @@ -6,6 +6,8 @@ include config-host.mak CFLAGS = -O2 -g MAKEFLAGS += -rR +GIT_SUBMODULES = roms/SLOF + NULL := SPACE := $(NULL) # TARGET_PREFIX := $(patsubst %/,%:$(SPACE),$(TARGET_DIR)) @@ -80,3 +82,12 @@ clean: distclean: rm -f config-cc.mak + +.PHONY: git-submodule-update +$(SRC_PATH)/../../.git-submodule-status: git-submodule-update config-host.mak +Makefile: $(SRC_PATH)/../../.git-submodule-status + +git-submodule-update: +ifneq ($(GIT_SUBMODULES_ACTION),ignore) + $(quiet-@)GIT=git "$(SRC_PATH)/../../scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES) +endif From patchwork Tue Jun 6 14:31:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791253 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=RnnSnnG8; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCdj5cPzz20Ty for ; Wed, 7 Jun 2023 00:33:45 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6XjU-00067g-BN; Tue, 06 Jun 2023 10:32:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xiz-0005b3-PJ for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xiw-0001KV-NO for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ge4jdihkScBNcEVqkgKh2RLw5xeyUC0ajU6o0YN3Ua0=; b=RnnSnnG8ktEHyhylkFeSdBgR+ZcmcNO/z8Xc+P3SGIa4kFeYvLjJC1/bEB7Ngm14UPzaGI q/hexOr1DBZqjrW+toYH0p1kPW5AcEGmiTOQoHMdddr0sir4zVt6iDktbxW3BiKfT6/Z1U nGrJo6CZ2RDAL/lZGa+dp9XIjbFreuw= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-205-hw5ghIN4MMG-m7sjeWAuQQ-1; Tue, 06 Jun 2023 10:31:48 -0400 X-MC-Unique: hw5ghIN4MMG-m7sjeWAuQQ-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-977cb78acfcso232114666b.3 for ; Tue, 06 Jun 2023 07:31:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061907; x=1688653907; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ge4jdihkScBNcEVqkgKh2RLw5xeyUC0ajU6o0YN3Ua0=; b=Pg683VBRqdIHF3qRhiBO5P6HWLq7Wd1Cyc8QXcUtPPFKIyQOCKeOiKpZ3GqOcvLIeX av/lmvSaW65Lg5xnKapQOw4o8rELBeJ5tSKM/pou/bLayzSz3Rz70XLH/wKbFln2i94M eAcuSjAnnbAtkaVBEm5casgyD0lDQT2+1VNPLqkX8jfzZ8qmw/lpG9f3N4t8RHqdNfB+ d9oljXiU1rLviwBEujOgLvU2IkiUgslwtGBVfAB/uwo6rM+AAb8eWsvIe+qgLkQvuwhN 9m3DLQBMgqigScE2UidGgVuKLQKmBKlZg08WHU3fWtbcoBaekOOGluxbKovL/r9PEhxZ 0BUA== X-Gm-Message-State: AC+VfDygOes7mJMwb67yFSoTnh+IekprRPA5Tn5LEaxxQTAaUBJ18YLX KS0RV5B9eYfWIQ0eVVFjD0rcBdv55BiPS6guDrmUErxRslrz2kIuVP3NXay/0sN2XCmY0cu/sR5 G0XrWrvbcYNW+OE2Q1zkzN2shNJ9Se3269M6S8EJwQT+g4dq66i1bLnIENTuZoWFk/WHjgd5H34 o= X-Received: by 2002:a17:907:6d8c:b0:977:1dae:2500 with SMTP id sb12-20020a1709076d8c00b009771dae2500mr2359283ejc.1.1686061906955; Tue, 06 Jun 2023 07:31:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7IQ6WOhR//ArdbucUTfm/9ibUkuKz0rCNDX8N2G7UedhVGGA4Du+LcxqPnVID6aKGAxA5Osw== X-Received: by 2002:a17:907:6d8c:b0:977:1dae:2500 with SMTP id sb12-20020a1709076d8c00b009771dae2500mr2359271ejc.1.1686061906756; Tue, 06 Jun 2023 07:31:46 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id ot12-20020a170906cccc00b0096f4c9ce526sm5638194ejb.225.2023.06.06.07.31.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:46 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= Subject: [PULL 18/21] pc-bios/s390-ccw: always build network bootloader Date: Tue, 6 Jun 2023 16:31:13 +0200 Message-Id: <20230606143116.685644-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org In the beginning, the network bootloader was considered experimental and thus optional, but it is well established nowadays and configure always checks for roms/SLOF before compiling pc-bios/s390-ccw. Therefore, it makes sense to always build it together with the other part of the s390-ccw bios. Reviewed-by: Thomas Huth Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- pc-bios/s390-ccw/Makefile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile index 9c5276f8ade..2e8cc015aa0 100644 --- a/pc-bios/s390-ccw/Makefile +++ b/pc-bios/s390-ccw/Makefile @@ -67,12 +67,7 @@ s390-ccw.img: s390-ccw.elf $(OBJECTS): Makefile -ifneq ($(wildcard $(SRC_PATH)/../../roms/SLOF/lib/libnet),) include $(SRC_PATH)/netboot.mak -else -s390-netboot.img: - @echo "s390-netboot.img not built since roms/SLOF/ is not available." -endif ALL_OBJS = $(sort $(OBJECTS) $(NETOBJS) $(LIBCOBJS) $(LIBNETOBJS)) -include $(ALL_OBJS:%.o=%.d) From patchwork Tue Jun 6 14:31:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791258 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=CyCUpHbA; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCf36FNvz20X0 for ; Wed, 7 Jun 2023 00:34:03 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6XjX-0006XM-5T; Tue, 06 Jun 2023 10:32:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xj5-0005j2-FJ for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:32:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xiz-0001Kv-VP for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ztWkMLT8SUDP4DKHH81trlCyHOYzAGonO+NfUKGrnXs=; b=CyCUpHbAzzhSw6V9GWvSVdq6ctfSQbWS5ioXA4weQt1TJOmw+jSiZbqAn5x79mnnejFmGf RrzcaIpxwZnvDlGu0X6swCNZUmsibLhpELxDtypgS1vmjNqCRTMZ4EqVmsE30eVhJe7Ddi 8/OyJeshr7P/DCHkGSKxBMWiz33rgMc= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-347-BlcMQ9FWORKO-nsPezvbSg-1; Tue, 06 Jun 2023 10:31:51 -0400 X-MC-Unique: BlcMQ9FWORKO-nsPezvbSg-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-94f7a2b21fdso543838466b.2 for ; Tue, 06 Jun 2023 07:31:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061909; x=1688653909; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ztWkMLT8SUDP4DKHH81trlCyHOYzAGonO+NfUKGrnXs=; b=HCzT7T8TlPdCYai4AiEAb/Ky4v/PdMT2n8d2reZU6FacZp467hOh4WbxTgQDjSOoKy BzVWk467cjaB3Rj3tH5pzUXXbvrjSJ+yXjmlpfLIWr7BREyisyi08h+gXrdmOOJGSPDc fK3HKM3mRaGrqlXzZSueaMz3YmIlcR8/+Iu8a/dTUkpbyRiV379sL4umcMkaATvWhlj0 CmFWs8xYNX4T/HYXB2k/EEd3gQYIE7MheH7j0hTUwSbGenbgU6hklzlpvR0+9PmufnHN Cg4hja+oLCCKlxAu/w6PWWONitiOKl3xdBBZT72dbho3qeekmukMdxIvc58ptbhqDZLg q8GA== X-Gm-Message-State: AC+VfDwrHmsurOhc3taKdx9oexVFpV+Hs8fa/0k00llYTA1yGYnjXFkA lwgCLQizifdHVKR2TSWf8V6gW7PRteH11CPAdKChLK41FCj1+zUJ8WJPD6bbBrBi7gB6c6eu10A SPpDKEGfzblyNNeQSemoarE1zuBBv8fLs4M41NqtQfFen6WvM/BPzBxJof4MrnBaK8k2Kx4tNGI Q= X-Received: by 2002:a17:907:6d04:b0:973:946d:36b2 with SMTP id sa4-20020a1709076d0400b00973946d36b2mr2362838ejc.56.1686061909117; Tue, 06 Jun 2023 07:31:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4lq7Nt8Q+vEqe5Yn2t8m/KiaxPV9wzWYKQ2LIGEE8wOkgGI0t8NeYEIhnEQpF9gRjNf5rlFw== X-Received: by 2002:a17:907:6d04:b0:973:946d:36b2 with SMTP id sa4-20020a1709076d0400b00973946d36b2mr2362800ejc.56.1686061908377; Tue, 06 Jun 2023 07:31:48 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id v1-20020a1709060b4100b0096f6647b5e8sm5645938ejg.64.2023.06.06.07.31.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:47 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= Subject: [PULL 19/21] meson: subprojects: replace berkeley-{soft, test}float-3 with wraps Date: Tue, 6 Jun 2023 16:31:14 +0200 Message-Id: <20230606143116.685644-20-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Unlike other subprojects, these require an overlay directory to include meson rules to build the libraries. The rules are basically lifted from tests/fp/meson.build, with a few changes to create platform.h and publish a dependency. The build defines are passed through a subproject option, and posted back to users of the library via the dependency's compile_args. The only remaining user of GIT_SUBMODULES and GIT_SUBMODULES_ACTION is roms/SLOF, which is used to build pc-bios/s390-ccw. All other roms submodules are only present to satisfy the license on pre-built firmware blobs. Best reviewed with --color-moved. Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- .gitmodules | 6 - configure | 27 - scripts/archive-source.sh | 22 +- scripts/make-release | 2 +- subprojects/.gitignore | 2 + subprojects/berkeley-softfloat-3.wrap | 5 + subprojects/berkeley-testfloat-3.wrap | 5 + .../berkeley-softfloat-3/meson.build | 339 +++++++++++ .../berkeley-softfloat-3/meson_options.txt | 1 + .../berkeley-testfloat-3/meson.build | 220 +++++++ .../berkeley-testfloat-3/meson_options.txt | 1 + tests/fp/meson.build | 541 +----------------- 12 files changed, 590 insertions(+), 581 deletions(-) create mode 100644 subprojects/berkeley-softfloat-3.wrap create mode 100644 subprojects/berkeley-testfloat-3.wrap create mode 100644 subprojects/packagefiles/berkeley-softfloat-3/meson.build create mode 100644 subprojects/packagefiles/berkeley-softfloat-3/meson_options.txt create mode 100644 subprojects/packagefiles/berkeley-testfloat-3/meson.build create mode 100644 subprojects/packagefiles/berkeley-testfloat-3/meson_options.txt diff --git a/.gitmodules b/.gitmodules index a934c85e4e4..73cae4cd4da 100644 --- a/.gitmodules +++ b/.gitmodules @@ -28,12 +28,6 @@ [submodule "roms/u-boot-sam460ex"] path = roms/u-boot-sam460ex url = https://gitlab.com/qemu-project/u-boot-sam460ex.git -[submodule "tests/fp/berkeley-testfloat-3"] - path = tests/fp/berkeley-testfloat-3 - url = https://gitlab.com/qemu-project/berkeley-testfloat-3.git -[submodule "tests/fp/berkeley-softfloat-3"] - path = tests/fp/berkeley-softfloat-3 - url = https://gitlab.com/qemu-project/berkeley-softfloat-3.git [submodule "roms/edk2"] path = roms/edk2 url = https://gitlab.com/qemu-project/edk2.git diff --git a/configure b/configure index de3904fb59d..4dad32938df 100755 --- a/configure +++ b/configure @@ -805,28 +805,6 @@ case $git_submodules_action in fi ;; ignore) - if ! test -f "$source_path/tests/fp/berkeley-testfloat-3/README.md" - then - echo - echo "ERROR: missing GIT submodules" - echo - if test -e "$source_path/.git"; then - echo "--with-git-submodules=ignore specified but submodules were not" - echo "checked out. Please initialize and update submodules." - else - echo "This is not a GIT checkout but module content appears to" - echo "be missing. Do not use 'git archive' or GitHub download links" - echo "to acquire QEMU source archives. Non-GIT builds are only" - echo "supported with source archives linked from:" - echo - echo " https://www.qemu.org/download/#source" - echo - echo "Developers working with GIT can use scripts/archive-source.sh" - echo "if they need to create valid source archives." - fi - echo - exit 1 - fi ;; *) echo "ERROR: invalid --with-git-submodules= value '$git_submodules_action'" @@ -1142,11 +1120,6 @@ if test "$tcg" = "auto"; then fi fi -if test "$tcg" = "enabled"; then - git_submodules="$git_submodules tests/fp/berkeley-testfloat-3" - git_submodules="$git_submodules tests/fp/berkeley-softfloat-3" -fi - ########################################## # big/little endian test cat > $TMPC << EOF diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index b99cb66e412..48996304910 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -26,8 +26,7 @@ sub_file="${sub_tdir}/submodule.tar" # independent of what the developer currently has initialized # in their checkout, because the build environment is completely # different to the host OS. -subprojects="dtc keycodemapdb libvfio-user" -submodules="tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3" +subprojects="dtc keycodemapdb libvfio-user berkeley-softfloat-3 berkeley-testfloat-3" sub_deinit="" function cleanup() { @@ -51,25 +50,6 @@ function tree_ish() { git archive --format tar "$(tree_ish)" > "$tar_file" test $? -ne 0 && error "failed to archive qemu" -for sm in $submodules; do - status="$(git submodule status "$sm")" - smhash="${status#[ +-]}" - smhash="${smhash%% *}" - case "$status" in - -*) - sub_deinit="$sub_deinit $sm" - git submodule update --init "$sm" - test $? -ne 0 && error "failed to update submodule $sm" - ;; - +*) - echo "WARNING: submodule $sm is out of sync" - ;; - esac - (cd $sm; git archive --format tar --prefix "$sm/" $(tree_ish)) > "$sub_file" - test $? -ne 0 && error "failed to archive submodule $sm ($smhash)" - tar --concatenate --file "$tar_file" "$sub_file" - test $? -ne 0 && error "failed append submodule $sm to $tar_file" -done for sp in $subprojects; do meson subprojects download $sp diff --git a/scripts/make-release b/scripts/make-release index 0604e61b814..c5db87b3f91 100755 --- a/scripts/make-release +++ b/scripts/make-release @@ -17,7 +17,7 @@ if [ $# -ne 2 ]; then fi # Only include wraps that are invoked with subproject() -SUBPROJECTS="dtc libvfio-user keycodemapdb" +SUBPROJECTS="dtc libvfio-user keycodemapdb berkeley-softfloat-3 berkeley-testfloat-3" src="$1" version="$2" diff --git a/subprojects/.gitignore b/subprojects/.gitignore index 935e9a72a8f..adca0266be6 100644 --- a/subprojects/.gitignore +++ b/subprojects/.gitignore @@ -1,5 +1,7 @@ /packagecache +/berkeley-softfloat-3 +/berkeley-testfloat-3 /dtc /keycodemapdb /libvfio-user diff --git a/subprojects/berkeley-softfloat-3.wrap b/subprojects/berkeley-softfloat-3.wrap new file mode 100644 index 00000000000..a8fd87740b1 --- /dev/null +++ b/subprojects/berkeley-softfloat-3.wrap @@ -0,0 +1,5 @@ +[wrap-git] +url = https://gitlab.com/qemu-project/berkeley-softfloat-3 +revision = b64af41c3276f97f0e181920400ee056b9c88037 +patch_directory = berkeley-softfloat-3 +depth = 1 diff --git a/subprojects/berkeley-testfloat-3.wrap b/subprojects/berkeley-testfloat-3.wrap new file mode 100644 index 00000000000..6ad80a37b2a --- /dev/null +++ b/subprojects/berkeley-testfloat-3.wrap @@ -0,0 +1,5 @@ +[wrap-git] +url = https://gitlab.com/qemu-project/berkeley-testfloat-3 +revision = 40619cbb3bf32872df8c53cc457039229428a263 +patch_directory = berkeley-testfloat-3 +depth = 1 diff --git a/subprojects/packagefiles/berkeley-softfloat-3/meson.build b/subprojects/packagefiles/berkeley-softfloat-3/meson.build new file mode 100644 index 00000000000..4ce964b8389 --- /dev/null +++ b/subprojects/packagefiles/berkeley-softfloat-3/meson.build @@ -0,0 +1,339 @@ +project('berkeley-softfloat-3', 'c', + default_options: ['warning_level=1', 'c_std=gnu99']) + +fpcflags = get_option('defines') + +platform_data = configuration_data() +platform_data.set('INLINE', 'static inline') +platform_data.set('LITTLEENDIAN', host_machine.endian() == 'little') +configure_file(output: 'platform.h', configuration: platform_data) + +sfdir = 'source' +sfspedir = sfdir / '8086-SSE' +sfinc = include_directories('.', sfdir / 'include', sfspedir) + +add_project_arguments([ + '-Wno-implicit-fallthrough', + '-Wno-missing-prototypes', + '-Wno-redundant-decls', + '-Wno-return-type', + '-Wno-error', +], native: false, language: 'c') + +libsoftfloat = static_library( + 'softfloat', + files( + # primitives + sfdir / 's_eq128.c', + sfdir / 's_le128.c', + sfdir / 's_lt128.c', + sfdir / 's_shortShiftLeft128.c', + sfdir / 's_shortShiftRight128.c', + sfdir / 's_shortShiftRightJam64.c', + sfdir / 's_shortShiftRightJam64Extra.c', + sfdir / 's_shortShiftRightJam128.c', + sfdir / 's_shortShiftRightJam128Extra.c', + sfdir / 's_shiftRightJam32.c', + sfdir / 's_shiftRightJam64.c', + sfdir / 's_shiftRightJam64Extra.c', + sfdir / 's_shiftRightJam128.c', + sfdir / 's_shiftRightJam128Extra.c', + sfdir / 's_shiftRightJam256M.c', + sfdir / 's_countLeadingZeros8.c', + sfdir / 's_countLeadingZeros16.c', + sfdir / 's_countLeadingZeros32.c', + sfdir / 's_countLeadingZeros64.c', + sfdir / 's_add128.c', + sfdir / 's_add256M.c', + sfdir / 's_sub128.c', + sfdir / 's_sub256M.c', + sfdir / 's_mul64ByShifted32To128.c', + sfdir / 's_mul64To128.c', + sfdir / 's_mul128By32.c', + sfdir / 's_mul128To256M.c', + sfdir / 's_approxRecip_1Ks.c', + sfdir / 's_approxRecip32_1.c', + sfdir / 's_approxRecipSqrt_1Ks.c', + sfdir / 's_approxRecipSqrt32_1.c', + # others + sfdir / 's_roundToUI32.c', + sfdir / 's_roundToUI64.c', + sfdir / 's_roundToI32.c', + sfdir / 's_roundToI64.c', + sfdir / 's_normSubnormalF16Sig.c', + sfdir / 's_roundPackToF16.c', + sfdir / 's_normRoundPackToF16.c', + sfdir / 's_addMagsF16.c', + sfdir / 's_subMagsF16.c', + sfdir / 's_mulAddF16.c', + sfdir / 's_normSubnormalF32Sig.c', + sfdir / 's_roundPackToF32.c', + sfdir / 's_normRoundPackToF32.c', + sfdir / 's_addMagsF32.c', + sfdir / 's_subMagsF32.c', + sfdir / 's_mulAddF32.c', + sfdir / 's_normSubnormalF64Sig.c', + sfdir / 's_roundPackToF64.c', + sfdir / 's_normRoundPackToF64.c', + sfdir / 's_addMagsF64.c', + sfdir / 's_subMagsF64.c', + sfdir / 's_mulAddF64.c', + sfdir / 's_normSubnormalExtF80Sig.c', + sfdir / 's_roundPackToExtF80.c', + sfdir / 's_normRoundPackToExtF80.c', + sfdir / 's_addMagsExtF80.c', + sfdir / 's_subMagsExtF80.c', + sfdir / 's_normSubnormalF128Sig.c', + sfdir / 's_roundPackToF128.c', + sfdir / 's_normRoundPackToF128.c', + sfdir / 's_addMagsF128.c', + sfdir / 's_subMagsF128.c', + sfdir / 's_mulAddF128.c', + sfdir / 'softfloat_state.c', + sfdir / 'ui32_to_f16.c', + sfdir / 'ui32_to_f32.c', + sfdir / 'ui32_to_f64.c', + sfdir / 'ui32_to_extF80.c', + sfdir / 'ui32_to_extF80M.c', + sfdir / 'ui32_to_f128.c', + sfdir / 'ui32_to_f128M.c', + sfdir / 'ui64_to_f16.c', + sfdir / 'ui64_to_f32.c', + sfdir / 'ui64_to_f64.c', + sfdir / 'ui64_to_extF80.c', + sfdir / 'ui64_to_extF80M.c', + sfdir / 'ui64_to_f128.c', + sfdir / 'ui64_to_f128M.c', + sfdir / 'i32_to_f16.c', + sfdir / 'i32_to_f32.c', + sfdir / 'i32_to_f64.c', + sfdir / 'i32_to_extF80.c', + sfdir / 'i32_to_extF80M.c', + sfdir / 'i32_to_f128.c', + sfdir / 'i32_to_f128M.c', + sfdir / 'i64_to_f16.c', + sfdir / 'i64_to_f32.c', + sfdir / 'i64_to_f64.c', + sfdir / 'i64_to_extF80.c', + sfdir / 'i64_to_extF80M.c', + sfdir / 'i64_to_f128.c', + sfdir / 'i64_to_f128M.c', + sfdir / 'f16_to_ui32.c', + sfdir / 'f16_to_ui64.c', + sfdir / 'f16_to_i32.c', + sfdir / 'f16_to_i64.c', + sfdir / 'f16_to_ui32_r_minMag.c', + sfdir / 'f16_to_ui64_r_minMag.c', + sfdir / 'f16_to_i32_r_minMag.c', + sfdir / 'f16_to_i64_r_minMag.c', + sfdir / 'f16_to_f32.c', + sfdir / 'f16_to_f64.c', + sfdir / 'f16_to_extF80.c', + sfdir / 'f16_to_extF80M.c', + sfdir / 'f16_to_f128.c', + sfdir / 'f16_to_f128M.c', + sfdir / 'f16_roundToInt.c', + sfdir / 'f16_add.c', + sfdir / 'f16_sub.c', + sfdir / 'f16_mul.c', + sfdir / 'f16_mulAdd.c', + sfdir / 'f16_div.c', + sfdir / 'f16_rem.c', + sfdir / 'f16_sqrt.c', + sfdir / 'f16_eq.c', + sfdir / 'f16_le.c', + sfdir / 'f16_lt.c', + sfdir / 'f16_eq_signaling.c', + sfdir / 'f16_le_quiet.c', + sfdir / 'f16_lt_quiet.c', + sfdir / 'f16_isSignalingNaN.c', + sfdir / 'f32_to_ui32.c', + sfdir / 'f32_to_ui64.c', + sfdir / 'f32_to_i32.c', + sfdir / 'f32_to_i64.c', + sfdir / 'f32_to_ui32_r_minMag.c', + sfdir / 'f32_to_ui64_r_minMag.c', + sfdir / 'f32_to_i32_r_minMag.c', + sfdir / 'f32_to_i64_r_minMag.c', + sfdir / 'f32_to_f16.c', + sfdir / 'f32_to_f64.c', + sfdir / 'f32_to_extF80.c', + sfdir / 'f32_to_extF80M.c', + sfdir / 'f32_to_f128.c', + sfdir / 'f32_to_f128M.c', + sfdir / 'f32_roundToInt.c', + sfdir / 'f32_add.c', + sfdir / 'f32_sub.c', + sfdir / 'f32_mul.c', + sfdir / 'f32_mulAdd.c', + sfdir / 'f32_div.c', + sfdir / 'f32_rem.c', + sfdir / 'f32_sqrt.c', + sfdir / 'f32_eq.c', + sfdir / 'f32_le.c', + sfdir / 'f32_lt.c', + sfdir / 'f32_eq_signaling.c', + sfdir / 'f32_le_quiet.c', + sfdir / 'f32_lt_quiet.c', + sfdir / 'f32_isSignalingNaN.c', + sfdir / 'f64_to_ui32.c', + sfdir / 'f64_to_ui64.c', + sfdir / 'f64_to_i32.c', + sfdir / 'f64_to_i64.c', + sfdir / 'f64_to_ui32_r_minMag.c', + sfdir / 'f64_to_ui64_r_minMag.c', + sfdir / 'f64_to_i32_r_minMag.c', + sfdir / 'f64_to_i64_r_minMag.c', + sfdir / 'f64_to_f16.c', + sfdir / 'f64_to_f32.c', + sfdir / 'f64_to_extF80.c', + sfdir / 'f64_to_extF80M.c', + sfdir / 'f64_to_f128.c', + sfdir / 'f64_to_f128M.c', + sfdir / 'f64_roundToInt.c', + sfdir / 'f64_add.c', + sfdir / 'f64_sub.c', + sfdir / 'f64_mul.c', + sfdir / 'f64_mulAdd.c', + sfdir / 'f64_div.c', + sfdir / 'f64_rem.c', + sfdir / 'f64_sqrt.c', + sfdir / 'f64_eq.c', + sfdir / 'f64_le.c', + sfdir / 'f64_lt.c', + sfdir / 'f64_eq_signaling.c', + sfdir / 'f64_le_quiet.c', + sfdir / 'f64_lt_quiet.c', + sfdir / 'f64_isSignalingNaN.c', + sfdir / 'extF80_to_ui32.c', + sfdir / 'extF80_to_ui64.c', + sfdir / 'extF80_to_i32.c', + sfdir / 'extF80_to_i64.c', + sfdir / 'extF80_to_ui32_r_minMag.c', + sfdir / 'extF80_to_ui64_r_minMag.c', + sfdir / 'extF80_to_i32_r_minMag.c', + sfdir / 'extF80_to_i64_r_minMag.c', + sfdir / 'extF80_to_f16.c', + sfdir / 'extF80_to_f32.c', + sfdir / 'extF80_to_f64.c', + sfdir / 'extF80_to_f128.c', + sfdir / 'extF80_roundToInt.c', + sfdir / 'extF80_add.c', + sfdir / 'extF80_sub.c', + sfdir / 'extF80_mul.c', + sfdir / 'extF80_div.c', + sfdir / 'extF80_rem.c', + sfdir / 'extF80_sqrt.c', + sfdir / 'extF80_eq.c', + sfdir / 'extF80_le.c', + sfdir / 'extF80_lt.c', + sfdir / 'extF80_eq_signaling.c', + sfdir / 'extF80_le_quiet.c', + sfdir / 'extF80_lt_quiet.c', + sfdir / 'extF80_isSignalingNaN.c', + sfdir / 'extF80M_to_ui32.c', + sfdir / 'extF80M_to_ui64.c', + sfdir / 'extF80M_to_i32.c', + sfdir / 'extF80M_to_i64.c', + sfdir / 'extF80M_to_ui32_r_minMag.c', + sfdir / 'extF80M_to_ui64_r_minMag.c', + sfdir / 'extF80M_to_i32_r_minMag.c', + sfdir / 'extF80M_to_i64_r_minMag.c', + sfdir / 'extF80M_to_f16.c', + sfdir / 'extF80M_to_f32.c', + sfdir / 'extF80M_to_f64.c', + sfdir / 'extF80M_to_f128M.c', + sfdir / 'extF80M_roundToInt.c', + sfdir / 'extF80M_add.c', + sfdir / 'extF80M_sub.c', + sfdir / 'extF80M_mul.c', + sfdir / 'extF80M_div.c', + sfdir / 'extF80M_rem.c', + sfdir / 'extF80M_sqrt.c', + sfdir / 'extF80M_eq.c', + sfdir / 'extF80M_le.c', + sfdir / 'extF80M_lt.c', + sfdir / 'extF80M_eq_signaling.c', + sfdir / 'extF80M_le_quiet.c', + sfdir / 'extF80M_lt_quiet.c', + sfdir / 'f128_to_ui32.c', + sfdir / 'f128_to_ui64.c', + sfdir / 'f128_to_i32.c', + sfdir / 'f128_to_i64.c', + sfdir / 'f128_to_ui32_r_minMag.c', + sfdir / 'f128_to_ui64_r_minMag.c', + sfdir / 'f128_to_i32_r_minMag.c', + sfdir / 'f128_to_i64_r_minMag.c', + sfdir / 'f128_to_f16.c', + sfdir / 'f128_to_f32.c', + sfdir / 'f128_to_extF80.c', + sfdir / 'f128_to_f64.c', + sfdir / 'f128_roundToInt.c', + sfdir / 'f128_add.c', + sfdir / 'f128_sub.c', + sfdir / 'f128_mul.c', + sfdir / 'f128_mulAdd.c', + sfdir / 'f128_div.c', + sfdir / 'f128_rem.c', + sfdir / 'f128_sqrt.c', + sfdir / 'f128_eq.c', + sfdir / 'f128_le.c', + sfdir / 'f128_lt.c', + sfdir / 'f128_eq_signaling.c', + sfdir / 'f128_le_quiet.c', + sfdir / 'f128_lt_quiet.c', + sfdir / 'f128_isSignalingNaN.c', + sfdir / 'f128M_to_ui32.c', + sfdir / 'f128M_to_ui64.c', + sfdir / 'f128M_to_i32.c', + sfdir / 'f128M_to_i64.c', + sfdir / 'f128M_to_ui32_r_minMag.c', + sfdir / 'f128M_to_ui64_r_minMag.c', + sfdir / 'f128M_to_i32_r_minMag.c', + sfdir / 'f128M_to_i64_r_minMag.c', + sfdir / 'f128M_to_f16.c', + sfdir / 'f128M_to_f32.c', + sfdir / 'f128M_to_extF80M.c', + sfdir / 'f128M_to_f64.c', + sfdir / 'f128M_roundToInt.c', + sfdir / 'f128M_add.c', + sfdir / 'f128M_sub.c', + sfdir / 'f128M_mul.c', + sfdir / 'f128M_mulAdd.c', + sfdir / 'f128M_div.c', + sfdir / 'f128M_rem.c', + sfdir / 'f128M_sqrt.c', + sfdir / 'f128M_eq.c', + sfdir / 'f128M_le.c', + sfdir / 'f128M_lt.c', + sfdir / 'f128M_eq_signaling.c', + sfdir / 'f128M_le_quiet.c', + sfdir / 'f128M_lt_quiet.c', + # spe + sfspedir / 'softfloat_raiseFlags.c', + sfspedir / 's_f16UIToCommonNaN.c', + sfspedir / 's_commonNaNToF16UI.c', + sfspedir / 's_propagateNaNF16UI.c', + sfspedir / 's_f32UIToCommonNaN.c', + sfspedir / 's_commonNaNToF32UI.c', + sfspedir / 's_propagateNaNF32UI.c', + sfspedir / 's_f64UIToCommonNaN.c', + sfspedir / 's_commonNaNToF64UI.c', + sfspedir / 's_propagateNaNF64UI.c', + sfspedir / 'extF80M_isSignalingNaN.c', + sfspedir / 's_extF80UIToCommonNaN.c', + sfspedir / 's_commonNaNToExtF80UI.c', + sfspedir / 's_propagateNaNExtF80UI.c', + sfspedir / 'f128M_isSignalingNaN.c', + sfspedir / 's_f128UIToCommonNaN.c', + sfspedir / 's_commonNaNToF128UI.c', + sfspedir / 's_propagateNaNF128UI.c', + ), + include_directories: sfinc, + c_args: fpcflags, +) + +libsoftfloat_dep = declare_dependency( + link_with: libsoftfloat, + include_directories: sfinc, + compile_args: fpcflags) diff --git a/subprojects/packagefiles/berkeley-softfloat-3/meson_options.txt b/subprojects/packagefiles/berkeley-softfloat-3/meson_options.txt new file mode 100644 index 00000000000..868ae57e805 --- /dev/null +++ b/subprojects/packagefiles/berkeley-softfloat-3/meson_options.txt @@ -0,0 +1 @@ +option('defines', type : 'array', value : []) diff --git a/subprojects/packagefiles/berkeley-testfloat-3/meson.build b/subprojects/packagefiles/berkeley-testfloat-3/meson.build new file mode 100644 index 00000000000..a41673d616b --- /dev/null +++ b/subprojects/packagefiles/berkeley-testfloat-3/meson.build @@ -0,0 +1,220 @@ +project('berkeley-testfloat-3', 'c', + default_options: ['warning_level=1', 'c_std=gnu99']) + +fpcflags = get_option('defines') + +platform_data = configuration_data() +platform_data.set('INLINE', 'static inline') +platform_data.set('LITTLEENDIAN', host_machine.endian() == 'little') +configure_file(output: 'platform.h', configuration: platform_data) + +tfdir = 'source' +tfinc = include_directories('.', tfdir) + +add_project_arguments( + [ + '-Wno-implicit-fallthrough', + '-Wno-strict-prototypes', + '-Wno-unknown-pragmas', + '-Wno-uninitialized', + '-Wno-missing-prototypes', + '-Wno-return-type', + '-Wno-unused-function', + '-Wno-missing-format-attribute', + '-Wno-error', + ] + meson.get_compiler('c').get_supported_arguments('-Wno-ignored-pragmas'), + native: false, language: 'c') + +tfgencases = [ + tfdir / 'genCases_ui32.c', + tfdir / 'genCases_ui64.c', + tfdir / 'genCases_i32.c', + tfdir / 'genCases_i64.c', + tfdir / 'genCases_f16.c', + tfdir / 'genCases_f32.c', + tfdir / 'genCases_f64.c', + tfdir / 'genCases_extF80.c', + tfdir / 'genCases_f128.c', +] + +tfwritecase = [ + tfdir / 'writeCase_a_ui32.c', + tfdir / 'writeCase_a_ui64.c', + tfdir / 'writeCase_a_f16.c', + tfdir / 'writeCase_ab_f16.c', + tfdir / 'writeCase_abc_f16.c', + tfdir / 'writeCase_a_f32.c', + tfdir / 'writeCase_ab_f32.c', + tfdir / 'writeCase_abc_f32.c', + tfdir / 'writeCase_a_f64.c', + tfdir / 'writeCase_ab_f64.c', + tfdir / 'writeCase_abc_f64.c', + tfdir / 'writeCase_a_extF80M.c', + tfdir / 'writeCase_ab_extF80M.c', + tfdir / 'writeCase_a_f128M.c', + tfdir / 'writeCase_ab_f128M.c', + tfdir / 'writeCase_abc_f128M.c', + tfdir / 'writeCase_z_bool.c', + tfdir / 'writeCase_z_ui32.c', + tfdir / 'writeCase_z_ui64.c', + tfdir / 'writeCase_z_f16.c', + tfdir / 'writeCase_z_f32.c', + tfdir / 'writeCase_z_f64.c', + tfdir / 'writeCase_z_extF80M.c', + tfdir / 'writeCase_z_f128M.c', +] + +tftest = [ + tfdir / 'test_a_ui32_z_f16.c', + tfdir / 'test_a_ui32_z_f32.c', + tfdir / 'test_a_ui32_z_f64.c', + tfdir / 'test_a_ui32_z_extF80.c', + tfdir / 'test_a_ui32_z_f128.c', + tfdir / 'test_a_ui64_z_f16.c', + tfdir / 'test_a_ui64_z_f32.c', + tfdir / 'test_a_ui64_z_f64.c', + tfdir / 'test_a_ui64_z_extF80.c', + tfdir / 'test_a_ui64_z_f128.c', + tfdir / 'test_a_i32_z_f16.c', + tfdir / 'test_a_i32_z_f32.c', + tfdir / 'test_a_i32_z_f64.c', + tfdir / 'test_a_i32_z_extF80.c', + tfdir / 'test_a_i32_z_f128.c', + tfdir / 'test_a_i64_z_f16.c', + tfdir / 'test_a_i64_z_f32.c', + tfdir / 'test_a_i64_z_f64.c', + tfdir / 'test_a_i64_z_extF80.c', + tfdir / 'test_a_i64_z_f128.c', + tfdir / 'test_a_f16_z_ui32_rx.c', + tfdir / 'test_a_f16_z_ui64_rx.c', + tfdir / 'test_a_f16_z_i32_rx.c', + tfdir / 'test_a_f16_z_i64_rx.c', + tfdir / 'test_a_f16_z_ui32_x.c', + tfdir / 'test_a_f16_z_ui64_x.c', + tfdir / 'test_a_f16_z_i32_x.c', + tfdir / 'test_a_f16_z_i64_x.c', + tfdir / 'test_a_f16_z_f32.c', + tfdir / 'test_a_f16_z_f64.c', + tfdir / 'test_a_f16_z_extF80.c', + tfdir / 'test_a_f16_z_f128.c', + tfdir / 'test_az_f16.c', + tfdir / 'test_az_f16_rx.c', + tfdir / 'test_abz_f16.c', + tfdir / 'test_abcz_f16.c', + tfdir / 'test_ab_f16_z_bool.c', + tfdir / 'test_a_f32_z_ui32_rx.c', + tfdir / 'test_a_f32_z_ui64_rx.c', + tfdir / 'test_a_f32_z_i32_rx.c', + tfdir / 'test_a_f32_z_i64_rx.c', + tfdir / 'test_a_f32_z_ui32_x.c', + tfdir / 'test_a_f32_z_ui64_x.c', + tfdir / 'test_a_f32_z_i32_x.c', + tfdir / 'test_a_f32_z_i64_x.c', + tfdir / 'test_a_f32_z_f16.c', + tfdir / 'test_a_f32_z_f64.c', + tfdir / 'test_a_f32_z_extF80.c', + tfdir / 'test_a_f32_z_f128.c', + tfdir / 'test_az_f32.c', + tfdir / 'test_az_f32_rx.c', + tfdir / 'test_abz_f32.c', + tfdir / 'test_abcz_f32.c', + tfdir / 'test_ab_f32_z_bool.c', + tfdir / 'test_a_f64_z_ui32_rx.c', + tfdir / 'test_a_f64_z_ui64_rx.c', + tfdir / 'test_a_f64_z_i32_rx.c', + tfdir / 'test_a_f64_z_i64_rx.c', + tfdir / 'test_a_f64_z_ui32_x.c', + tfdir / 'test_a_f64_z_ui64_x.c', + tfdir / 'test_a_f64_z_i32_x.c', + tfdir / 'test_a_f64_z_i64_x.c', + tfdir / 'test_a_f64_z_f16.c', + tfdir / 'test_a_f64_z_f32.c', + tfdir / 'test_a_f64_z_extF80.c', + tfdir / 'test_a_f64_z_f128.c', + tfdir / 'test_az_f64.c', + tfdir / 'test_az_f64_rx.c', + tfdir / 'test_abz_f64.c', + tfdir / 'test_abcz_f64.c', + tfdir / 'test_ab_f64_z_bool.c', + tfdir / 'test_a_extF80_z_ui32_rx.c', + tfdir / 'test_a_extF80_z_ui64_rx.c', + tfdir / 'test_a_extF80_z_i32_rx.c', + tfdir / 'test_a_extF80_z_i64_rx.c', + tfdir / 'test_a_extF80_z_ui32_x.c', + tfdir / 'test_a_extF80_z_ui64_x.c', + tfdir / 'test_a_extF80_z_i32_x.c', + tfdir / 'test_a_extF80_z_i64_x.c', + tfdir / 'test_a_extF80_z_f16.c', + tfdir / 'test_a_extF80_z_f32.c', + tfdir / 'test_a_extF80_z_f64.c', + tfdir / 'test_a_extF80_z_f128.c', + tfdir / 'test_az_extF80.c', + tfdir / 'test_az_extF80_rx.c', + tfdir / 'test_abz_extF80.c', + tfdir / 'test_ab_extF80_z_bool.c', + tfdir / 'test_a_f128_z_ui32_rx.c', + tfdir / 'test_a_f128_z_ui64_rx.c', + tfdir / 'test_a_f128_z_i32_rx.c', + tfdir / 'test_a_f128_z_i64_rx.c', + tfdir / 'test_a_f128_z_ui32_x.c', + tfdir / 'test_a_f128_z_ui64_x.c', + tfdir / 'test_a_f128_z_i32_x.c', + tfdir / 'test_a_f128_z_i64_x.c', + tfdir / 'test_a_f128_z_f16.c', + tfdir / 'test_a_f128_z_f32.c', + tfdir / 'test_a_f128_z_f64.c', + tfdir / 'test_a_f128_z_extF80.c', + tfdir / 'test_az_f128.c', + tfdir / 'test_az_f128_rx.c', + tfdir / 'test_abz_f128.c', + tfdir / 'test_abcz_f128.c', + tfdir / 'test_ab_f128_z_bool.c', +] + +libsoftfloat_proj = subproject('berkeley-softfloat-3', required: true) +libsoftfloat = libsoftfloat_proj.get_variable('libsoftfloat_dep') + +libtestfloat = static_library( + 'testfloat', + files( + tfdir / 'uint128_inline.c', + tfdir / 'uint128.c', + tfdir / 'fail.c', + tfdir / 'functions_common.c', + tfdir / 'functionInfos.c', + tfdir / 'standardFunctionInfos.c', + tfdir / 'random.c', + tfdir / 'genCases_common.c', + tfgencases, + tfdir / 'genCases_writeTestsTotal.c', + tfdir / 'verCases_inline.c', + tfdir / 'verCases_common.c', + tfdir / 'verCases_writeFunctionName.c', + tfdir / 'readHex.c', + tfdir / 'writeHex.c', + tfwritecase, + tfdir / 'testLoops_common.c', + tftest, + ), + dependencies: libsoftfloat.partial_dependency(includes: true, compile_args: true), + c_args: fpcflags, +) + +libtestfloat_dep = declare_dependency( + link_with: libtestfloat, + dependencies: libsoftfloat, + include_directories: tfinc, + compile_args: fpcflags) + +libslowfloat = static_library( + 'slowfloat', + tfdir / 'slowfloat.c', + dependencies: libsoftfloat.partial_dependency(includes: true, compile_args: true), + c_args: fpcflags, +) + +libslowfloat_dep = declare_dependency( + link_with: libslowfloat, + dependencies: libsoftfloat, + include_directories: tfinc, + compile_args: fpcflags) diff --git a/subprojects/packagefiles/berkeley-testfloat-3/meson_options.txt b/subprojects/packagefiles/berkeley-testfloat-3/meson_options.txt new file mode 100644 index 00000000000..868ae57e805 --- /dev/null +++ b/subprojects/packagefiles/berkeley-testfloat-3/meson_options.txt @@ -0,0 +1 @@ +option('defines', type : 'array', value : []) diff --git a/tests/fp/meson.build b/tests/fp/meson.build index f9ca6a93b49..cbc17392d67 100644 --- a/tests/fp/meson.build +++ b/tests/fp/meson.build @@ -7,13 +7,15 @@ if targetos == 'windows' subdir_done() endif -fpcflags = [ +sfcflags = [ # softfloat defines '-DSOFTFLOAT_ROUND_ODD', '-DINLINE_LEVEL=5', '-DSOFTFLOAT_FAST_DIV32TO16', '-DSOFTFLOAT_FAST_DIV64TO32', '-DSOFTFLOAT_FAST_INT64', +] +tfcflags = [ # testfloat defines '-DFLOAT16', '-DFLOAT64', @@ -23,523 +25,16 @@ fpcflags = [ '-DLONG_DOUBLE_IS_EXTFLOAT80', ] -sfdir = 'berkeley-softfloat-3/source' -sfspedir = sfdir / '8086-SSE' -tfdir = 'berkeley-testfloat-3/source' +libsoftfloat_proj = subproject('berkeley-softfloat-3', required: true, + default_options: 'defines=' + ','.join(sfcflags)) +libsoftfloat = libsoftfloat_proj.get_variable('libsoftfloat_dep') -sfinc = include_directories(sfdir / 'include', sfspedir) +libtestfloat_proj = subproject('berkeley-testfloat-3', required: true, + default_options: 'defines=' + ','.join(tfcflags)) +libtestfloat = libtestfloat_proj.get_variable('libtestfloat_dep') +libslowfloat = libtestfloat_proj.get_variable('libslowfloat_dep') -tfcflags = [ - '-Wno-implicit-fallthrough', - '-Wno-strict-prototypes', - '-Wno-unknown-pragmas', - '-Wno-uninitialized', - '-Wno-missing-prototypes', - '-Wno-return-type', - '-Wno-unused-function', - '-Wno-missing-format-attribute', - '-Wno-error', -] - -if cc.get_id() == 'clang' - # Clang does not support '#pragma STDC FENV_ACCESS' - tfcflags += [ '-Wno-ignored-pragmas' ] -endif - -tfgencases = [ - tfdir / 'genCases_ui32.c', - tfdir / 'genCases_ui64.c', - tfdir / 'genCases_i32.c', - tfdir / 'genCases_i64.c', - tfdir / 'genCases_f16.c', - tfdir / 'genCases_f32.c', - tfdir / 'genCases_f64.c', - tfdir / 'genCases_extF80.c', - tfdir / 'genCases_f128.c', -] - -tfwritecase = [ - tfdir / 'writeCase_a_ui32.c', - tfdir / 'writeCase_a_ui64.c', - tfdir / 'writeCase_a_f16.c', - tfdir / 'writeCase_ab_f16.c', - tfdir / 'writeCase_abc_f16.c', - tfdir / 'writeCase_a_f32.c', - tfdir / 'writeCase_ab_f32.c', - tfdir / 'writeCase_abc_f32.c', - tfdir / 'writeCase_a_f64.c', - tfdir / 'writeCase_ab_f64.c', - tfdir / 'writeCase_abc_f64.c', - tfdir / 'writeCase_a_extF80M.c', - tfdir / 'writeCase_ab_extF80M.c', - tfdir / 'writeCase_a_f128M.c', - tfdir / 'writeCase_ab_f128M.c', - tfdir / 'writeCase_abc_f128M.c', - tfdir / 'writeCase_z_bool.c', - tfdir / 'writeCase_z_ui32.c', - tfdir / 'writeCase_z_ui64.c', - tfdir / 'writeCase_z_f16.c', - tfdir / 'writeCase_z_f32.c', - tfdir / 'writeCase_z_f64.c', - tfdir / 'writeCase_z_extF80M.c', - tfdir / 'writeCase_z_f128M.c', -] - -tftest = [ - tfdir / 'test_a_ui32_z_f16.c', - tfdir / 'test_a_ui32_z_f32.c', - tfdir / 'test_a_ui32_z_f64.c', - tfdir / 'test_a_ui32_z_extF80.c', - tfdir / 'test_a_ui32_z_f128.c', - tfdir / 'test_a_ui64_z_f16.c', - tfdir / 'test_a_ui64_z_f32.c', - tfdir / 'test_a_ui64_z_f64.c', - tfdir / 'test_a_ui64_z_extF80.c', - tfdir / 'test_a_ui64_z_f128.c', - tfdir / 'test_a_i32_z_f16.c', - tfdir / 'test_a_i32_z_f32.c', - tfdir / 'test_a_i32_z_f64.c', - tfdir / 'test_a_i32_z_extF80.c', - tfdir / 'test_a_i32_z_f128.c', - tfdir / 'test_a_i64_z_f16.c', - tfdir / 'test_a_i64_z_f32.c', - tfdir / 'test_a_i64_z_f64.c', - tfdir / 'test_a_i64_z_extF80.c', - tfdir / 'test_a_i64_z_f128.c', - tfdir / 'test_a_f16_z_ui32_rx.c', - tfdir / 'test_a_f16_z_ui64_rx.c', - tfdir / 'test_a_f16_z_i32_rx.c', - tfdir / 'test_a_f16_z_i64_rx.c', - tfdir / 'test_a_f16_z_ui32_x.c', - tfdir / 'test_a_f16_z_ui64_x.c', - tfdir / 'test_a_f16_z_i32_x.c', - tfdir / 'test_a_f16_z_i64_x.c', - tfdir / 'test_a_f16_z_f32.c', - tfdir / 'test_a_f16_z_f64.c', - tfdir / 'test_a_f16_z_extF80.c', - tfdir / 'test_a_f16_z_f128.c', - tfdir / 'test_az_f16.c', - tfdir / 'test_az_f16_rx.c', - tfdir / 'test_abz_f16.c', - tfdir / 'test_abcz_f16.c', - tfdir / 'test_ab_f16_z_bool.c', - tfdir / 'test_a_f32_z_ui32_rx.c', - tfdir / 'test_a_f32_z_ui64_rx.c', - tfdir / 'test_a_f32_z_i32_rx.c', - tfdir / 'test_a_f32_z_i64_rx.c', - tfdir / 'test_a_f32_z_ui32_x.c', - tfdir / 'test_a_f32_z_ui64_x.c', - tfdir / 'test_a_f32_z_i32_x.c', - tfdir / 'test_a_f32_z_i64_x.c', - tfdir / 'test_a_f32_z_f16.c', - tfdir / 'test_a_f32_z_f64.c', - tfdir / 'test_a_f32_z_extF80.c', - tfdir / 'test_a_f32_z_f128.c', - tfdir / 'test_az_f32.c', - tfdir / 'test_az_f32_rx.c', - tfdir / 'test_abz_f32.c', - tfdir / 'test_abcz_f32.c', - tfdir / 'test_ab_f32_z_bool.c', - tfdir / 'test_a_f64_z_ui32_rx.c', - tfdir / 'test_a_f64_z_ui64_rx.c', - tfdir / 'test_a_f64_z_i32_rx.c', - tfdir / 'test_a_f64_z_i64_rx.c', - tfdir / 'test_a_f64_z_ui32_x.c', - tfdir / 'test_a_f64_z_ui64_x.c', - tfdir / 'test_a_f64_z_i32_x.c', - tfdir / 'test_a_f64_z_i64_x.c', - tfdir / 'test_a_f64_z_f16.c', - tfdir / 'test_a_f64_z_f32.c', - tfdir / 'test_a_f64_z_extF80.c', - tfdir / 'test_a_f64_z_f128.c', - tfdir / 'test_az_f64.c', - tfdir / 'test_az_f64_rx.c', - tfdir / 'test_abz_f64.c', - tfdir / 'test_abcz_f64.c', - tfdir / 'test_ab_f64_z_bool.c', - tfdir / 'test_a_extF80_z_ui32_rx.c', - tfdir / 'test_a_extF80_z_ui64_rx.c', - tfdir / 'test_a_extF80_z_i32_rx.c', - tfdir / 'test_a_extF80_z_i64_rx.c', - tfdir / 'test_a_extF80_z_ui32_x.c', - tfdir / 'test_a_extF80_z_ui64_x.c', - tfdir / 'test_a_extF80_z_i32_x.c', - tfdir / 'test_a_extF80_z_i64_x.c', - tfdir / 'test_a_extF80_z_f16.c', - tfdir / 'test_a_extF80_z_f32.c', - tfdir / 'test_a_extF80_z_f64.c', - tfdir / 'test_a_extF80_z_f128.c', - tfdir / 'test_az_extF80.c', - tfdir / 'test_az_extF80_rx.c', - tfdir / 'test_abz_extF80.c', - tfdir / 'test_ab_extF80_z_bool.c', - tfdir / 'test_a_f128_z_ui32_rx.c', - tfdir / 'test_a_f128_z_ui64_rx.c', - tfdir / 'test_a_f128_z_i32_rx.c', - tfdir / 'test_a_f128_z_i64_rx.c', - tfdir / 'test_a_f128_z_ui32_x.c', - tfdir / 'test_a_f128_z_ui64_x.c', - tfdir / 'test_a_f128_z_i32_x.c', - tfdir / 'test_a_f128_z_i64_x.c', - tfdir / 'test_a_f128_z_f16.c', - tfdir / 'test_a_f128_z_f32.c', - tfdir / 'test_a_f128_z_f64.c', - tfdir / 'test_a_f128_z_extF80.c', - tfdir / 'test_az_f128.c', - tfdir / 'test_az_f128_rx.c', - tfdir / 'test_abz_f128.c', - tfdir / 'test_abcz_f128.c', - tfdir / 'test_ab_f128_z_bool.c', -] - -libtestfloat = static_library( - 'testfloat', - files( - tfdir / 'uint128_inline.c', - tfdir / 'uint128.c', - tfdir / 'fail.c', - tfdir / 'functions_common.c', - tfdir / 'functionInfos.c', - tfdir / 'standardFunctionInfos.c', - tfdir / 'random.c', - tfdir / 'genCases_common.c', - tfgencases, - tfdir / 'genCases_writeTestsTotal.c', - tfdir / 'verCases_inline.c', - tfdir / 'verCases_common.c', - tfdir / 'verCases_writeFunctionName.c', - tfdir / 'readHex.c', - tfdir / 'writeHex.c', - tfwritecase, - tfdir / 'testLoops_common.c', - tftest, - ), - include_directories: sfinc, - c_args: tfcflags + fpcflags, -) - -sfcflags = [ - '-Wno-implicit-fallthrough', - '-Wno-missing-prototypes', - '-Wno-redundant-decls', - '-Wno-return-type', - '-Wno-error', -] - -libsoftfloat = static_library( - 'softfloat', - files( - # primitives - sfdir / 's_eq128.c', - sfdir / 's_le128.c', - sfdir / 's_lt128.c', - sfdir / 's_shortShiftLeft128.c', - sfdir / 's_shortShiftRight128.c', - sfdir / 's_shortShiftRightJam64.c', - sfdir / 's_shortShiftRightJam64Extra.c', - sfdir / 's_shortShiftRightJam128.c', - sfdir / 's_shortShiftRightJam128Extra.c', - sfdir / 's_shiftRightJam32.c', - sfdir / 's_shiftRightJam64.c', - sfdir / 's_shiftRightJam64Extra.c', - sfdir / 's_shiftRightJam128.c', - sfdir / 's_shiftRightJam128Extra.c', - sfdir / 's_shiftRightJam256M.c', - sfdir / 's_countLeadingZeros8.c', - sfdir / 's_countLeadingZeros16.c', - sfdir / 's_countLeadingZeros32.c', - sfdir / 's_countLeadingZeros64.c', - sfdir / 's_add128.c', - sfdir / 's_add256M.c', - sfdir / 's_sub128.c', - sfdir / 's_sub256M.c', - sfdir / 's_mul64ByShifted32To128.c', - sfdir / 's_mul64To128.c', - sfdir / 's_mul128By32.c', - sfdir / 's_mul128To256M.c', - sfdir / 's_approxRecip_1Ks.c', - sfdir / 's_approxRecip32_1.c', - sfdir / 's_approxRecipSqrt_1Ks.c', - sfdir / 's_approxRecipSqrt32_1.c', - # others - sfdir / 's_roundToUI32.c', - sfdir / 's_roundToUI64.c', - sfdir / 's_roundToI32.c', - sfdir / 's_roundToI64.c', - sfdir / 's_normSubnormalF16Sig.c', - sfdir / 's_roundPackToF16.c', - sfdir / 's_normRoundPackToF16.c', - sfdir / 's_addMagsF16.c', - sfdir / 's_subMagsF16.c', - sfdir / 's_mulAddF16.c', - sfdir / 's_normSubnormalF32Sig.c', - sfdir / 's_roundPackToF32.c', - sfdir / 's_normRoundPackToF32.c', - sfdir / 's_addMagsF32.c', - sfdir / 's_subMagsF32.c', - sfdir / 's_mulAddF32.c', - sfdir / 's_normSubnormalF64Sig.c', - sfdir / 's_roundPackToF64.c', - sfdir / 's_normRoundPackToF64.c', - sfdir / 's_addMagsF64.c', - sfdir / 's_subMagsF64.c', - sfdir / 's_mulAddF64.c', - sfdir / 's_normSubnormalExtF80Sig.c', - sfdir / 's_roundPackToExtF80.c', - sfdir / 's_normRoundPackToExtF80.c', - sfdir / 's_addMagsExtF80.c', - sfdir / 's_subMagsExtF80.c', - sfdir / 's_normSubnormalF128Sig.c', - sfdir / 's_roundPackToF128.c', - sfdir / 's_normRoundPackToF128.c', - sfdir / 's_addMagsF128.c', - sfdir / 's_subMagsF128.c', - sfdir / 's_mulAddF128.c', - sfdir / 'softfloat_state.c', - sfdir / 'ui32_to_f16.c', - sfdir / 'ui32_to_f32.c', - sfdir / 'ui32_to_f64.c', - sfdir / 'ui32_to_extF80.c', - sfdir / 'ui32_to_extF80M.c', - sfdir / 'ui32_to_f128.c', - sfdir / 'ui32_to_f128M.c', - sfdir / 'ui64_to_f16.c', - sfdir / 'ui64_to_f32.c', - sfdir / 'ui64_to_f64.c', - sfdir / 'ui64_to_extF80.c', - sfdir / 'ui64_to_extF80M.c', - sfdir / 'ui64_to_f128.c', - sfdir / 'ui64_to_f128M.c', - sfdir / 'i32_to_f16.c', - sfdir / 'i32_to_f32.c', - sfdir / 'i32_to_f64.c', - sfdir / 'i32_to_extF80.c', - sfdir / 'i32_to_extF80M.c', - sfdir / 'i32_to_f128.c', - sfdir / 'i32_to_f128M.c', - sfdir / 'i64_to_f16.c', - sfdir / 'i64_to_f32.c', - sfdir / 'i64_to_f64.c', - sfdir / 'i64_to_extF80.c', - sfdir / 'i64_to_extF80M.c', - sfdir / 'i64_to_f128.c', - sfdir / 'i64_to_f128M.c', - sfdir / 'f16_to_ui32.c', - sfdir / 'f16_to_ui64.c', - sfdir / 'f16_to_i32.c', - sfdir / 'f16_to_i64.c', - sfdir / 'f16_to_ui32_r_minMag.c', - sfdir / 'f16_to_ui64_r_minMag.c', - sfdir / 'f16_to_i32_r_minMag.c', - sfdir / 'f16_to_i64_r_minMag.c', - sfdir / 'f16_to_f32.c', - sfdir / 'f16_to_f64.c', - sfdir / 'f16_to_extF80.c', - sfdir / 'f16_to_extF80M.c', - sfdir / 'f16_to_f128.c', - sfdir / 'f16_to_f128M.c', - sfdir / 'f16_roundToInt.c', - sfdir / 'f16_add.c', - sfdir / 'f16_sub.c', - sfdir / 'f16_mul.c', - sfdir / 'f16_mulAdd.c', - sfdir / 'f16_div.c', - sfdir / 'f16_rem.c', - sfdir / 'f16_sqrt.c', - sfdir / 'f16_eq.c', - sfdir / 'f16_le.c', - sfdir / 'f16_lt.c', - sfdir / 'f16_eq_signaling.c', - sfdir / 'f16_le_quiet.c', - sfdir / 'f16_lt_quiet.c', - sfdir / 'f16_isSignalingNaN.c', - sfdir / 'f32_to_ui32.c', - sfdir / 'f32_to_ui64.c', - sfdir / 'f32_to_i32.c', - sfdir / 'f32_to_i64.c', - sfdir / 'f32_to_ui32_r_minMag.c', - sfdir / 'f32_to_ui64_r_minMag.c', - sfdir / 'f32_to_i32_r_minMag.c', - sfdir / 'f32_to_i64_r_minMag.c', - sfdir / 'f32_to_f16.c', - sfdir / 'f32_to_f64.c', - sfdir / 'f32_to_extF80.c', - sfdir / 'f32_to_extF80M.c', - sfdir / 'f32_to_f128.c', - sfdir / 'f32_to_f128M.c', - sfdir / 'f32_roundToInt.c', - sfdir / 'f32_add.c', - sfdir / 'f32_sub.c', - sfdir / 'f32_mul.c', - sfdir / 'f32_mulAdd.c', - sfdir / 'f32_div.c', - sfdir / 'f32_rem.c', - sfdir / 'f32_sqrt.c', - sfdir / 'f32_eq.c', - sfdir / 'f32_le.c', - sfdir / 'f32_lt.c', - sfdir / 'f32_eq_signaling.c', - sfdir / 'f32_le_quiet.c', - sfdir / 'f32_lt_quiet.c', - sfdir / 'f32_isSignalingNaN.c', - sfdir / 'f64_to_ui32.c', - sfdir / 'f64_to_ui64.c', - sfdir / 'f64_to_i32.c', - sfdir / 'f64_to_i64.c', - sfdir / 'f64_to_ui32_r_minMag.c', - sfdir / 'f64_to_ui64_r_minMag.c', - sfdir / 'f64_to_i32_r_minMag.c', - sfdir / 'f64_to_i64_r_minMag.c', - sfdir / 'f64_to_f16.c', - sfdir / 'f64_to_f32.c', - sfdir / 'f64_to_extF80.c', - sfdir / 'f64_to_extF80M.c', - sfdir / 'f64_to_f128.c', - sfdir / 'f64_to_f128M.c', - sfdir / 'f64_roundToInt.c', - sfdir / 'f64_add.c', - sfdir / 'f64_sub.c', - sfdir / 'f64_mul.c', - sfdir / 'f64_mulAdd.c', - sfdir / 'f64_div.c', - sfdir / 'f64_rem.c', - sfdir / 'f64_sqrt.c', - sfdir / 'f64_eq.c', - sfdir / 'f64_le.c', - sfdir / 'f64_lt.c', - sfdir / 'f64_eq_signaling.c', - sfdir / 'f64_le_quiet.c', - sfdir / 'f64_lt_quiet.c', - sfdir / 'f64_isSignalingNaN.c', - sfdir / 'extF80_to_ui32.c', - sfdir / 'extF80_to_ui64.c', - sfdir / 'extF80_to_i32.c', - sfdir / 'extF80_to_i64.c', - sfdir / 'extF80_to_ui32_r_minMag.c', - sfdir / 'extF80_to_ui64_r_minMag.c', - sfdir / 'extF80_to_i32_r_minMag.c', - sfdir / 'extF80_to_i64_r_minMag.c', - sfdir / 'extF80_to_f16.c', - sfdir / 'extF80_to_f32.c', - sfdir / 'extF80_to_f64.c', - sfdir / 'extF80_to_f128.c', - sfdir / 'extF80_roundToInt.c', - sfdir / 'extF80_add.c', - sfdir / 'extF80_sub.c', - sfdir / 'extF80_mul.c', - sfdir / 'extF80_div.c', - sfdir / 'extF80_rem.c', - sfdir / 'extF80_sqrt.c', - sfdir / 'extF80_eq.c', - sfdir / 'extF80_le.c', - sfdir / 'extF80_lt.c', - sfdir / 'extF80_eq_signaling.c', - sfdir / 'extF80_le_quiet.c', - sfdir / 'extF80_lt_quiet.c', - sfdir / 'extF80_isSignalingNaN.c', - sfdir / 'extF80M_to_ui32.c', - sfdir / 'extF80M_to_ui64.c', - sfdir / 'extF80M_to_i32.c', - sfdir / 'extF80M_to_i64.c', - sfdir / 'extF80M_to_ui32_r_minMag.c', - sfdir / 'extF80M_to_ui64_r_minMag.c', - sfdir / 'extF80M_to_i32_r_minMag.c', - sfdir / 'extF80M_to_i64_r_minMag.c', - sfdir / 'extF80M_to_f16.c', - sfdir / 'extF80M_to_f32.c', - sfdir / 'extF80M_to_f64.c', - sfdir / 'extF80M_to_f128M.c', - sfdir / 'extF80M_roundToInt.c', - sfdir / 'extF80M_add.c', - sfdir / 'extF80M_sub.c', - sfdir / 'extF80M_mul.c', - sfdir / 'extF80M_div.c', - sfdir / 'extF80M_rem.c', - sfdir / 'extF80M_sqrt.c', - sfdir / 'extF80M_eq.c', - sfdir / 'extF80M_le.c', - sfdir / 'extF80M_lt.c', - sfdir / 'extF80M_eq_signaling.c', - sfdir / 'extF80M_le_quiet.c', - sfdir / 'extF80M_lt_quiet.c', - sfdir / 'f128_to_ui32.c', - sfdir / 'f128_to_ui64.c', - sfdir / 'f128_to_i32.c', - sfdir / 'f128_to_i64.c', - sfdir / 'f128_to_ui32_r_minMag.c', - sfdir / 'f128_to_ui64_r_minMag.c', - sfdir / 'f128_to_i32_r_minMag.c', - sfdir / 'f128_to_i64_r_minMag.c', - sfdir / 'f128_to_f16.c', - sfdir / 'f128_to_f32.c', - sfdir / 'f128_to_extF80.c', - sfdir / 'f128_to_f64.c', - sfdir / 'f128_roundToInt.c', - sfdir / 'f128_add.c', - sfdir / 'f128_sub.c', - sfdir / 'f128_mul.c', - sfdir / 'f128_mulAdd.c', - sfdir / 'f128_div.c', - sfdir / 'f128_rem.c', - sfdir / 'f128_sqrt.c', - sfdir / 'f128_eq.c', - sfdir / 'f128_le.c', - sfdir / 'f128_lt.c', - sfdir / 'f128_eq_signaling.c', - sfdir / 'f128_le_quiet.c', - sfdir / 'f128_lt_quiet.c', - sfdir / 'f128_isSignalingNaN.c', - sfdir / 'f128M_to_ui32.c', - sfdir / 'f128M_to_ui64.c', - sfdir / 'f128M_to_i32.c', - sfdir / 'f128M_to_i64.c', - sfdir / 'f128M_to_ui32_r_minMag.c', - sfdir / 'f128M_to_ui64_r_minMag.c', - sfdir / 'f128M_to_i32_r_minMag.c', - sfdir / 'f128M_to_i64_r_minMag.c', - sfdir / 'f128M_to_f16.c', - sfdir / 'f128M_to_f32.c', - sfdir / 'f128M_to_extF80M.c', - sfdir / 'f128M_to_f64.c', - sfdir / 'f128M_roundToInt.c', - sfdir / 'f128M_add.c', - sfdir / 'f128M_sub.c', - sfdir / 'f128M_mul.c', - sfdir / 'f128M_mulAdd.c', - sfdir / 'f128M_div.c', - sfdir / 'f128M_rem.c', - sfdir / 'f128M_sqrt.c', - sfdir / 'f128M_eq.c', - sfdir / 'f128M_le.c', - sfdir / 'f128M_lt.c', - sfdir / 'f128M_eq_signaling.c', - sfdir / 'f128M_le_quiet.c', - sfdir / 'f128M_lt_quiet.c', - # spe - sfspedir / 'softfloat_raiseFlags.c', - sfspedir / 's_f16UIToCommonNaN.c', - sfspedir / 's_commonNaNToF16UI.c', - sfspedir / 's_propagateNaNF16UI.c', - sfspedir / 's_f32UIToCommonNaN.c', - sfspedir / 's_commonNaNToF32UI.c', - sfspedir / 's_propagateNaNF32UI.c', - sfspedir / 's_f64UIToCommonNaN.c', - sfspedir / 's_commonNaNToF64UI.c', - sfspedir / 's_propagateNaNF64UI.c', - sfspedir / 'extF80M_isSignalingNaN.c', - sfspedir / 's_extF80UIToCommonNaN.c', - sfspedir / 's_commonNaNToExtF80UI.c', - sfspedir / 's_propagateNaNExtF80UI.c', - sfspedir / 'f128M_isSignalingNaN.c', - sfspedir / 's_f128UIToCommonNaN.c', - sfspedir / 's_commonNaNToF128UI.c', - sfspedir / 's_propagateNaNF128UI.c', - ), - include_directories: sfinc, - c_args: sfcflags + fpcflags, -) - -fpcflags += [ +fpcflags = [ # work around TARGET_* poisoning '-DHW_POISON_H', # define a target to match testfloat's implementation-defined choices, such as @@ -551,10 +46,8 @@ fpcflags += [ fptest = executable( 'fp-test', - ['fp-test.c', tfdir / 'slowfloat.c', '../../fpu/softfloat.c'], - link_with: [libtestfloat, libsoftfloat], - dependencies: [qemuutil], - include_directories: [sfinc, include_directories(tfdir)], + ['fp-test.c', '../../fpu/softfloat.c'], + dependencies: [qemuutil, libsoftfloat, libtestfloat, libslowfloat], c_args: fpcflags, ) softfloat_conv_tests = { @@ -636,18 +129,14 @@ test('fp-test-mulAdd', fptest, executable( 'fp-bench', ['fp-bench.c', '../../fpu/softfloat.c'], - link_with: [libtestfloat, libsoftfloat], - dependencies: [qemuutil], - include_directories: [sfinc, include_directories(tfdir)], + dependencies: [qemuutil, libtestfloat, libsoftfloat], c_args: fpcflags, ) fptestlog2 = executable( 'fp-test-log2', ['fp-test-log2.c', '../../fpu/softfloat.c'], - link_with: [libsoftfloat], - dependencies: [qemuutil], - include_directories: [sfinc], + dependencies: [qemuutil, libsoftfloat], c_args: fpcflags, ) test('fp-test-log2', fptestlog2, From patchwork Tue Jun 6 14:31:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791252 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=XWAg6rRF; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCdg2bTJz20Ty for ; Wed, 7 Jun 2023 00:33:43 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6XjX-0006Xs-5v; Tue, 06 Jun 2023 10:32:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xj5-0005j4-FR for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:32:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xj1-0001LB-FE for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dsZHG504ppi0bD32Z8ri/3YIY0UtxnuneA7a5gOwU88=; b=XWAg6rRFGfZzjVeAeVfm4SG1c7Dq7uqJDsb6sQNZiSGPDZp9NmdQQMdA9TbT+NnTy+fuF0 eLUs9kvcju6ORrm7zwZgFmC+NasE2JutW2uZWNOFdT/Kk+/pqy2WcB0Lnp9A9+9cCyQ+Um HFWYkR6vAqf5gQTTcSSWKaMDTyoo27Q= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-515-WIZi5D_8NX6KHTb10zy8rg-1; Tue, 06 Jun 2023 10:31:51 -0400 X-MC-Unique: WIZi5D_8NX6KHTb10zy8rg-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-97463348446so410011366b.2 for ; Tue, 06 Jun 2023 07:31:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061910; x=1688653910; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dsZHG504ppi0bD32Z8ri/3YIY0UtxnuneA7a5gOwU88=; b=Nnj23j5qyAAuxC8BxLIcj17ncYc6nIvSZExS81m0zVzSgGnTWTjvvCXZ4qxV4pCzt9 Gme4ToXkm1lpcBeuo9qMLNgv0ujl/gimvsbZ8iaJCioDN/tlQ6oCnvNBkutbI0XhodZo GO0i53NI96udONqQS4h8k8ZFrmmxe12E7kFX1ZSbe+WN+IG234pb1Rmr4lc4BvFJMnq0 UWpdPikbRVg45OJeZ2R8N2eZhHF6bMRbuhcqY+tzj54gUcvlxa9WqjaTFICL62RJlSh0 2LENV1NRdlEB7GVMeVYfGM9ki55/hRK4L/nZ0mLJnIf0768iNsSS+5IVRPoqpjK71tE3 Y1TQ== X-Gm-Message-State: AC+VfDyabheX5We18H17e1OzMWP14qarB25iR8SrXS8akCaKIM1ZIM3d 1H2gibvoXyse5T69OYQeSuexXBScrH2ieS+CdU23lsDzRQ3AL9TnVHhVTCy1lZ8e7Pb0GhCLmLa nI7mSU4jltF1paePENZdPwr7rBk6KiTk7uH1uGP5cYtSSQAoNj5A9ofDMkgluDK0fZjpG5Gc0qv E= X-Received: by 2002:a17:907:16a5:b0:978:6be4:7efb with SMTP id hc37-20020a17090716a500b009786be47efbmr2504006ejc.7.1686061910035; Tue, 06 Jun 2023 07:31:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7F8bMWOVmOdKMZwZHA8RQOgz18K1JMJHkAJY+yAL37Wsm/NbrAD05OBaGyq/WCxL1ZfmtGQw== X-Received: by 2002:a17:907:16a5:b0:978:6be4:7efb with SMTP id hc37-20020a17090716a500b009786be47efbmr2503988ejc.7.1686061909617; Tue, 06 Jun 2023 07:31:49 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id z8-20020a50eb48000000b00510da8aa2c6sm5134031edp.69.2023.06.06.07.31.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:49 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= Subject: [PULL 20/21] build: remove git submodule handling from main makefile Date: Tue, 6 Jun 2023 16:31:15 +0200 Message-Id: <20230606143116.685644-21-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The only remaining user of submodules at build time is roms/SLOF, which is handled in pc-bios/s390-ccw/Makefile. Remove the relevant code from the main makefile. Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/buildtest-template.yml | 3 +-- Makefile | 10 ---------- configure | 7 ------- meson.build | 1 - 4 files changed, 1 insertion(+), 20 deletions(-) diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml index d01d504ec5f..76ff1dfcb6f 100644 --- a/.gitlab-ci.d/buildtest-template.yml +++ b/.gitlab-ci.d/buildtest-template.yml @@ -42,8 +42,7 @@ stage: test image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest script: - - scripts/git-submodule.sh update - roms/SLOF $(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak) + - scripts/git-submodule.sh update roms/SLOF - meson subprojects download $(cd build/subprojects && echo *) - cd build - find . -type f -exec touch {} + diff --git a/Makefile b/Makefile index d68196acb9e..b22bf6fba12 100644 --- a/Makefile +++ b/Makefile @@ -45,16 +45,6 @@ include config-host.mak include Makefile.prereqs Makefile.prereqs: config-host.mak -git-submodule-update: -.git-submodule-status: git-submodule-update config-host.mak -Makefile: .git-submodule-status - -.PHONY: git-submodule-update -git-submodule-update: -ifneq ($(GIT_SUBMODULES_ACTION),ignore) - $(quiet-@)GIT=git "$(SRC_PATH)/scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES) -endif - # 0. ensure the build tree is okay # Check that we're not trying to do an out-of-tree build from diff --git a/configure b/configure index 4dad32938df..bc0660f5a32 100755 --- a/configure +++ b/configure @@ -253,7 +253,6 @@ else git_submodules_action="ignore" fi -git_submodules="" git="git" debug_tcg="no" docs="auto" @@ -1657,18 +1656,12 @@ fi ####################################### # generate config-host.mak -if ! (GIT=git "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then - exit 1 -fi - config_host_mak="config-host.mak" echo "# Automatically generated by configure - do not modify" > $config_host_mak echo >> $config_host_mak echo all: >> $config_host_mak -echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak -echo "GIT_SUBMODULES_ACTION=$git_submodules_action" >> $config_host_mak if test "$debug_tcg" = "yes" ; then echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak diff --git a/meson.build b/meson.build index 74fb147fde3..6cd29c11b05 100644 --- a/meson.build +++ b/meson.build @@ -3976,7 +3976,6 @@ endif summary_info = {} summary_info += {'Build directory': meson.current_build_dir()} summary_info += {'Source path': meson.current_source_dir()} -summary_info += {'GIT submodules': config_host['GIT_SUBMODULES']} summary_info += {'Download dependencies': get_option('wrap_mode') != 'nodownload'} summary(summary_info, bool_yn: true, section: 'Build environment') From patchwork Tue Jun 6 14:31:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1791255 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DyRUxE04; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbCdk714Vz20Ty for ; Wed, 7 Jun 2023 00:33:46 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6XjW-0006PW-8J; Tue, 06 Jun 2023 10:32:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xj5-0005iv-EQ for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:32:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xj3-0001Lf-7V for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d41daTl/K9RG0QQvz7UtPuUgVUPwl1xrGxWNTb68ah8=; b=DyRUxE04vgN8NV0k0VBwX4nugsxKCBkudjCdrAm/RWsKdFi95ZXYIK04V75Evl+d4F8xWp BWkkQ2agPuubpb2ee745LqbfKk08TLplngK0goheA99+UEMi0cOPiJD0P2S8XgLc6MfOOa 2uflyF9inHIGEZtuR0B1P8d2cIgwwnY= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-653--kOCQ2FwPF-k5KvCPpIOPg-1; Tue, 06 Jun 2023 10:31:54 -0400 X-MC-Unique: -kOCQ2FwPF-k5KvCPpIOPg-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-97542592eb9so317438566b.2 for ; Tue, 06 Jun 2023 07:31:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061911; x=1688653911; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d41daTl/K9RG0QQvz7UtPuUgVUPwl1xrGxWNTb68ah8=; b=G/TcD/xCoZMZrCP+pAUINhh7MEFb7ev9m1Iw60YnkfGtUtSu1SCBw7VxeoakIVrzCt g9f/csI37Xftf9fLNW9CaIyuc1NdmnKBGGE3V6HqUVVaA3eXVv3luizLZYx2fVC1/qHq 9mrIgAMvvSzUCKuhcKX77CaAWPfaVSm4USnbtJSr/AzGWHlHnHOPoZbKqDu9vd+QBqic zX2vaHyG7nmR5az+aL005FOJ5u3xNtWS0EmIVSLj4teyoxs1oHJSE1KK1YuS/03fuSq6 JKk3qBjHcGYcJox6DWY6+NFk9buIhn7vJst3Yutnsd0jNzQ3eqizGXZN/UVAs91GaZ2c Fcpg== X-Gm-Message-State: AC+VfDzlZLnIxt2r2f3DS26UQ8mkEML7J49wx1N3Z9zFGplRc8PUEC7x gOy4ABzNd2kILgR/qkI9BnSB6XdEAVf4ARG/tmy7T8fIS5HPx8qh50/Msk/xy88P1//TSU+62Wp TRlAmjms9n/njiZg9letmHKrce9w3Os2IeOTuJI7v4J23XsYBxSkDUwUIx8fxsIEm0dzlNL3xuc o= X-Received: by 2002:a17:907:7da0:b0:974:6176:2223 with SMTP id oz32-20020a1709077da000b0097461762223mr3076105ejc.13.1686061911716; Tue, 06 Jun 2023 07:31:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5h5K6+a4e/GFp85D2rgIB8OGsSP6KuN83Zq3Hmufal2bFkbJ/SaCJ9f1+57GeX1MUdKqyBGQ== X-Received: by 2002:a17:907:7da0:b0:974:6176:2223 with SMTP id oz32-20020a1709077da000b0097461762223mr3076088ejc.13.1686061911379; Tue, 06 Jun 2023 07:31:51 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id l14-20020a170906a40e00b0095807ab4b57sm5725981ejz.178.2023.06.06.07.31.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:50 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= Subject: [PULL 21/21] configure: remove --with-git-submodules= Date: Tue, 6 Jun 2023 16:31:16 +0200 Message-Id: <20230606143116.685644-22-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Reuse --enable/--disable-download to control git submodules as well. Adjust the error messages of git-submodule.sh to refer to the new option. Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- configure | 40 +++++-------------- .../ci/org.centos/stream/8/x86_64/configure | 1 - scripts/git-submodule.sh | 8 ++-- 3 files changed, 12 insertions(+), 37 deletions(-) diff --git a/configure b/configure index bc0660f5a32..8765b88e12f 100755 --- a/configure +++ b/configure @@ -246,13 +246,7 @@ for opt do done -if test -e "$source_path/.git" -then - git_submodules_action="update" -else - git_submodules_action="ignore" -fi - +git_submodules_action="update" git="git" debug_tcg="no" docs="auto" @@ -738,12 +732,9 @@ for opt do ;; --disable-cfi) cfi="false" ;; - --with-git-submodules=*) - git_submodules_action="$optarg" + --disable-download) download="disabled"; git_submodules_action=validate; ;; - --disable-download) download="disabled" - ;; - --enable-download) download="enabled" + --enable-download) download="enabled"; git_submodules_action=update; ;; --enable-plugins) if test "$mingw32" = "yes"; then error_exit "TCG plugins not currently supported on Windows platforms" @@ -765,6 +756,11 @@ for opt do esac done +if ! test -e "$source_path/.git" +then + git_submodules_action="ignore" +fi + # test for any invalid configuration combinations if test "$plugins" = "yes" -a "$tcg" = "disabled"; then error_exit "Can't enable plugins on non-TCG builds" @@ -796,21 +792,6 @@ then exit 1 fi -case $git_submodules_action in - update|validate) - if test ! -e "$source_path/.git" || ! has git; then - echo "ERROR: cannot $git_submodules_action git submodules without .git" - exit 1 - fi - ;; - ignore) - ;; - *) - echo "ERROR: invalid --with-git-submodules= value '$git_submodules_action'" - exit 1 - ;; -esac - default_target_list="" mak_wilds="" @@ -877,9 +858,6 @@ Advanced options (experts only): --python=PYTHON use specified python [$python] --ninja=NINJA use specified ninja [$ninja] --smbd=SMBD use specified smbd [$smbd] - --with-git-submodules=update update git submodules (default if .git dir exists) - --with-git-submodules=validate fail if git submodules are not up to date - --with-git-submodules=ignore do not update or check git submodules (default if no .git dir) --static enable static build [$static] --bindir=PATH install binaries in PATH --with-suffix=SUFFIX suffix for QEMU data inside datadir/libdir/sysconfdir/docdir [$qemu_suffix] @@ -1024,7 +1002,7 @@ fi # Consult white-list to determine whether to enable werror # by default. Only enable by default for git builds if test -z "$werror" ; then - if test "$git_submodules_action" != "ignore" && \ + if test -e "$source_path/.git" && \ { test "$linux" = "yes" || test "$mingw32" = "yes"; }; then werror="yes" else diff --git a/scripts/ci/org.centos/stream/8/x86_64/configure b/scripts/ci/org.centos/stream/8/x86_64/configure index de76510978f..d02b09a4b9b 100755 --- a/scripts/ci/org.centos/stream/8/x86_64/configure +++ b/scripts/ci/org.centos/stream/8/x86_64/configure @@ -29,7 +29,6 @@ --extra-cflags="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection" \ --with-suffix="qemu-kvm" \ --firmwarepath=/usr/share/qemu-firmware \ ---with-git-submodules=update \ --target-list="x86_64-softmmu" \ --block-drv-rw-whitelist="qcow2,raw,file,host_device,nbd,iscsi,rbd,blkdebug,luks,null-co,nvme,copy-on-read,throttle,gluster" \ --audio-drv-list="" \ diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh index 38b55c90e11..11fad2137cd 100755 --- a/scripts/git-submodule.sh +++ b/scripts/git-submodule.sh @@ -9,7 +9,7 @@ command=$1 shift maybe_modules="$@" -# if --with-git-submodules=ignore, do nothing +# if not running in a git checkout, do nothing test "$command" = "ignore" && exit 0 test -z "$GIT" && GIT=$(command -v git) @@ -24,7 +24,7 @@ update_error() { echo "enable use of a transparent proxy), please disable automatic" echo "GIT submodule checkout with:" echo - echo " $ ./configure --with-git-submodules=validate" + echo " $ ./configure --disable-download" echo echo "and then manually update submodules prior to running make, with:" echo @@ -39,9 +39,7 @@ validate_error() { echo "configured for validate only. Please run" echo " scripts/git-submodule.sh update $maybe_modules" echo "from the source directory or call configure with" - echo " --with-git-submodules=update" - echo "To disable GIT submodules validation, use" - echo " --with-git-submodules=ignore" + echo " --enable-download" fi exit 1 }