From nobody Mon May 20 21:02:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1664273526; cv=none; d=zohomail.com; s=zohoarc; b=VUz9PtGR7NUzGzE7NjA6EnYcuaAx+1cgATCL++uZx5jPEB6HZMXXpUZ1SYvTVmIb5RNO3gqa0ag8EifId8Kyt5IEKW6g11fCCJ0BieKIZ4EPVoR1YoVtOEzSfpns0AdP4IO5n3XPKruBbe/a8pX9VBbgM2s4l3nZC3a4UoWvSiQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664273526; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SzC1vCIIxy/AukG1I7H0YNq/Zfll4aQSjlYfrynWk/U=; b=Wi0y0Pdx2XPcwf3GxPEuRdbfZu9k4YTYgyyQPhnHyz/ggTA5Q37D/712+6Hu0tEDfJ9Q+aeiZ8TzXUm3/8yEE4r2Yh2loPacl5ullggeQry2p6F365+6yF12tn3lK4gIAaPRSD4cVvVzt0FbGxC5/jerY6tikUFAGbRv1GwJRQA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1664273526731499.52243532271575; Tue, 27 Sep 2022 03:12:06 -0700 (PDT) Received: from localhost ([::1]:46924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1od7ZN-0006sL-Oh for importer@patchew.org; Tue, 27 Sep 2022 06:12:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7NF-0007cX-6Z for qemu-devel@nongnu.org; Tue, 27 Sep 2022 05:59:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:59297) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7ND-0008TQ-KU for qemu-devel@nongnu.org; Tue, 27 Sep 2022 05:59:32 -0400 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_128_GCM_SHA256) id us-mta-503-pxsfk4AdPayT0WH0Qj-dAg-1; Tue, 27 Sep 2022 05:59:29 -0400 Received: by mail-ej1-f72.google.com with SMTP id hq17-20020a1709073f1100b00782f9d252f4so2953146ejc.11 for ; Tue, 27 Sep 2022 02:59:28 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id f20-20020a50ee94000000b004482dd03fe8sm909202edr.91.2022.09.27.02.59.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 02:59:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664272770; 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=SzC1vCIIxy/AukG1I7H0YNq/Zfll4aQSjlYfrynWk/U=; b=AuPhq0YxlouOifvbiyYGWpy4ohN3X7vloNRqaFkIuvPlnfAXZLCZqHGar/N+ILwwbU9cBU qVtcK3k2jJ78ynQx4f9NilN2Yp+6zuUTHYNcLsC72T3YK+VtjhBPMEAjIMiIqzsNpOj6mx ULbYqQgRHMRYp2NthS/MDnTGwLPcYWM= X-MC-Unique: pxsfk4AdPayT0WH0Qj-dAg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=SzC1vCIIxy/AukG1I7H0YNq/Zfll4aQSjlYfrynWk/U=; b=qAysARIncLSpVwf+/7jBmKMmyB3gavt0P6mAj+jb1DokFVAR5wb2aK7QXght7IZLFv 2Z4z8QvfbfZwazDA9a4RtK4lsiLsbpUtDm2WZ79+IDpEgM9ql+9TVhD1nDTPGFqGbOv3 4kdPHGWDM/j5mNaLjepsni6hdN87G/Z6t/kvKmN67TIxGvss8iBoy9GkKjR2wkXcd4BY zVZ+8puI4XHdYA2F8W2b06mp7YD0SuczUY6wpK2MGejsCc0zg1Mf+Z+EDdqzvPAFH+us RjpPFYjMfoJFAM5uYO649HcUmiUYZ3cJ2JPZCBNI8jWj3l2BkqC9KYuAoiTx3tXlGy0S +ROw== X-Gm-Message-State: ACrzQf1/hQXHm9Mymghg3RA25oYJHKGVQ1TIzRfUli8sQALPrOmBi1hB eZeMaLSkLlP2dYp7g2yfmrRZr3lLfdqJ6pDvYufFUp9mmGGOidvhDOuQ9X4PXnyaHC6zYx6R9DN 92qewjDvRGupr7Y3nMwMLNGDWYl2qwmoYN1t+PYjLpz3II11Li7BmEh8+xnf0OSERLuQ= X-Received: by 2002:a05:6402:b29:b0:456:f2dc:826d with SMTP id bo9-20020a0564020b2900b00456f2dc826dmr16370744edb.94.1664272767666; Tue, 27 Sep 2022 02:59:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5bm0f2lTSg8Sy3k/O3YJ+1jhH5Wgr4jaHomFW7p3zsTT/92Q2tbUsR6o5it0a8pu5KJXj28w== X-Received: by 2002:a05:6402:b29:b0:456:f2dc:826d with SMTP id bo9-20020a0564020b2900b00456f2dc826dmr16370723edb.94.1664272767313; Tue, 27 Sep 2022 02:59:27 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com Subject: [PATCH 1/5] ui: fix path to dbus-display1.h Date: Tue, 27 Sep 2022 11:59:17 +0200 Message-Id: <20220927095921.261760-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220927095921.261760-1-pbonzini@redhat.com> References: <20220927095921.261760-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1664273528411100001 Content-Type: text/plain; charset="utf-8" While the source directory is always included in the include path, the corresponding directory in the build tree is not. Therefore, custom_targets (e.g. ui/dbus-display1.h) must be referred to using the full path. This avoids a build failure when ui/dbus-chardev.c is not built as a module: In file included from ../ui/dbus-chardev.c:32: ../ui/dbus.h:34:10: fatal error: dbus-display1.h: No such file or directory 34 | #include "dbus-display1.h" | ^~~~~~~~~~~~~~~~~ Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- tests/qtest/dbus-display-test.c | 2 +- ui/dbus.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/dbus-display-test.c b/tests/qtest/dbus-display-tes= t.c index 8be5974763..cb1b62d1d1 100644 --- a/tests/qtest/dbus-display-test.c +++ b/tests/qtest/dbus-display-test.c @@ -3,7 +3,7 @@ #include #include #include "libqtest.h" -#include "dbus-display1.h" +#include "ui/dbus-display1.h" =20 static GDBusConnection* test_dbus_p2p_from_fd(int fd) diff --git a/ui/dbus.h b/ui/dbus.h index c001c11f70..9c149e7b41 100644 --- a/ui/dbus.h +++ b/ui/dbus.h @@ -31,7 +31,7 @@ #include "ui/console.h" #include "ui/clipboard.h" =20 -#include "dbus-display1.h" +#include "ui/dbus-display1.h" =20 typedef struct DBusClipboardRequest { GDBusMethodInvocation *invocation; --=20 2.37.3 From nobody Mon May 20 21:02:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1664274200; cv=none; d=zohomail.com; s=zohoarc; b=OqBmuXuppk7WXKNux8lZiwL9aixw3kbrkMihmIqufnEwyIS9yNK9n5+ECAVR2ZRETJ6/H2lDucE4fM9n+hHoPFeWABXIcu3DYLSAIkhKbLV4yRBztL/NyQqKTNC8nRH7pjOdvXasYtFVH2Rg416aWmyII9ooBvtlsy0h9SctCd4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664274200; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GmEzTXeWttwM0cmsdfT/yyFOvuJ57Q0lrjG3lwibT6k=; b=UdfgXZy10BneEmeEyJ2ic6cPZbB58ltLFJRKXghC6nquiqjozYOBerUxgH3rr5RAS6CtckdR2g2JLoBJBPmPR6UJ7Vn6qifv0HMuWLgyHt4PnhGjyIAvRVUYBYvKmJ7f2ng/JxEd7HI8UpXo4Lb6nHk+I8/X6KknYJ+9VBT/e30= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1664274200868488.9431771573128; Tue, 27 Sep 2022 03:23:20 -0700 (PDT) Received: from localhost ([::1]:41586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1od7kF-0005y4-To for importer@patchew.org; Tue, 27 Sep 2022 06:23:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7NI-0007kK-Od for qemu-devel@nongnu.org; Tue, 27 Sep 2022 05:59:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45911) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7NF-0008Ts-Sz for qemu-devel@nongnu.org; Tue, 27 Sep 2022 05:59:35 -0400 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-196-6AZSVkW6P7yvTM0SeiUQXw-1; Tue, 27 Sep 2022 05:59:31 -0400 Received: by mail-ed1-f71.google.com with SMTP id i17-20020a05640242d100b0044f18a5379aso7510471edc.21 for ; Tue, 27 Sep 2022 02:59:31 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id v7-20020a056402348700b0044e7862ab3fsm1005672edc.7.2022.09.27.02.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 02:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664272773; 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=GmEzTXeWttwM0cmsdfT/yyFOvuJ57Q0lrjG3lwibT6k=; b=NdrDIJ/H/PwFoJcUmAFUymJrJaV0GV8WJU4bUxOQLCKq+Smipxmi2Oz+eQ7YQe4kWQCozP AKZa2cU3qj6PKtxDy1Neck18h9LzvdPOAaB8ot+SspkZsqpG4IytwNCijECzr44yCEcI/z gQ3UPGXoBxCCH2OZeoy0C92FaCfTQA8= X-MC-Unique: 6AZSVkW6P7yvTM0SeiUQXw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=GmEzTXeWttwM0cmsdfT/yyFOvuJ57Q0lrjG3lwibT6k=; b=uHV8Z22TZI8mrdi/675iQ0KhApTvOlv6XJrJG4qeAPeTwdMYy06WmGojgb/PLOz2dw TPFquJCWvTTSe3IfbBT6LJOtHQF6+okYvACkOR/I+KuI7Ve1Mizy4JWcDRtbgKM+rlPS zPWyOxJRRh6E5Wafi4kY/TtbIgUwkIXkamW+IBNShq07XKKxBBnTzLnmdqLNQnrDzew+ rJVSsNkPBXLJ7X7Kvsa8xA4iYNBQgW9ymYexmSjTxdvY0mHwOexPDm7QP3q0sw5COTvo PqwhYktWFAiAazHq3nlm3+MqdABDBmx6Aw0S+ezBBeS0BUaNU9Ku9r0TycOncg0hyfez tutg== X-Gm-Message-State: ACrzQf0L5czGiajYXtkzpfYIH6q/cuCP1K0nO5nzUDXmIy//7yjxsC4K +EvrmIIoHSdjbRQFxGUvVM2sXfVZCR8KZSrl062rkWwY900gCKEgXA0/5vbqtuK6AUrJ4Wg6rNT BGz+3ASaDSiXfIdHns5DuKc2ZNULJ5yz+XXbf2K2T256CGVMNCDfV+Rt6/n2UsutTo1g= X-Received: by 2002:a17:907:160d:b0:782:9631:c198 with SMTP id hb13-20020a170907160d00b007829631c198mr17623378ejc.520.1664272770272; Tue, 27 Sep 2022 02:59:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6KVjo2kVzncrQFVPTWEX9tqc5R23kQoyPH0sFRdcbEItCOOPJ3iY8YWFSRvy+KSFFZybnAkQ== X-Received: by 2002:a17:907:160d:b0:782:9631:c198 with SMTP id hb13-20020a170907160d00b007829631c198mr17623365ejc.520.1664272769961; Tue, 27 Sep 2022 02:59:29 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com Subject: [PATCH 2/5] meson: require 0.61.3 Date: Tue, 27 Sep 2022 11:59:18 +0200 Message-Id: <20220927095921.261760-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220927095921.261760-1-pbonzini@redhat.com> References: <20220927095921.261760-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1664274202698100001 Content-Type: text/plain; charset="utf-8" This removes the dependency of dbus-display on --enable-modules. It also a= llows cleanups in modinfo collection and allows moving C++ compiler detection to meson.build. Because it is now deprecated to use install_subdir to create an empty direc= tory, replace it with install_emptydir. Updating the Meson submodule to 0.61.5 also removes the message WARNING: Broken python installation detected. Python files installed by Meson might not be found by python interpreter. unless using system meson is forced with --meson. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/873 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/848 Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 2 +- meson | 2 +- meson.build | 5 +---- qga/meson.build | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/configure b/configure index a963e6afb3..680d96d09f 100755 --- a/configure +++ b/configure @@ -1114,7 +1114,7 @@ fi python=3D"$python -B" =20 if test -z "$meson"; then - if test "$explicit_python" =3D no && has meson && version_ge "$(meson = --version)" 0.59.3; then + if test "$explicit_python" =3D no && has meson && version_ge "$(meson = --version)" 0.61.5; then meson=3Dmeson elif test "$git_submodules_action" !=3D 'ignore' ; then meson=3Dgit diff --git a/meson b/meson index 12f9f04ba0..3a9b285a55 160000 --- a/meson +++ b/meson @@ -1 +1 @@ -Subproject commit 12f9f04ba0decfda425dbbf9a501084c153a2d18 +Subproject commit 3a9b285a55b91b53b2acda987192274352ecb5be diff --git a/meson.build b/meson.build index 1f6634d4cd..8be01ba1c3 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('qemu', ['c'], meson_version: '>=3D0.59.3', +project('qemu', ['c'], meson_version: '>=3D0.61.3', default_options: ['warning_level=3D1', 'c_std=3Dgnu11', 'cpp_std= =3Dgnu++11', 'b_colorout=3Dauto', 'b_staticpic=3Dfalse', 'stdsplit=3Dfalse', 'opti= mization=3D2', 'b_pie=3Dtrue'], version: files('VERSION')) @@ -1669,12 +1669,9 @@ endif have_host_block_device =3D (targetos !=3D 'darwin' or cc.has_header('IOKit/storage/IOMedia.h')) =20 -# FIXME enable_modules shouldn't be necessary, but: https://github.com/mes= onbuild/meson/issues/8333 dbus_display =3D get_option('dbus_display') \ .require(gio.version().version_compare('>=3D2.64'), error_message: '-display dbus requires glib>=3D2.64') \ - .require(enable_modules, - error_message: '-display dbus requires --enable-modules') \ .require(gdbus_codegen.found(), error_message: '-display dbus requires gdbus-codegen') \ .require(opengl.found() and gbm.found(), diff --git a/qga/meson.build b/qga/meson.build index 65c1e93846..a0ffd6d268 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -138,7 +138,7 @@ else if get_option('guest_agent_msi').enabled() error('MSI guest agent package is available only for MinGW Windows cro= ss-compilation') endif - install_subdir('run', install_dir: get_option('localstatedir')) + install_emptydir(get_option('localstatedir') / 'run') endif =20 alias_target('qemu-ga', all_qga) --=20 2.37.3 From nobody Mon May 20 21:02:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1664273075; cv=none; d=zohomail.com; s=zohoarc; b=JXHp+Tcw9nA/QS9jJ2L/Y9eEcsmopsrzEd7lPL89jEKWRFPjQF6BnCXa761VN4SM8mW1YYqTIlB0ldu7PURhtQNQr/uS4ejnSw8fUTwEm9G/NjYfVBMJPb5EdJ0wnmy9u82FeQrl8w3UiEpRzolivMvDJdNkILJn9huJE2ey0lY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664273075; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=aPj5z8G4LaRdkqvctjZSXNLzzOgJI5HGdpKUs4UaT0U=; b=XnwdwUvOqouWDTQJkSfP2wJG881K8fJjNKehPvi/fcN+tw8TsyCQVJB09rq7DUIlEt5582fEX2ZJ09XJa3t6P9hzKtjtbr1JXczfbTsR0AdZY9YPNsOwB114Gehcptp7Z43PgnF8zGMnRtcmQH4jtCYwDIfifBb6Zs6UifQbiv4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 166427307549889.04294022365048; Tue, 27 Sep 2022 03:04:35 -0700 (PDT) Received: from localhost ([::1]:41448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1od7S4-0002fh-SI for importer@patchew.org; Tue, 27 Sep 2022 06:04:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7NK-0007ro-0D for qemu-devel@nongnu.org; Tue, 27 Sep 2022 05:59:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:59777) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7NI-0008UX-ID for qemu-devel@nongnu.org; Tue, 27 Sep 2022 05:59:37 -0400 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_128_GCM_SHA256) id us-mta-516-ME220EZyOaiC4hISw3pU1Q-1; Tue, 27 Sep 2022 05:59:34 -0400 Received: by mail-ej1-f69.google.com with SMTP id sd4-20020a1709076e0400b00781e6ba94e1so3562189ejc.1 for ; Tue, 27 Sep 2022 02:59:34 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id 26-20020a170906309a00b00781b589a1afsm531675ejv.159.2022.09.27.02.59.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 02:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664272776; 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=aPj5z8G4LaRdkqvctjZSXNLzzOgJI5HGdpKUs4UaT0U=; b=LpHCpO5u/ssV40MG7BwtYh7+1lHmEsmIyVvwHYZwTAd46X+y8zGlZXYePq7zIaSVv7qTfz egFdMz4d+8phyBK7+G9WPRsWrFJg4rkW3HwYmpcEnApVO1hcrmJd6OLDT4y4QhBs1LtS6r b13SZNzipq5Tvvx+ZiK2MJsK3XHYQtI= X-MC-Unique: ME220EZyOaiC4hISw3pU1Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=aPj5z8G4LaRdkqvctjZSXNLzzOgJI5HGdpKUs4UaT0U=; b=RtmIIZ9ktyGzw/fdq0hY4uSu3PEayciM6kx7nQOahgAm4V2Aj7Rh77f3tdsq5mU8uV DeG2ZBTgFmFn8rrWJ9KDxbRkElELlAWrEPpZ4b/M77Uf3vyQfMuXRIN98U0vXQzN0Zlp J/BzRqBC1Pg2ZvKSQewh0tq8xkuztRhatlIKiPTOnotuvxNnxWSckYtZcyeoOxxLy5e0 +Xz/LJ5krhbe9cyK23L3SsCIZiwNViOl347KUGd4Tp8JYOg1TE5pSzkxBOabCvVRXA2U FjNB/ZhkTaHx9R8TuL9ztxzVqNfh71I1zgDvO8vFGISJmgeSMdZOJDSYEb3VT+jHlM2l 8Bpw== X-Gm-Message-State: ACrzQf1LFhNXFvFz/R/HdFZYkG0gSI3gWkJAqVc1oGxsyBI4k3Z5z17B Da9P1sebJlXy15wqe2ukR6RnyB2Gr5zp2xKNqn/SvsqEtaNXcVkQ4qDj+jhpKMrEZs+xwD4J+bT 5Bv3gTyjEGSykpVDf5aw4ZSsKvIWr1nnyXzf9bPHCgY5/tbfuHSX/AcC+TqnrnAs9frM= X-Received: by 2002:a17:907:2c75:b0:77c:2b6a:6b63 with SMTP id ib21-20020a1709072c7500b0077c2b6a6b63mr22653777ejc.702.1664272773183; Tue, 27 Sep 2022 02:59:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7x1iG2UMddzE95OUGkND3iYEyrlGvjQmgP2UMr0RAabFDAhORi3uS0otSe+Bt4jaFBkoGTFg== X-Received: by 2002:a17:907:2c75:b0:77c:2b6a:6b63 with SMTP id ib21-20020a1709072c7500b0077c2b6a6b63mr22653763ejc.702.1664272772919; Tue, 27 Sep 2022 02:59:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com Subject: [PATCH 3/5] meson: multiple names can be passed to dependency() Date: Tue, 27 Sep 2022 11:59:19 +0200 Message-Id: <20220927095921.261760-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220927095921.261760-1-pbonzini@redhat.com> References: <20220927095921.261760-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1664273077026100001 Content-Type: text/plain; charset="utf-8" This is new in Meson 0.60.0. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- meson.build | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 8be01ba1c3..e1700d1d55 100644 --- a/meson.build +++ b/meson.build @@ -825,14 +825,10 @@ if have_system and get_option('curses').allowed() }''' =20 curses_dep_list =3D targetos =3D=3D 'windows' ? ['ncurses', 'ncursesw'] = : ['ncursesw'] - foreach curses_dep : curses_dep_list - if not curses.found() - curses =3D dependency(curses_dep, - required: false, - method: 'pkg-config', - kwargs: static_kwargs) - endif - endforeach + curses =3D dependency(curses_dep_list, + required: false, + method: 'pkg-config', + kwargs: static_kwargs) msg =3D get_option('curses').enabled() ? 'curses library not found' : '' curses_compile_args =3D ['-DNCURSES_WIDECHAR=3D1'] if curses.found() --=20 2.37.3 From nobody Mon May 20 21:02:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1664273220; cv=none; d=zohomail.com; s=zohoarc; b=UMjfCQjHIubT3mRMJ7jYi+UXOCAoOtP2s393e+vkD6gP9HdmCGBRIsicg+ojBmdvkSn1BqG5/4Fg06H+ZdgH1y51qIu1JEKFm61XedC80iy8KBKQmiiZYdUIVKAJgZUat5zRN4+YB7JVobNJ5aPyj0Io0eM33/aHHgDSpTpdQTY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664273220; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cZvvOrSffxAvNyvTqnxvbaS4G1IkK9vUU36lJHAhErM=; b=kZB5rArj3kIt2wNgJsGeBOxjmFda8u3qt2ss4wKuhIX8tD/4DA8xX8VcvB6qKXCH8lx4QCsfsDzoCzfeh6GPf3dD+M4Er/SvD1MvfJCQHqi1DZPYzLKo0Lfcr9ZN2MslOAdhSi67DLfZVKfTCX6YnDGNE3pwKthpy7NRlLoxgjI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1664273220466268.2491549752656; Tue, 27 Sep 2022 03:07:00 -0700 (PDT) Received: from localhost ([::1]:33874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1od7UR-0004VN-9E for importer@patchew.org; Tue, 27 Sep 2022 06:06:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7NN-000859-Qp for qemu-devel@nongnu.org; Tue, 27 Sep 2022 05:59:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:43717) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7NL-0008Vf-Qk for qemu-devel@nongnu.org; Tue, 27 Sep 2022 05:59:41 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-173-bn8fzegbPkmSz6Cz03Atpw-1; Tue, 27 Sep 2022 05:59:37 -0400 Received: by mail-ed1-f69.google.com with SMTP id z13-20020a05640240cd00b0045276a79364so7352079edb.2 for ; Tue, 27 Sep 2022 02:59:37 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id m21-20020a1709060d9500b0073d638a7a89sm538305eji.99.2022.09.27.02.59.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 02:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664272779; 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=cZvvOrSffxAvNyvTqnxvbaS4G1IkK9vUU36lJHAhErM=; b=VNP+vrLIn0paEt5oXEKkNiwNklUatwuZowzZT4ud6cvAZ74tpyGhOFM3hhu8Eq2jd4xcI2 Qb2OEDSAsyzmzWb9YKVuCNMYRlwPHdOH3MBdIsMckj1Q9CTJQ3zfaPFvQ1YZCs59rm16kE O8Al5zjk+arMp7n3ogEPzvlRKYY9afw= X-MC-Unique: bn8fzegbPkmSz6Cz03Atpw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=cZvvOrSffxAvNyvTqnxvbaS4G1IkK9vUU36lJHAhErM=; b=eKEeHaN1x80X6xk2i8FzAox6jkhWY0xU8WQxD4Y++dwp10nLRA6W9XYiXxno9H7PrN 9GyUTOQjd0LVLq8n4TJNnrSVhuLt5S98ry4se3mz2UZAJXARrZxdNFg4Fw3Kcii5tvp5 S9unR/oRkq/6p/4umFn3JwQcnmyOQRNLBiZ5EQECHNVTHfKUKfveZ9r9EJrJ0Quu/Rwc fhohImbKDUQ4uru2CY8XbitaesfY7XDqcGVG4YMgsFylUuzRI+5q5+7iLsa3DaBprcyk yBd0oHEalgMRDa2lyWCeeNXmY5dbCoFlg5zpU8SA2797PUdaqD07zatUGgHA3Bp/YdkL X4Mw== X-Gm-Message-State: ACrzQf1nPmN6w+/RrrNGiMf2QoA7LdSUaXNy6Yg7xWwbE1BvwsRZhuAu P12WsVbQNgPzHw8gs604jIov40evFgJBXXQ0JAawN8P/loSq7G4V/IfXKWrO6HVWjXq6LmRYA0x xmUHqY15vedHGjKughSEKPsoAPdq8s072cOTRinwTBjVOolTwBhiz724iwIyoa4OtBe8= X-Received: by 2002:a05:6402:3582:b0:451:3f7b:a7c5 with SMTP id y2-20020a056402358200b004513f7ba7c5mr27554683edc.63.1664272775794; Tue, 27 Sep 2022 02:59:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM59HiQ/LJRKPB4qlkG2AM8HAG/5jpynZ4t/NT9a2ipWtideWLQ5L2pRJnpn+wQ0PkH5rnAG4Q== X-Received: by 2002:a05:6402:3582:b0:451:3f7b:a7c5 with SMTP id y2-20020a056402358200b004513f7ba7c5mr27554659edc.63.1664272775434; Tue, 27 Sep 2022 02:59:35 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com Subject: [PATCH 4/5] configure, meson: move C++ compiler detection to meson.build Date: Tue, 27 Sep 2022 11:59:20 +0200 Message-Id: <20220927095921.261760-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220927095921.261760-1-pbonzini@redhat.com> References: <20220927095921.261760-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1664273222514100001 Content-Type: text/plain; charset="utf-8" The test is slightly weaker than before, because it does not call an extern "C" function from a C source file. However, in practice what we seek to detect is ABI compatibility of the various sanitizer flags, and for that it is enough to compile anything with CC and link it with CXX. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 57 -------------------------------------------------- meson.build | 37 ++++++++++++++++++++++---------- scripts/main.c | 1 + 3 files changed, 27 insertions(+), 68 deletions(-) create mode 100644 scripts/main.c diff --git a/configure b/configure index 680d96d09f..0a6f57c371 100755 --- a/configure +++ b/configure @@ -75,7 +75,6 @@ fi TMPB=3D"qemu-conf" TMPC=3D"${TMPDIR1}/${TMPB}.c" TMPO=3D"${TMPDIR1}/${TMPB}.o" -TMPCXX=3D"${TMPDIR1}/${TMPB}.cxx" TMPM=3D"${TMPDIR1}/${TMPB}.m" TMPE=3D"${TMPDIR1}/${TMPB}.exe" =20 @@ -158,10 +157,6 @@ do_cc() { do_compiler_werror "$cc" $CPU_CFLAGS "$@" } =20 -do_cxx() { - do_compiler_werror "$cxx" $CPU_CFLAGS "$@" -} - do_objc() { do_compiler_werror "$objcc" $CPU_CFLAGS "$@" } @@ -171,24 +166,6 @@ add_to() { eval $1=3D\${$1:+\"\$$1 \"}\$2 } =20 -update_cxxflags() { - # Set QEMU_CXXFLAGS from QEMU_CFLAGS by filtering out those - # options which some versions of GCC's C++ compiler complain about - # because they only make sense for C programs. - QEMU_CXXFLAGS=3D"-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__ST= DC_FORMAT_MACROS" - CONFIGURE_CXXFLAGS=3D$(echo "$CONFIGURE_CFLAGS" | sed s/-std=3Dgnu11/-= std=3Dgnu++11/) - for arg in $QEMU_CFLAGS; do - case $arg in - -Wstrict-prototypes|-Wmissing-prototypes|-Wnested-externs|\ - -Wold-style-declaration|-Wold-style-definition|-Wredundant-dec= ls) - ;; - *) - QEMU_CXXFLAGS=3D${QEMU_CXXFLAGS:+$QEMU_CXXFLAGS }$arg - ;; - esac - done -} - compile_object() { local_cflags=3D"$1" do_cc $CFLAGS $EXTRA_CFLAGS $CONFIGURE_CFLAGS $QEMU_CFLAGS $local_cflags= -c -o $TMPO $TMPC @@ -2371,38 +2348,6 @@ fi ####################################### # generate config-host.mak =20 -# Check that the C++ compiler exists and works with the C compiler. -# All the QEMU_CXXFLAGS are based on QEMU_CFLAGS. Keep this at the end to = don't miss any other that could be added. -if has $cxx; then - cat > $TMPC < $TMPCXX <> $config_host_mak echo "NINJA=3D$ninja" >> $config_host_mak echo "CC=3D$cc" >> $config_host_mak echo "QEMU_CFLAGS=3D$QEMU_CFLAGS" >> $config_host_mak -echo "QEMU_CXXFLAGS=3D$QEMU_CXXFLAGS" >> $config_host_mak echo "QEMU_OBJCFLAGS=3D$QEMU_OBJCFLAGS" >> $config_host_mak echo "GLIB_CFLAGS=3D$glib_cflags" >> $config_host_mak echo "GLIB_LIBS=3D$glib_libs" >> $config_host_mak @@ -2608,7 +2552,6 @@ if test "$skip_meson" =3D no; then echo "${a}-softmmu =3D '$c'" >> $cross done =20 - test -z "$cxx" && echo "link_language =3D 'c'" >> $cross echo "[built-in options]" >> $cross echo "c_args =3D [$(meson_quote $CFLAGS $EXTRA_CFLAGS)]" >> $cross echo "cpp_args =3D [$(meson_quote $CXXFLAGS $EXTRA_CXXFLAGS)]" >> $cross diff --git a/meson.build b/meson.build index e1700d1d55..f57a60ac4c 100644 --- a/meson.build +++ b/meson.build @@ -180,7 +180,6 @@ endif ################## =20 qemu_cflags =3D config_host['QEMU_CFLAGS'].split() -qemu_cxxflags =3D config_host['QEMU_CXXFLAGS'].split() qemu_objcflags =3D config_host['QEMU_OBJCFLAGS'].split() qemu_ldflags =3D config_host['QEMU_LDFLAGS'].split() =20 @@ -194,7 +193,6 @@ endif =20 if get_option('gprof') qemu_cflags +=3D ['-p'] - qemu_cxxflags +=3D ['-p'] qemu_objcflags +=3D ['-p'] qemu_ldflags +=3D ['-p'] endif @@ -240,8 +238,33 @@ if get_option('fuzzing') endif =20 add_global_arguments(qemu_cflags, native: false, language: ['c']) -add_global_arguments(qemu_cxxflags, native: false, language: ['cpp']) add_global_arguments(qemu_objcflags, native: false, language: ['objc']) + +# Check that the C++ compiler exists and works with the C compiler. +link_language =3D 'c' +linker =3D cc +qemu_cxxflags =3D [] +if add_languages('cpp', required: false, native: false) + cxx =3D meson.get_compiler('cpp') + add_global_arguments(['-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS= ', '-D__STDC_FORMAT_MACROS'], + native: false, language: 'cpp') + foreach k: qemu_cflags + if k not in ['-Wstrict-prototypes', '-Wmissing-prototypes', '-Wnested-= externs', + '-Wold-style-declaration', '-Wold-style-definition', '-Wr= edundant-decls'] + qemu_cxxflags +=3D [k] + endif + endforeach + add_global_arguments(qemu_cxxflags, native: false, language: 'cpp') + + if cxx.links(files('scripts/main.c'), args: qemu_cflags) + link_language =3D 'cpp' + linker =3D cxx + else + message('C++ compiler does not work with C compiler') + message('Disabling C++-specific optional code') + endif +endif + add_global_link_arguments(qemu_ldflags, native: false, language: ['c', 'cp= p', 'objc']) =20 if targetos =3D=3D 'linux' @@ -255,14 +278,6 @@ add_project_arguments('-iquote', '.', '-iquote', meson.current_source_dir() / 'include', language: ['c', 'cpp', 'objc']) =20 -link_language =3D meson.get_external_property('link_language', 'cpp') -if link_language =3D=3D 'cpp' - add_languages('cpp', required: true, native: false) - cxx =3D meson.get_compiler('cpp') - linker =3D cxx -else - linker =3D cc -endif if host_machine.system() =3D=3D 'darwin' add_languages('objc', required: false, native: false) endif diff --git a/scripts/main.c b/scripts/main.c new file mode 100644 index 0000000000..b552c8e4ed --- /dev/null +++ b/scripts/main.c @@ -0,0 +1 @@ +int main(void) {} --=20 2.37.3 From nobody Mon May 20 21:02:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1664274497; cv=none; d=zohomail.com; s=zohoarc; b=k9CjDXdlJGHyQgLnzavQ6NjJZmbKXzX40BZd9paPKEUeldy4xmvJNTYsZkWU1Tk3EqqMKf2lx5vjsDp7Fkn8i1C2nb51wiBW5xQNPtNkEpTfPYsUoH7ZpCd5L4M9Rl5//ULAqHbro6k3WMhu4rDWg1swfuxmGLvYNE6mCNs1ZRY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664274497; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Cv2s2RMj/yiIy9atQZWzauYp1PxlHA8JgOuTAzR6GEk=; b=Zz1OVTmtFn54uoJrg1SN3OqW65LL+MfTCc/G5YH83jLlVAWgW1WT4xh5FxdRCD23t1/VEsYZ4hMcGQIbNYuxt69Pw66vrm3otDnWCT5ypG8mf80KQ1fR0sIjRTk0x6NA1m4zo3kUzSnjP6bRKzSPXUSnTw2/s2UUzpxEq0rFfu0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1664274497748350.21179554769446; Tue, 27 Sep 2022 03:28:17 -0700 (PDT) Received: from localhost ([::1]:45060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1od7oz-0002cW-Tb for importer@patchew.org; Tue, 27 Sep 2022 06:28:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7NR-0008HU-Vu for qemu-devel@nongnu.org; Tue, 27 Sep 2022 05:59:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:27414) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7NQ-00005G-9w for qemu-devel@nongnu.org; Tue, 27 Sep 2022 05:59:45 -0400 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-567-PyQJyk5OM6CFq2nwv8oMww-1; Tue, 27 Sep 2022 05:59:40 -0400 Received: by mail-ed1-f71.google.com with SMTP id x5-20020a05640226c500b00451ec193793so7424058edd.16 for ; Tue, 27 Sep 2022 02:59:40 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id o23-20020a170906769700b0073ddff7e432sm557077ejm.14.2022.09.27.02.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 02:59:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664272782; 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=Cv2s2RMj/yiIy9atQZWzauYp1PxlHA8JgOuTAzR6GEk=; b=dmJzQop9ALW/+25PYuSg2MANsZ8xauKzDWi2myDpMFUPS2p00cn61+yROMgGShgfFmh5Ck hFsJNTQN2elpZldpo7aiOQ+1D2PECCXLkFlIGGEXDONcfMSUjyzgUEponvKmlmniC6YgyU nMMWT36I26sV009VJwJpqwU+zXjHK8I= X-MC-Unique: PyQJyk5OM6CFq2nwv8oMww-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=Cv2s2RMj/yiIy9atQZWzauYp1PxlHA8JgOuTAzR6GEk=; b=IdeMoLWV6gM3G43vGxtRxoI/qPetDb2ISbDkPWJkFCAAZpRCwOitA3Jlrzt1++TfhU RysQJxGhBwgU3TQDyyyDQ2Su5AoqkHgg2K/Ove3nmVjse93zjRcMzMCHaidA1tZRjQP2 tflRPTEXGzujW2yTDPg1eXkI7YSx0d5wPandj0AIulsqfJhhQyif8U0VNtn+MhgJvVad NLm+JH07ltOLxbpuDqn5xyGcSaRFzB+uOkimgSI3I4ENs3/I2O9/QNOHgZIMWhARFQD4 lLJuEUpZTn8OQ4nY+emNpgWlsgW4YyC2NZnxOUMz65dlARXrvABPK9HPlaWOj74xLmZm p36g== X-Gm-Message-State: ACrzQf3WCZt9h2V0BC1xYJdvW2WpTUBYZxBqctlVlxnu1GrIAmvPWDqW lrihIKkxOT3pTs6ek1Kb+cvTBU5aeSffgjEOUqEDJ+Qfbg3qea/QjEiMyyosvZi1U1X8++JaClU W2WJykkEZ+1HW5NyMc4EqudN9y7wac2Eml7JJYQNGIJoWPUcUoQnx2SIFX+CKmNPlV/k= X-Received: by 2002:a17:907:2711:b0:781:d13a:bd15 with SMTP id w17-20020a170907271100b00781d13abd15mr22382508ejk.669.1664272778552; Tue, 27 Sep 2022 02:59:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5quwjykfode9Tg9sJrlLphSK0HBkIJjaXfLXh620i0PMCYybFYak+cTc1o97CVgb9sy7micg== X-Received: by 2002:a17:907:2711:b0:781:d13a:bd15 with SMTP id w17-20020a170907271100b00781d13abd15mr22382486ejk.669.1664272778248; Tue, 27 Sep 2022 02:59:38 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com Subject: [PATCH 5/5] configure, meson: move linker flag detection to meson Date: Tue, 27 Sep 2022 11:59:21 +0200 Message-Id: <20220927095921.261760-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220927095921.261760-1-pbonzini@redhat.com> References: <20220927095921.261760-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1664274499320100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 16 ---------------- meson.build | 13 +++++++++++++ 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 0a6f57c371..e5f1eb6213 100755 --- a/configure +++ b/configure @@ -1342,12 +1342,10 @@ EOF if test "$static" =3D "yes"; then if test "$pie" !=3D "no" && compile_prog "-Werror -fPIE -DPIE" "-static-= pie"; then CONFIGURE_CFLAGS=3D"-fPIE -DPIE $CONFIGURE_CFLAGS" - QEMU_LDFLAGS=3D"-static-pie $QEMU_LDFLAGS" pie=3D"yes" elif test "$pie" =3D "yes"; then error_exit "-static-pie not available due to missing toolchain support" else - QEMU_LDFLAGS=3D"-static $QEMU_LDFLAGS" pie=3D"no" fi elif test "$pie" =3D "no"; then @@ -1369,12 +1367,6 @@ else pie=3D"no" fi =20 -# Detect support for PT_GNU_RELRO + DT_BIND_NOW. -# The combination is known as "full relro", because .got.plt is read-only = too. -if compile_prog "" "-Wl,-z,relro -Wl,-z,now" ; then - QEMU_LDFLAGS=3D"-Wl,-z,relro -Wl,-z,now $QEMU_LDFLAGS" -fi - ########################################## # __sync_fetch_and_and requires at least -march=3Di486. Many toolchains # use i686 as default anyway, but for those that don't, an explicit @@ -2247,14 +2239,6 @@ if test "$have_ubsan" =3D "yes"; then fi =20 ########################################## - -# Exclude --warn-common with TSan to suppress warnings from the TSan libra= ries. -if test "$solaris" =3D "no" && test "$tsan" =3D "no"; then - if $ld --version 2>/dev/null | grep "GNU ld" >/dev/null 2>/dev/null ; = then - QEMU_LDFLAGS=3D"-Wl,--warn-common $QEMU_LDFLAGS" - fi -fi - # Guest agent Windows MSI package =20 if test "$QEMU_GA_MANUFACTURER" =3D ""; then diff --git a/meson.build b/meson.build index f57a60ac4c..f8c80a5b00 100644 --- a/meson.build +++ b/meson.build @@ -183,6 +183,14 @@ qemu_cflags =3D config_host['QEMU_CFLAGS'].split() qemu_objcflags =3D config_host['QEMU_OBJCFLAGS'].split() qemu_ldflags =3D config_host['QEMU_LDFLAGS'].split() =20 +if enable_static + qemu_ldflags +=3D get_option('b_pie') ? '-static-pie' : '-static' +endif + +# Detect support for PT_GNU_RELRO + DT_BIND_NOW. +# The combination is known as "full relro", because .got.plt is read-only = too. +qemu_ldflags +=3D cc.get_supported_link_arguments('-Wl,-z,relro', '-Wl,-z,= now') + if targetos =3D=3D 'windows' qemu_ldflags +=3D cc.get_supported_link_arguments('-Wl,--no-seh', '-Wl,-= -nxcompat') # Disable ASLR for debug builds to allow debugging with gdb @@ -265,6 +273,11 @@ if add_languages('cpp', required: false, native: false) endif endif =20 +# Exclude --warn-common with TSan to suppress warnings from the TSan libra= ries. +if targetos !=3D 'sunos' and not config_host.has_key('CONFIG_TSAN') + qemu_ldflags +=3D linker.get_supported_link_arguments('-Wl,--warn-common= ') +endif + add_global_link_arguments(qemu_ldflags, native: false, language: ['c', 'cp= p', 'objc']) =20 if targetos =3D=3D 'linux' --=20 2.37.3