From nobody Fri May 17 21:03:22 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=1670585171; cv=none; d=zohomail.com; s=zohoarc; b=ZVRbRLEBE8L0K1o542JWKYYiraOvZo377By2pz9e7fzTWhAPdTfU2D7NV9wkoDEy/jPHCuXiShv5kk/9BE2HDEL41gwJfnxmMBTzbNbFrBZeUL5hZvbR/kzDgWELBKZFUpPGB3Z3JgTpWgGa6y27JpMhV9Ovu5o4b267dcIEiAY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585171; h=Content-Type:Content-Transfer-Encoding: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=IqCOMmh9H5Cl8rermYH1x21MQE2J0zZoMmtEy60MyuI=; b=gEPofto+k/F11uivePLOyEAIudf7In8jJ57bJli44cLIetHNN1EOJH8szsYRgsFKjTe0j0PS97mWKJksELrFCad11cGwUoi44FXMYNmpQ0c+FsOCFNbzRMAuR1M7Mc3l4FsJYjE3vXX/WrU1rZDHo03VKiG27nOa7aQZFZSVSAI= 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 1670585171347596.0918895007162; Fri, 9 Dec 2022 03:26:11 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bVx-0004SO-DZ; Fri, 09 Dec 2022 06:26:03 -0500 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 1p3bUW-0003w5-7y for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:33 -0500 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 1p3bUI-0000wo-6H for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:19 -0500 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-610-U7UsAfmFMmS5ehqznLIRFA-1; Fri, 09 Dec 2022 06:24:15 -0500 Received: by mail-ed1-f69.google.com with SMTP id j6-20020a05640211c600b0046d6960b266so1197765edw.6 for ; Fri, 09 Dec 2022 03:24:15 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id s19-20020a170906455300b0073022b796a7sm450864ejq.93.2022.12.09.03.24.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:24:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585057; 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=IqCOMmh9H5Cl8rermYH1x21MQE2J0zZoMmtEy60MyuI=; b=i/xi5xv91rWw0LHUPV7vtqrcvfmClDsbNeVEkM+N3htmKTeiUcuxSs/DPH9Myue1YD1qNP jRnDlvteaB0rIYaBFcaRX3EQhoCJrqDe/EHfLj/iiFhUuDenw5HBbNfVauwWnxzpR0HsrH hVBStvCgv08i5mZnGa2gAUsmWtWjmj4= X-MC-Unique: U7UsAfmFMmS5ehqznLIRFA-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IqCOMmh9H5Cl8rermYH1x21MQE2J0zZoMmtEy60MyuI=; b=oR6zIhcrsZER+Mb9XqOaCKHuxeOz2Zy0bq22bm4+AoeFbKCcgEydfKH1KJrjCgEb9R qod61op+SOQwwD0+cVkQ6+Th1hl3iQmh+w+OU1hBXezxhjgpwcn96Q0OMOhdbDsS3MUw WZdRFj3dWPPEc/Ui7wnbLcwzSfDyarIQUI1si84ytT+AtuPfsrboNn2mQi4iOhCJj97Q Oej2113x9P/RAL+ItE0UnGhkEC4p8m5zY+m161LmiiGB7jqJGwAfnZik0WSh+jScYuAb FweJjg2y/hC0VGDEOQjxdRCZThR08PZ+JTkiwC2AKePt8ntU9oBFTGsZU2NK7n8wpjp0 PyzA== X-Gm-Message-State: ANoB5plJJx/SC0vAb7q1RFXrRDuzLWiM7QQAODmK2VhW1L2rlOg9qCIU yukBXbY2T3mER24A3dmI3WPF79RK6RSkl7FXRnCYMQ1Uho0IzXsoceUnvbaSZYBk7RYmBMd/6e4 DPU/xsAh38byn1mI+ny9kNBMJI8KwbAiOdGZVMYXD5RAVl7+d7QOwtP4nnZaR5/83a9A= X-Received: by 2002:a17:906:86d9:b0:7c1:2a0f:55b1 with SMTP id j25-20020a17090686d900b007c12a0f55b1mr3925044ejy.14.1670585054359; Fri, 09 Dec 2022 03:24:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf6lhl+JTRF47wBaaNcm55ei5ovRtxty6uvvnTLnIvlZgJLliC/xW7SYTV4I3K8jJCl0Kc78RA== X-Received: by 2002:a17:906:86d9:b0:7c1:2a0f:55b1 with SMTP id j25-20020a17090686d900b007c12a0f55b1mr3925024ejy.14.1670585054021; Fri, 09 Dec 2022 03:24:14 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 01/30] configure: remove useless write_c_skeleton Date: Fri, 9 Dec 2022 12:23:40 +0100 Message-Id: <20221209112409.184703-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585189126100005 Content-Type: text/plain; charset="utf-8" This is not needed ever since QEMU stopped detecting -liberty; this happened with the Meson switch but it is quite likely that the library was not really necessary years before. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Maydell --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index 26c7bc515468..e31d4522ea63 100755 --- a/configure +++ b/configure @@ -638,7 +638,6 @@ if test "$mingw32" =3D "yes" ; then EXESUF=3D".exe" # MinGW needs -mthreads for TLS and macro _MT. CONFIGURE_CFLAGS=3D"-mthreads $CONFIGURE_CFLAGS" - write_c_skeleton; prefix=3D"/qemu" bindir=3D"" qemu_suffix=3D"" --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585139; cv=none; d=zohomail.com; s=zohoarc; b=Gf3EGYclrO5SeZhGjZlDpgW67z9WYNSTy85f+w25+kfTtfuFMXPAJTWQQcpz+v7QBRgd4Z+jCJ91QDnRmf0KiK+PYqhKKg7Vft+TaqeuWd7Lpgh20FvasuxSCd2KhchcLfSaRIJPz6rYblGfcnmkG8mkrq4gMVcaMmMEue7/D6Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585139; h=Content-Type:Content-Transfer-Encoding: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=WFtN8VunDV27fIl33PQfEOOcY8O2Ez7sdebsJhL3MAw=; b=lYM7NpQvdkgji4mSLaCj5/1uR1B2bc2exwDOOZCsEnteges2aybPcpqzl4YJAxUCah12drDZaSgEsUlAXUl5HPXaIzd80TKWZD2qxqLUWrORgo/jIlHZJal8Vmq0G493QeVm7Zy3jXT7TdbfpS8nSIndvvwvhD7HgJcB4EwoJxc= 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 1670585139141561.2780490586082; Fri, 9 Dec 2022 03:25:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bUa-0003xI-Ax; Fri, 09 Dec 2022 06:24:36 -0500 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 1p3bUX-0003wX-Ie for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:33 -0500 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 1p3bUS-0000x2-Ay for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:33 -0500 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-443-nqOR4a6RMM69hf7b4gsWKw-1; Fri, 09 Dec 2022 06:24:18 -0500 Received: by mail-ej1-f72.google.com with SMTP id qf25-20020a1709077f1900b0078c02a23da3so2902605ejc.0 for ; Fri, 09 Dec 2022 03:24:18 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id kv2-20020a17090778c200b007b2b98e1f2dsm438832ejc.122.2022.12.09.03.24.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:24:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585059; 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=WFtN8VunDV27fIl33PQfEOOcY8O2Ez7sdebsJhL3MAw=; b=IW0rFNCBMPQX8zKRaG+9cKuK7U8xiat1jmbwvPWl3cHVt2EDYE2I+Sw4Uwyk3hsVT7eqaI AfQNfqXzLnsUvvoTqpZ54xT4+fv6Nro4WayStYC2EqZ/yiP8dJ0UDuGg1bQRKcHS1TNfbV 4cALf/ESLkPjoEj7eV/kERJaDDb/AYs= X-MC-Unique: nqOR4a6RMM69hf7b4gsWKw-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WFtN8VunDV27fIl33PQfEOOcY8O2Ez7sdebsJhL3MAw=; b=nrVdKDp6/Fuzt29JI1KyjaxhYtVw9vg99WLMKbyLgMsZTg9BVhB0JWS1wvkN2cdVlt WYTTjqbMwN28Pph5gY6EZfWbxEwFHcGBDBRdQMXaEMd0RFLzn5gFRO3iWQuOQwqK2QrZ smlP03LCkMNLSDzl+0q/v5Zko7KwwCm8AvOboB/0TUKQDaaKeaxLudXqjtM4AklqixlZ o6isEerC4Y/jBjFgzmbagxUyIEAqvEDx8dEDmHyyJXhmtOFdzLNQSDe8uKD4f8JXmNCd WIf6yjXv+OfBxUuxSLO1HeLIQtq2j1/WKBCwUfeQtBlV60q7fSCKq5KSam01y+g+P7Pv fmFw== X-Gm-Message-State: ANoB5pmKDnzCth4fLdSvAHXOaoMwFOBuiS6BHSpVWC2T2Q93InFog5Ov VQRyZGcg0En+T3Qu7kXvIo2vk66dTvAZop2L5N+Yl9aOyoCPZuVKrxixbyu7PNTkQ6qZJCWXWW2 Yz9LH+jhFSmuOEQ0BEw5FvcBlKYOGnefuWn05AEbRFy8k1SNQAG6cw//hMWYCEXPekuc= X-Received: by 2002:a17:906:d18f:b0:7b2:75c6:6d3c with SMTP id c15-20020a170906d18f00b007b275c66d3cmr4738112ejz.74.1670585056912; Fri, 09 Dec 2022 03:24:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf6jbROFRlAzlDcWAd3ksGsDLTGs9j9u6gp6L3q+sJFvpnGjB/tYS2TScAl9YPB77y1ADyQyWQ== X-Received: by 2002:a17:906:d18f:b0:7b2:75c6:6d3c with SMTP id c15-20020a170906d18f00b007b275c66d3cmr4738095ejz.74.1670585056587; Fri, 09 Dec 2022 03:24:16 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 02/30] configure: remove dead function Date: Fri, 9 Dec 2022 12:23:41 +0100 Message-Id: <20221209112409.184703-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585182549100005 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Maydell --- configure | 4 ---- 1 file changed, 4 deletions(-) diff --git a/configure b/configure index e31d4522ea63..543fd5a48bf0 100755 --- a/configure +++ b/configure @@ -210,10 +210,6 @@ version_ge () { done } =20 -glob() { - eval test -z '"${1#'"$2"'}"' -} - if printf %s\\n "$source_path" "$PWD" | grep -q "[[:space:]:]"; then error_exit "main directory cannot contain spaces nor colons" --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585110; cv=none; d=zohomail.com; s=zohoarc; b=g+eM5kEYY0pCul7lAp4iylW5u7K7tH57h29EmNoObT99hGAuMGCnnBWdfrw6jEg3qqZGjLzibp8XmOpe7xLndIgwtXYuvuEWNLn1tbbZ7JKmhl9BwoXZOwWs27SgRJrEtf0keBwVzKQBaTYyVheBDeEmFQXfUoua0npwoY9yDWY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585110; h=Content-Type:Content-Transfer-Encoding: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=nhvjNB4OA8hsIXov8nN5lZt2h9cUBGWr2ztc3bOaMEc=; b=mn9djIOdRI4byk3tcbI13Kfj4Uq1POqRyzO8TO8Muyann4bHulvrD2U5oPiISQ0Mi8FWhpte/OikxBn2J/XNEN6nzbtudBPANWwBcX43EZo8DI+D+p/sVLE86mGcDxg86as9LUoedn41KmuzHpRelnddd40FP7oGOSyLeLbg3wU= 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 1670585110763915.3687073124693; Fri, 9 Dec 2022 03:25:10 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bUb-0003xQ-6y; Fri, 09 Dec 2022 06:24:37 -0500 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 1p3bUY-0003wn-HH for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:34 -0500 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 1p3bUV-0000xA-Vv for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:34 -0500 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-503--htBy_JsP9-xmxMbChUiuQ-1; Fri, 09 Dec 2022 06:24:21 -0500 Received: by mail-ed1-f71.google.com with SMTP id w15-20020a05640234cf00b0046d32d7b153so1219303edc.0 for ; Fri, 09 Dec 2022 03:24:20 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id m15-20020a50930f000000b00463597d2c25sm523812eda.74.2022.12.09.03.24.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:24:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585062; 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=nhvjNB4OA8hsIXov8nN5lZt2h9cUBGWr2ztc3bOaMEc=; b=HkFasVVbJ+yZPv6X8Aj7S6MRHZdAfOCuyO7h8BceoIpOjathxDHr3IuopMRJrREp/Qh+FW KD6oc2bDj4D3Bb08lRLtBN5HTWeiIpS9IObJUkdJOsNyrgXdUaKMBOFyVp0J/qw8oaOCMP W11+sNznlZh0yU2PrZgNnMpFy1F/SRE= X-MC-Unique: -htBy_JsP9-xmxMbChUiuQ-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nhvjNB4OA8hsIXov8nN5lZt2h9cUBGWr2ztc3bOaMEc=; b=EsF7k8NwgkpZXv16hjqtFDxbxpkydX+krHcLkeUmPXV/5maKn8oTPFR30f0FA7k5hO i1nkd/rKYyCsPA00oPVwKlMQxtUTEWmrpX4ihZkf9dJFXat3L+gMm/w7qZK6REGufs+i 1tKxOcjnTmoxtzj1j+PaNwgM3yiqQSiOwr8usG6pFVsuoz+GfmeKureVclq/PBmRA3J3 SVsgBx+PjzCTmunbgNo08UoK58F/RCWysIB+s+D7QWz6zzB9BTBYgemK/Sh/ZEiG67h1 yV19jsbRgs05SFGeVPRIdxtnToTYo1jYCA3psMSj2BNdUDMiPenV438Wfgp2BNbpHlvv OI/g== X-Gm-Message-State: ANoB5pkevAKZRwFp9tlU7faCoRkr68iPcm3g9qCNjCAj+WUVmY2mIR1r Y5xzSAdSnjho4MRT2GSjaobrL2/LMeo/0CKu02JmtQOqwDPPZOdA9uIvfukoPkS6OQXVa9BwG4v /c5HIgd8r/iDISYfcSICfI5hB1GyY9jjYxoz6EThBjU1TuxMQXny4pKL57iTLr6lEWac= X-Received: by 2002:a05:6402:3982:b0:461:9578:f904 with SMTP id fk2-20020a056402398200b004619578f904mr5362996edb.23.1670585059732; Fri, 09 Dec 2022 03:24:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Pwf36K7bncHBZ02kn2ZTwXBH3KSI9ykTT+/NAUJoJNEqazTWh09QcxYyd+IyjGDl/cuy0ng== X-Received: by 2002:a05:6402:3982:b0:461:9578:f904 with SMTP id fk2-20020a056402398200b004619578f904mr5362979edb.23.1670585059320; Fri, 09 Dec 2022 03:24:19 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 03/30] configure: remove useless test Date: Fri, 9 Dec 2022 12:23:42 +0100 Message-Id: <20221209112409.184703-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585172208100005 Content-Type: text/plain; charset="utf-8" $cpu is derived from preprocessor defines rather than uname these days, so do not bother using isainfo on Solaris. Likewise do not recognize BeOS's uname -m output. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Maydell --- configure | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/configure b/configure index 543fd5a48bf0..db2b45740449 100755 --- a/configure +++ b/configure @@ -337,9 +337,6 @@ for opt do ;; esac done -# OS specific -# Using uname is really, really broken. Once we have the right set of che= cks -# we can eliminate its usage altogether. =20 # Preferred compiler: # ${CC} (if set) @@ -489,13 +486,6 @@ sunos) QEMU_CFLAGS=3D"-D_XOPEN_SOURCE=3D600 $QEMU_CFLAGS" # needed for TIOCWIN* defines in termios.h QEMU_CFLAGS=3D"-D__EXTENSIONS__ $QEMU_CFLAGS" - # $(uname -m) returns i86pc even on an x86_64 box, so default based on i= sainfo - # Note that this check is broken for cross-compilation: if you're - # cross-compiling to one of these OSes then you'll need to specify - # the correct CPU with the --cpu option. - if test -z "$cpu" && test "$(isainfo -k)" =3D "amd64"; then - cpu=3D"x86_64" - fi ;; haiku) pie=3D"no" @@ -559,7 +549,7 @@ case "$cpu" in armv*b|armv*l|arm) cpu=3D"arm" ;; =20 - i386|i486|i586|i686|i86pc|BePC) + i386|i486|i586|i686) cpu=3D"i386" CPU_CFLAGS=3D"-m32" ;; x32) --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670586258; cv=none; d=zohomail.com; s=zohoarc; b=MN/fw6XLP5JCvhJCeciyx+CDe6EGotB0q+jSYOvlYQfZcF+tkkD7W8DhXI3E2oJ+8kvtY2+vvgR3e+Y7oOX8dz6JhxaJ+dQu/zy+/Nr58BQKCLxQbIXP/ofdA6dmCGg4Vg0W4F7VTXKu4GQ/ksLWN5HL4flr8IJ5+pkcLM3ZYzw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670586258; h=Content-Type:Content-Transfer-Encoding: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=za/k6vD1LgEWg237PfcY4++NBJhaGInfCianBH5mDvM=; b=DN8+VWC9aeIQ7BXuuTBNEn0eSUhImnG3GgB5aVd8GTvKW0/yL3tKV9O18VtDt8M02x4JDPG6pp5p2ZHoiGaTaTesdXtGOEYVP5SgnZRuQHWQ0bhKt7QOeVCU8vr4+mbSIHLCy995/481d9/jMdyCNfbx+/EQSYSprSDLcx3fg6M= 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 1670586258459762.1572492971235; Fri, 9 Dec 2022 03:44:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bW4-0004dT-CA; Fri, 09 Dec 2022 06:26:09 -0500 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 1p3bUY-0003wl-D6 for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:34 -0500 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 1p3bUV-0000xR-VY for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:34 -0500 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_128_GCM_SHA256) id us-mta-282-iZLsNfGMOT6kFtA7OAiW8g-1; Fri, 09 Dec 2022 06:24:23 -0500 Received: by mail-ed1-f70.google.com with SMTP id z3-20020a056402274300b0046b14f99390so1193030edd.9 for ; Fri, 09 Dec 2022 03:24:23 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id hw20-20020a170907a0d400b0074134543f82sm456800ejc.90.2022.12.09.03.24.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:24:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585065; 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=za/k6vD1LgEWg237PfcY4++NBJhaGInfCianBH5mDvM=; b=MUPjwkVLXtZxJdZb17zxX2wduR9pwaOyEpqjaINxg78XFABhhKAlbJaVmDlQU8hdRVxsl+ ENHVz89FyfulSQDMwnojRFNkaAsScYjeCDGlvP2evJyRe6Sx1hXHM98zhk0qLqX+ecznzk dzLPJD5JbnDhG1T61Kk/o2y5I424yW8= X-MC-Unique: iZLsNfGMOT6kFtA7OAiW8g-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=za/k6vD1LgEWg237PfcY4++NBJhaGInfCianBH5mDvM=; b=5t0pIc7W8sHsjBiX0FZ+wOTWY99oLX/M+oWszPmliBY5zLFkTMEDBfqnKwzuEPyso4 2RML+XM1z5sDC5pL8O3jzURsoTRyDs5Ur4xvOdE1vdEX7QAeOkZBnfQ/YqgsET3KE0CF h8vgHtzLX46fEISLwq+yNVt2UbGlSSeZbl6BdmeAcNG0t1mI2TGCXwdcsYPl2SnCW+Wl 1CGErhK1GB/PgsKBH2eRmk90i6JQsA+U4LEHz0bQMHdu48z6lZnWCPgw+FvfL9mwlWe/ bVuDLEHn217q4rmxGxTBDS4lMMAPG+Fc5OXwpRoHnyU3wyBEEczkrjVMx5IhyIZCUZFD CemQ== X-Gm-Message-State: ANoB5pmGxKO1UImZdOgNU9cAOjbTN4CCe1Su6+eHi2kEqnN2Z6xCROvO f6s4z8lxfhPmVqGbQeWDFlw4lYtiOC3ve+0h8ep/Iqv1hGohA3YJvuKFEEGitGDPkECNipelaOk MQKLDjcxLVnSPAeoYdf9R1KFRwZB2udGw4ikxAbiEIDeI9TBtBxQI6BNoXc+o4kJ92YA= X-Received: by 2002:a17:906:ecad:b0:7c1:ff4:d0c6 with SMTP id qh13-20020a170906ecad00b007c10ff4d0c6mr4053675ejb.36.1670585062491; Fri, 09 Dec 2022 03:24:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf4vMA/mZp/fI+i040kjWGmHv7YOQLTNGPOW9037r+iCyohPe0L86bcCWyaGHkfvWBTHAKfdBg== X-Received: by 2002:a17:906:ecad:b0:7c1:ff4:d0c6 with SMTP id qh13-20020a170906ecad00b007c10ff4d0c6mr4053653ejb.36.1670585062096; Fri, 09 Dec 2022 03:24:22 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 04/30] configure: preserve qemu-ga variables Date: Fri, 9 Dec 2022 12:23:43 +0100 Message-Id: <20221209112409.184703-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670586259249100003 Content-Type: text/plain; charset="utf-8" Ensure that qemu-ga variables set at configure time are kept later when the script is rerun. For preserve_env to work, the variables need to be empty so move the default values to config-host.mak generation. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/configure b/configure index db2b45740449..4d14ff9c319c 100755 --- a/configure +++ b/configure @@ -2222,20 +2222,6 @@ if test "$have_ubsan" =3D "yes"; then QEMU_LDFLAGS=3D"-fsanitize=3Dundefined $QEMU_LDFLAGS" fi =20 -########################################## -# Guest agent Windows MSI package - -if test "$QEMU_GA_MANUFACTURER" =3D ""; then - QEMU_GA_MANUFACTURER=3DQEMU -fi -if test "$QEMU_GA_DISTRO" =3D ""; then - QEMU_GA_DISTRO=3DLinux -fi -if test "$QEMU_GA_VERSION" =3D ""; then - QEMU_GA_VERSION=3D$(cat "$source_path"/VERSION) -fi - - ####################################### # cross-compiled firmware targets =20 @@ -2331,9 +2317,9 @@ if test "$debug_tcg" =3D "yes" ; then fi if test "$mingw32" =3D "yes" ; then echo "CONFIG_WIN32=3Dy" >> $config_host_mak - echo "QEMU_GA_MANUFACTURER=3D${QEMU_GA_MANUFACTURER}" >> $config_host_mak - echo "QEMU_GA_DISTRO=3D${QEMU_GA_DISTRO}" >> $config_host_mak - echo "QEMU_GA_VERSION=3D${QEMU_GA_VERSION}" >> $config_host_mak + echo "QEMU_GA_MANUFACTURER=3D${QEMU_GA_MANUFACTURER-QEMU}" >> $config_ho= st_mak + echo "QEMU_GA_DISTRO=3D${QEMU_GA_DISTRO-Linux}" >> $config_host_mak + echo "QEMU_GA_VERSION=3D${QEMU_GA_VERSION-$(cat "$source_path"/VERSION)}= " >> $config_host_mak else echo "CONFIG_POSIX=3Dy" >> $config_host_mak fi @@ -2647,6 +2633,9 @@ preserve_env PKG_CONFIG preserve_env PKG_CONFIG_LIBDIR preserve_env PKG_CONFIG_PATH preserve_env PYTHON +preserve_env QEMU_GA_MANUFACTURER +preserve_env QEMU_GA_DISTRO +preserve_env QEMU_GA_VERSION preserve_env SDL2_CONFIG preserve_env SMBD preserve_env STRIP --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585168; cv=none; d=zohomail.com; s=zohoarc; b=VtH2JHL1apdKSNOpW7aLpslbeRRkiU51ntnujiTQiipIX5ebUZJvkC9n92lXALGO85cUtipdOSSvy2UXfb+PWF8ehe+G+vyvsYVyLkfEDuYA8ncLv5MN7Qx6MGlbXo5uElCQQFoRS/OqaWWt7Y8t86eUUw+yWCVWJjrsWCeBKIA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585168; h=Content-Type:Content-Transfer-Encoding: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=oOQAWMPSQz988D3IvpBBn7kMOWDVijqq8387gXlMuac=; b=g/bxt+SMdmGlwOT+RdYndAK7X46bPM1FsosIvqkVoPPQZzWrMBdQR0u8mRQJBSTjaB7fd1DLDP616x6FWJEOZ8EldOvXxHMYloskLB9s2vgY2cc/RHGTz1AIeG5idQFW9uitzq8nCqQqbRCxvNOFltV/wRHOMhOkFYFHXSt/WBU= 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 167058516896934.13167816744772; Fri, 9 Dec 2022 03:26:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bVS-0003yN-K2; Fri, 09 Dec 2022 06:25:35 -0500 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 1p3bUY-0003wm-Gw for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:34 -0500 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 1p3bUV-0000xZ-Vp for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:34 -0500 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_128_GCM_SHA256) id us-mta-296-TZdBhQEZMNifo3vva9n7lg-1; Fri, 09 Dec 2022 06:24:26 -0500 Received: by mail-ej1-f71.google.com with SMTP id hr21-20020a1709073f9500b007b29ccd1228so2923668ejc.16 for ; Fri, 09 Dec 2022 03:24:26 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w14-20020a056402070e00b00463a83ce063sm498413edx.96.2022.12.09.03.24.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:24:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585068; 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=oOQAWMPSQz988D3IvpBBn7kMOWDVijqq8387gXlMuac=; b=A78Nllz0LA5BT0lVddargIMok6nuj73DXHIZBhEvrLz08IgYc6kr8vzq1SboDvBWCAV6Yg oXtE78DUYM/LuvFy0g7C/owRFT/EUB2bgI6WTubTDqOPPzfDJdS7tg8FcenIVXJLO9jxcc qZW/dCE3KpsZS8AOzpIDKxs9gxQ27Ec= X-MC-Unique: TZdBhQEZMNifo3vva9n7lg-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oOQAWMPSQz988D3IvpBBn7kMOWDVijqq8387gXlMuac=; b=JaRXXYamEKs9q7Y5ndaY7z473gfEdmEwTcD5mDyEByKS19SjM7PfLJj31Cz/wOSREy dgnZiFAXAdQWlaEb6Q4JqPPlVZPnEYlWyUkaL0lchxTH2fMKti8TR5F+0MQf/7xXWp4M FCJAsPMqMdzb3gq98Y03IhKfS9wA2Wq7f+Yv8294aBuRV45kIZPnixanvKd3IG3sH0GC VHrtgFYTZcLxo54djfE4/TYhhG+RIu61UrqyKBVNIfDXoKaKFW0OkMBYc7O+OViWwdg4 66K1vjmHB9xtroJiSerIJf+g9qZ7oCo7kH8XmVA9OzhglMmEZNWR33hFodQ1OfIrlLUX YrtQ== X-Gm-Message-State: ANoB5pnnY1NPDn3Dcdejq6r/PD7TctJjEvAlFk0PvX7P78+vzlUSCLo+ NnNyHwFBUVXBb6tr79dRGQqipJiRfJyG0gbRahrDLGCOWhmPak/T3pb8ZkS9dq+jIhZdqTP1TmZ 7CWjJDwWY1iqcTAEjFSikTnUxSt1W5U1uwAHUGXA6xgtcOti1B1EchRdvZP+gBO8sSuo= X-Received: by 2002:a17:907:cb83:b0:78d:f455:30fa with SMTP id un3-20020a170907cb8300b0078df45530famr5645422ejc.34.1670585065341; Fri, 09 Dec 2022 03:24:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf71BOS4H6KKTeCNM9XESgn+vcxCTg1lTnQcpIrE4Ji49g/aqVyVCIPvd3RdePnGhGMK0iBM+A== X-Received: by 2002:a17:907:cb83:b0:78d:f455:30fa with SMTP id un3-20020a170907cb8300b0078df45530famr5645398ejc.34.1670585065045; Fri, 09 Dec 2022 03:24:25 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 05/30] configure: remove backwards-compatibility and obsolete options Date: Fri, 9 Dec 2022 12:23:44 +0100 Message-Id: <20221209112409.184703-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585187915100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/configure b/configure index 4d14ff9c319c..adfff30a6204 100755 --- a/configure +++ b/configure @@ -838,17 +838,6 @@ for opt do ;; --with-coroutine=3D*) coroutine=3D"$optarg" ;; - --disable-zlib-test) - ;; - --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane) - echo "$0: $opt is obsolete, virtio-blk data-plane is always on" >&2 - ;; - --enable-vhdx|--disable-vhdx) - echo "$0: $opt is obsolete, VHDX driver is always built" >&2 - ;; - --enable-uuid|--disable-uuid) - echo "$0: $opt is obsolete, UUID support is always built" >&2 - ;; --with-git=3D*) git=3D"$optarg" ;; --with-git-submodules=3D*) @@ -868,19 +857,10 @@ for opt do ;; --gdb=3D*) gdb_bin=3D"$optarg" ;; - # backwards compatibility options - --enable-trace-backend=3D*) meson_option_parse "--enable-trace-backends= =3D$optarg" "$optarg" - ;; - --disable-blobs) meson_option_parse --disable-install-blobs "" - ;; --enable-vfio-user-server) vfio_user_server=3D"enabled" ;; --disable-vfio-user-server) vfio_user_server=3D"disabled" ;; - --enable-tcmalloc) meson_option_parse --enable-malloc=3Dtcmalloc tcmalloc - ;; - --enable-jemalloc) meson_option_parse --enable-malloc=3Djemalloc jemalloc - ;; # everything else has the same name in configure and meson --*) meson_option_parse "$opt" "$optarg" ;; --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585181; cv=none; d=zohomail.com; s=zohoarc; b=Qqd8uxfTQXWSN4iDOjmAHjZqAEhpAPla1+YRqu0WmY6tVAZTMIlNYWcSCjcXI99bH1Pfuo0fxdRpOwx3MwgFtCeUdyZwkvQJaaGBMROuUC+eFgdaOUIc2MMBQtNxOtaMkR/xWnUSZw3s+lWpj8JYGcbPShgUQ5F9ZP/AVB4LoT0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585181; h=Content-Type:Content-Transfer-Encoding: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=E6Kn+I8CfWpn/0AmDasqCnq+EboZ+mRrHgi6RT57zh0=; b=lDBEh2GkPL/B4DRz7lVw3LRF8xqMev0/U/1EuKpQVqu+bwUoGkR2roWMW+1mxn8fKmYGtvVys+kiMMGxmrb6YXM5zBNPREeyyUmDj7LEmpbfwEAGcGdoaESYJoIWpROYLZWmDB1qQhEZgL32HY7xjt7L0osSaWBoVfQMYHgQH0Q= 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 1670585181705261.92171944647816; Fri, 9 Dec 2022 03:26:21 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bWE-0004yL-5Q; Fri, 09 Dec 2022 06:26:18 -0500 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 1p3bUZ-0003wo-6M for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:35 -0500 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 1p3bUV-0000xj-Vn for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:34 -0500 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_128_GCM_SHA256) id us-mta-418-zG4XgSFdOi27Yq8rI29ZNA-1; Fri, 09 Dec 2022 06:24:29 -0500 Received: by mail-ej1-f71.google.com with SMTP id xh12-20020a170906da8c00b007413144e87fso2910510ejb.14 for ; Fri, 09 Dec 2022 03:24:29 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id v27-20020a170906489b00b007c094d31f35sm450537ejq.76.2022.12.09.03.24.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:24:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585070; 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=E6Kn+I8CfWpn/0AmDasqCnq+EboZ+mRrHgi6RT57zh0=; b=SP/trcK1D9CZ0j3OCglZFVMPtB+/PEWp6fLcNtlzvuVJs+OUECMxvPk1b6u5CJ3Y0QpuoF lkfN4GmkXjzep5rQfM19Ck032xGd4T3wqM0Q0RPaXiiSDOYpRzaFp8hlL+5Gx71AY3yOBZ gUTCAbmPZN0efoqQAi39p8FjxR1Sjto= X-MC-Unique: zG4XgSFdOi27Yq8rI29ZNA-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E6Kn+I8CfWpn/0AmDasqCnq+EboZ+mRrHgi6RT57zh0=; b=Uu/v94Dfq44fDyT/qfKk+aZB3s22M3sOyT+ULqlNNv0AtaR/QdIXaxeJqjXURaax/g MTZRMx/0ZmRvl3ZQdtENduzTtXPzuENM9eiP6xVIBhuHuxK1vNSoDPn7GkOFB0UH5rHG nVh9b7GhEDz/LVUxDwsO9hhuKWxhYHTKM6YgMnvidgPX1FadN0NMq7ZLsX/QNh+mexlk 9GNGzJCxN/Qs2DirA94xTPf2EdQ5jTxNcwE/dIChola4YETZ5bTYf1AVooXumF7IfdCw fTUwWgBiS7NHk8UIoZhmfK9ECruBgjeKFD1XjXp0XpgkwvKkxZrxRdoiabZm10eogJ7Y 1fAQ== X-Gm-Message-State: ANoB5pkI7ERB/Lp8MnNdRRDHUPxCly08VVPUrsiYkL+xlpS39SwgLHem BQ6YPvgBoEPHuDQJzcYAAmoRXb8QvG9BLe0wpKfCuZCT8llh/rnQXHD0NCpeAIo3Wdidvu8Psd3 zoPmNnzGPbJMnnC2/VoS74f8mvLvAklrgSsq+ReaRz4xhnR25N3x6VDeXWqwPZnRSGwI= X-Received: by 2002:a17:907:9208:b0:7c0:d605:fe42 with SMTP id ka8-20020a170907920800b007c0d605fe42mr3677189ejb.18.1670585068137; Fri, 09 Dec 2022 03:24:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf6idrx+rOibinie7p68xtIqk14dxhcDXX9lHho41MOM4Qd8bBBjRXl0GS7ducEdqRE5GU7YeA== X-Received: by 2002:a17:907:9208:b0:7c0:d605:fe42 with SMTP id ka8-20020a170907920800b007c0d605fe42mr3677176ejb.18.1670585067824; Fri, 09 Dec 2022 03:24:27 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 06/30] meson: tweak hardening options for Windows Date: Fri, 9 Dec 2022 12:23:45 +0100 Message-Id: <20221209112409.184703-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585190401100008 Content-Type: text/plain; charset="utf-8" -Wl,--dynamicbase has been enabled for DLLs upstream for roughly 2 years (https://sourceware.org/bugzilla/show_bug.cgi?id=3D19011), and also by some distros including Debian for 6 years even (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D836365), so just enable it unconditionally. Also add -Wl,--high-entropy-va. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 --- meson.build | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 5c6b5a1c757f..d61c7a82f112 100644 --- a/meson.build +++ b/meson.build @@ -193,10 +193,7 @@ qemu_ldflags +=3D cc.get_supported_link_arguments('-Wl= ,-z,relro', '-Wl,-z,now') =20 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 - if get_option('optimization') =3D=3D '0' - qemu_ldflags +=3D cc.get_supported_link_arguments('-Wl,--dynamicbase') - endif + qemu_ldflags +=3D cc.get_supported_link_arguments('-Wl,--dynamicbase', '= -Wl,--high-entropy-va') endif =20 if get_option('gprof') --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585179; cv=none; d=zohomail.com; s=zohoarc; b=ahxWFEZ2Viep/adxAQGIgqM8MEzmqkc558hq92Pt/4+edRJwct6oKmUSKfJx6kRgZP3MG/kdoxFmLx34u4n1runnDwZDYndOHZYqYvCyJZMjsxG4ZR2DhBcHveL1x3WdqfGbfjZ1BUBCAR79/2he7TUQjR74drqjyMTULO3jgT8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585179; h=Content-Type:Content-Transfer-Encoding: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=QAW6f5Ww8mIY4+U+CCrsUVvJqjkHLnfYiUIZfiFUURc=; b=NaN3lrvaPbCB42ygjaHRTje/qNX1nn0zg3dNXP+jhhIp1RppG28qp/MuOpugP0CaBhSCvVBcqHnhB7omjgP70/H81mEsXxKpPGs2yb642O0vOTDvQEsSdKxKzPdXbulJ47UXzPo/wQYJxJ2ts3LmuzptV5BE0CYR75LSyhk5bjg= 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 1670585179917281.3932802974098; Fri, 9 Dec 2022 03:26:19 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bWA-0004tk-S7; Fri, 09 Dec 2022 06:26:14 -0500 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 1p3bUb-0003xS-Gl for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:39 -0500 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 1p3bUY-0000yG-VR for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:36 -0500 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_128_GCM_SHA256) id us-mta-397-3tI8VNb-M8OYlRmLkMRx_Q-1; Fri, 09 Dec 2022 06:24:32 -0500 Received: by mail-ed1-f70.google.com with SMTP id v4-20020a056402348400b0046cbbc786bdso1201324edc.7 for ; Fri, 09 Dec 2022 03:24:32 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id s12-20020a056402164c00b0046bada4b121sm517027edx.54.2022.12.09.03.24.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:24:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585073; 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=QAW6f5Ww8mIY4+U+CCrsUVvJqjkHLnfYiUIZfiFUURc=; b=bRAEr44U+3gb7fNTE5bA/nUD7+uZqCh/9aHfTuxIpKXnV+0TLuEkqpuGl37+DBeNESc/Ot iSy1SDPtbEv5iLDC85xlsiT77G2yrVbDsERzZoqLQpM6FzzGAuUGXaAIPSWuNZhsdrId4I 6GGI+4a9dSg2rKq1/6jrRtiDFNH9Aes= X-MC-Unique: 3tI8VNb-M8OYlRmLkMRx_Q-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QAW6f5Ww8mIY4+U+CCrsUVvJqjkHLnfYiUIZfiFUURc=; b=dWbfT75bKue5mNX6o9MlZPHLY7MZ3Iphnv7UpBONi9h7fw25Cx5Xu6A4qm9jwYIcrY sc1eKlayQv210Ts9zPO3FfO2lnlVD4TbNblVhkcsRRTCKti83M2n6wRvwNP+li0SQRty pwBWTfHSO1N9RAChIzARVK4YEVuACov8xqlG5DDXw2+eTiF6Bl+c85yp0jJ5JBSsRHIu gB6ok85FOcBCMQBsK4BH1gw2ePjHjJZI+f/uaVDYQXHJkTYpAXF/dUF/ZpGfNI8DyqTF FV490HUEMg8+ukrDVFT9L0YR2qgngM1hdQkL8TB9VWqgs++2MhpvF7fFZdHEQgKrTpDY GaTQ== X-Gm-Message-State: ANoB5plwN1cKmals2U+a0jmGBzwiQBINNUfsPUy53tcIOB3MtwTvwGTv q5PSwtU1liS0AaWznQ+ddb0NY/QxuLMHCXhAD6BgysdG1Kd3dX0S6yjQ/9wrx0Oq0BlE2E42tQW yCNn3xH0vE7fw7XBVvfikOw0VYijo7sBthyJLXsrXjhizSTTUi2MHeubDwuAoIjhNrCs= X-Received: by 2002:a50:fb91:0:b0:46a:732e:fd29 with SMTP id e17-20020a50fb91000000b0046a732efd29mr4761757edq.42.1670585070802; Fri, 09 Dec 2022 03:24:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf7SRVwjtDgPYQVDvzbPw4CAQ1sGKfqjcaXyhRt6HnL6yrtq4eeV839Yk3OBEEePk21EmiMjWw== X-Received: by 2002:a50:fb91:0:b0:46a:732e:fd29 with SMTP id e17-20020a50fb91000000b0046a732efd29mr4761739edq.42.1670585070467; Fri, 09 Dec 2022 03:24:30 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 07/30] meson: support meson 0.64 -Doptimization=plain Date: Fri, 9 Dec 2022 12:23:46 +0100 Message-Id: <20221209112409.184703-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585190135100007 Content-Type: text/plain; charset="utf-8" In Meson 0.64, the optimization built-in option now accepts the "plain" val= ue, which will not set any optimization flags. While QEMU does not check the contents of the option and therefore does not suffer any ill effect from the new value, it uses get_option to print the optimization flags in the summary. Clean the code up to remove duplication, and check for -Doptimization=3Dplain at the same time. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- meson.build | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/meson.build b/meson.build index d61c7a82f112..dbd0b5563446 100644 --- a/meson.build +++ b/meson.build @@ -3752,18 +3752,16 @@ endif if targetos =3D=3D 'darwin' summary_info +=3D {'Objective-C compiler': ' '.join(meson.get_compiler('= objc').cmd_array())} endif -summary_info +=3D {'CFLAGS': ' '.join(get_option('c_args') - + ['-O' + get_option('optim= ization')] - + (get_option('debug') ? ['= -g'] : []))} +option_cflags =3D (get_option('debug') ? ['-g'] : []) +if get_option('optimization') !=3D 'plain' + option_cflags +=3D ['-O' + get_option('optimization')] +endif +summary_info +=3D {'CFLAGS': ' '.join(get_option('c_args') + op= tion_cflags)} if link_language =3D=3D 'cpp' - summary_info +=3D {'CXXFLAGS': ' '.join(get_option('cpp_args') - + ['-O' + get_option('optim= ization')] - + (get_option('debug') ? ['= -g'] : []))} + summary_info +=3D {'CXXFLAGS': ' '.join(get_option('cpp_args') + = option_cflags)} endif if targetos =3D=3D 'darwin' - summary_info +=3D {'OBJCFLAGS': ' '.join(get_option('objc_args') - + ['-O' + get_option('optim= ization')] - + (get_option('debug') ? ['= -g'] : []))} + summary_info +=3D {'OBJCFLAGS': ' '.join(get_option('objc_args') += option_cflags)} endif link_args =3D get_option(link_language + '_link_args') if link_args.length() > 0 --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585201; cv=none; d=zohomail.com; s=zohoarc; b=MMldbFZnoQnyVinGit6BAJTc9LU1OD+ZE0bsbCekPRat3MxseT1egH5h+lgmq5r+HdN7grv3X0DQuV9odxnnKH7CldnVmF50+Bjqb+4cjPRa+51v7eGBM9gSq1sokFAgl8vtegPovrMjWfL4iZZBAJtA5sy2MNpHAgxZW26R76w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585201; h=Content-Type:Content-Transfer-Encoding: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=iUWdx2zhhTuGpVL2oq7NV4uBafczGyLM+OQnO3SSoHE=; b=gTdWsVNtiF2WIzIvmkEuBuF8gLYzuJdesAYp/asc9hA0mGcUSt6mQ+6h451cD3Zvp2rIhArX9lvXgmOqiM2njqqCk81LL6oCtszMcdhLdvh/ZEvg4YaCouDAU+P/454aBXqhGWOz4l8wHEgwU2rdbody7BZoEXkUH6n5gBrQBd0= 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 167058520110220.606072843052516; Fri, 9 Dec 2022 03:26:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bW1-0004XA-Tg; Fri, 09 Dec 2022 06:26:06 -0500 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 1p3bUp-0003yV-O0 for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:14 -0500 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 1p3bUl-0000yz-CN for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:50 -0500 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-10-phSMVtOMNamM4kmKQL6vuw-1; Fri, 09 Dec 2022 06:24:35 -0500 Received: by mail-ej1-f72.google.com with SMTP id xc12-20020a170907074c00b007416699ea14so2905521ejb.19 for ; Fri, 09 Dec 2022 03:24:34 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id i9-20020a056402054900b00463c5c32c6esm515547edx.89.2022.12.09.03.24.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:24:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585076; 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=iUWdx2zhhTuGpVL2oq7NV4uBafczGyLM+OQnO3SSoHE=; b=Ypi/+zswbCxeGsdnVpR/pB6F4be1wo0sDLalrcm0Faoq0SO5/pyTIK5Bf1Fd8axXM+HX6A VUUGP9p2iEKdf97nnlt0D+52g73sF2t9R5sLI6bRMtUBRcBtzcua7K4HytmWIMf80Mc5lg 18yf5LM3/NoylEdLE3ClEp2twvimetI= X-MC-Unique: phSMVtOMNamM4kmKQL6vuw-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iUWdx2zhhTuGpVL2oq7NV4uBafczGyLM+OQnO3SSoHE=; b=d78pX2PDupwDdcA+o2bvlTvkIy2nI5b8Prfq6Kpb5geKskEGC2YiYpQ2UlI/48CHs1 d0ORZ7C7OMe0fYt0ZnoH+N7zdZtk0bfWpbP/TwxwcSKnfMsGZ9gyFFRtHNUFKh9kS5f7 6J9lGAs570SCQxiZtnb4wYV36N78FerT3nEZJ9BJBKpPS3H3hbhkRh/kfYNWGcJ4KtDl TEtXQA09WZF9Sd10uXCru0yiyJONwHb40nWZGpvFIAlbd9fvBJW14RCckyy31k60spgL 85vNDpHulaqICCQ76qphRhVuBvS0JPKjeYiASfUpuaiVq/8ZdtHKsiJGD1CwWshw8PpS jwxA== X-Gm-Message-State: ANoB5pm5iQvFR3nZHehPohe9NGgt719wBiI4/vc4m8+ohS/vHctXLy3L XwB/gvmECvEcCog5kTmDziqsfOfJ4/i34/KFCEeDdhUGCFBeB1gnm05e5tLS85YOWV5d4rHyBg7 92Ebg+nd1pU05KQqq1I8l3MQO++vpUqaaGxdEN0p+rI8l0L5GM4Jg0L1ly/SGSXzccH8= X-Received: by 2002:a05:6402:e09:b0:467:91bc:f523 with SMTP id h9-20020a0564020e0900b0046791bcf523mr5453505edh.36.1670585073618; Fri, 09 Dec 2022 03:24:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf5vYRZnEhNKs3YvUrFJV6b0Oa9Yh2I8//+BIsquP0kwyYj65aJKDcGRpilo1O5NLzxjKVo9lg== X-Received: by 2002:a05:6402:e09:b0:467:91bc:f523 with SMTP id h9-20020a0564020e0900b0046791bcf523mr5453484edh.36.1670585073237; Fri, 09 Dec 2022 03:24:33 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 08/30] meson: require 0.63.0 Date: Fri, 9 Dec 2022 12:23:47 +0100 Message-Id: <20221209112409.184703-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585202522100003 Content-Type: text/plain; charset="utf-8" This allows cleanups cleanups in modinfo collection and supports the equivalent of QEMU's --static option to configure. Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth --- configure | 2 +- meson | 2 +- meson.build | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index adfff30a6204..411dfe977958 100755 --- a/configure +++ b/configure @@ -1043,7 +1043,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.61.5; then + if test "$explicit_python" =3D no && has meson && version_ge "$(meson = --version)" 0.63.0; then meson=3Dmeson elif test "$git_submodules_action" !=3D 'ignore' ; then meson=3Dgit diff --git a/meson b/meson index 3a9b285a55b9..9c6dab2cfd31 160000 --- a/meson +++ b/meson @@ -1 +1 @@ -Subproject commit 3a9b285a55b91b53b2acda987192274352ecb5be +Subproject commit 9c6dab2cfd310ef2d840a2a7a479ce6b9e563b1d diff --git a/meson.build b/meson.build index dbd0b5563446..19b023985325 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('qemu', ['c'], meson_version: '>=3D0.61.3', +project('qemu', ['c'], meson_version: '>=3D0.63.0', 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')) --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585184; cv=none; d=zohomail.com; s=zohoarc; b=MGRIFz4gNYFDJxhTa7tl2PPP/2bmfJ4e3vqiArWX6XAfvKMME2hT7W2jrbnMqxXCRGEOo3euKluyIXQ/9fes8ePHzavLQZfV9cqcZozX+LC2812C0G729J6hAzkrDh06c6Ku64yr6RPl8XRTPfG1h5Zit1z3GTydPcBzzDZCB1c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585184; h=Content-Type:Content-Transfer-Encoding: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=s4FMVLMLH7mQP0UGUkVZQ8bdJWPe09jUog+sQJ/g1V0=; b=jEXOvM0ap4HP3Xm4lqLE4bJChiPzU7AhVnMt1FPSNIMJj4+trATBb9kSiMXcLsSqSQ3QslFEA1IzudUcezW+V19lL3W2ckq7qzUoRuQhDSmjmguaMf5VYAQNVfAM4QNWz1Q76xL9Ieb1BVLFu+Mmv0WZWc5L7OCjWBI6ka7n/hk= 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 1670585184504776.4909921650884; Fri, 9 Dec 2022 03:26:24 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bWF-0004zJ-SI; Fri, 09 Dec 2022 06:26:19 -0500 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 1p3bUs-0003yd-40 for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:14 -0500 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 1p3bUl-0000zB-Ca for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:52 -0500 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-227-mkbZhCWoMmOpKCzFsiHOfA-1; Fri, 09 Dec 2022 06:24:37 -0500 Received: by mail-ed1-f69.google.com with SMTP id f17-20020a056402355100b00466481256f6so1185481edd.19 for ; Fri, 09 Dec 2022 03:24:37 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id d9-20020aa7d5c9000000b004611c230bd0sm522446eds.37.2022.12.09.03.24.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:24:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585079; 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=s4FMVLMLH7mQP0UGUkVZQ8bdJWPe09jUog+sQJ/g1V0=; b=coQG7+pb4vJZfhTpSPHUVDC8bOUGxCVqthFnkKMnT1IvVcrRPhhRU/wt35XjN11WCjCJj2 3NQE3mZI9BxhbXWpjVQxIHnjlcjfHfRQI/Ap/QPwFmus/C7fCe67aI8Xl+cuQTL70wb/Kk Xv16nQpWXGP1mZRO7Ugn7S4mPhz8kQM= X-MC-Unique: mkbZhCWoMmOpKCzFsiHOfA-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s4FMVLMLH7mQP0UGUkVZQ8bdJWPe09jUog+sQJ/g1V0=; b=ZBmHv7WDgloj8nusFFcPzylfep272s/qhQbcNzZ+Erte/rlw+eIphwlJKKK9NKHcqS AXsv790OOn6n9JLQ45aj3vdJowaoYQ1J2zCF5kpuf8G4DMRZ+rgvTMgXW2UdjIrzsGiq fs182wH6GzOY7scQ6qakk7SYMWaMl19GJENEqsMcGeI6EWM/RHY7P+fG51joKwM6RAb2 URcdAlWeEHzTO1JQHJfsQCXaXRWxKUA382uWEM27h0c9gUhcgBMPX1s7RdJBf/R09ciJ BlYYmBNtGL9siOw7i2dCOaDG41OxmH5qrlT2N+F86dsQyzQnhFmjjkOTvTTN5gWTExvA DUUg== X-Gm-Message-State: ANoB5pn2OtNE9zIV+i00dwTMzyhXtlUsbLqXtKADLpP8HeJkTBeZaQx2 NqUQ6sukxli7zusjULYRl3eUk4OQXXeKAvXVw9vsnm0XZzpvB1RPgkVXR39jqCl8od1p3djIa6Q 8issfJCwb5R19h+YpTZgPtIjqFnBc+0bYa314VfqPMxUagn6y6NWuKjvTTam+IeFC6i8= X-Received: by 2002:aa7:dd44:0:b0:461:ac11:2e1e with SMTP id o4-20020aa7dd44000000b00461ac112e1emr4508721edw.22.1670585076465; Fri, 09 Dec 2022 03:24:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf4S9IMTuQyaurtQbe5L0gRVavo3/D4rrFg4Sn9071m8UtO+LF1UKLggRTtWoxAx9Pf4uZcrew== X-Received: by 2002:aa7:dd44:0:b0:461:ac11:2e1e with SMTP id o4-20020aa7dd44000000b00461ac112e1emr4508709edw.22.1670585076098; Fri, 09 Dec 2022 03:24:36 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 09/30] meson: use prefer_static option Date: Fri, 9 Dec 2022 12:23:48 +0100 Message-Id: <20221209112409.184703-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585191740100011 Content-Type: text/plain; charset="utf-8" The option is new in Meson 0.63 and removes the need to pass "static: true" to all dependency and find_library invocation. Actually cleaning up the invocations is left for a separate patch. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 4 +--- docs/devel/build-system.rst | 3 +-- meson.build | 11 ++++------- qga/meson.build | 2 +- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 411dfe977958..6efc2055ce09 100755 --- a/configure +++ b/configure @@ -2315,9 +2315,6 @@ fi if test "$solaris" =3D "yes" ; then echo "CONFIG_SOLARIS=3Dy" >> $config_host_mak fi -if test "$static" =3D "yes" ; then - echo "CONFIG_STATIC=3Dy" >> $config_host_mak -fi echo "SRC_PATH=3D$source_path" >> $config_host_mak echo "TARGET_DIRS=3D$target_list" >> $config_host_mak if test "$modules" =3D "yes"; then @@ -2540,6 +2537,7 @@ if test "$skip_meson" =3D no; then # Built-in options test "$bindir" !=3D "bin" && meson_option_add "-Dbindir=3D$bindir" test "$default_feature" =3D no && meson_option_add -Dauto_features=3Ddis= abled + test "$static" =3D yes && meson_option_add -Dprefer_static=3Dtrue test "$pie" =3D no && meson_option_add -Db_pie=3Dfalse test "$werror" =3D yes && meson_option_add -Dwerror=3Dtrue =20 diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst index 189472174340..9db18aff159e 100644 --- a/docs/devel/build-system.rst +++ b/docs/devel/build-system.rst @@ -311,8 +311,7 @@ dependency will be used:: sdl_image =3D not_found if not get_option('sdl_image').auto() or have_system sdl_image =3D dependency('SDL2_image', required: get_option('sdl_image= '), - method: 'pkg-config', - static: enable_static) + method: 'pkg-config') endif =20 This avoids warnings on static builds of user-mode emulators, for example. diff --git a/meson.build b/meson.build index 19b023985325..dced840bfbee 100644 --- a/meson.build +++ b/meson.build @@ -18,10 +18,7 @@ sh =3D find_program('sh') cc =3D meson.get_compiler('c') config_host =3D keyval.load(meson.current_build_dir() / 'config-host.mak') enable_modules =3D 'CONFIG_MODULES' in config_host -enable_static =3D 'CONFIG_STATIC' in config_host - -# Allow both shared and static libraries unless --enable-static -static_kwargs =3D enable_static ? {'static': true} : {} +static_kwargs =3D {} =20 # Temporary directory used for files created while # configure runs. Since it is in the build directory @@ -183,7 +180,7 @@ 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 +if get_option('prefer_static') qemu_ldflags +=3D get_option('b_pie') ? '-static-pie' : '-static' endif =20 @@ -830,7 +827,7 @@ if targetos =3D=3D 'linux' and have_tools and get_optio= n('mpath').allowed() kwargs: static_kwargs) if libmpathpersist.found() mpathlibs +=3D libmpathpersist - if enable_static + if get_option('prefer_static') mpathlibs +=3D cc.find_library('devmapper', required: get_option('mpath'), kwargs: static_kwargs) @@ -1214,7 +1211,7 @@ if not gnutls_crypto.found() # Debian has removed -lgpg-error from libgcrypt-config # as it "spreads unnecessary dependencies" which in # turn breaks static builds... - if gcrypt.found() and enable_static + if gcrypt.found() and get_option('prefer_static') gcrypt =3D declare_dependency(dependencies: [ gcrypt, cc.find_library('gpg-error', required: true, kwargs: static_kwargs= )]) diff --git a/qga/meson.build b/qga/meson.build index 3cfb9166e5d8..ec67326b25f3 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -22,7 +22,7 @@ have_qga_vss =3D get_option('qga_vss') \ Then run configure with: --extra-cxxflags=3D"-isystem /path/to/vss/inc= /win2003"''') \ .require(midl.found() or widl.found(), error_message: 'VSS support requires midl or widl') \ - .require(not enable_static, + .require(not get_option('prefer_static'), error_message: 'VSS support requires dynamic linking with GLib'= ) \ .allowed() =20 --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670586105; cv=none; d=zohomail.com; s=zohoarc; b=GlaBi1Fe3ZHwkJeWNUwvbZO5xyDg5d8sUDM0p6otGlQihbajJJewD8dDYrYLY+Dy0j6+UrLnE1MPPK5Gq+QIFbS+4SfIjofVN9EhQEsFgUtcPcJHlYGkp37tYIZqftRTJYABnoXLT6MALEbXI3+Ttkwv+cIwavtP2uTGrwSLwbA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670586105; h=Content-Type:Content-Transfer-Encoding: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=oWW86Nbx7QSsZ5WKLbIHXYqXWEJSgTKbg3TWeSAdsiM=; b=cLTvgypxRPYR4HQ4HwwZbUlmTNuP95Uz73Sb0v7yFgmI2oLLjQvimFK08NMPGy8icjz4Kb/oJaOKMv7rtL1Jhy8guP1ZAV//aGTBSgEcrouaCQ4bO8yym1LRgk4ViXF6dzYniNp53eLVGPOxkYh5c327qnUACoMobjixv/k/BtE= 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 1670586105807339.946645884326; Fri, 9 Dec 2022 03:41:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bWD-0004vn-54; Fri, 09 Dec 2022 06:26:17 -0500 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 1p3bUs-0003yb-3i for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:14 -0500 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 1p3bUl-0000zL-Cc for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:53 -0500 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_128_GCM_SHA256) id us-mta-359-SbbKUPybOAe_MiMQE3Us-A-1; Fri, 09 Dec 2022 06:24:41 -0500 Received: by mail-ed1-f72.google.com with SMTP id s13-20020a056402520d00b0046c78433b54so1197332edd.16 for ; Fri, 09 Dec 2022 03:24:41 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id kw11-20020a170907770b00b0077f20a722dfsm440267ejc.165.2022.12.09.03.24.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:24:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585082; 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=oWW86Nbx7QSsZ5WKLbIHXYqXWEJSgTKbg3TWeSAdsiM=; b=NsQ0q8jS7gu+dIuM3P6IbUjIztc3EMm0nc85t9svXjDW7lCFHpGEhY8+ztIQqsL5tvtJRm x5SDoeHvGmDtGTR75TidCLygdCRxkTDZmK4X/OROPEunfnjEqm7I4y0vnaZSojJcD1ERky SqeCE/bYlfiGLE9Y15BmvfFVs49IXEQ= X-MC-Unique: SbbKUPybOAe_MiMQE3Us-A-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oWW86Nbx7QSsZ5WKLbIHXYqXWEJSgTKbg3TWeSAdsiM=; b=OW9lrfzFJUPoHeQaBVSz2j8LJg40n7ZHn1y4ITNUMYWMH/8BNYqbq7db1MrLUAeMGE i2F8aUW+DEf4Fv2mF1ySOvunL+TuUwgHkCLMUvjRIq3GWSPeonIUUxv6uX5jkznY5dBa vhS92RlGbAZV+lzoNQS9SPeMfFzx85kYp+pvFZOaCsFtEEYr9H391zxv79rpj/HuX+YM uSxUzsSvc6MmSMPX3QvjpPTRMGPNt4LHQlGo0/ZdGPW/6PHyhWGRllZn3msfb4wfZAVj U7sv+kyVoMS+zFyIS4Pz/V3VX34IgCtNH740j4rZXSUyhtcV/ErLrA0svrsZmWCOqAiz kk+w== X-Gm-Message-State: ANoB5pmYAEclW1OKsbvTFYKXr9EZQeWVEUnADCn0AcxH/3SRHMJPYknG abu6hXkvvRIdX0AjkoK8aSwuh8a2yCp5+47OHEu9PRiwpXZQe2+a2MPEUPFGeCylRBUeI8uxMZD jZVwaCxIt66T/hWMDuAWL8HYsUEkS/dlqmJvivn8hNzQslNB9uYPM6d1+WLJbgUiVxqY= X-Received: by 2002:a17:907:1719:b0:7c0:f9ef:23a2 with SMTP id le25-20020a170907171900b007c0f9ef23a2mr7306262ejc.30.1670585079669; Fri, 09 Dec 2022 03:24:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf7rzu2XKeMgNV6444GrTeJDqcQMOIL1f6hAapSUm2xWRZt7H37uvrxplw/BB6nn0Q4Dv46coA== X-Received: by 2002:a17:907:1719:b0:7c0:f9ef:23a2 with SMTP id le25-20020a170907171900b007c0f9ef23a2mr7306214ejc.30.1670585078892; Fri, 09 Dec 2022 03:24:38 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 10/30] meson: remove static_kwargs Date: Fri, 9 Dec 2022 12:23:49 +0100 Message-Id: <20221209112409.184703-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670586106274100001 Content-Type: text/plain; charset="utf-8" After static_kwargs has been changed to an empty dictionary, it has no functional effect and can be removed. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- meson.build | 212 +++++++++++++++++++----------------------------- tcg/meson.build | 2 +- 2 files changed, 84 insertions(+), 130 deletions(-) diff --git a/meson.build b/meson.build index dced840bfbee..9ccbe0f6e4ee 100644 --- a/meson.build +++ b/meson.build @@ -18,7 +18,6 @@ sh =3D find_program('sh') cc =3D meson.get_compiler('c') config_host =3D keyval.load(meson.current_build_dir() / 'config-host.mak') enable_modules =3D 'CONFIG_MODULES' in config_host -static_kwargs =3D {} =20 # Temporary directory used for files created while # configure runs. Since it is in the build directory @@ -510,7 +509,7 @@ gdbus_codegen =3D not_found gdbus_codegen_error =3D '@0@ requires gdbus-codegen, please install libgio' if not get_option('gio').auto() or have_system gio =3D dependency('gio-2.0', required: get_option('gio'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') if gio.found() and not cc.links(''' #include int main(void) @@ -527,7 +526,7 @@ if not get_option('gio').auto() or have_system gdbus_codegen =3D find_program(gio.get_variable('gdbus_codegen'), required: get_option('gio')) gio_unix =3D dependency('gio-unix-2.0', required: get_option('gio'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') gio =3D declare_dependency(dependencies: [gio, gio_unix], version: gio.version()) endif @@ -540,20 +539,19 @@ endif lttng =3D not_found if 'ust' in get_option('trace_backends') lttng =3D dependency('lttng-ust', required: true, version: '>=3D 2.1', - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') endif pixman =3D not_found if have_system or have_tools pixman =3D dependency('pixman-1', required: have_system, version:'>=3D0.= 21.8', - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') endif -zlib =3D dependency('zlib', required: true, kwargs: static_kwargs) +zlib =3D dependency('zlib', required: true) =20 libaio =3D not_found if not get_option('linux_aio').auto() or have_block libaio =3D cc.find_library('aio', has_headers: ['libaio.h'], - required: get_option('linux_aio'), - kwargs: static_kwargs) + required: get_option('linux_aio')) endif =20 linux_io_uring_test =3D ''' @@ -566,7 +564,7 @@ linux_io_uring =3D not_found if not get_option('linux_io_uring').auto() or have_block linux_io_uring =3D dependency('liburing', version: '>=3D0.3', required: get_option('linux_io_uring'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') if not cc.links(linux_io_uring_test) linux_io_uring =3D not_found endif @@ -576,7 +574,7 @@ libnfs =3D not_found if not get_option('libnfs').auto() or have_block libnfs =3D dependency('libnfs', version: '>=3D1.9.3', required: get_option('libnfs'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') endif =20 libattr_test =3D ''' @@ -596,8 +594,7 @@ if get_option('attr').allowed() libattr =3D declare_dependency() else libattr =3D cc.find_library('attr', has_headers: ['attr/xattr.h'], - required: get_option('attr'), - kwargs: static_kwargs) + required: get_option('attr')) if libattr.found() and not \ cc.links(libattr_test, dependencies: libattr, args: '-DCONFIG_LIBATT= R') libattr =3D not_found @@ -632,7 +629,7 @@ seccomp_has_sysrawrc =3D false if not get_option('seccomp').auto() or have_system or have_tools seccomp =3D dependency('libseccomp', version: '>=3D2.3.0', required: get_option('seccomp'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') if seccomp.found() seccomp_has_sysrawrc =3D cc.has_header_symbol('seccomp.h', 'SCMP_FLTATR_API_SYSRAWRC', @@ -643,8 +640,7 @@ endif libcap_ng =3D not_found if not get_option('cap_ng').auto() or have_system or have_tools libcap_ng =3D cc.find_library('cap-ng', has_headers: ['cap-ng.h'], - required: get_option('cap_ng'), - kwargs: static_kwargs) + required: get_option('cap_ng')) endif if libcap_ng.found() and not cc.links(''' #include @@ -665,13 +661,13 @@ if get_option('xkbcommon').auto() and not have_system= and not have_tools xkbcommon =3D not_found else xkbcommon =3D dependency('xkbcommon', required: get_option('xkbcommon'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') endif =20 slirp =3D not_found if not get_option('slirp').auto() or have_system slirp =3D dependency('slirp', required: get_option('slirp'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') # slirp < 4.7 is incompatible with CFI support in QEMU. This is because # it passes function pointers within libslirp as callbacks for timers. # When using a system-wide shared libslirp, the type information for the @@ -691,8 +687,7 @@ endif vde =3D not_found if not get_option('vde').auto() or have_system or have_tools vde =3D cc.find_library('vdeplug', has_headers: ['libvdeplug.h'], - required: get_option('vde'), - kwargs: static_kwargs) + required: get_option('vde')) endif if vde.found() and not cc.links(''' #include @@ -714,35 +709,35 @@ endif pulse =3D not_found if not get_option('pa').auto() or (targetos =3D=3D 'linux' and have_system) pulse =3D dependency('libpulse', required: get_option('pa'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') endif alsa =3D not_found if not get_option('alsa').auto() or (targetos =3D=3D 'linux' and have_syst= em) alsa =3D dependency('alsa', required: get_option('alsa'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') endif jack =3D not_found if not get_option('jack').auto() or have_system jack =3D dependency('jack', required: get_option('jack'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') endif sndio =3D not_found if not get_option('sndio').auto() or have_system sndio =3D dependency('sndio', required: get_option('sndio'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') endif =20 spice_protocol =3D not_found if not get_option('spice_protocol').auto() or have_system spice_protocol =3D dependency('spice-protocol', version: '>=3D0.12.3', required: get_option('spice_protocol'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') endif spice =3D not_found if not get_option('spice').auto() or have_system spice =3D dependency('spice-server', version: '>=3D0.12.5', required: get_option('spice'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') endif spice_headers =3D spice.partial_dependency(compile_args: true, includes: t= rue) =20 @@ -752,13 +747,13 @@ libiscsi =3D not_found if not get_option('libiscsi').auto() or have_block libiscsi =3D dependency('libiscsi', version: '>=3D1.9.0', required: get_option('libiscsi'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') endif zstd =3D not_found if not get_option('zstd').auto() or have_block zstd =3D dependency('libzstd', version: '>=3D1.4.0', required: get_option('zstd'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') endif virgl =3D not_found =20 @@ -766,29 +761,25 @@ have_vhost_user_gpu =3D have_tools and targetos =3D= =3D 'linux' and pixman.found() if not get_option('virglrenderer').auto() or have_system or have_vhost_use= r_gpu virgl =3D dependency('virglrenderer', method: 'pkg-config', - required: get_option('virglrenderer'), - kwargs: static_kwargs) + required: get_option('virglrenderer')) endif blkio =3D not_found if not get_option('blkio').auto() or have_block blkio =3D dependency('blkio', method: 'pkg-config', - required: get_option('blkio'), - kwargs: static_kwargs) + required: get_option('blkio')) endif curl =3D not_found if not get_option('curl').auto() or have_block curl =3D dependency('libcurl', version: '>=3D7.29.0', method: 'pkg-config', - required: get_option('curl'), - kwargs: static_kwargs) + required: get_option('curl')) endif libudev =3D not_found if targetos =3D=3D 'linux' and (have_system or have_tools) libudev =3D dependency('libudev', method: 'pkg-config', - required: get_option('libudev'), - kwargs: static_kwargs) + required: get_option('libudev')) endif =20 mpathlibs =3D [libudev] @@ -823,18 +814,15 @@ if targetos =3D=3D 'linux' and have_tools and get_opt= ion('mpath').allowed() return 0; }''' libmpathpersist =3D cc.find_library('mpathpersist', - required: get_option('mpath'), - kwargs: static_kwargs) + required: get_option('mpath')) if libmpathpersist.found() mpathlibs +=3D libmpathpersist if get_option('prefer_static') mpathlibs +=3D cc.find_library('devmapper', - required: get_option('mpath'), - kwargs: static_kwargs) + required: get_option('mpath')) endif mpathlibs +=3D cc.find_library('multipath', - required: get_option('mpath'), - kwargs: static_kwargs) + required: get_option('mpath')) foreach lib: mpathlibs if not lib.found() mpathlibs =3D [] @@ -884,8 +872,7 @@ if have_system and get_option('curses').allowed() curses_dep_list =3D targetos =3D=3D 'windows' ? ['ncurses', 'ncursesw'] = : ['ncursesw'] curses =3D dependency(curses_dep_list, required: false, - method: 'pkg-config', - kwargs: static_kwargs) + method: 'pkg-config') msg =3D get_option('curses').enabled() ? 'curses library not found' : '' curses_compile_args =3D ['-DNCURSES_WIDECHAR=3D1'] if curses.found() @@ -907,8 +894,7 @@ if have_system and get_option('curses').allowed() curses_libname_list =3D (targetos =3D=3D 'windows' ? ['pdcurses'] : = ['ncursesw', 'cursesw']) foreach curses_libname : curses_libname_list libcurses =3D cc.find_library(curses_libname, - required: false, - kwargs: static_kwargs) + required: false) if libcurses.found() if cc.links(curses_test, args: curses_compile_args, dependencies= : libcurses) curses =3D declare_dependency(compile_args: curses_compile_arg= s, @@ -958,8 +944,7 @@ endif brlapi =3D not_found if not get_option('brlapi').auto() or have_system brlapi =3D cc.find_library('brlapi', has_headers: ['brlapi.h'], - required: get_option('brlapi'), - kwargs: static_kwargs) + required: get_option('brlapi')) if brlapi.found() and not cc.links(''' #include #include @@ -975,7 +960,7 @@ endif =20 sdl =3D not_found if not get_option('sdl').auto() or have_system - sdl =3D dependency('sdl2', required: get_option('sdl'), kwargs: static_k= wargs) + sdl =3D dependency('sdl2', required: get_option('sdl')) sdl_image =3D not_found endif if sdl.found() @@ -983,7 +968,7 @@ if sdl.found() sdl =3D declare_dependency(compile_args: '-Wno-undef', dependencies: sdl) sdl_image =3D dependency('SDL2_image', required: get_option('sdl_image'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') else if get_option('sdl_image').enabled() error('sdl-image required, but SDL was @0@'.format( @@ -994,11 +979,9 @@ endif =20 rbd =3D not_found if not get_option('rbd').auto() or have_block - librados =3D cc.find_library('rados', required: get_option('rbd'), - kwargs: static_kwargs) + librados =3D cc.find_library('rados', required: get_option('rbd')) librbd =3D cc.find_library('rbd', has_headers: ['rbd/librbd.h'], - required: get_option('rbd'), - kwargs: static_kwargs) + required: get_option('rbd')) if librados.found() and librbd.found() if cc.links(''' #include @@ -1026,7 +1009,7 @@ glusterfs_iocb_has_stat =3D false if not get_option('glusterfs').auto() or have_block glusterfs =3D dependency('glusterfs-api', version: '>=3D3', required: get_option('glusterfs'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') if glusterfs.found() glusterfs_ftruncate_has_stat =3D cc.links(''' #include @@ -1061,15 +1044,13 @@ libssh =3D not_found if not get_option('libssh').auto() or have_block libssh =3D dependency('libssh', version: '>=3D0.8.7', method: 'pkg-config', - required: get_option('libssh'), - kwargs: static_kwargs) + required: get_option('libssh')) endif =20 libbzip2 =3D not_found if not get_option('bzip2').auto() or have_block libbzip2 =3D cc.find_library('bz2', has_headers: ['bzlib.h'], - required: get_option('bzip2'), - kwargs: static_kwargs) + required: get_option('bzip2')) if libbzip2.found() and not cc.links(''' #include int main(void) { BZ2_bzlibVersion(); return 0; }''', dependencies: li= bbzip2) @@ -1085,8 +1066,7 @@ endif liblzfse =3D not_found if not get_option('lzfse').auto() or have_block liblzfse =3D cc.find_library('lzfse', has_headers: ['lzfse.h'], - required: get_option('lzfse'), - kwargs: static_kwargs) + required: get_option('lzfse')) endif if liblzfse.found() and not cc.links(''' #include @@ -1104,8 +1084,7 @@ if get_option('oss').allowed() and have_system if not cc.has_header('sys/soundcard.h') # not found elif targetos =3D=3D 'netbsd' - oss =3D cc.find_library('ossaudio', required: get_option('oss'), - kwargs: static_kwargs) + oss =3D cc.find_library('ossaudio', required: get_option('oss')) else oss =3D declare_dependency() endif @@ -1138,7 +1117,7 @@ endif opengl =3D not_found if not get_option('opengl').auto() or have_system or have_vhost_user_gpu epoxy =3D dependency('epoxy', method: 'pkg-config', - required: get_option('opengl'), kwargs: static_kwarg= s) + required: get_option('opengl')) if cc.has_header('epoxy/egl.h', dependencies: epoxy) opengl =3D epoxy elif get_option('opengl').enabled() @@ -1147,8 +1126,7 @@ if not get_option('opengl').auto() or have_system or = have_vhost_user_gpu endif gbm =3D not_found if (have_system or have_tools) and (virgl.found() or opengl.found()) - gbm =3D dependency('gbm', method: 'pkg-config', required: false, - kwargs: static_kwargs) + gbm =3D dependency('gbm', method: 'pkg-config', required: false) endif have_vhost_user_gpu =3D have_vhost_user_gpu and virgl.found() and opengl.f= ound() and gbm.found() =20 @@ -1170,16 +1148,14 @@ if get_option('gnutls').enabled() or (get_option('g= nutls').auto() and have_syste # the platform support requirements gnutls_crypto =3D dependency('gnutls', version: '>=3D3.6.14', method: 'pkg-config', - required: false, - kwargs: static_kwargs) + required: false) if gnutls_crypto.found() gnutls =3D gnutls_crypto else # Our min version if all we need is TLS gnutls =3D dependency('gnutls', version: '>=3D3.5.18', method: 'pkg-config', - required: get_option('gnutls'), - kwargs: static_kwargs) + required: get_option('gnutls')) endif endif =20 @@ -1206,34 +1182,31 @@ if not gnutls_crypto.found() if (not get_option('gcrypt').auto() or have_system) and not get_option('= nettle').enabled() gcrypt =3D dependency('libgcrypt', version: '>=3D1.8', method: 'config-tool', - required: get_option('gcrypt'), - kwargs: static_kwargs) + required: get_option('gcrypt')) # Debian has removed -lgpg-error from libgcrypt-config # as it "spreads unnecessary dependencies" which in # turn breaks static builds... if gcrypt.found() and get_option('prefer_static') gcrypt =3D declare_dependency(dependencies: [ gcrypt, - cc.find_library('gpg-error', required: true, kwargs: static_kwargs= )]) + cc.find_library('gpg-error', required: true)]) endif endif if (not get_option('nettle').auto() or have_system) and not gcrypt.found= () nettle =3D dependency('nettle', version: '>=3D3.4', method: 'pkg-config', - required: get_option('nettle'), - kwargs: static_kwargs) + required: get_option('nettle')) if nettle.found() and not cc.has_header('nettle/xts.h', dependencies: = nettle) xts =3D 'private' endif endif endif =20 -gmp =3D dependency('gmp', required: false, method: 'pkg-config', kwargs: s= tatic_kwargs) +gmp =3D dependency('gmp', required: false, method: 'pkg-config') if nettle.found() and gmp.found() hogweed =3D dependency('hogweed', version: '>=3D3.4', method: 'pkg-config', - required: get_option('nettle'), - kwargs: static_kwargs) + required: get_option('nettle')) endif =20 =20 @@ -1245,20 +1218,17 @@ have_gtk_clipboard =3D get_option('gtk_clipboard').= enabled() if not get_option('gtk').auto() or have_system gtk =3D dependency('gtk+-3.0', version: '>=3D3.22.0', method: 'pkg-config', - required: get_option('gtk'), - kwargs: static_kwargs) + required: get_option('gtk')) if gtk.found() gtkx11 =3D dependency('gtk+-x11-3.0', version: '>=3D3.22.0', method: 'pkg-config', - required: false, - kwargs: static_kwargs) + required: false) gtk =3D declare_dependency(dependencies: [gtk, gtkx11]) =20 if not get_option('vte').auto() or have_system vte =3D dependency('vte-2.91', method: 'pkg-config', - required: get_option('vte'), - kwargs: static_kwargs) + required: get_option('vte')) endif elif have_gtk_clipboard error('GTK clipboard requested, but GTK not found') @@ -1267,13 +1237,12 @@ endif =20 x11 =3D not_found if gtkx11.found() - x11 =3D dependency('x11', method: 'pkg-config', required: gtkx11.found(), - kwargs: static_kwargs) + x11 =3D dependency('x11', method: 'pkg-config', required: gtkx11.found()) endif png =3D not_found if get_option('png').allowed() and have_system png =3D dependency('libpng', version: '>=3D1.6.34', required: get_optio= n('png'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') endif vnc =3D not_found jpeg =3D not_found @@ -1281,10 +1250,9 @@ sasl =3D not_found if get_option('vnc').allowed() and have_system vnc =3D declare_dependency() # dummy dependency jpeg =3D dependency('libjpeg', required: get_option('vnc_jpeg'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') sasl =3D cc.find_library('sasl2', has_headers: ['sasl/sasl.h'], - required: get_option('vnc_sasl'), - kwargs: static_kwargs) + required: get_option('vnc_sasl')) if sasl.found() sasl =3D declare_dependency(dependencies: sasl, compile_args: '-DSTRUCT_IOVEC_DEFINED') @@ -1294,8 +1262,7 @@ endif pam =3D not_found if not get_option('auth_pam').auto() or have_system pam =3D cc.find_library('pam', has_headers: ['security/pam_appl.h'], - required: get_option('auth_pam'), - kwargs: static_kwargs) + required: get_option('auth_pam')) endif if pam.found() and not cc.links(''' #include @@ -1319,8 +1286,7 @@ endif snappy =3D not_found if not get_option('snappy').auto() or have_system snappy =3D cc.find_library('snappy', has_headers: ['snappy-c.h'], - required: get_option('snappy'), - kwargs: static_kwargs) + required: get_option('snappy')) endif if snappy.found() and not linker.links(''' #include @@ -1336,8 +1302,7 @@ endif lzo =3D not_found if not get_option('lzo').auto() or have_system lzo =3D cc.find_library('lzo2', has_headers: ['lzo/lzo1x.h'], - required: get_option('lzo'), - kwargs: static_kwargs) + required: get_option('lzo')) endif if lzo.found() and not cc.links(''' #include @@ -1353,8 +1318,7 @@ endif numa =3D not_found if not get_option('numa').auto() or have_system or have_tools numa =3D cc.find_library('numa', has_headers: ['numa.h'], - required: get_option('numa'), - kwargs: static_kwargs) + required: get_option('numa')) endif if numa.found() and not cc.links(''' #include @@ -1372,10 +1336,8 @@ rdma =3D not_found if not get_option('rdma').auto() or have_system libumad =3D cc.find_library('ibumad', required: get_option('rdma')) rdma_libs =3D [cc.find_library('rdmacm', has_headers: ['rdma/rdma_cma.h'= ], - required: get_option('rdma'), - kwargs: static_kwargs), - cc.find_library('ibverbs', required: get_option('rdma'), - kwargs: static_kwargs), + required: get_option('rdma')), + cc.find_library('ibverbs', required: get_option('rdma')), libumad] rdma =3D declare_dependency(dependencies: rdma_libs) foreach lib: rdma_libs @@ -1388,30 +1350,30 @@ endif xen =3D not_found if get_option('xen').enabled() or (get_option('xen').auto() and have_syste= m) xencontrol =3D dependency('xencontrol', required: false, - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') if xencontrol.found() xen_pc =3D declare_dependency(version: xencontrol.version(), dependencies: [ xencontrol, # disabler: true makes xen_pc.found() return false if any is not f= ound dependency('xenstore', required: false, - method: 'pkg-config', kwargs: static_kwargs, + method: 'pkg-config', disabler: true), dependency('xenforeignmemory', required: false, - method: 'pkg-config', kwargs: static_kwargs, + method: 'pkg-config', disabler: true), dependency('xengnttab', required: false, - method: 'pkg-config', kwargs: static_kwargs, + method: 'pkg-config', disabler: true), dependency('xenevtchn', required: false, - method: 'pkg-config', kwargs: static_kwargs, + method: 'pkg-config', disabler: true), dependency('xendevicemodel', required: false, - method: 'pkg-config', kwargs: static_kwargs, + method: 'pkg-config', disabler: true), # optional, no "disabler: true" dependency('xentoolcore', required: false, - method: 'pkg-config', kwargs: static_kwargs)]) + method: 'pkg-config')]) if xen_pc.found() xen =3D xen_pc endif @@ -1469,60 +1431,53 @@ have_xen_pci_passthrough =3D get_option('xen_pci_pa= ssthrough') \ cacard =3D not_found if not get_option('smartcard').auto() or have_system cacard =3D dependency('libcacard', required: get_option('smartcard'), - version: '>=3D2.5.1', method: 'pkg-config', - kwargs: static_kwargs) + version: '>=3D2.5.1', method: 'pkg-config') endif u2f =3D not_found if have_system u2f =3D dependency('u2f-emu', required: get_option('u2f'), - method: 'pkg-config', - kwargs: static_kwargs) + method: 'pkg-config') endif canokey =3D not_found if have_system canokey =3D dependency('canokey-qemu', required: get_option('canokey'), - method: 'pkg-config', - kwargs: static_kwargs) + method: 'pkg-config') endif usbredir =3D not_found if not get_option('usb_redir').auto() or have_system usbredir =3D dependency('libusbredirparser-0.5', required: get_option('u= sb_redir'), - version: '>=3D0.6', method: 'pkg-config', - kwargs: static_kwargs) + version: '>=3D0.6', method: 'pkg-config') endif libusb =3D not_found if not get_option('libusb').auto() or have_system libusb =3D dependency('libusb-1.0', required: get_option('libusb'), - version: '>=3D1.0.13', method: 'pkg-config', - kwargs: static_kwargs) + version: '>=3D1.0.13', method: 'pkg-config') endif =20 libpmem =3D not_found if not get_option('libpmem').auto() or have_system libpmem =3D dependency('libpmem', required: get_option('libpmem'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') endif libdaxctl =3D not_found if not get_option('libdaxctl').auto() or have_system libdaxctl =3D dependency('libdaxctl', required: get_option('libdaxctl'), - version: '>=3D57', method: 'pkg-config', - kwargs: static_kwargs) + version: '>=3D57', method: 'pkg-config') endif tasn1 =3D not_found if gnutls.found() tasn1 =3D dependency('libtasn1', - method: 'pkg-config', - kwargs: static_kwargs) + method: 'pkg-config') endif keyutils =3D dependency('libkeyutils', required: false, - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') =20 has_gettid =3D cc.has_function('gettid') =20 # libselinux selinux =3D dependency('libselinux', required: get_option('selinux'), - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') =20 # Malloc tests =20 @@ -1586,8 +1541,7 @@ if get_option('fuse').disabled() and get_option('fuse= _lseek').enabled() endif =20 fuse =3D dependency('fuse3', required: get_option('fuse'), - version: '>=3D3.1', method: 'pkg-config', - kwargs: static_kwargs) + version: '>=3D3.1', method: 'pkg-config') =20 fuse_lseek =3D not_found if get_option('fuse_lseek').allowed() @@ -2677,7 +2631,7 @@ genh +=3D custom_target('config-poison.h', capstone =3D not_found if not get_option('capstone').auto() or have_system or have_user capstone =3D dependency('capstone', version: '>=3D3.0.5', - kwargs: static_kwargs, method: 'pkg-config', + method: 'pkg-config', required: get_option('capstone')) =20 # Some versions of capstone have broken pkg-config file @@ -2713,7 +2667,7 @@ if have_system fdt_opt =3D get_option('fdt') if fdt_opt in ['enabled', 'auto', 'system'] have_internal =3D fs.exists(meson.current_source_dir() / 'dtc/libfdt/M= akefile.libfdt') - fdt =3D cc.find_library('fdt', kwargs: static_kwargs, + fdt =3D cc.find_library('fdt', required: fdt_opt =3D=3D 'system' or fdt_opt =3D=3D 'enabled' and not have_= internal) if fdt.found() and cc.links(''' diff --git a/tcg/meson.build b/tcg/meson.build index c4c63b19d4ed..3db551bb3485 100644 --- a/tcg/meson.build +++ b/tcg/meson.build @@ -12,7 +12,7 @@ tcg_ss.add(files( =20 if get_option('tcg_interpreter') libffi =3D dependency('libffi', version: '>=3D3.0', required: true, - method: 'pkg-config', kwargs: static_kwargs) + method: 'pkg-config') specific_ss.add(libffi) specific_ss.add(files('tci.c')) endif --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585525; cv=none; d=zohomail.com; s=zohoarc; b=jQgcaqKmtSZ27mcikXHSQrvHOzTIY2Ms9VXrw2EGPvEcp9Dm+9uo6KipgS4yTxbsy6UiZU2xHl+mrbR40KcsqGLZI14N4XKv72HKlXeyfXKCeQYhA3m/CI+L1oFryCj3S90wurWtWvrRA+IyLWmPGGef4wvD805OLbW/Mi/lGzM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585525; h=Content-Type:Content-Transfer-Encoding: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=u1mbLHMn/wYtFExtFcVSyZm7+5Wcq6+nPQCFkIbbgYs=; b=N1IAxJzvmmI/Xw/Ka9ND7XFMTzUjpp4kLXVkUDXcQ232dBa1dHSDWQR/i8gnhMm1awW0rq4tONuP6gDPlPoNfhTNpYPjrNHKxJX+VuSgmr//sLaq9zEQbL9q89NDhIZu2Czn2jW11B4i8oIdoXg3J6Mh/nXqw753U/aRjeUvzY4= 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 1670585525212869.2910218698686; Fri, 9 Dec 2022 03:32:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bX3-0005k3-EK; Fri, 09 Dec 2022 06:27:10 -0500 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 1p3bUs-0003ya-4Q for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:14 -0500 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 1p3bUl-0000zh-Cn for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:51 -0500 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_128_GCM_SHA256) id us-mta-595-XMbVRo_XNo-mDLGyJfSGdw-1; Fri, 09 Dec 2022 06:24:43 -0500 Received: by mail-ej1-f70.google.com with SMTP id oz34-20020a1709077da200b007adc8d68e90so2918968ejc.11 for ; Fri, 09 Dec 2022 03:24:43 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id ha26-20020a170906a89a00b007c1027ed6b5sm448892ejb.75.2022.12.09.03.24.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:24:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585085; 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=u1mbLHMn/wYtFExtFcVSyZm7+5Wcq6+nPQCFkIbbgYs=; b=E2jyXAzWUWSWEFVI/HqR/aNCMGmYpn9nw/f1oHYI1FE1ArQqqpkB1zBuGFqheFp6m5oQnF 0duLyNcS5Gn3PkcLZhNs8R7NHl5nGgm5ccF4YfSvShaDn2KPj0MUTDXeWlvLsETJWRedG+ AQD8pjTqcaG2TpMfClTfSWDwrROM2co= X-MC-Unique: XMbVRo_XNo-mDLGyJfSGdw-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u1mbLHMn/wYtFExtFcVSyZm7+5Wcq6+nPQCFkIbbgYs=; b=XOCMyX1lS2IkbEzr1D+0BZZj/KBTt2/qVZ4e21MjydAXa0woD7qM2vfd+8yp8xRSqL r3cpmyZLjcHEV3kxPjjTXzYvjQ47o2m48SbCnsXgq/nh8twmKY0ZfGc7fJsL03M1LWZj ilC1E+TQ+bricQg1lbyMT1BKUNosNp1mMiAq/GEk46/BIbzpqS5Rc2HY1ozdked03BiK m3hrNxEEvC6WQsVOjiZ6Mw4Udv05Gz1tGzukF/mRWXvPFu7lHZfuTVM+3grtzgNOMwCP 2Gjp0FO2RR1+T3jqJWQknHxYETIRl2Ctfhjpg+4i5Cp+jodVuI69Rl9diq8KxQeSsCsI ISRg== X-Gm-Message-State: ANoB5plQVdI+MOuZkwc1kjM+NFJ2I874NHwnX/yZV5qY+Aez32nvXE/W 6aE1yfNYQBWMfG4dn4BwVRHmNQEf2LOQsKw0iXtSK4c7lVdyBkNyx4gC4ICMegEQ5aCFDhiTHCT LbjgZAoW8RNweKfG6FT+nDq++Hj0IEWttDIjOeActktRu39Sm8T7wkCnTs6uozLI4ZSA= X-Received: by 2002:a17:907:d687:b0:7b8:882d:43ff with SMTP id wf7-20020a170907d68700b007b8882d43ffmr5593281ejc.0.1670585082445; Fri, 09 Dec 2022 03:24:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf7bTlByQP6WD5WDtio1YGDDj1ig2BSOXNta8zhOGEcQEt1hXlGD1Hc5r5iRVIIum15vn9BngA== X-Received: by 2002:a17:907:d687:b0:7b8:882d:43ff with SMTP id wf7-20020a170907d68700b007b8882d43ffmr5593259ejc.0.1670585082129; Fri, 09 Dec 2022 03:24:42 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 11/30] meson: cleanup dummy-cpus.c rules Date: Fri, 9 Dec 2022 12:23:50 +0100 Message-Id: <20221209112409.184703-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585526492100001 Content-Type: text/plain; charset="utf-8" Now that qtest is available on all targets including Windows, dummy-cpus.c is included unconditionally in the build. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- accel/meson.build | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/accel/meson.build b/accel/meson.build index 259c35c4c882..3a480cc2efef 100644 --- a/accel/meson.build +++ b/accel/meson.build @@ -11,10 +11,5 @@ if have_system subdir('stubs') endif =20 -dummy_ss =3D ss.source_set() -dummy_ss.add(files( - 'dummy-cpus.c', -)) - -specific_ss.add_all(when: ['CONFIG_SOFTMMU'], if_true: dummy_ss) -specific_ss.add_all(when: ['CONFIG_XEN'], if_true: dummy_ss) +# qtest +softmmu_ss.add(files('dummy-cpus.c')) --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585862; cv=none; d=zohomail.com; s=zohoarc; b=P1d/dHN7fXGHFziB2GtJIHYnnesCkG5XqNQJW7vEOfJ5yEjgcoeHFigatqGMeOxKY3xV4G22mspo5dk5oj5an2enrleQ9bCtskk1i04WZA0mM0NzDEa/Mwau9gEPz1syUzYk65Axswy9ErpRCJVQM8R7rd1jpWHoJp03RmlE/5Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585862; 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=O7GByV2/tPXhbOnzsuk4iLNqmk3qgnJ2d7J1SI0Y0iM=; b=KhmZXgf4Yo4nZ/i79ZbhqcjzlKp5jZ9QyWef3wJ75oM9705QItsPqy1jfMclu1SWwJ2Bg+Vd4twN2bEX0HplwHGq0QV9yB2u9CgEThjis/JGrPV+yXShtFsjTbdnWSBxtvIJxmpqy2ssvyar2IizwOFSJq7V/HJnMWfiWSooqTQ= 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 1670585862023671.7634289655808; Fri, 9 Dec 2022 03:37:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bX6-0005qm-28; Fri, 09 Dec 2022 06:27:12 -0500 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 1p3bUs-0003yc-3S for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:14 -0500 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 1p3bUn-0000zv-J5 for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:52 -0500 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-653-quXVSTrvNCOtoCU4DzFsKg-1; Fri, 09 Dec 2022 06:24:46 -0500 Received: by mail-ej1-f72.google.com with SMTP id js17-20020a17090797d100b007c0dd8018b6so2920511ejc.17 for ; Fri, 09 Dec 2022 03:24:46 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id lb17-20020a170907785100b007a9c3831409sm442583ejc.137.2022.12.09.03.24.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:24:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585087; 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=O7GByV2/tPXhbOnzsuk4iLNqmk3qgnJ2d7J1SI0Y0iM=; b=LQEANeu5kgN20lqFRdDeS63Df0FuN2Hsx7+YB684vPA4X4AThhaZ5OVTxBM83Uz2tb+JzK e+t8o8sMDt9z+xbUJK1USj+qrmkLy0mvd1cChXmXjuv1wRrkANqp2NPWklePYnBa9102wi 40POZOq4QEGGZasE+urNFU8U0psojsE= X-MC-Unique: quXVSTrvNCOtoCU4DzFsKg-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:message-id:reply-to; bh=O7GByV2/tPXhbOnzsuk4iLNqmk3qgnJ2d7J1SI0Y0iM=; b=K2l4p/PCfcA7Z0rsLVUF7ISy95T0PnxJ7Z6wgNWSOjXnJRc5Q/0V6venySM2fgG4WM YD+8K8/TLnuE1h9x8ECbLH2H3yKmMnB66DdrH94NQWUA3jH/GUAtamspJE24vsKkMYf0 VF9ztTDlGLhzkk7r5O8pWvyJHCshSTyJnusFNXzeoOL78I4+LNdpWNQE0vQIgAHIefEe eYzOWBl8YcQfzHvPR9qEoZoELxlnj/G1AbR3shdWT1iMUHT0WAKEb+jy0ydzQbOWLuh5 0/0UcWLoynHegr7qZp8yw5jRq4r1AyZHP9P2r3aVM8zy/py15DK1jeEMzYb8Xe8tyGUL 3LOQ== X-Gm-Message-State: ANoB5pkxOM3YEDeONPdQJxHQNIVVU1oFXSXXwj7a+zwv9iS8wtPKtBtD rXzqUWTYMAFAwkuohqo3CjIWxtpIh1BWriNVCMbkB1Vsuq8v54BrMX04v/pQC8XkRVBWMwrFdnd 9RC54VXf9GLdEOwIlphUz8PKaRBdGMDy5v6ayoCkMaJMkcn2DC+2IPTDfvlZGQur/Hhg= X-Received: by 2002:a17:907:a803:b0:78d:f457:1062 with SMTP id vo3-20020a170907a80300b0078df4571062mr6021585ejc.31.1670585085232; Fri, 09 Dec 2022 03:24:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf79xKurqpd3pkShQl8nz4JgRCMVxyeClZIGTCjSLKja6A0QotmIxhOjB1nLwo7lRgv+yheAgQ== X-Received: by 2002:a17:907:a803:b0:78d:f457:1062 with SMTP id vo3-20020a170907a80300b0078df4571062mr6021568ejc.31.1670585084896; Fri, 09 Dec 2022 03:24:44 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Subject: [PATCH 12/30] modinfo: lookup compile_commands.json by object Date: Fri, 9 Dec 2022 12:23:51 +0100 Message-Id: <20221209112409.184703-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585862961100001 Content-Type: text/plain; charset="utf-8" With Meson 0.63 having fixed various issues with extract_objects, the compile_commands.json lookups can be simplified. If the lookup uses the object file as key, there is no need to use the command line to distinguish among all entries for a given source. Cc: Gerd Hoffmann Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- meson.build | 14 ++++---------- scripts/modinfo-collect.py | 23 +++++++++++------------ 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/meson.build b/meson.build index 9ccbe0f6e4ee..8a9ed5628317 100644 --- a/meson.build +++ b/meson.build @@ -3123,16 +3123,11 @@ foreach d, list : modules softmmu_mods +=3D sl endif if module_ss.sources() !=3D [] - # FIXME: Should use sl.extract_all_objects(recursive: true) as - # input. Sources can be used multiple times but objects are - # unique when it comes to lookup in compile_commands.json. - # Depnds on a mesion version with - # https://github.com/mesonbuild/meson/pull/8900 modinfo_files +=3D custom_target(d + '-' + m + '.modinfo', output: d + '-' + m + '.modinfo', - input: module_ss.sources() + genh, + input: sl.extract_all_objects(recur= sive: true), capture: true, - command: [modinfo_collect, module_s= s.sources()]) + command: [modinfo_collect, '@INPUT@= ']) endif else if d =3D=3D 'block' @@ -3165,12 +3160,11 @@ foreach d, list : target_modules c_args: c_args, pic: true) softmmu_mods +=3D sl - # FIXME: Should use sl.extract_all_objects(recursive: true) to= o. modinfo_files +=3D custom_target(module_name + '.modinfo', output: module_name + '.modinfo= ', - input: target_module_ss.sources= () + genh, + input: sl.extract_all_objects(r= ecursive: true), capture: true, - command: [modinfo_collect, '--t= arget', target, target_module_ss.sources()]) + command: [modinfo_collect, '--t= arget', target, '@INPUT@']) endif endif endforeach diff --git a/scripts/modinfo-collect.py b/scripts/modinfo-collect.py index 4e7584df6676..48bd92bd6180 100755 --- a/scripts/modinfo-collect.py +++ b/scripts/modinfo-collect.py @@ -7,15 +7,6 @@ import shlex import subprocess =20 -def find_command(src, target, compile_commands): - for command in compile_commands: - if command['file'] !=3D src: - continue - if target !=3D '' and command['command'].find(target) =3D=3D -1: - continue - return command['command'] - return 'false' - def process_command(src, command): skip =3D False out =3D [] @@ -43,14 +34,22 @@ def main(args): print("MODINFO_DEBUG target %s" % target) arch =3D target[:-8] # cut '-softmmu' print("MODINFO_START arch \"%s\" MODINFO_END" % arch) + with open('compile_commands.json') as f: - compile_commands =3D json.load(f) - for src in args: + compile_commands_json =3D json.load(f) + compile_commands =3D { x['output']: x for x in compile_commands_json } + + for obj in args: + entry =3D compile_commands.get(obj, None) + if not entry: + sys.stderr.print('modinfo: Could not find object file', obj) + sys.exit(1) + src =3D entry['file'] if not src.endswith('.c'): print("MODINFO_DEBUG skip %s" % src) continue + command =3D entry['command'] print("MODINFO_DEBUG src %s" % src) - command =3D find_command(src, target, compile_commands) cmdline =3D process_command(src, command) print("MODINFO_DEBUG cmd", cmdline) result =3D subprocess.run(cmdline, stdout =3D subprocess.PIPE, --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585258; cv=none; d=zohomail.com; s=zohoarc; b=hS0ovyv7Sx9jAa3lq+u23lXn4IO2uIYgfoaggCul/DM4aX/xdJ1idK2UdLrYmH6mXqG3R95Y1CdZ1WA+XwQkHRtRsBfFQKleHRKVtcckkrfii8tPNFKWW5/PdPa6f1cR/wOEt++wWf1iWvT0/qWa/UKPpSjtcYE5uRWlehqZeEY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585258; h=Content-Type:Content-Transfer-Encoding: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=H+/Qhy5YI+m6ReFDcRj9vmTwXS9tW1f9AMgMdyZi0pI=; b=A4ddrqVMQXXvbrbyOwUpmbfiOLZW4xlm66rVPQjW5QuvHr5alsZpsRm2TEsylli+u3DOLHnIt2qq0yxAUwtRahzWszIUGePhtZ0tecGcESXnXnXGpfUo7H4EbJry/5UEVwjvIcpjAIchoOXf40HC4pdC+hkkEa5lFBR66Xzw9To= 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 1670585258046615.9259072475036; Fri, 9 Dec 2022 03:27:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bWA-0004rV-P3; Fri, 09 Dec 2022 06:26:14 -0500 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 1p3bUs-0003yZ-3D for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:14 -0500 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 1p3bUp-00010B-H5 for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:53 -0500 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-657-1XQl0gHvPmSOhxUFwZZepw-1; Fri, 09 Dec 2022 06:24:49 -0500 Received: by mail-ej1-f72.google.com with SMTP id sa20-20020a1709076d1400b007bbe8699c2eso2897039ejc.6 for ; Fri, 09 Dec 2022 03:24:49 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id mm22-20020a170906cc5600b007c0fd177c0bsm449917ejb.46.2022.12.09.03.24.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:24:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585090; 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=H+/Qhy5YI+m6ReFDcRj9vmTwXS9tW1f9AMgMdyZi0pI=; b=L8TOIHogTlVHfqet8YI7aq7lxL7m8bIxg43679p0hnEnKVjEys7UdelxNGNSwERu6LZoOD jhLcC4YQ8vHD6Hx5cjU0exWJ4r/b7x0mnNwc1OXIQfbCkXx0qRVAuE+9eLZcW7Z5dqVa+l A3NWvtHavZpHXdvSsW6nHeOPmpNKiws= X-MC-Unique: 1XQl0gHvPmSOhxUFwZZepw-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H+/Qhy5YI+m6ReFDcRj9vmTwXS9tW1f9AMgMdyZi0pI=; b=k2eTqhMxFh+SLJ7gqTeNuqmRVl/UCb1EKg7PzhlsBP/dwEnUxWcSfvPDy2q+b3V1pr 21DMvkMr5b3IOeYlbLb9mgeeFIzNCcTJ+gswHkrH3GYjhXx166NJtI1TPM0+A5+l/x79 NcAEajPYJvKGt3Sy36JSlSsXQAJ/uBhirrMs6CVVYxxEiIH7pRNritQ1a63GRR2fBqmE ES+xMCB0n4/nts84+tovrw1Ul5MyN8XHJzdXaMQus+lw/PARs4a3J6jVDWRLmPXaB4nn V4eM7UJM4litQu6KXiMFNfUiIoNd8HvGjQTukK4d5oggtdsydAUL2RMm0HyyhsHJVjZH VtNQ== X-Gm-Message-State: ANoB5pkg0Ca5OgYHTM75Q+PfgRj+54Y7P1heJ+aClctvrg862ur9olYE 1yyAqllmfRV88bZknbSJdNw1xcCNnKO0uyx8tke58KCiL0+beyComXscNKXPiBdep69TeGDlZmj gisd2mkkGA0d+RDLH/RPSP4a1bHNWSBNNfDK4qgDz5QqaBU6uKE7V4GqTDHV0HB6FWp8= X-Received: by 2002:a17:906:4bcc:b0:7c1:b65:440f with SMTP id x12-20020a1709064bcc00b007c10b65440fmr4394532ejv.25.1670585087953; Fri, 09 Dec 2022 03:24:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf7XUtAoMyEdPSDvySxZPAFlxFPogyvF2MAdWdwgQWUtFJWWR1j23Qi6IvX+Y8h+0apxyx8zVw== X-Received: by 2002:a17:906:4bcc:b0:7c1:b65:440f with SMTP id x12-20020a1709064bcc00b007c10b65440fmr4394520ejv.25.1670585087564; Fri, 09 Dec 2022 03:24:47 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 13/30] configure: remove backwards-compatibility code Date: Fri, 9 Dec 2022 12:23:52 +0100 Message-Id: <20221209112409.184703-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585259016100003 Content-Type: text/plain; charset="utf-8" The cmd_line.txt mangling is only needed when rebuilding from very old trees and is kept mostly as an example of how to extend it. However, Meson 0.63 introduces a deprecation mechanism for meson_options.txt that can be used instead, so get rid of our home-grown hack. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/configure b/configure index 6efc2055ce09..113db838a16f 100755 --- a/configure +++ b/configure @@ -2556,16 +2556,6 @@ if test "$skip_meson" =3D no; then if test "$?" -ne 0 ; then error_exit "meson setup failed" fi -else - if test -f meson-private/cmd_line.txt; then - # Adjust old command line options whose type was changed - # Avoids having to use "setup --wipe" when Meson is upgraded - perl -i -ne ' - s/^gettext =3D true$/gettext =3D auto/; - s/^gettext =3D false$/gettext =3D disabled/; - /^b_staticpic/ && next; - print;' meson-private/cmd_line.txt - fi fi =20 # Save the configure command line for later reuse. --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670586280; cv=none; d=zohomail.com; s=zohoarc; b=AKeJb/qrIzaZKs6xiNgELtxp11W67miV9GNU89L9wUzGdCwgQ8pQrSzWwhs/1mFYmFdMgP2m0zcdNq57+LuNgqiONAu5zC0hzMORyAQnupV52dyLRHkPIQrzF5E7wv1gpBU2did175zMnCFoELaGlOyAMYXr8ad5jDHj8iwFCwU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670586280; h=Content-Type:Content-Transfer-Encoding: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=lVEYVLy4bG6SIZTRvPZzmvu8H95iJMHf5269FMOz9mg=; b=lB4vCBKMcOKy9puIoe/Me8y9RPx56TXPnKLAea6QYJZ+c6ZbQ7Jg6j8+zLS1Sk17RDUe9VDs5XI1u8SrP2m7bFYYBnR0mrVdp4w2m+PLQ97rktQHDZLrar5dZBlko7lL2GOQ8WShOpuU8uTaN5fFS2E/bBmScjdEYvgULnrFMWY= 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 1670586280179279.976328032731; Fri, 9 Dec 2022 03:44:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bWM-0005F7-6x; Fri, 09 Dec 2022 06:26:26 -0500 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 1p3bUt-0003yi-H5 for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:14 -0500 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 1p3bUr-00010V-SL for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:55 -0500 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_128_GCM_SHA256) id us-mta-100-B_gPSA08OfO4XbprSlQLUw-1; Fri, 09 Dec 2022 06:24:51 -0500 Received: by mail-ed1-f70.google.com with SMTP id i2-20020a05640242c200b0046c66305ebaso1196658edc.15 for ; Fri, 09 Dec 2022 03:24:51 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id i15-20020a50fd0f000000b0046b4e0fae75sm515125eds.40.2022.12.09.03.24.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:24:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585093; 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=lVEYVLy4bG6SIZTRvPZzmvu8H95iJMHf5269FMOz9mg=; b=iLZSTcOxdJfHiO8oQNEEVKzgDbg0q76n6KAmDJKOGrafMbSebZLqvOScLjEtEykEhVBdYQ LGAqvzgHqZOi/hQo4aaIj2q9bTiGb2iGEWVpfhcU3H1NPWkdLLMWTP0wEmuKD2a5w3SZ+n CQVUQyP3CnTq/p14Hk2qcAATbJOH5cQ= X-MC-Unique: B_gPSA08OfO4XbprSlQLUw-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lVEYVLy4bG6SIZTRvPZzmvu8H95iJMHf5269FMOz9mg=; b=QBqq5yKSvOAVZ+ukiyRi75vI86cFngI4Aup8v4kaslZeQQglTk2qF+zLzlGTHv10HU Iy+vI3S5Ip+hRSOQ+U6JSk7J0E0+toSkugP//KQsHEHe5H/RJaFzyE9jveX31pH4bmFn k46adrKrIPnYgwPBI2cX86NSmi6jf1JaJueDJ1DjrPrc0TZ4Bcqrj8C6C23OMDCUbei5 4rDZ9MIwotcEOXGzPScPlEQNdAOaJ+iJ3E5t/JtXJYGJOs4Nf7o+/iooh1K+YIZPEpH6 KozaV8aifH+mIkNAZu/aWd8GGxJAcbhKn7eYhS/LNNLbZctEWPC/ch3dRnqzRy7fmY+B 6TpA== X-Gm-Message-State: ANoB5pmTmOtA3zpHjiz/Jbpm5/y5d1xAP1Z3NGGGdPvOsKRLIQkGorHS P8W+fkOW+goWpOdin4k3fmFJ7Dvw6QqKXP4wa0dJfBb/zr9EYEblNHNjDJf9l2yFLHK54rRCAoL QWLLWQQMDJ9c0gT+/xHKHVOFuvzrOAery0ewk/mp2Iq1lNxLtcFeOQeRHBsy1Qc8HDEk= X-Received: by 2002:a17:907:a803:b0:78d:f454:3762 with SMTP id vo3-20020a170907a80300b0078df4543762mr5744399ejc.5.1670585090468; Fri, 09 Dec 2022 03:24:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf5+Du2YwT+/NBSnskd2weXegs+MOe7YHiGUM0qBeZg3H4Fq3RTegBlb8s+V83+Q15XzbU++9g== X-Received: by 2002:a17:907:a803:b0:78d:f454:3762 with SMTP id vo3-20020a170907a80300b0078df4543762mr5744385ejc.5.1670585090248; Fri, 09 Dec 2022 03:24:50 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 14/30] configure: test all warnings Date: Fri, 9 Dec 2022 12:23:53 +0100 Message-Id: <20221209112409.184703-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670586281587100003 Content-Type: text/plain; charset="utf-8" Some warnings are hardcoded in QEMU_CFLAGS and not tested. There is no particular reason to single out these five, as many more -W flags are present on all the supported compilers. For homogeneity when moving the detection to meson, make them use the same warn_flags infrastructure. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- configure | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 113db838a16f..9c5393a25de7 100755 --- a/configure +++ b/configure @@ -378,8 +378,6 @@ sdl2_config=3D"${SDL2_CONFIG-${cross_prefix}sdl2-config= }" # 2s-complement style results. (Both clang and gcc agree that it # provides these semantics.) QEMU_CFLAGS=3D"-fno-strict-aliasing -fno-common -fwrapv" -QEMU_CFLAGS=3D"-Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS" -QEMU_CFLAGS=3D"-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS" QEMU_CFLAGS=3D"-D_GNU_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_LARGEFILE_SOURCE = $QEMU_CFLAGS" =20 QEMU_LDFLAGS=3D @@ -1161,6 +1159,11 @@ fi # just silently disable some features, so it's too error prone. =20 warn_flags=3D +add_to warn_flags -Wundef +add_to warn_flags -Wwrite-strings +add_to warn_flags -Wmissing-prototypes +add_to warn_flags -Wstrict-prototypes +add_to warn_flags -Wredundant-decls add_to warn_flags -Wold-style-declaration add_to warn_flags -Wold-style-definition add_to warn_flags -Wtype-limits --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585633; cv=none; d=zohomail.com; s=zohoarc; b=RN+Le1ezsfA2Do+UJlqSU0GrqOpFKZ+P5CBfQ+rjH75iX/gUteB+lttBy+NQummKpWwkZKKsxK+mB3M+iEFkmpfn2KE1cQyYhKumm33svW/w2acQqdBnvSDxYhR8Twp3/0PNCKMHzq1uJY5W805dLT5Ku2kDAKHXoxksqCXD7ek= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585633; h=Content-Type:Content-Transfer-Encoding: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=FKVqDpGdK8B/+N9LpyhXBN01lnpX+uhdgTjONzNUl6Q=; b=nb2bjO8FpI6dx6s7aBiCLseF4uzByS3WOcq+q4I+uhRFzmz/WOijmZGZS+RpCt/oUHGFVduydUtAP3r7wH8kTai8potZsh3vi+8vocDwIOnD5bO9nLNRhwDnbIDwBmIdzOHS5gPyYziYO0Y2wHQH0TTwnu4HsICaztZfRdZyHqk= 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 1670585633176231.60690647640376; Fri, 9 Dec 2022 03:33:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bWC-0004vU-L0; Fri, 09 Dec 2022 06:26:16 -0500 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 1p3bUx-0003yz-0O for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:23 -0500 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 1p3bUv-00011F-2U for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:24:58 -0500 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-629-kBxHcI_NOWiLfvyLNb4qIA-1; Fri, 09 Dec 2022 06:24:55 -0500 Received: by mail-ed1-f69.google.com with SMTP id t4-20020a056402524400b004620845ba7bso1205606edd.4 for ; Fri, 09 Dec 2022 03:24:55 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id o16-20020a170906769000b00782e3cf7277sm438151ejm.120.2022.12.09.03.24.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:24:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585096; 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=FKVqDpGdK8B/+N9LpyhXBN01lnpX+uhdgTjONzNUl6Q=; b=W001Wh3VDCAtGzUCQKsl5GxfrLjkpbhoUVDHcU7qR3RsnSesJ+gNOvKRrHmMpowYUPUQMa yv7YzpskzFTAN2TvJEbPOwCE3HvAhtfeTxRdkO4Pn4Y8eQGpXy8VsOrbKwzlMSx6TN4n6U 10K/V5V9aKBbWwaR7qXa8y6Chj6lwrQ= X-MC-Unique: kBxHcI_NOWiLfvyLNb4qIA-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FKVqDpGdK8B/+N9LpyhXBN01lnpX+uhdgTjONzNUl6Q=; b=o1FzgStCJPQ3Q08EImABKoXzmyGegIoms3ezoI7PqMWqU8HTLFDF+eB3OlMhHZK/bL 0vb1FbnwguKBDJczQ8DCRWmr8Xb+FwnPLtp3d0aj1J3IHgpc+ZCQxIkoHljuDClAjIGL pEDNV8pfELF/nwMEb6TBfuZLGXdG19yuWKe05patz9MMjfa3MXBuXYHlovVts/8i4Uki 3NVTm5yvJkM9H6pgfrig+QOcRUvr2nqfKf4OSYOF6e0QDskfifw3dbGqIUdktgK8JXkR v4d3ZuqC6oa4a84YT1L802m0rNexq9wOE2FbS4V9jCEAjLugNwTBlROZ3ztpS4x/u3iW qXCA== X-Gm-Message-State: ANoB5pmkUuTS00O+liPN0GtpGCXSbKglYQtvO7LmG53Hrp2cemvr6aWf 2rNETE2S3AkgWy2dYOzdq3FzV4gNBPinLb5K0s3upezzl3R25rev7/vAwHMNb1PD+FCBe1TQPl0 dzvAsdOPoM0BwTtNLmCNNr0uSebOZ++kD1aPp98qHoVmea7Nhkdss4XkMVHXC81OvlE0= X-Received: by 2002:a17:907:8b87:b0:7bc:14f7:9daa with SMTP id tb7-20020a1709078b8700b007bc14f79daamr5146037ejc.39.1670585093770; Fri, 09 Dec 2022 03:24:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf4QTjBg7LYin/ZQm5LUZM8IcVXznyciPemQfgPa6Wm3tTJMr7BwTpffjfhhoqTySfRDl2oQcQ== X-Received: by 2002:a17:907:8b87:b0:7bc:14f7:9daa with SMTP id tb7-20020a1709078b8700b007bc14f79daamr5146009ejc.39.1670585093333; Fri, 09 Dec 2022 03:24:53 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 15/30] meson: cleanup compiler detection Date: Fri, 9 Dec 2022 12:23:54 +0100 Message-Id: <20221209112409.184703-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585635820100003 Content-Type: text/plain; charset="utf-8" Detect all compilers at the beginning of meson.build, and store the available languages in an array. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- meson.build | 62 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/meson.build b/meson.build index 8a9ed5628317..c4fa82ae8ba4 100644 --- a/meson.build +++ b/meson.build @@ -15,9 +15,21 @@ ss =3D import('sourceset') fs =3D import('fs') =20 sh =3D find_program('sh') -cc =3D meson.get_compiler('c') config_host =3D keyval.load(meson.current_build_dir() / 'config-host.mak') enable_modules =3D 'CONFIG_MODULES' in config_host +targetos =3D host_machine.system() + +cc =3D meson.get_compiler('c') +all_languages =3D ['c'] +if add_languages('cpp', required: false, native: false) + all_languages +=3D ['cpp'] + cxx =3D meson.get_compiler('cpp') +endif +if targetos =3D=3D 'darwin' and \ + add_languages('objc', required: get_option('cocoa'), native: false) + all_languages +=3D ['objc'] + objc =3D meson.get_compiler('objc') +endif =20 # Temporary directory used for files created while # configure runs. Since it is in the build directory @@ -54,8 +66,6 @@ if cpu in ['riscv32', 'riscv64'] cpu =3D 'riscv' endif =20 -targetos =3D host_machine.system() - target_dirs =3D config_host['TARGET_DIRS'].split() have_linux_user =3D false have_bsd_user =3D false @@ -161,7 +171,7 @@ if 'dtrace' in get_option('trace_backends') # semaphores are linked into the main binary and not the module's shar= ed # object. add_global_arguments('-DSTAP_SDT_V2', - native: false, language: ['c', 'cpp', 'objc']) + native: false, language: all_languages) endif endif =20 @@ -203,7 +213,7 @@ endif if get_option('fuzzing') add_project_link_arguments(['-Wl,-T,', (meson.current_source_dir() / 'tests/qtest/f= uzz/fork_fuzz.ld')], - native: false, language: ['c', 'cpp', 'objc']) + native: false, language: all_languages) =20 # Specify a filter to only instrument code that is directly related to # virtual-devices. @@ -216,7 +226,7 @@ if get_option('fuzzing') args: ['-fsanitize-coverage-allowlist=3D/dev/null', '-fsanitize-coverage=3Dtrace-pc'] ) add_global_arguments('-fsanitize-coverage-allowlist=3Dinstrumentation-= filter', - native: false, language: ['c', 'cpp', 'objc']) + native: false, language: all_languages) endif =20 if get_option('fuzzing_engine') =3D=3D '' @@ -225,9 +235,9 @@ if get_option('fuzzing') # everything with fsanitize=3Dfuzzer-no-link. Otherwise, the linker wi= ll be # unable to bind the fuzzer-related callbacks added by instrumentation. add_global_arguments('-fsanitize=3Dfuzzer-no-link', - native: false, language: ['c', 'cpp', 'objc']) + native: false, language: all_languages) add_global_link_arguments('-fsanitize=3Dfuzzer-no-link', - native: false, language: ['c', 'cpp', 'objc'= ]) + native: false, language: all_languages) # For the actual fuzzer binaries, we need to link against the libfuzzer # library. They need to be configurable, to support OSS-Fuzz fuzz_exe_ldflags =3D ['-fsanitize=3Dfuzzer'] @@ -238,15 +248,11 @@ if get_option('fuzzing') endif endif =20 -add_global_arguments(qemu_cflags, native: false, language: ['c']) -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') +if 'cpp' in all_languages add_global_arguments(['-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS= ', '-D__STDC_FORMAT_MACROS'], native: false, language: 'cpp') foreach k: qemu_cflags @@ -255,7 +261,6 @@ if add_languages('cpp', required: false, native: false) qemu_cxxflags +=3D [k] endif endforeach - add_global_arguments(qemu_cxxflags, native: false, language: 'cpp') =20 if cxx.links(files('scripts/main.c'), args: qemu_cflags) link_language =3D 'cpp' @@ -271,22 +276,21 @@ if targetos !=3D 'sunos' and not config_host.has_key(= 'CONFIG_TSAN') qemu_ldflags +=3D linker.get_supported_link_arguments('-Wl,--warn-common= ') endif =20 -add_global_link_arguments(qemu_ldflags, native: false, language: ['c', 'cp= p', 'objc']) +add_global_link_arguments(qemu_ldflags, native: false, language: all_langu= ages) =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') if targetos =3D=3D 'linux' add_project_arguments('-isystem', meson.current_source_dir() / 'linux-he= aders', '-isystem', 'linux-headers', - language: ['c', 'cpp']) + language: all_languages) endif =20 add_project_arguments('-iquote', '.', '-iquote', meson.current_source_dir(), '-iquote', meson.current_source_dir() / 'include', - language: ['c', 'cpp', 'objc']) - -if host_machine.system() =3D=3D 'darwin' - add_languages('objc', required: false, native: false) -endif + language: all_languages) =20 sparse =3D find_program('cgcc', required: get_option('sparse')) if sparse.found() @@ -468,7 +472,7 @@ if get_option('tcg').allowed() tcg_arch =3D 'ppc' endif add_project_arguments('-iquote', meson.current_source_dir() / 'tcg' / tc= g_arch, - language: ['c', 'cpp', 'objc']) + language: all_languages) =20 accelerators +=3D 'CONFIG_TCG' config_host +=3D { 'CONFIG_TCG': 'y' } @@ -494,7 +498,7 @@ endif # The path to glib.h is added to all compilation commands. This was # grandfathered in from the QEMU Makefiles. add_project_arguments(config_host['GLIB_CFLAGS'].split(), - native: false, language: ['c', 'cpp', 'objc']) + native: false, language: all_languages) glib =3D declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split= (), link_args: config_host['GLIB_LIBS'].split(), version: config_host['GLIB_VERSION'], @@ -1674,8 +1678,8 @@ if get_option('cfi') error('-fno-sanitize-trap=3Dcfi-icall is not supported by the compil= er') endif endif - add_global_arguments(cfi_flags, native: false, language: ['c', 'cpp', 'o= bjc']) - add_global_link_arguments(cfi_flags, native: false, language: ['c', 'cpp= ', 'objc']) + add_global_arguments(cfi_flags, native: false, language: all_languages) + add_global_link_arguments(cfi_flags, native: false, language: all_langua= ges) endif =20 have_host_block_device =3D (targetos !=3D 'darwin' or @@ -3713,8 +3717,12 @@ if link_args.length() > 0 summary_info +=3D {'LDFLAGS': ' '.join(link_args)} endif summary_info +=3D {'QEMU_CFLAGS': ' '.join(qemu_cflags)} -summary_info +=3D {'QEMU_CXXFLAGS': ' '.join(qemu_cxxflags)} -summary_info +=3D {'QEMU_OBJCFLAGS': ' '.join(qemu_objcflags)} +if 'cpp' in all_languages + summary_info +=3D {'QEMU_CXXFLAGS': ' '.join(qemu_cxxflags)} +endif +if 'objc' in all_languages + summary_info +=3D {'QEMU_OBJCFLAGS': ' '.join(qemu_objcflags)} +endif summary_info +=3D {'QEMU_LDFLAGS': ' '.join(qemu_ldflags)} summary_info +=3D {'profiler': get_option('profiler')} summary_info +=3D {'link-time optimization (LTO)': get_option('b_lto')} --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670586201; cv=none; d=zohomail.com; s=zohoarc; b=M+sPpXJl3h+xK+ZAE5P6q4J45JqO3SFnBEBbeGAuM3HAVCnIi7al3VlCpnqDaHLwyNMJUIfNpmzkES8wmcLfoqARPJZc2s/fzHz6C4ppEfnsxupblRbOh4aqxAgIFpo9X3fetmxtHqY8mQW30TYFx/x2elUzlSD3s0YOMP/P/FA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670586201; h=Content-Type:Content-Transfer-Encoding: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=NQVG1qMxVxADoLqdsGTmmP6GVi8GQAzTiysq17FwIyI=; b=NacFd2gh9rkr61ehDv0qduSUL/XrkGgblILe3u1+52063NscWzjKTr8O2yj1rfKKxFB3KL7qmrg7EquZvmlEOvWguAV21VOJIKVURJVW9a5kRm62NtOQBSb8NMhQ+0nkQLATVvOn6iwOTF9aX4MGHOHzv5bl1Xyp6lD56abU1XQ= 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 1670586201206931.3078557531665; Fri, 9 Dec 2022 03:43:21 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bW8-0004ny-UI; Fri, 09 Dec 2022 06:26:13 -0500 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 1p3bV7-00045i-ES for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:23 -0500 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 1p3bUz-00011i-JB for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:04 -0500 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-115-ypmJzCcIO2GoELsflSt59g-1; Fri, 09 Dec 2022 06:24:58 -0500 Received: by mail-ej1-f69.google.com with SMTP id sh37-20020a1709076ea500b007c09b177cd1so2910655ejc.12 for ; Fri, 09 Dec 2022 03:24:57 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id fe17-20020a1709072a5100b007be301a1d51sm437578ejc.211.2022.12.09.03.24.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:24:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585099; 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=NQVG1qMxVxADoLqdsGTmmP6GVi8GQAzTiysq17FwIyI=; b=fOE3hdR31OYS6AiwOXdyrUrB0bp1g1vuNfZqkxA44XjBcP51CV1SpgVfz7L9wSQkDg9fgD QN/+kLTEf35uzhJ6k7CwqjicR6KLZR88ZKljIspodCr6Twvq9Ce5UbJHgMR8ISm6oplBNM 7/zf0IEqkgxMR25TRgLw8RABmvH9zRo= X-MC-Unique: ypmJzCcIO2GoELsflSt59g-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NQVG1qMxVxADoLqdsGTmmP6GVi8GQAzTiysq17FwIyI=; b=4cqC5yUQcD89tDktg1E++KgFc5NRa5tBsQ+Ax21L5zzlgnGR4+c2wwRjIUac6yH2Gj wjPX8r7lKYGmpXYAdlVPSH2pDemhjogbn3f+5F7J3lNlNyMSEZfjazaHIJt4vyds1tDS WFWd308aqkikZpcaRzxx9vRjk/Pn3yzIprFrtugq8P5LoJCosCSJVbZKUHfPLEtUfLWa ap8HbBU8dq7K+fDdUtKOkztq2VXds71vUAwah1T98kXo6b/zJjGpu/JxPM5Zq2+oKYkb Kq+zUNV5+LhPk9MGkgpD5tAPVm7wA8BPow5W9qk4Zyms342i9kC1GOJ72yLUXr7n/XXm 79Dw== X-Gm-Message-State: ANoB5pkvdkDq9xt4xoaGRLIbW84A1oZsyJFM5mUio8cJ1BAxtCffJfc6 1JLO8sChpZPUwmPx9W/Y9Gk1R+f9M3JlIcbPwukW8lgUwtocChhGQQq8ws0Wh2fm6G3EDWwp8EA V+YTFfK39pvWexUY8v55ILVgznEcysIo9hHO+w5w1GWbcocBpKzEkvSLVcRlU2Yw+CkE= X-Received: by 2002:a17:906:8ce:b0:7ad:dd10:c614 with SMTP id o14-20020a17090608ce00b007addd10c614mr4339446eje.44.1670585096552; Fri, 09 Dec 2022 03:24:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf50sxpyGC6+oVsCT0pLbfQC1k6FRolEU14ic9/ZXEPaQpxUFhDcg1u1acisGZfZ4NMP2PaljQ== X-Received: by 2002:a17:906:8ce:b0:7ad:dd10:c614 with SMTP id o14-20020a17090608ce00b007addd10c614mr4339429eje.44.1670585096105; Fri, 09 Dec 2022 03:24:56 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 16/30] build: move glib detection and workarounds to meson Date: Fri, 9 Dec 2022 12:23:55 +0100 Message-Id: <20221209112409.184703-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670586203016100003 Content-Type: text/plain; charset="utf-8" QEMU adds the path to glib.h is added to all compilation commands. This is simpler due to the pervasive use of static_library, and was grandfathered in from the previous Make-based build system. Until Meson 0.63 the only way to do this was to detect glib in configure and use add_project_arguments, but now it is possible to use add_project_dependencies instead. gmodule is detected in a separate variable and added via both block_ss (for --enable-modules) and plugins/meson.build (for --enable-plugins). Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- block/meson.build | 1 + configure | 83 +--------------------------------------- contrib/plugins/Makefile | 4 +- meson.build | 81 +++++++++++++++++++++++++++++++++------ plugins/meson.build | 2 +- 5 files changed, 74 insertions(+), 97 deletions(-) diff --git a/block/meson.build b/block/meson.build index b7c68b83a36f..f2e0e86f3b0a 100644 --- a/block/meson.build +++ b/block/meson.build @@ -145,6 +145,7 @@ block_gen_c =3D custom_target('block-gen.c', block_ss.add(block_gen_c) =20 block_ss.add(files('stream.c')) +block_ss.add(gmodule) =20 softmmu_ss.add(files('qapi-sysemu.c')) =20 diff --git a/configure b/configure index 9c5393a25de7..fb28dd3963bd 100755 --- a/configure +++ b/configure @@ -1426,84 +1426,6 @@ if ! has "$pkg_config_exe"; then error_exit "pkg-config binary '$pkg_config_exe' not found" fi =20 -########################################## -# glib support probe - -# When bumping glib_req_ver, please check also whether we should increase -# the _WIN32_WINNT setting in osdep.h according to the value from glib -glib_req_ver=3D2.56 -glib_modules=3Dgthread-2.0 -if test "$modules" =3D yes; then - glib_modules=3D"$glib_modules gmodule-export-2.0" -elif test "$plugins" =3D "yes"; then - glib_modules=3D"$glib_modules gmodule-no-export-2.0" -fi - -for i in $glib_modules; do - if $pkg_config --atleast-version=3D$glib_req_ver $i; then - glib_cflags=3D$($pkg_config --cflags $i) - glib_libs=3D$($pkg_config --libs $i) - else - error_exit "glib-$glib_req_ver $i is required to compile QEMU" - fi -done - -glib_bindir=3D"$($pkg_config --variable=3Dbindir glib-2.0)" -if test -z "$glib_bindir" ; then - glib_bindir=3D"$($pkg_config --variable=3Dprefix glib-2.0)"/bin -fi - -# This workaround is required due to a bug in pkg-config file for glib as = it -# doesn't define GLIB_STATIC_COMPILATION for pkg-config --static - -if test "$static" =3D yes && test "$mingw32" =3D yes; then - glib_cflags=3D"-DGLIB_STATIC_COMPILATION $glib_cflags" -fi - -# Sanity check that the current size_t matches the -# size that glib thinks it should be. This catches -# problems on multi-arch where people try to build -# 32-bit QEMU while pointing at 64-bit glib headers -cat > $TMPC < -#include - -#define QEMU_BUILD_BUG_ON(x) \ - typedef char qemu_build_bug_on[(x)?-1:1] __attribute__((unused)); - -int main(void) { - QEMU_BUILD_BUG_ON(sizeof(size_t) !=3D GLIB_SIZEOF_SIZE_T); - return 0; -} -EOF - -if ! compile_prog "$glib_cflags" "$glib_libs" ; then - error_exit "sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T."\ - "You probably need to set PKG_CONFIG_LIBDIR"\ - "to point to the right pkg-config files for your"\ - "build target" -fi - -# Silence clang warnings triggered by glib < 2.57.2 -cat > $TMPC << EOF -#include -typedef struct Foo { - int i; -} Foo; -static void foo_free(Foo *f) -{ - g_free(f); -} -G_DEFINE_AUTOPTR_CLEANUP_FUNC(Foo, foo_free) -int main(void) { return 0; } -EOF -if ! compile_prog "$glib_cflags -Werror" "$glib_libs" ; then - if cc_has_warning_flag "-Wno-unused-function"; then - glib_cflags=3D"$glib_cflags -Wno-unused-function" - CONFIGURE_CFLAGS=3D"$CONFIGURE_CFLAGS -Wno-unused-function" - fi -fi - ########################################## # fdt probe =20 @@ -2361,13 +2283,10 @@ echo "PYTHON=3D$python" >> $config_host_mak echo "GENISOIMAGE=3D$genisoimage" >> $config_host_mak echo "MESON=3D$meson" >> $config_host_mak echo "NINJA=3D$ninja" >> $config_host_mak +echo "PKG_CONFIG=3D${pkg_config_exe}" >> $config_host_mak echo "CC=3D$cc" >> $config_host_mak echo "QEMU_CFLAGS=3D$QEMU_CFLAGS" >> $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 -echo "GLIB_BINDIR=3D$glib_bindir" >> $config_host_mak -echo "GLIB_VERSION=3D$(pkg-config --modversion glib-2.0)" >> $config_host_= mak echo "QEMU_LDFLAGS=3D$QEMU_LDFLAGS" >> $config_host_mak echo "EXESUF=3D$EXESUF" >> $config_host_mak =20 diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile index 23e0396687e8..8a316cd76f2f 100644 --- a/contrib/plugins/Makefile +++ b/contrib/plugins/Makefile @@ -3,7 +3,7 @@ # This Makefile example is fairly independent from the main makefile # so users can take and adapt it for their build. We only really # include config-host.mak so we don't have to repeat probing for -# cflags that the main configure has already done for us. +# programs that the main configure has already done for us. # =20 BUILD_DIR :=3D $(CURDIR)/../.. @@ -26,7 +26,7 @@ SONAMES :=3D $(addsuffix .so,$(addprefix lib,$(NAMES))) =20 # The main QEMU uses Glib extensively so it's perfectly fine to use it # in plugins (which many example do). -CFLAGS =3D $(GLIB_CFLAGS) +CFLAGS :=3D $(shell $(PKG_CONFIG) --cflags glib-2.0) CFLAGS +=3D -fPIC -Wall $(filter -W%, $(QEMU_CFLAGS)) CFLAGS +=3D $(if $(findstring no-psabi,$(QEMU_CFLAGS)),-Wpsabi) CFLAGS +=3D $(if $(CONFIG_DEBUG_TCG), -ggdb -O0) diff --git a/meson.build b/meson.build index c4fa82ae8ba4..f63ab7f83bed 100644 --- a/meson.build +++ b/meson.build @@ -495,19 +495,77 @@ endif # Dependencies # ################ =20 -# The path to glib.h is added to all compilation commands. This was -# grandfathered in from the QEMU Makefiles. -add_project_arguments(config_host['GLIB_CFLAGS'].split(), - native: false, language: all_languages) -glib =3D declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split= (), - link_args: config_host['GLIB_LIBS'].split(), - version: config_host['GLIB_VERSION'], +# When bumping glib minimum version, please check also whether to increase +# the _WIN32_WINNT setting in osdep.h according to the value from glib +glib_req_ver =3D '>=3D2.56.0' +glib =3D dependency('glib-2.0', version: glib_req_ver, required: true, + method: 'pkg-config') +glib_cflags =3D [] +if config_host.has_key('CONFIG_MODULES') + gmodule =3D dependency('gmodule-export-2.0', version: glib_req_ver, requ= ired: true, + method: 'pkg-config') +elif config_host.has_key('CONFIG_PLUGIN') + gmodule =3D dependency('gmodule-no-export-2.0', version: glib_req_ver, r= equired: true, + method: 'pkg-config') +else + gmodule =3D not_found +endif + +# This workaround is required due to a bug in pkg-config file for glib as = it +# doesn't define GLIB_STATIC_COMPILATION for pkg-config --static +if targetos =3D=3D 'windows' and get_option('prefer_static') + glib_cflags +=3D ['-DGLIB_STATIC_COMPILATION'] +endif + +# Sanity check that the current size_t matches the +# size that glib thinks it should be. This catches +# problems on multi-arch where people try to build +# 32-bit QEMU while pointing at 64-bit glib headers + +if not cc.compiles(''' + #include + #include + + #define QEMU_BUILD_BUG_ON(x) \ + typedef char qemu_build_bug_on[(x)?-1:1] __attribute__((unused)); + + int main(void) { + QEMU_BUILD_BUG_ON(sizeof(size_t) !=3D GLIB_SIZEOF_SIZE_T); + return 0; + }''', dependencies: glib, args: glib_cflags) + error('''sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T. + You probably need to set PKG_CONFIG_LIBDIR" to point + to the right pkg-config files for your build target.''') +endif + +# Silence clang warnings triggered by glib < 2.57.2 +if not cc.compiles(''' + #include + typedef struct Foo { + int i; + } Foo; + static void foo_free(Foo *f) + { + g_free(f); + } + G_DEFINE_AUTOPTR_CLEANUP_FUNC(Foo, foo_free) + int main(void) { return 0; }''', dependencies: glib, args: ['-Werror']) + glib_cflags +=3D cc.get_supported_arguments('-Wno-unused-function') +endif +glib =3D declare_dependency(dependencies: glib, + compile_args: glib_cflags, + version: glib.version(), variables: { - 'bindir': config_host['GLIB_BINDIR'], + 'bindir': glib.get_variable('bindir') }) -# override glib dep with the configure results (for subprojects) + +# override glib dep to include the above refinements meson.override_dependency('glib-2.0', glib) =20 +# The path to glib.h is added to all compilation commands. +add_project_dependencies(glib.partial_dependency(compile_args: true, inclu= des: true), + native: false, language: all_languages) + gio =3D not_found gdbus_codegen =3D not_found gdbus_codegen_error =3D '@0@ requires gdbus-codegen, please install libgio' @@ -923,7 +981,7 @@ if have_system and get_option('curses').allowed() int main(void) { iconv_t conv =3D iconv_open("WCHAR_T", "UCS-2"); return conv !=3D (iconv_t) -1; - }''', args: config_host['GLIB_CFLAGS'].split() + config_host['GLIB= _LIBS'].split() + link_args) + }''', args: link_args, dependencies: glib) iconv =3D declare_dependency(link_args: link_args, dependencies: g= lib) break endif @@ -2977,7 +3035,6 @@ subdir('ui') subdir('hw') subdir('gdbstub') =20 - if enable_modules libmodulecommon =3D static_library('module-common', files('module-common= .c') + genh, pic: true, c_args: '-DBUILD_DSO') modulecommon =3D declare_dependency(link_whole: libmodulecommon, compile= _args: '-DBUILD_DSO') @@ -3590,7 +3647,7 @@ if host_machine.system() =3D=3D 'windows' '@OUTPUT@', get_option('prefix'), meson.current_source_dir(), - config_host['GLIB_BINDIR'], + glib.get_variable('bindir'), host_machine.cpu(), '--', '-DDISPLAYVERSION=3D' + meson.project_version(), diff --git a/plugins/meson.build b/plugins/meson.build index 752377c66d32..04cb7d252aab 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -17,4 +17,4 @@ specific_ss.add(when: 'CONFIG_PLUGIN', if_true: [files( 'loader.c', 'core.c', 'api.c', -), declare_dependency(link_args: plugin_ldflags)]) +), gmodule, declare_dependency(link_args: plugin_ldflags)]) --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585908; cv=none; d=zohomail.com; s=zohoarc; b=a42mJNpdqtYFabvP5eGrpiYAFX9VGLKidRvUVRVAnwMbz8n+d9GpZc2MYzYCib4HgYIX1ioOzw4STQ/rUPGBBM66DFZNJOQ82llo0ThT1KznvLZ6/jKbABfI98J3dlUShFx5fEytYx/HyY1shm50R1CIBqTyBgq451z5pumjYc4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585908; h=Content-Type:Content-Transfer-Encoding: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=Ly9X8LRoyRD4u0/Mdbe+guE81+taxTsk3fckWLgpH9g=; b=FJESjk6GIGk9D2rtSYqG5P+2oOPQzrWsgoXHgp5aANCSAJYaDygxBWF3avK4lTB3NTdfK+2YEBEEoqATywKPE50WngSsxsLkplxKj/l3TZ2y/QwUfqKSjVoXm0KgxLmITRymBmE0nixc7RQTTyHNYGmIBVuPm4Iw9dyKjtOjLhM= 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 1670585908402656.5811470482234; Fri, 9 Dec 2022 03:38:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bXH-0005yE-Ve; Fri, 09 Dec 2022 06:27:24 -0500 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 1p3bVj-0004RG-Et for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:53 -0500 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 1p3bVM-0001Ip-4w for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:35 -0500 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-465-Yg-LVdemMo-ZvnxhNZq24w-1; Fri, 09 Dec 2022 06:25:16 -0500 Received: by mail-ej1-f72.google.com with SMTP id nc4-20020a1709071c0400b0078a5ceb571bso2907111ejc.4 for ; Fri, 09 Dec 2022 03:25:16 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id p26-20020a17090628da00b0077205dd15basm453122ejd.66.2022.12.09.03.24.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:25:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585117; 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=Ly9X8LRoyRD4u0/Mdbe+guE81+taxTsk3fckWLgpH9g=; b=fL74NOrQv7IeEpauIrZxwZUveRdFxznZeBhFn2F8J1eE6m1GE/Q8p2iFTxQYWmPg0Pum53 L/5c0G2Cg7uxTbEJhUNRlWFpmUEf+Gu+KaspE5dupAr2PHP17XmiBKyngavqa8qnKwh6as 5OM8o85OYB4z/de1Hrs3q5uH1fNGiF8= X-MC-Unique: Yg-LVdemMo-ZvnxhNZq24w-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ly9X8LRoyRD4u0/Mdbe+guE81+taxTsk3fckWLgpH9g=; b=76M+LpdYr9et4cX09Ta8T4ZyAcJxpBV9O5Xw7FIcyzPVlTCfw2rs9If36xZ5+5RSy3 d/KNkbOFaRbQ3w27R3uGbAMmQlhf5SNfq+YwmbOUHHsGIDcmxlS1UN+uj7dJMZvRQ+OP T+PQR03hbUqIEmYpPfVVSPNmQD+pl9DWCXueYOw8R1JipmPx+/rP60Dk27GGyqPMsubF fk7qD2OfyTTssbocrBbdH67XZjvCzsbb64WqnogNR0wvd+uUfHUqdgmRbX8rxfPSSwpC s23WZeltS9Sz+KnuxADl2lQeI3UITaD2oJlonx6gNtaZan7vdGVmIBgT0oGE3b53oSc/ GwHw== X-Gm-Message-State: ANoB5pmvxx3Vg32UknX+8pd+2Wly74FYsDtP3A726sPjXNpR3PKYB4i5 V22W0bGR8Z7NY1zrvdLKSpBs+0ppHWrl26DfbF8wWBxRGNzfyIOJceRvpTZd8zayrNxOoXaK+o4 At0fS4hfdLnnINT4OGPrNLQQUpzcX7TZGk1cIGaIGxewPNMqpGVW5cUcEKaHTmzwtYXE= X-Received: by 2002:a50:fb0a:0:b0:46a:878c:3325 with SMTP id d10-20020a50fb0a000000b0046a878c3325mr4757123edq.36.1670585114943; Fri, 09 Dec 2022 03:25:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf4lkuGTWyivoQVwwDPydsIFHgVUVdEMJCcwlCye64r2E9TcOasD9kFEdohPxYCEiNpdpDg6tQ== X-Received: by 2002:a50:fb0a:0:b0:46a:878c:3325 with SMTP id d10-20020a50fb0a000000b0046a878c3325mr4757110edq.36.1670585114584; Fri, 09 Dec 2022 03:25:14 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 17/30] configure: remove pkg-config functions Date: Fri, 9 Dec 2022 12:23:56 +0100 Message-Id: <20221209112409.184703-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585908841100005 Content-Type: text/plain; charset="utf-8" All uses of pkg-config have been moved to Meson. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 19 +++---------------- docs/devel/build-system.rst | 4 ---- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/configure b/configure index fb28dd3963bd..9c336203d8d9 100755 --- a/configure +++ b/configure @@ -365,11 +365,7 @@ smbd=3D"$SMBD" strip=3D"${STRIP-${cross_prefix}strip}" widl=3D"${WIDL-${cross_prefix}widl}" windres=3D"${WINDRES-${cross_prefix}windres}" -pkg_config_exe=3D"${PKG_CONFIG-${cross_prefix}pkg-config}" -query_pkg_config() { - "${pkg_config_exe}" ${QEMU_PKG_CONFIG_FLAGS} "$@" -} -pkg_config=3Dquery_pkg_config +pkg_config=3D"${PKG_CONFIG-${cross_prefix}pkg-config}" sdl2_config=3D"${SDL2_CONFIG-${cross_prefix}sdl2-config}" =20 # default flags for all hosts @@ -745,9 +741,7 @@ for opt do ;; --without-default-features) # processed above ;; - --static) - static=3D"yes" - QEMU_PKG_CONFIG_FLAGS=3D"--static $QEMU_PKG_CONFIG_FLAGS" + --static) static=3D"yes" ;; --bindir=3D*) bindir=3D"$optarg" ;; @@ -1419,13 +1413,6 @@ EOF fi fi =20 -########################################## -# pkg-config probe - -if ! has "$pkg_config_exe"; then - error_exit "pkg-config binary '$pkg_config_exe' not found" -fi - ########################################## # fdt probe =20 @@ -2423,7 +2410,7 @@ if test "$skip_meson" =3D no; then test -n "$objcc" && echo "objc =3D [$(meson_quote $objcc $CPU_CFLAGS)]" = >> $cross echo "ar =3D [$(meson_quote $ar)]" >> $cross echo "nm =3D [$(meson_quote $nm)]" >> $cross - echo "pkgconfig =3D [$(meson_quote $pkg_config_exe)]" >> $cross + echo "pkgconfig =3D [$(meson_quote $pkg_config)]" >> $cross echo "ranlib =3D [$(meson_quote $ranlib)]" >> $cross if has $sdl2_config; then echo "sdl2-config =3D [$(meson_quote $sdl2_config)]" >> $cross diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst index 9db18aff159e..66cfe7b8bdc8 100644 --- a/docs/devel/build-system.rst +++ b/docs/devel/build-system.rst @@ -103,10 +103,6 @@ developers in checking for system features: Print $MESSAGE to stderr, followed by $MORE... and then exit from the configure script with non-zero status =20 -``query_pkg_config $ARGS...`` - Run pkg-config passing it $ARGS. If QEMU is doing a static build, - then --static will be automatically added to $ARGS - =20 Stage 2: Meson =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585454; cv=none; d=zohomail.com; s=zohoarc; b=FTHoxh7W83noQXwVsu2X9QclZbX/Dk7xNxR8AyQoNMbuGH0IZyz3sGTEo+K69Y1kEA38LFTTtjXqgkW6G9s8nSUyM4D8isdMu9ivHU9T9XzdLBLqnuw9aiuI0t/i+UnMhbqNivNEAg0HG6kAdPwV1vk8JHC2AxcAqIshJstANcM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585454; h=Content-Type:Content-Transfer-Encoding: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=EyhopLFMyxkTH5IgcwEgCKlWTJOjEOoq7axQMQYBvrA=; b=KDWDflTQ/PqNROhz9V8tTeMS6Y4aTH7XBMic8+hE57rjl3ijrHLIpMSrHbCfPymAMvY1UIMfdcIHiHIE0uib7wW4w+Tp9Xn7V2bLQbLFb+42e0iRsBNkA0doTmGBy3OUHqjLSTlpMxtwzEIp5jmE3AKMHOFUt13M0H9FdA7ij8g= 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 1670585454279717.5713540637603; Fri, 9 Dec 2022 03:30:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bXB-0005sz-CX; Fri, 09 Dec 2022 06:27:20 -0500 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 1p3bVq-0004Sq-Cn for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:57 -0500 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 1p3bVl-0001LC-Sl for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:53 -0500 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_128_GCM_SHA256) id us-mta-532-R5ARWXgmP0G7EeAY4pOauQ-1; Fri, 09 Dec 2022 06:25:19 -0500 Received: by mail-ed1-f70.google.com with SMTP id s13-20020a056402520d00b0046c78433b54so1198513edd.16 for ; Fri, 09 Dec 2022 03:25:18 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id la5-20020a170907780500b007c0ae137404sm458340ejc.97.2022.12.09.03.25.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:25:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585120; 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=EyhopLFMyxkTH5IgcwEgCKlWTJOjEOoq7axQMQYBvrA=; b=hqqKu/QkoUSS2ZQtcki8rdFVXRLv5VU8nilJIrwTftrPpZ/MFm4Q9Ti5xw9eZmdvwBQtZI L5cWMBeFE+DtQcgeX7m3XaKmOoZuJaeEVo4wDDwDX11RDHFkfn9Xmfm7wmaNwYnNY+sqgY XA7YB1LrVjyWKWFr2ahCbSXlUT3LTq0= X-MC-Unique: R5ARWXgmP0G7EeAY4pOauQ-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EyhopLFMyxkTH5IgcwEgCKlWTJOjEOoq7axQMQYBvrA=; b=X0VbEHWLKTN/sm2dH19Takprw0WG9YDrDHn/6vJ1p+Q6OgsVraX7XNGABXtDoDpzXE ViDlKtWuXRP5E8DBf+MKrIhK1r+nHFKLaQafM0BosdKI1rWw7yMqQd5INNWAcC/+OJiu ZvLpmBPAFt4a5BiHu49lb98piQFa+GCbRhl6Az9sBk4xCdQHYaqZ32KwxYp4YNh6/2kg RaJ1WpZrrpC/vh2hHv3vw4oZba5azgpIQ03y2+oiyOZKKcDbX7m/ZkanFoz3BVrBd6zF pLKQLH/oz8GGXRaOEAS18KxtxeEHDkqTEZZ6djE0oiWUPoBJsHgFsLKcwZcijhEsSo4e Z7HQ== X-Gm-Message-State: ANoB5plzsq45VQu5FlAc/qKwTJUA6ZuxqjQJiFixtRytSMmcjnVIE5rU At5LzjHkULqLMQNkWzKrqpLzjNRxVGxLdbnmAR1cWHyzMC2+KhUqEP2U6Q9rzcMWcX9AEZGD8ZY nt/F8Wl7i5gE4yF9Nt/6Yavtl8Fy7s2RPaE085n0jkPas5VzWBasreHXWQ4BzSIYBEvg= X-Received: by 2002:a17:907:d18:b0:7ae:1438:5892 with SMTP id gn24-20020a1709070d1800b007ae14385892mr6757790ejc.36.1670585117557; Fri, 09 Dec 2022 03:25:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf5riUbPKTLrBlzs1RWkA24fWv4UfZ2nFH6Fs4sb9EDpj6IhoK3ktxgCvMlMR7WyY/l4fQE7xA== X-Received: by 2002:a17:907:d18:b0:7ae:1438:5892 with SMTP id gn24-20020a1709070d1800b007ae14385892mr6757764ejc.36.1670585117164; Fri, 09 Dec 2022 03:25:17 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 18/30] configure, meson: move --enable-modules to Meson Date: Fri, 9 Dec 2022 12:23:57 +0100 Message-Id: <20221209112409.184703-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585456216100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 21 +-------------------- meson.build | 7 ++++++- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 12 insertions(+), 21 deletions(-) diff --git a/configure b/configure index 9c336203d8d9..26d10aeffd82 100755 --- a/configure +++ b/configure @@ -273,7 +273,6 @@ sanitizers=3D"no" tsan=3D"no" fortify_source=3D"yes" EXESUF=3D"" -modules=3D"no" prefix=3D"/usr/local" qemu_suffix=3D"qemu" softmmu=3D"yes" @@ -705,12 +704,6 @@ for opt do ;; --disable-debug-info) meson_option_add -Ddebug=3Dfalse ;; - --enable-modules) - modules=3D"yes" - ;; - --disable-modules) - modules=3D"no" - ;; --cpu=3D*) ;; --target-list=3D*) target_list=3D"$optarg" @@ -1001,7 +994,6 @@ cat << EOF linux-user all linux usermode emulation targets bsd-user all BSD usermode emulation targets pie Position Independent Executables - modules modules support (non-Windows) debug-tcg TCG debugging (default is disabled) debug-info debugging information safe-stack SafeStack Stack Smash Protection. Depends on @@ -1260,16 +1252,8 @@ else QEMU_CFLAGS=3D"$QEMU_CFLAGS -Wno-missing-braces" fi =20 -# Our module code doesn't support Windows -if test "$modules" =3D "yes" && test "$mingw32" =3D "yes" ; then - error_exit "Modules are not available for Windows" -fi - -# Static linking is not possible with plugins, modules or PIE +# Resolve default for --enable-plugins if test "$static" =3D "yes" ; then - if test "$modules" =3D "yes" ; then - error_exit "static and modules are mutually incompatible" - fi if test "$plugins" =3D "yes"; then error_exit "static and plugins are mutually incompatible" else @@ -2229,9 +2213,6 @@ if test "$solaris" =3D "yes" ; then fi echo "SRC_PATH=3D$source_path" >> $config_host_mak echo "TARGET_DIRS=3D$target_list" >> $config_host_mak -if test "$modules" =3D "yes"; then - echo "CONFIG_MODULES=3Dy" >> $config_host_mak -fi =20 # XXX: suppress that if [ "$bsd" =3D "yes" ] ; then diff --git a/meson.build b/meson.build index f63ab7f83bed..99c1bde4d154 100644 --- a/meson.build +++ b/meson.build @@ -16,7 +16,6 @@ fs =3D import('fs') =20 sh =3D find_program('sh') config_host =3D keyval.load(meson.current_build_dir() / 'config-host.mak') -enable_modules =3D 'CONFIG_MODULES' in config_host targetos =3D host_machine.system() =20 cc =3D meson.get_compiler('c') @@ -84,6 +83,12 @@ have_ga =3D get_option('guest_agent') \ .require(targetos in ['sunos', 'linux', 'windows', 'freebsd'], error_message: 'unsupported OS for QEMU guest agent') \ .allowed() +enable_modules =3D get_option('modules') \ + .require(targetos !=3D 'windows', + error_message: 'Modules are not available for Windows') \ + .require(not get_option('prefer_static'), + error_message: 'Modules are incompatible with static linking') \ + .allowed() have_block =3D have_system or have_tools =20 python =3D import('python').find_installation() diff --git a/meson_options.txt b/meson_options.txt index 4b749ca54900..e492aaa73fbc 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -44,6 +44,8 @@ option('fuzzing', type : 'boolean', value: false, description: 'build fuzzing targets') option('gettext', type : 'feature', value : 'auto', description: 'Localization of the GTK+ user interface') +option('modules', type : 'feature', value : 'disabled', + description: 'modules support (non Windows)') option('module_upgrades', type : 'boolean', value : false, description: 'try to load modules from alternate paths for upgrades= ') option('install_blobs', type : 'boolean', value : true, diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index aa6e30ea911e..f91797741eef 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -119,6 +119,7 @@ meson_options_help() { printf "%s\n" ' lzo lzo compression support' printf "%s\n" ' malloc-trim enable libc malloc_trim() for memory op= timization' printf "%s\n" ' membarrier membarrier system call (for Linux 4.14+= or Windows' + printf "%s\n" ' modules modules support (non Windows)' printf "%s\n" ' mpath Multipath persistent reservation passth= rough' printf "%s\n" ' multiprocess Out of process device emulation support' printf "%s\n" ' netmap netmap network backend support' @@ -338,6 +339,8 @@ _meson_option_parse() { --disable-membarrier) printf "%s" -Dmembarrier=3Ddisabled ;; --enable-module-upgrades) printf "%s" -Dmodule_upgrades=3Dtrue ;; --disable-module-upgrades) printf "%s" -Dmodule_upgrades=3Dfalse ;; + --enable-modules) printf "%s" -Dmodules=3Denabled ;; + --disable-modules) printf "%s" -Dmodules=3Ddisabled ;; --enable-mpath) printf "%s" -Dmpath=3Denabled ;; --disable-mpath) printf "%s" -Dmpath=3Ddisabled ;; --enable-multiprocess) printf "%s" -Dmultiprocess=3Denabled ;; --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585521; cv=none; d=zohomail.com; s=zohoarc; b=hlWL4FX+uf7lRmJb02CQcID8joHhCfjLOa4fiGhcULvlYZeuVoPiuPxLNVDpgCqiNpVNcEOaXlbRynXd6fJ88zCHav2kq45SzvaBGbBZAt9p6sX5rU5AhdbLuek29ReSZY+CFC/ixEexrBW/2EmHVKDk8GPqAf4edHTn9xRhQ8s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585521; h=Content-Type:Content-Transfer-Encoding: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=OKffBOnQ3NCwm5mK91PnkEuN7WOMVA1WCIp8ukU17gM=; b=WUPhjEZjNf0DhwAttJzEMOwyP5rmANbqqC97y/RSSihf/h+NI+Bt6Gz/IjSiRivb83keZhR+F9KwpHPRrNzXqYuz4NkRSN9J5EPWpm2qeEFSA7gFqPpcVTxH9Z9BhmxFt0WbheQTQLaRPl0SnR+wPQHMO1JlobZnHHjVnVuzIfE= 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 1670585521070282.12723953677107; Fri, 9 Dec 2022 03:32:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bXi-0006TJ-Uk; Fri, 09 Dec 2022 06:27:50 -0500 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 1p3bVy-0004X5-1h for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:26:03 -0500 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 1p3bVp-0001Oa-Sx for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:26:01 -0500 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_128_GCM_SHA256) id us-mta-556-o6wO_WBFO5C9rMUXTzUXPw-1; Fri, 09 Dec 2022 06:25:21 -0500 Received: by mail-ej1-f71.google.com with SMTP id qw20-20020a1709066a1400b007af13652c92so2951867ejc.20 for ; Fri, 09 Dec 2022 03:25:21 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id er18-20020a056402449200b004588ef795easm524492edb.34.2022.12.09.03.25.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:25:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585123; 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=OKffBOnQ3NCwm5mK91PnkEuN7WOMVA1WCIp8ukU17gM=; b=Mwr5Om6wZ8h4/NPh8NaoBmM9qyhyUV8LTR2yg46DuhJxU/VjrDsvw0guAgn5/BJ6fdCdXU gUQPnhnKgWVdii+mfFCenyXs5i0QVZp63D7411y1whtdTqtw6IsjSvjxewLdhlNH6t1ulv 5JR1TS6ou79o1QvGHIOqj9xRlNJEmKs= X-MC-Unique: o6wO_WBFO5C9rMUXTzUXPw-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OKffBOnQ3NCwm5mK91PnkEuN7WOMVA1WCIp8ukU17gM=; b=mIPeBbPaEy8rE8mT4Po+4WLYRsNsTv4OF57EqUJrIcE4XcvwhthkJWRUgyFn2JyjNV xm4ZXekFq1N/8BbqamUKKJhNKMnFxzDowgLulATd0EhQF/qiz7GmZ8FTvg/N+Iuz6TYT Om/ezCz4ws6Dk3/Z/0sXnEpqAkPiU960/RM2TxgWqAqJGz66ART7SGSnLP5VsnkwpYuX X0fJc48Xbl84ZFeV84G2DKk9MC2TQwgLsBqVwiurmf90gtWEDAFSttOBQG4L41Y6ewya Io7mvhSpwjp7hvAKppBDAvN6HG+HL0XKcYq+s2YKdP8pJ4LaLylLFbYyO5mE4d9ibj/b X+QQ== X-Gm-Message-State: ANoB5pnmT1nv8AL+VObAWrjoUP0eMIaH87xje+Io/Vbc0UW1rRDymdRU 4FQFzmYHPYxcKHHgdpxlb9ikNE7Sg37dvsK9mykjmww3Rh7CqRxnTbq7nC/qtX+NK9V6ekg0GMt nUSE4ELApRZVjJxQCEPX30MI0jjFfwkxxbzhIhFcMJ03btLJW3wjHECbY4cS+J+t50bA= X-Received: by 2002:a17:906:9d9f:b0:7c0:f90e:e5b6 with SMTP id fq31-20020a1709069d9f00b007c0f90ee5b6mr3738652ejc.31.1670585120464; Fri, 09 Dec 2022 03:25:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf5fLbJbYKcpdIUaMe2hQVEcC3YHp6wRO5jvkomxA32e+99/fpzbTV3BuxbQPk7kCSSOxmnHmg== X-Received: by 2002:a17:906:9d9f:b0:7c0:f90e:e5b6 with SMTP id fq31-20020a1709069d9f00b007c0f90ee5b6mr3738637ejc.31.1670585120080; Fri, 09 Dec 2022 03:25:20 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 19/30] configure, meson: move --enable-debug-info to Meson Date: Fri, 9 Dec 2022 12:23:58 +0100 Message-Id: <20221209112409.184703-20-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585522598100001 Content-Type: text/plain; charset="utf-8" Older versions of Meson had an unclear description of the -Ddebug option, but this is fixed in 0.63.0 that is required now. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 --- configure | 5 ----- scripts/meson-buildoptions.py | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 26d10aeffd82..b0df6c3cf754 100755 --- a/configure +++ b/configure @@ -700,10 +700,6 @@ for opt do ;; --cross-prefix-*) ;; - --enable-debug-info) meson_option_add -Ddebug=3Dtrue - ;; - --disable-debug-info) meson_option_add -Ddebug=3Dfalse - ;; --cpu=3D*) ;; --target-list=3D*) target_list=3D"$optarg" @@ -995,7 +991,6 @@ cat << EOF bsd-user all BSD usermode emulation targets pie Position Independent Executables debug-tcg TCG debugging (default is disabled) - debug-info debugging information safe-stack SafeStack Stack Smash Protection. Depends on clang/llvm >=3D 3.7 and requires coroutine backend ucont= ext. =20 diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 3e2b4785388f..8e4e5c4e8bd6 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -35,6 +35,7 @@ OPTION_NAMES =3D { "b_coverage": "gcov", "b_lto": "lto", + "debug": "debug-info", "malloc": "enable-malloc", "pkgversion": "with-pkgversion", "qemu_firmwarepath": "firmwarepath", @@ -45,6 +46,7 @@ BUILTIN_OPTIONS =3D { "b_coverage", "b_lto", + "debug", "datadir", "includedir", "libdir", diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index f91797741eef..cb277347bb18 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -10,6 +10,7 @@ meson_options_help() { printf "%s\n" ' affects only QEMU, not tools l= ike qemu-img)' printf "%s\n" ' --datadir=3DVALUE Data file directory [share]' printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better per= formance)' + printf "%s\n" ' --disable-debug-info Enable debug symbols and other= information' printf "%s\n" ' --disable-install-blobs install provided firmware blob= s' printf "%s\n" ' --docdir=3DVALUE Base directory for documenta= tion installation' printf "%s\n" ' (can be empty) [share/doc]' @@ -242,6 +243,8 @@ _meson_option_parse() { --datadir=3D*) quote_sh "-Ddatadir=3D$2" ;; --enable-dbus-display) printf "%s" -Ddbus_display=3Denabled ;; --disable-dbus-display) printf "%s" -Ddbus_display=3Ddisabled ;; + --enable-debug-info) printf "%s" -Ddebug=3Dtrue ;; + --disable-debug-info) printf "%s" -Ddebug=3Dfalse ;; --enable-debug-mutex) printf "%s" -Ddebug_mutex=3Dtrue ;; --disable-debug-mutex) printf "%s" -Ddebug_mutex=3Dfalse ;; --enable-debug-stack-usage) printf "%s" -Ddebug_stack_usage=3Dtrue ;; --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585910; cv=none; d=zohomail.com; s=zohoarc; b=lpLhGotnCZNq92F9iVDTnPj+28VnSiZoo7hvr1By3VisCPKwfCSsioYkEAApGI8yYt9mfSOp6HxHd6SlrYvm84ZbY5h2iljI+QodRfErAuWM6d8Kp+sERnZCVygtk7UamoyS8lYN/pIzizPUK5wOa8HqQEX+0W3KeWEnoT/X+OA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585910; h=Content-Type:Content-Transfer-Encoding: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=pR26OFOoy6QKEyt1tQyJHyljdRra3eCvOh/6b4sB30I=; b=kRS4uR/ra0z+h9/KK0C1W9ozEDnodSHGy+vwOhzu3yrAbw5Rp/STQ9maX65Q5sB8X7mB6ODCLt0YbbuKHNq3ewNj2H7s247/b/mC2o0twi4qb7cKAyYPcfoUIPd+xccQpj6E+ienCvl2vx2Ge2anfzcWQbHKeSp5LDTGhhCXSHw= 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 1670585910233473.9166851020881; Fri, 9 Dec 2022 03:38:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bXG-0005xQ-5x; Fri, 09 Dec 2022 06:27:22 -0500 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 1p3bVm-0004SH-Em for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:55 -0500 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 1p3bVU-0001Qe-Gp for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:49 -0500 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-352-eS_KCv_oMOuB_tcmctgXKg-1; Fri, 09 Dec 2022 06:25:25 -0500 Received: by mail-ed1-f71.google.com with SMTP id x20-20020a05640226d400b0046cbe2b85caso1206410edd.3 for ; Fri, 09 Dec 2022 03:25:24 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id 17-20020a170906211100b0073d71792c8dsm434522ejt.180.2022.12.09.03.25.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:25:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585126; 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=pR26OFOoy6QKEyt1tQyJHyljdRra3eCvOh/6b4sB30I=; b=Ms/RJHvzCNdi9+1zmi+RoHZ9gTnrx/ku2RrZ7shZP3xmQqx9jnG20Y/Bi2K9kvCZXPJ3eW J36Y+vZSL6Kwcmdk/ANzWaaasYsTC6qkBWOX3HDJ8XH0gvbwYwkH5+4cNqXfT3FRxfindI EN+ISyctjQQbFvHsdiF/tVHtVu75vUQ= X-MC-Unique: eS_KCv_oMOuB_tcmctgXKg-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pR26OFOoy6QKEyt1tQyJHyljdRra3eCvOh/6b4sB30I=; b=UVCzWJ3zQqcbyM875buYBcod5q/LrTBQW4meudQK3khpRcSb7JKeu+OMiuIlLqEw2P mUTHuINAwShT/LXLKjFopnTiMr+E3jAYwNaeGjMQqcWX2RsIea0O5XZytdM9nkSZjxAT qhrlpfdSTJSbJtmdVIBaZ76nA/wcWmM2pR1YdZ1Gflxe6WYz4b/wqQKAL+X8+rV43dtC Ce3AHdVj/ui+OiAsszuOAp7s643kQB2mQBenwuqSu9VCRgaAYp3SSSxqo695R3o/X3SY tAMpVk0HzMcbhbafufKobXj3Km16hbDRWZlcZUntrnKTpACoBbIJa9DXF+V9RzdTydTI AmnA== X-Gm-Message-State: ANoB5pnVSgDZrcnUfjBLh7lmOXRBFSL7qzKtDrhbAbAEAaTQVLeYcf5L FZSzIUv9+stq9y2qSsaxQJFfP7nZuY7fdHOSn0dWfW5SItg20dV5AFX99StozBB9TncbKgQEuIJ xBai7EJzXADkltoq0nib1vyc80AmRoMtDgcpuWLKNAPOmXQSBKuzkxCsvdQhZ4vvz/7U= X-Received: by 2002:a17:907:3e91:b0:7c1:13b5:c434 with SMTP id hs17-20020a1709073e9100b007c113b5c434mr7128924ejc.35.1670585123586; Fri, 09 Dec 2022 03:25:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf5SIPZST8b0DzEQ+7k2Zp/FUmA/QDhn5mthLOmEOCR/T9zehUQvUqFFhAhG46mWwl6eoUkbXw== X-Received: by 2002:a17:907:3e91:b0:7c1:13b5:c434 with SMTP id hs17-20020a1709073e9100b007c113b5c434mr7128897ejc.35.1670585123227; Fri, 09 Dec 2022 03:25:23 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 20/30] meson: prepare move of QEMU_CFLAGS to meson Date: Fri, 9 Dec 2022 12:23:59 +0100 Message-Id: <20221209112409.184703-21-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585910800100010 Content-Type: text/plain; charset="utf-8" Clean up the handling of compiler flags in meson.build, splitting the general flags that should be included in subprojects as well, from warning flags that only apply to QEMU itself. The two were mixed in both configure tests and meson tests. This split makes it easier to move the compiler tests piecewise from configure to Meson. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- meson.build | 53 +++++++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/meson.build b/meson.build index 99c1bde4d154..dac343d14797 100644 --- a/meson.build +++ b/meson.build @@ -190,10 +190,23 @@ endif # Compiler flags # ################## =20 -qemu_cflags =3D config_host['QEMU_CFLAGS'].split() +qemu_common_flags =3D [] +qemu_cflags =3D [] +foreach arg : config_host['QEMU_CFLAGS'].split() + if arg.startswith('-W') + qemu_cflags +=3D arg + else + qemu_common_flags +=3D arg + endif +endforeach qemu_objcflags =3D config_host['QEMU_OBJCFLAGS'].split() qemu_ldflags =3D config_host['QEMU_LDFLAGS'].split() =20 +if get_option('gprof') + qemu_common_flags +=3D ['-p'] + qemu_ldflags +=3D ['-p'] +endif + if get_option('prefer_static') qemu_ldflags +=3D get_option('b_pie') ? '-static-pie' : '-static' endif @@ -207,10 +220,9 @@ if targetos =3D=3D 'windows' qemu_ldflags +=3D cc.get_supported_link_arguments('-Wl,--dynamicbase', '= -Wl,--high-entropy-va') endif =20 -if get_option('gprof') - qemu_cflags +=3D ['-p'] - qemu_objcflags +=3D ['-p'] - qemu_ldflags +=3D ['-p'] +# 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 cc.get_supported_link_arguments('-Wl,--warn-common') endif =20 # Specify linker-script with add_project_link_arguments so that it is not = placed @@ -230,8 +242,7 @@ if get_option('fuzzing') name: '-fsanitize-coverage-allowlist=3D/dev/null', args: ['-fsanitize-coverage-allowlist=3D/dev/null', '-fsanitize-coverage=3Dtrace-pc'] ) - add_global_arguments('-fsanitize-coverage-allowlist=3Dinstrumentation-= filter', - native: false, language: all_languages) + qemu_common_flags +=3D ['-fsanitize-coverage-allowlist=3Dinstrumentati= on-filter'] endif =20 if get_option('fuzzing_engine') =3D=3D '' @@ -239,10 +250,8 @@ if get_option('fuzzing') # compiled code. To build non-fuzzer binaries with --enable-fuzzing, = link # everything with fsanitize=3Dfuzzer-no-link. Otherwise, the linker wi= ll be # unable to bind the fuzzer-related callbacks added by instrumentation. - add_global_arguments('-fsanitize=3Dfuzzer-no-link', - native: false, language: all_languages) - add_global_link_arguments('-fsanitize=3Dfuzzer-no-link', - native: false, language: all_languages) + qemu_common_flags +=3D ['-fsanitize=3Dfuzzer-no-link'] + qemu_ldflags +=3D ['-fsanitize=3Dfuzzer-no-link'] # For the actual fuzzer binaries, we need to link against the libfuzzer # library. They need to be configurable, to support OSS-Fuzz fuzz_exe_ldflags =3D ['-fsanitize=3Dfuzzer'] @@ -253,6 +262,9 @@ if get_option('fuzzing') endif endif =20 +add_global_arguments(qemu_common_flags, native: false, language: all_langu= ages) +add_global_link_arguments(qemu_ldflags, native: false, language: all_langu= ages) + # Check that the C++ compiler exists and works with the C compiler. link_language =3D 'c' linker =3D cc @@ -276,16 +288,9 @@ if 'cpp' in all_languages 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: all_langu= ages) - -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') +add_project_arguments(qemu_cflags, native: false, language: 'c') +add_project_arguments(qemu_cxxflags, native: false, language: 'cpp') +add_project_arguments(qemu_objcflags, native: false, language: 'objc') if targetos =3D=3D 'linux' add_project_arguments('-isystem', meson.current_source_dir() / 'linux-he= aders', '-isystem', 'linux-headers', @@ -3778,12 +3783,12 @@ link_args =3D get_option(link_language + '_link_arg= s') if link_args.length() > 0 summary_info +=3D {'LDFLAGS': ' '.join(link_args)} endif -summary_info +=3D {'QEMU_CFLAGS': ' '.join(qemu_cflags)} +summary_info +=3D {'QEMU_CFLAGS': ' '.join(qemu_common_flags + qemu_= cflags)} if 'cpp' in all_languages - summary_info +=3D {'QEMU_CXXFLAGS': ' '.join(qemu_cxxflags)} + summary_info +=3D {'QEMU_CXXFLAGS': ' '.join(qemu_common_flags + qem= u_cxxflags)} endif if 'objc' in all_languages - summary_info +=3D {'QEMU_OBJCFLAGS': ' '.join(qemu_objcflags)} + summary_info +=3D {'QEMU_OBJCFLAGS': ' '.join(qemu_common_flags + qem= u_objcflags)} endif summary_info +=3D {'QEMU_LDFLAGS': ' '.join(qemu_ldflags)} summary_info +=3D {'profiler': get_option('profiler')} --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585908; cv=none; d=zohomail.com; s=zohoarc; b=h4aHy9nyRTkx8/JEWPcMfdpw86Q1TS9TuGSZXEAN9s6swpd+3w4FrwggP1NAoPFaDU02WlZX7O5WaJYRdln8lp+nnrK4fYIco50lJltOkkgF75XTe8WfbQ6ZzOy292/5xPhGcM2AICq+cXVa5gDbFFjf7zH4H5lhh+ht7pxwSy8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585908; h=Content-Type:Content-Transfer-Encoding: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=mOwX9wpZTs+zF4AW3wtB/CLmwtvj3wE48v6r8TJJLJ8=; b=U9IxsznlRQtgOzBV5OecGPhrgB8Kph9INNMzYF1mXxvTlC+/yD90WM8nEwkTg1i3VMRZVEnfvJ/ZyGsjEh6dq5VWD7vvtac4bjyVueH1U/wQifiBl9lteXJ0Fkh2IZNhjuh6wpLYga1wqcc10cRlAXTHZAm1g5th3dn9GHBsF7U= 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 1670585908395686.2146868440047; Fri, 9 Dec 2022 03:38:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bX6-0005qs-4Q; Fri, 09 Dec 2022 06:27:12 -0500 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 1p3bVo-0004Sa-BI for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:57 -0500 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 1p3bVe-0001UB-Aw for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:50 -0500 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_128_GCM_SHA256) id us-mta-643-ZJZLlkWPOSa8c08eGFilew-1; Fri, 09 Dec 2022 06:25:28 -0500 Received: by mail-ej1-f71.google.com with SMTP id nc4-20020a1709071c0400b0078a5ceb571bso2907437ejc.4 for ; Fri, 09 Dec 2022 03:25:28 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id r17-20020a1709061bb100b0073d7b876621sm432648ejg.205.2022.12.09.03.25.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:25:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585129; 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=mOwX9wpZTs+zF4AW3wtB/CLmwtvj3wE48v6r8TJJLJ8=; b=RP+e/6uwX+0eKqNZiewScoRFNVXLqgi+dq9UcU89y0QhSl7MdjMrfFrFUVQJgedkr+/wqA Z/CleZWw3Mx7ASuGdUsD/lrK4Or8C6NWkQSMTGyFowHoKqdf378ulT62bU0NbKV14FTGIT 9Q6vM3ep4wDK3AGgInmFkByCMfWZjfY= X-MC-Unique: ZJZLlkWPOSa8c08eGFilew-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mOwX9wpZTs+zF4AW3wtB/CLmwtvj3wE48v6r8TJJLJ8=; b=23UjmZiD+bKru7A8MSyla6NZG2Fox6dOVww0iOD1LAJ6KA4ZOI/Y+aFRV4wbCi4MZL wjYrCIxHzvGrrpIp+I9oIUD3M68fYeUcj2L2bflg9VD0zAyzK2Y/WCBCgxJxCRiEcjgu uXYngI0O10Td1lzTaA0EDtOKA8oHl37UcAA2ZBK+S9nn84Q9syx2XXqWxgj1nWiYMUIG QHkREbUijGw52HKUf0lFkF0eKVHqY7u+uyu63LCNBkMiCX9SjZWHlKil0o8zIGvU4J58 oNlAWP+GsCjAu25amGlAD89NpfLxqNAYDEjgqUQxqSiC6MgOSfUfM9IwrE2HgSzTbxm2 gqFw== X-Gm-Message-State: ANoB5plaxIh0ppYVdVxq/J0x33lylsMZhoSWYtr9prlb3Z7HPi9YaSWB EeestxSiNxV+TYIRjCExygAEsidGmNmorTtqJ8EaR0/gi6K1viqJE2V6wZ1+XH9iRfQE+XL++4e Ub/OMhCMKvyx3MoU94udSdO5kt6+DrfP01fVKuePW5pqTrNG5B19uIZbf5SNOuKythak= X-Received: by 2002:a17:906:5a54:b0:7c0:eba2:f9dd with SMTP id my20-20020a1709065a5400b007c0eba2f9ddmr4880491ejc.53.1670585127058; Fri, 09 Dec 2022 03:25:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf5z9I8zUmdsLRU6ceffCKNPOAopwLHZmYB558+XpQQ9PP4V1C28p74OCpi2YGQU6lGYm4DNBQ== X-Received: by 2002:a17:906:5a54:b0:7c0:eba2:f9dd with SMTP id my20-20020a1709065a5400b007c0eba2f9ddmr4880470ejc.53.1670585126433; Fri, 09 Dec 2022 03:25:26 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 21/30] build: move sanitizer tests to meson Date: Fri, 9 Dec 2022 12:24:00 +0100 Message-Id: <20221209112409.184703-22-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585908882100007 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- configure | 151 --------------------------------- docs/devel/build-system.rst | 4 - meson.build | 63 +++++++++++++- meson_options.txt | 4 + scripts/meson-buildoptions.sh | 6 ++ tests/qemu-iotests/meson.build | 2 +- tests/unit/meson.build | 2 +- 7 files changed, 73 insertions(+), 159 deletions(-) diff --git a/configure b/configure index b0df6c3cf754..babcf5d28a85 100755 --- a/configure +++ b/configure @@ -269,9 +269,6 @@ EXTRA_OBJCFLAGS=3D"" EXTRA_LDFLAGS=3D"" =20 debug_tcg=3D"no" -sanitizers=3D"no" -tsan=3D"no" -fortify_source=3D"yes" EXESUF=3D"" prefix=3D"/usr/local" qemu_suffix=3D"qemu" @@ -392,14 +389,6 @@ EOF compile_object } =20 -check_include() { -cat > $TMPC < -int main(void) { return 0; } -EOF - compile_object -} - write_c_skeleton() { cat > $TMPC < /dev/null 2>&1 ; then - fortify_source=3D"no"; - elif test -n "$cxx" && has $cxx && - echo | $cxx -dM -E - | grep __clang__ >/dev/null 2>&1 ; then - fortify_source=3D"no"; - else - fortify_source=3D"yes" - fi -fi - -########################################## -# checks for sanitizers - -have_asan=3Dno -have_ubsan=3Dno -have_asan_iface_h=3Dno -have_asan_iface_fiber=3Dno - -if test "$sanitizers" =3D "yes" ; then - write_c_skeleton - if compile_prog "$CPU_CFLAGS -Werror -fsanitize=3Daddress" ""; then - have_asan=3Dyes - fi - - # we could use a simple skeleton for flags checks, but this also - # detect the static linking issue of ubsan, see also: - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D84285 - cat > $TMPC << EOF -#include -int main(void) { - void *tmp =3D malloc(10); - if (tmp !=3D NULL) { - return *(int *)(tmp + 2); - } - return 1; -} -EOF - if compile_prog "$CPU_CFLAGS -Werror -fsanitize=3Dundefined" ""; then - have_ubsan=3Dyes - fi - - if check_include "sanitizer/asan_interface.h" ; then - have_asan_iface_h=3Dyes - fi - - cat > $TMPC << EOF -#include -int main(void) { - __sanitizer_start_switch_fiber(0, 0, 0); - return 0; -} -EOF - if compile_prog "$CPU_CFLAGS -Werror -fsanitize=3Daddress" "" ; then - have_asan_iface_fiber=3Dyes - fi -fi - -# Thread sanitizer is, for now, much noisier than the other sanitizers; -# keep it separate until that is not the case. -if test "$tsan" =3D "yes" && test "$sanitizers" =3D "yes"; then - error_exit "TSAN is not supported with other sanitiziers." -fi -have_tsan=3Dno -have_tsan_iface_fiber=3Dno -if test "$tsan" =3D "yes" ; then - write_c_skeleton - if compile_prog "$CPU_CFLAGS -Werror -fsanitize=3Dthread" "" ; then - have_tsan=3Dyes - fi - cat > $TMPC << EOF -#include -int main(void) { - __tsan_create_fiber(0); - return 0; -} -EOF - if compile_prog "$CPU_CFLAGS -Werror -fsanitize=3Dthread" "" ; then - have_tsan_iface_fiber=3Dyes - fi -fi - ########################################## # functions to probe cross compilers =20 @@ -2057,42 +1950,6 @@ case "$vfio_user_server" in ;; esac =20 -########################################## -# End of CC checks -# After here, no more $cc or $ld runs - -write_c_skeleton - -if test "$fortify_source" =3D "yes" ; then - QEMU_CFLAGS=3D"-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3D2 $QEMU_CFLAGS" -fi - -if test "$have_asan" =3D "yes"; then - QEMU_CFLAGS=3D"-fsanitize=3Daddress $QEMU_CFLAGS" - QEMU_LDFLAGS=3D"-fsanitize=3Daddress $QEMU_LDFLAGS" - if test "$have_asan_iface_h" =3D "no" ; then - echo "ASAN build enabled, but ASAN header missing." \ - "Without code annotation, the report may be inferior." - elif test "$have_asan_iface_fiber" =3D "no" ; then - echo "ASAN build enabled, but ASAN header is too old." \ - "Without code annotation, the report may be inferior." - fi -fi -if test "$have_tsan" =3D "yes" ; then - if test "$have_tsan_iface_fiber" =3D "yes" ; then - QEMU_CFLAGS=3D"-fsanitize=3Dthread $QEMU_CFLAGS" - QEMU_LDFLAGS=3D"-fsanitize=3Dthread $QEMU_LDFLAGS" - else - error_exit "Cannot enable TSAN due to missing fiber annotation interfa= ce." - fi -elif test "$tsan" =3D "yes" ; then - error_exit "Cannot enable TSAN due to missing sanitize thread interface." -fi -if test "$have_ubsan" =3D "yes"; then - QEMU_CFLAGS=3D"-fsanitize=3Dundefined $QEMU_CFLAGS" - QEMU_LDFLAGS=3D"-fsanitize=3Dundefined $QEMU_LDFLAGS" -fi - ####################################### # cross-compiled firmware targets =20 @@ -2216,14 +2073,6 @@ fi =20 echo "CONFIG_COROUTINE_BACKEND=3D$coroutine" >> $config_host_mak =20 -if test "$have_asan_iface_fiber" =3D "yes" ; then - echo "CONFIG_ASAN_IFACE_FIBER=3Dy" >> $config_host_mak -fi - -if test "$have_tsan" =3D "yes" && test "$have_tsan_iface_fiber" =3D "yes" = ; then - echo "CONFIG_TSAN=3Dy" >> $config_host_mak -fi - if test "$plugins" =3D "yes" ; then echo "CONFIG_PLUGIN=3Dy" >> $config_host_mak fi diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst index 66cfe7b8bdc8..4a733fc0a747 100644 --- a/docs/devel/build-system.rst +++ b/docs/devel/build-system.rst @@ -91,10 +91,6 @@ developers in checking for system features: ``check_define $NAME`` Determine if the macro $NAME is defined by the system C compiler =20 -``check_include $NAME`` - Determine if the include $NAME file is available to the system C - compiler. The replacement in Meson is ``cc.has_header()``. - ``write_c_skeleton`` Write a minimal C program main() function to the temporary file indicated by $TMPC diff --git a/meson.build b/meson.build index dac343d14797..41a45fa495b2 100644 --- a/meson.build +++ b/meson.build @@ -211,6 +211,42 @@ if get_option('prefer_static') qemu_ldflags +=3D get_option('b_pie') ? '-static-pie' : '-static' endif =20 +if get_option('sanitizers') + if cc.has_argument('-fsanitize=3Daddress') + qemu_cflags =3D ['-fsanitize=3Daddress'] + qemu_cflags + qemu_ldflags =3D ['-fsanitize=3Daddress'] + qemu_ldflags + endif + + # Detect static linking issue with ubsan - https://gcc.gnu.org/bugzilla/= show_bug.cgi?id=3D84285 + if cc.links(''' + #include + int main(void) { + void *tmp =3D malloc(10); + if (tmp !=3D NULL) { + return *(int *)(tmp + 2); + } + return 1; + }''', args: [qemu_ldflags, '-fsanitize=3Dundefined']) + qemu_cflags =3D ['-fsanitize=3Dundefined'] + qemu_cflags + qemu_ldflags =3D ['-fsanitize=3Dundefined'] + qemu_ldflags + endif +endif + +# Thread sanitizer is, for now, much noisier than the other sanitizers; +# keep it separate until that is not the case. +if get_option('tsan') + if get_option('sanitizers') + error('TSAN is not supported with other sanitizers') + endif + if not cc.has_function('__tsan_create_fiber', + args: '-fsanitize=3Dthread', + prefix: '#include ') + error('Cannot enable TSAN due to missing fiber annotation interface') + endif + qemu_cflags =3D ['-fsanitize=3Dthread'] + qemu_cflags + qemu_ldflags =3D ['-fsanitize=3Dthread'] + qemu_ldflags +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') @@ -221,7 +257,7 @@ if targetos =3D=3D 'windows' 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') +if targetos !=3D 'sunos' and not get_option('tsan') qemu_ldflags +=3D cc.get_supported_link_arguments('-Wl,--warn-common') endif =20 @@ -288,6 +324,16 @@ if 'cpp' in all_languages endif endif =20 +# clang does not support glibc + FORTIFY_SOURCE (is it still true?) +if get_option('optimization') !=3D '0' and targetos =3D=3D 'linux' + if cc.get_id() =3D=3D 'gcc' + qemu_cflags +=3D ['-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=3D2'] + endif + if 'cpp' in all_languages and cxx.get_id() =3D=3D 'gcc' + qemu_cxxflags +=3D ['-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=3D2'] + endif +endif + add_project_arguments(qemu_cflags, native: false, language: 'c') add_project_arguments(qemu_cxxflags, native: false, language: 'cpp') add_project_arguments(qemu_objcflags, native: false, language: 'objc') @@ -1890,6 +1936,7 @@ if seccomp.found() endif config_host_data.set('CONFIG_SNAPPY', snappy.found()) config_host_data.set('CONFIG_TPM', have_tpm) +config_host_data.set('CONFIG_TSAN', get_option('tsan')) config_host_data.set('CONFIG_USB_LIBUSB', libusb.found()) config_host_data.set('CONFIG_VDE', vde.found()) config_host_data.set('CONFIG_VHOST_NET', have_vhost_net) @@ -2018,6 +2065,18 @@ if rdma.found() prefix: '#include ')) endif =20 +have_asan_fiber =3D false +if get_option('sanitizers') and \ + not cc.has_function('__sanitizer_start_switch_fiber', + args: '-fsanitize=3Daddress', + prefix: '#include ') + warning('Missing ASAN due to missing fiber annotation interface') + warning('Without code annotation, the report may be inferior.') +else + have_asan_fiber =3D true +endif +config_host_data.set('CONFIG_ASAN_IFACE_FIBER', have_asan_fiber) + # has_header_symbol config_host_data.set('CONFIG_BYTESWAP_H', cc.has_header_symbol('byteswap.h', 'bswap_32')) @@ -3804,7 +3863,7 @@ summary_info +=3D {'avx2 optimization': config_host_d= ata.get('CONFIG_AVX2_OPT')} summary_info +=3D {'avx512f optimization': config_host_data.get('CONFIG_AV= X512F_OPT')} summary_info +=3D {'gprof enabled': get_option('gprof')} summary_info +=3D {'gcov': get_option('b_coverage')} -summary_info +=3D {'thread sanitizer': config_host.has_key('CONFIG_TSAN')} +summary_info +=3D {'thread sanitizer': get_option('tsan')} summary_info +=3D {'CFI support': get_option('cfi')} if get_option('cfi') summary_info +=3D {'CFI debug support': get_option('cfi_debug')} diff --git a/meson_options.txt b/meson_options.txt index e492aaa73fbc..feeefa2ccbc1 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -84,6 +84,10 @@ option('tcg', type: 'feature', value: 'enabled', description: 'TCG support') option('tcg_interpreter', type: 'boolean', value: false, description: 'TCG with bytecode interpreter (slow)') +option('sanitizers', type: 'boolean', value: false, + description: 'enable default sanitizers') +option('tsan', type: 'boolean', value: false, + description: 'enable thread sanitizer') option('cfi', type: 'boolean', value: false, description: 'Control-Flow Integrity (CFI)') option('cfi_debug', type: 'boolean', value: false, diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index cb277347bb18..bafc40ddfbf4 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -36,11 +36,13 @@ meson_options_help() { printf "%s\n" ' --enable-qom-cast-debug cast debugging support' printf "%s\n" ' --enable-rng-none dummy RNG, avoid using /dev/(u= )random and' printf "%s\n" ' getrandom()' + printf "%s\n" ' --enable-sanitizers enable default sanitizers' printf "%s\n" ' --enable-strip Strip targets on install' printf "%s\n" ' --enable-tcg-interpreter TCG with bytecode interpreter = (slow)' printf "%s\n" ' --enable-trace-backends=3DCHOICES' printf "%s\n" ' Set available tracing backends= [log] (choices:' printf "%s\n" ' dtrace/ftrace/log/nop/simple/s= yslog/ust)' + printf "%s\n" ' --enable-tsan enable thread sanitizer' printf "%s\n" ' --firmwarepath=3DVALUES search PATH for firmware fil= es [share/qemu-firmware]' printf "%s\n" ' --iasl=3DVALUE Path to ACPI disassembler' printf "%s\n" ' --includedir=3DVALUE Header file directory [inclu= de]' @@ -388,6 +390,8 @@ _meson_option_parse() { --disable-replication) printf "%s" -Dreplication=3Ddisabled ;; --enable-rng-none) printf "%s" -Drng_none=3Dtrue ;; --disable-rng-none) printf "%s" -Drng_none=3Dfalse ;; + --enable-sanitizers) printf "%s" -Dsanitizers=3Dtrue ;; + --disable-sanitizers) printf "%s" -Dsanitizers=3Dfalse ;; --enable-sdl) printf "%s" -Dsdl=3Denabled ;; --disable-sdl) printf "%s" -Dsdl=3Ddisabled ;; --enable-sdl-image) printf "%s" -Dsdl_image=3Denabled ;; @@ -427,6 +431,8 @@ _meson_option_parse() { --disable-tpm) printf "%s" -Dtpm=3Ddisabled ;; --enable-trace-backends=3D*) quote_sh "-Dtrace_backends=3D$2" ;; --with-trace-file=3D*) quote_sh "-Dtrace_file=3D$2" ;; + --enable-tsan) printf "%s" -Dtsan=3Dtrue ;; + --disable-tsan) printf "%s" -Dtsan=3Dfalse ;; --enable-u2f) printf "%s" -Du2f=3Denabled ;; --disable-u2f) printf "%s" -Du2f=3Ddisabled ;; --enable-usb-redir) printf "%s" -Dusb_redir=3Denabled ;; diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build index 323a4acb6a3f..583468c5b9b3 100644 --- a/tests/qemu-iotests/meson.build +++ b/tests/qemu-iotests/meson.build @@ -2,7 +2,7 @@ if not have_tools or targetos =3D=3D 'windows' or get_optio= n('gprof') subdir_done() endif =20 -foreach cflag: config_host['QEMU_CFLAGS'].split() +foreach cflag: qemu_ldflags if cflag.startswith('-fsanitize') and \ not cflag.contains('safe-stack') and not cflag.contains('cfi-icall') message('Sanitizers are enabled =3D=3D> Disabled the qemu-iotests.') diff --git a/tests/unit/meson.build b/tests/unit/meson.build index b497a4137830..46d88b49cbcf 100644 --- a/tests/unit/meson.build +++ b/tests/unit/meson.build @@ -143,7 +143,7 @@ if have_system # Some tests: test-char, test-qdev-global-props, and test-qga, # are not runnable under TSan due to a known issue. # https://github.com/google/sanitizers/issues/1116 - if 'CONFIG_TSAN' not in config_host + if not get_option('tsan') if 'CONFIG_POSIX' in config_host tests +=3D { 'test-char': ['socket-helpers.c', qom, io, chardev] --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585672; cv=none; d=zohomail.com; s=zohoarc; b=NB/GkUpxABNaEStAIOA3PFm/OZI0YhF6dXJNQxLawaBIFKr5F1QxT0fq39FK5yv7RGtZ5kmon4lzgbo5qu5SUud1Yqetg5feboeu2FG45MXf3nnqc7pcmaYYSKT0TiYm5zzYTz7zEJVYWCoZOJdxeyzFOrwDLjCKQw9QB0YH9Iw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585672; h=Content-Type:Content-Transfer-Encoding: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=udw7Cd2DtsloA+ZAMxHVLgSgxDIJxCnS0GVlNd0dzvE=; b=a0ukv7ODS7E7JzJJKs/nJvzBt5QvJRwrgY804AAESagmKv7IStJKPqOXKKFPcrL0BDp37FR/fy8jT9oAWqE6Xsds4+NDsDtMHFVQazsFf1ume2z4FB514cGUoSqm63X2OBOJ9dPe7a72trPmzT1pkpoM/dE7iVsWUyWxPpWPrGc= 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 1670585672184225.11007591294822; Fri, 9 Dec 2022 03:34:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bXk-0006V0-6a; Fri, 09 Dec 2022 06:27:52 -0500 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 1p3bVq-0004Sm-3P for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:57 -0500 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 1p3bVi-0001VM-LC for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:51 -0500 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_128_GCM_SHA256) id us-mta-226-BdF8waihM92NcyRxfQ0jzQ-1; Fri, 09 Dec 2022 06:25:31 -0500 Received: by mail-ed1-f70.google.com with SMTP id m18-20020a056402511200b0046db14dc1c9so1211329edd.10 for ; Fri, 09 Dec 2022 03:25:31 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id 2-20020a170906200200b007ad94422cf6sm434203ejo.198.2022.12.09.03.25.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:25:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585132; 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=udw7Cd2DtsloA+ZAMxHVLgSgxDIJxCnS0GVlNd0dzvE=; b=BX5DQKOmgGHfMFC8p2A6Hua13d8aA5e+rUbRkKB15G15UK0C6U6Q0rvcRmSvdJyldK8OMc g0FvMNyC0uaxAEGgozbOJ/LwVTZBD28m9j4GNY+Pdrna51ZRS+CWM0NrcmCYA0oANL1Vq7 T/AxNV2qQxZGUL/MRjqzLEj4L8DYiz0= X-MC-Unique: BdF8waihM92NcyRxfQ0jzQ-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=udw7Cd2DtsloA+ZAMxHVLgSgxDIJxCnS0GVlNd0dzvE=; b=YpnxmO5N1wcJ7cQPIosouVUSi9dT8boSuF0Q6dUaRK5+I6ml7VaOR7g/TK2lukMw+9 MOO8mbsp2Tz/3w87A12gT1CiVpa0yspDY9x1HBtwSy4QZ/NC2HxwD0VoY6IZiZWCrSph v17xI4mu2ApWLasLK7GSn4VHUtzwlxx+AEqlfuI9qr4uVW/U1/VmRTnh8w+boheWDoPU JWEgRJASjuUcuU9z0lr9d24/Kn2N65i6eGdfdZHiJux4Q9SG9YaSZWl3vu5zoIpjy7DT Ka0Ph0HuWgA+F1Go1rr7vNRi/IPdaDe1bJq6ipDrVR8rtC8/nhbRM4rolzHHIRbUhB4s vZPg== X-Gm-Message-State: ANoB5pmJQR7M4NDIawdfRBCKq8gFDcHRcGJvs4C0BVg/v/Mvd5PlDlBd qRaAnyxzMUwl5KdSvTeS/3EsMB5XKLlCeORsHpUgMCbrX0mP8oYxchED7IZtxFjDHQdDxhvv+Ze Dh9Aw6VqDPKVMVSVYW9Ba9zmcWCAM2UyC4XLNrCVSMTlDJ5hRVsnh4/bnTiGv7cCRCJQ= X-Received: by 2002:a17:906:37ce:b0:7c1:41bb:70ac with SMTP id o14-20020a17090637ce00b007c141bb70acmr1160740ejc.64.1670585129941; Fri, 09 Dec 2022 03:25:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf5OPAwawVp9irzX9Zoz1hhd1H890sXDeU/1WD4mCdnwbnlZtXBaYobb9tg88FZVAnJH2qKPOg== X-Received: by 2002:a17:906:37ce:b0:7c1:41bb:70ac with SMTP id o14-20020a17090637ce00b007c141bb70acmr1160709ejc.64.1670585129327; Fri, 09 Dec 2022 03:25:29 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 22/30] build: move SafeStack tests to meson Date: Fri, 9 Dec 2022 12:24:01 +0100 Message-Id: <20221209112409.184703-23-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585673630100001 Content-Type: text/plain; charset="utf-8" This disables the old behavior of detecting SafeStack from environment CFLAGS. SafeStack is now enabled purely based on the configure arguments. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- configure | 73 ----------------------------------- meson.build | 26 +++++++++++++ meson_options.txt | 2 + scripts/meson-buildoptions.sh | 4 ++ 4 files changed, 32 insertions(+), 73 deletions(-) diff --git a/configure b/configure index babcf5d28a85..fea9cbf3abd0 100755 --- a/configure +++ b/configure @@ -222,7 +222,6 @@ cross_compile=3D"no" cross_prefix=3D"" host_cc=3D"cc" stack_protector=3D"" -safe_stack=3D"" use_containers=3D"yes" gdb_bin=3D$(command -v "gdb-multiarch" || command -v "gdb") =20 @@ -779,10 +778,6 @@ for opt do ;; --disable-stack-protector) stack_protector=3D"no" ;; - --enable-safe-stack) safe_stack=3D"yes" - ;; - --disable-safe-stack) safe_stack=3D"no" - ;; --enable-cfi) cfi=3D"true"; meson_option_add -Db_lto=3Dtrue @@ -969,8 +964,6 @@ cat << EOF bsd-user all BSD usermode emulation targets pie Position Independent Executables debug-tcg TCG debugging (default is disabled) - safe-stack SafeStack Stack Smash Protection. Depends on - clang/llvm >=3D 3.7 and requires coroutine backend ucont= ext. =20 NOTE: The object files are built at the place where configure is launched EOF @@ -1435,68 +1428,6 @@ else esac fi =20 -################################################## -# SafeStack - - -if test "$safe_stack" =3D "yes"; then -cat > $TMPC << EOF -int main(void) -{ -#if ! __has_feature(safe_stack) -#error SafeStack Disabled -#endif - return 0; -} -EOF - flag=3D"-fsanitize=3Dsafe-stack" - # Check that safe-stack is supported and enabled. - if compile_prog "-Werror $flag" "$flag"; then - # Flag needed both at compilation and at linking - QEMU_CFLAGS=3D"$QEMU_CFLAGS $flag" - QEMU_LDFLAGS=3D"$QEMU_LDFLAGS $flag" - else - error_exit "SafeStack not supported by your compiler" - fi - if test "$coroutine" !=3D "ucontext"; then - error_exit "SafeStack is only supported by the coroutine backend ucont= ext" - fi -else -cat > $TMPC << EOF -int main(void) -{ -#if defined(__has_feature) -#if __has_feature(safe_stack) -#error SafeStack Enabled -#endif -#endif - return 0; -} -EOF -if test "$safe_stack" =3D "no"; then - # Make sure that safe-stack is disabled - if ! compile_prog "-Werror" ""; then - # SafeStack was already enabled, try to explicitly remove the feature - flag=3D"-fno-sanitize=3Dsafe-stack" - if ! compile_prog "-Werror $flag" "$flag"; then - error_exit "Configure cannot disable SafeStack" - fi - QEMU_CFLAGS=3D"$QEMU_CFLAGS $flag" - QEMU_LDFLAGS=3D"$QEMU_LDFLAGS $flag" - fi -else # "$safe_stack" =3D "" - # Set safe_stack to yes or no based on pre-existing flags - if compile_prog "-Werror" ""; then - safe_stack=3D"no" - else - safe_stack=3D"yes" - if test "$coroutine" !=3D "ucontext"; then - error_exit "SafeStack is only supported by the coroutine backend uco= ntext" - fi - fi -fi -fi - ######################################## # check if ccache is interfering with # semantic analysis of macros @@ -2153,10 +2084,6 @@ if test "$ccache_cpp2" =3D "yes"; then echo "export CCACHE_CPP2=3Dy" >> $config_host_mak fi =20 -if test "$safe_stack" =3D "yes"; then - echo "CONFIG_SAFESTACK=3Dy" >> $config_host_mak -fi - # tests/tcg configuration (config_host_mak=3Dtests/tcg/config-host.mak mkdir -p tests/tcg diff --git a/meson.build b/meson.build index 41a45fa495b2..7ee9f081d0a1 100644 --- a/meson.build +++ b/meson.build @@ -211,6 +211,31 @@ if get_option('prefer_static') qemu_ldflags +=3D get_option('b_pie') ? '-static-pie' : '-static' endif =20 +# Compiles if SafeStack *not* enabled +safe_stack_probe =3D ''' + int main(void) + { + #if defined(__has_feature) + #if __has_feature(safe_stack) + #error SafeStack Enabled + #endif + #endif + return 0; + }''' +if get_option('safe_stack') !=3D not cc.compiles(safe_stack_probe) + safe_stack_arg =3D get_option('safe_stack') ? '-fsanitize=3Dsafe-stack' = : '-fno-sanitize=3Dsafe-stack' + if get_option('safe_stack') !=3D not cc.compiles(safe_stack_probe, args:= safe_stack_arg) + error(get_option('safe_stack') \ + ? 'SafeStack not supported by your compiler' \ + : 'Cannot disable SafeStack') + endif + qemu_cflags +=3D safe_stack_arg + qemu_ldflags +=3D safe_stack_arg +endif +if get_option('safe_stack') and config_host['CONFIG_COROUTINE_BACKEND'] != =3D 'ucontext' + error('SafeStack is only supported with the ucontext coroutine backend') +endif + if get_option('sanitizers') if cc.has_argument('-fsanitize=3Daddress') qemu_cflags =3D ['-fsanitize=3Daddress'] + qemu_cflags @@ -1928,6 +1953,7 @@ config_host_data.set('CONFIG_OPENGL', opengl.found()) config_host_data.set('CONFIG_PROFILER', get_option('profiler')) config_host_data.set('CONFIG_RBD', rbd.found()) config_host_data.set('CONFIG_RDMA', rdma.found()) +config_host_data.set('CONFIG_SAFESTACK', get_option('safe_stack')) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_SECCOMP', seccomp.found()) diff --git a/meson_options.txt b/meson_options.txt index feeefa2ccbc1..d39d2a060ae7 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -84,6 +84,8 @@ option('tcg', type: 'feature', value: 'enabled', description: 'TCG support') option('tcg_interpreter', type: 'boolean', value: false, description: 'TCG with bytecode interpreter (slow)') +option('safe_stack', type: 'boolean', value: false, + description: 'SafeStack Stack Smash Protection (clang/llvm >=3D 3.7= )') option('sanitizers', type: 'boolean', value: false, description: 'enable default sanitizers') option('tsan', type: 'boolean', value: false, diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index bafc40ddfbf4..237220d9b308 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -36,6 +36,8 @@ meson_options_help() { printf "%s\n" ' --enable-qom-cast-debug cast debugging support' printf "%s\n" ' --enable-rng-none dummy RNG, avoid using /dev/(u= )random and' printf "%s\n" ' getrandom()' + printf "%s\n" ' --enable-safe-stack SafeStack Stack Smash Protecti= on (clang/llvm >=3D' + printf "%s\n" ' 3.7)' printf "%s\n" ' --enable-sanitizers enable default sanitizers' printf "%s\n" ' --enable-strip Strip targets on install' printf "%s\n" ' --enable-tcg-interpreter TCG with bytecode interpreter = (slow)' @@ -390,6 +392,8 @@ _meson_option_parse() { --disable-replication) printf "%s" -Dreplication=3Ddisabled ;; --enable-rng-none) printf "%s" -Drng_none=3Dtrue ;; --disable-rng-none) printf "%s" -Drng_none=3Dfalse ;; + --enable-safe-stack) printf "%s" -Dsafe_stack=3Dtrue ;; + --disable-safe-stack) printf "%s" -Dsafe_stack=3Dfalse ;; --enable-sanitizers) printf "%s" -Dsanitizers=3Dtrue ;; --disable-sanitizers) printf "%s" -Dsanitizers=3Dfalse ;; --enable-sdl) printf "%s" -Dsdl=3Denabled ;; --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670586049; cv=none; d=zohomail.com; s=zohoarc; b=OTbO9x90t9jjAZNx/47ge2MHglhAegTU5sutsJ6CeAsk1HEcQd/l6K8jX0yZ8B+1aEmXl7949MdprhE4z8F6ShF8BSEAcNJ81cn2KgcrKV4JR3cEChfUJzJqOJpqORJLDzWD9L8+p6EVgFZ5tBTbnRhAcrqWAQmgmvyI4V8HjLQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670586049; h=Content-Type:Content-Transfer-Encoding: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=WOmJjp7FOaRPzTB1VOb9CHrzg0NOiH5lgsd4QAUGHvw=; b=NgnrO3vco2SgLV0sKdHQcvOmRYS3/1PWer1diuI9pI2LpLf68Qe+OsuuRBYulFox1Dsqylj2EOUyT0zytd5t6J0lpj1c2sK+3O8OXGuXcvWnfRhDAOG/jl9/h09vlUr5L1pymweDxqgXG/45okAn/iSN09cP3Uw+sBxd4n7F3QQ= 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 1670586049833789.9587685172742; Fri, 9 Dec 2022 03:40:49 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bXU-0006Ij-4i; Fri, 09 Dec 2022 06:27:36 -0500 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 1p3bVq-0004Sp-C7 for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:57 -0500 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 1p3bVk-0001YT-FF for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:52 -0500 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-617-VOdwwT4hNBqQAdZE18qUZQ-1; Fri, 09 Dec 2022 06:25:34 -0500 Received: by mail-ej1-f72.google.com with SMTP id oz34-20020a1709077da200b007adc8d68e90so2920494ejc.11 for ; Fri, 09 Dec 2022 03:25:34 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id o25-20020a1709062e9900b007c100eba66asm451303eji.77.2022.12.09.03.25.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:25:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585135; 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=WOmJjp7FOaRPzTB1VOb9CHrzg0NOiH5lgsd4QAUGHvw=; b=ODqBuXEk1Q+AJaJ60igHdNI9mVCmqsdF6h8GP/dWN8oaV8uAj4ruX1x5MWxyMccGBIck2K exFxXDsVImjv2Vg3BZXoSjR08PLlw+bnOisj25DWICRJtPay/Xu4uIp55qY6+l+e8Yv3uS Djjvw22HjZYQmtdiyzDo5+wHxXrWces= X-MC-Unique: VOdwwT4hNBqQAdZE18qUZQ-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WOmJjp7FOaRPzTB1VOb9CHrzg0NOiH5lgsd4QAUGHvw=; b=qorBXsvdV3/LOWgqtXKUIxEgSwbJEYwajYSPm7XQMk72Q+ceWUnPSQQQeb4rHdH7Q6 bdVVflxdG2u68yRDzcFXV4in0VlZdZjWXKNNbCyH0bazFcILaQtxJYvypO4oO5u8I+2m JfAONvdXHn3+X0wvLfXUPEA+vFHlymT/pohgVjEu3zNvvkxK+I3liNDM8PZK+LJrEK3K HwGInykJ0Uxjuqlmng7JF4bTwYqzSkMTJZmJCfBE+1/4VNy7wg8/U9reuRX6hWJWV5aF zJ4Cmlzu9euv5zaKhG94oLKpVrnoa/vpPZSO4ta3jz34wJ0P4xIxphI2oDq7NIeJ0ped LZJg== X-Gm-Message-State: ANoB5pnTtsBLB4TyuwvW42hHY1nCzhJmBXkzv/hOidTYydAyuVHon881 AxclnE7A2uTdWZq4cp7V9IoiBfle/5+Y+963y9sOSHDmg4K6mo27oUdAoeIGcWtcsREqLmnUSOQ 5Jv9hkEGSkHx9AZtl+KsvDDUQdOh+dh/E6XX/x4x2MOPXFq9Y8PESdzox8N4kI9iDmy4= X-Received: by 2002:a17:907:c48d:b0:7b2:7181:2484 with SMTP id tp13-20020a170907c48d00b007b271812484mr4004433ejc.23.1670585133058; Fri, 09 Dec 2022 03:25:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf7c3I4vJbboD4YS1Y4yiMnlW3VN8q84okz3epovb1z8BzgKfAn7UnB190O6HNoewDurxPDphw== X-Received: by 2002:a17:907:c48d:b0:7b2:7181:2484 with SMTP id tp13-20020a170907c48d00b007b271812484mr4004400ejc.23.1670585132127; Fri, 09 Dec 2022 03:25:32 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 23/30] build: move coroutine backend selection to meson Date: Fri, 9 Dec 2022 12:24:02 +0100 Message-Id: <20221209112409.184703-24-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670586051808100003 Content-Type: text/plain; charset="utf-8" To simplify the code, rename coroutine-win32.c to match the option passed to configure. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 62 ------------------- meson.build | 32 +++++++++- meson_options.txt | 3 + scripts/meson-buildoptions.py | 1 + scripts/meson-buildoptions.sh | 3 + ...{coroutine-win32.c =3D> coroutine-windows.c} | 0 util/meson.build | 2 +- 7 files changed, 38 insertions(+), 65 deletions(-) rename util/{coroutine-win32.c =3D> coroutine-windows.c} (100%) diff --git a/configure b/configure index fea9cbf3abd0..1f7c5bbba4b9 100755 --- a/configure +++ b/configure @@ -275,7 +275,6 @@ softmmu=3D"yes" linux_user=3D"" bsd_user=3D"" pie=3D"" -coroutine=3D"" plugins=3D"$default_feature" meson=3D"" ninja=3D"" @@ -792,8 +791,6 @@ for opt do ;; --enable-fdt=3D*) fdt=3D"$optarg" ;; - --with-coroutine=3D*) coroutine=3D"$optarg" - ;; --with-git=3D*) git=3D"$optarg" ;; --with-git-submodules=3D*) @@ -949,8 +946,6 @@ Advanced options (experts only): --disable-werror disable compilation abort on warning --disable-stack-protector disable compiler-provided stack protection --cpu=3DCPU Build for host CPU [$cpu] - --with-coroutine=3DBACKEND coroutine backend. Supported options: - ucontext, sigaltstack, windows --enable-plugins enable plugins via shared library loading --disable-containers don't use containers for cross-building @@ -1373,61 +1368,6 @@ case "$fdt" in ;; esac =20 -########################################## -# check and set a backend for coroutine - -# We prefer ucontext, but it's not always possible. The fallback -# is sigcontext. On Windows the only valid backend is the Windows -# specific one. - -ucontext_works=3Dno -if test "$darwin" !=3D "yes"; then - cat > $TMPC << EOF -#include -#ifdef __stub_makecontext -#error Ignoring glibc stub makecontext which will always fail -#endif -int main(void) { makecontext(0, 0, 0); return 0; } -EOF - if compile_prog "" "" ; then - ucontext_works=3Dyes - fi -fi - -if test "$coroutine" =3D ""; then - if test "$mingw32" =3D "yes"; then - coroutine=3Dwin32 - elif test "$ucontext_works" =3D "yes"; then - coroutine=3Ducontext - else - coroutine=3Dsigaltstack - fi -else - case $coroutine in - windows) - if test "$mingw32" !=3D "yes"; then - error_exit "'windows' coroutine backend only valid for Windows" - fi - # Unfortunately the user visible backend name doesn't match the - # coroutine-*.c filename for this case, so we have to adjust it here. - coroutine=3Dwin32 - ;; - ucontext) - if test "$ucontext_works" !=3D "yes"; then - error_exit "'ucontext' backend requested but makecontext not availab= le" - fi - ;; - sigaltstack) - if test "$mingw32" =3D "yes"; then - error_exit "only the 'windows' coroutine backend is valid for Window= s" - fi - ;; - *) - error_exit "unknown coroutine backend $coroutine" - ;; - esac -fi - ######################################## # check if ccache is interfering with # semantic analysis of macros @@ -2002,8 +1942,6 @@ if [ "$bsd" =3D "yes" ] ; then echo "CONFIG_BSD=3Dy" >> $config_host_mak fi =20 -echo "CONFIG_COROUTINE_BACKEND=3D$coroutine" >> $config_host_mak - if test "$plugins" =3D "yes" ; then echo "CONFIG_PLUGIN=3Dy" >> $config_host_mak fi diff --git a/meson.build b/meson.build index 7ee9f081d0a1..b9df49667a19 100644 --- a/meson.build +++ b/meson.build @@ -211,6 +211,34 @@ if get_option('prefer_static') qemu_ldflags +=3D get_option('b_pie') ? '-static-pie' : '-static' endif =20 +coroutine_backend =3D get_option('coroutine_backend') +ucontext_probe =3D ''' + #include + #ifdef __stub_makecontext + #error Ignoring glibc stub makecontext which will always fail + #endif + int main(void) { makecontext(0, 0, 0); return 0; }''' + +# On Windows the only valid backend is the Windows specific one. +# For POSIX prefer ucontext, but it's not always possible. The fallback +# is sigcontext. +supported_backends =3D [] +if targetos =3D=3D 'windows' + supported_backends +=3D ['windows'] +else + if targetos !=3D 'darwin' and cc.links(ucontext_probe) + supported_backends +=3D ['ucontext'] + endif + supported_backends +=3D ['sigaltstack'] +endif + +if coroutine_backend =3D=3D 'auto' + coroutine_backend =3D supported_backends[0] +elif coroutine_backend not in supported_backends + error('"@0@" backend requested but not available. Available backends: @= 1@' \ + .format(coroutine_backend, ', '.join(supported_backends))) +endif + # Compiles if SafeStack *not* enabled safe_stack_probe =3D ''' int main(void) @@ -232,7 +260,7 @@ if get_option('safe_stack') !=3D not cc.compiles(safe_s= tack_probe) qemu_cflags +=3D safe_stack_arg qemu_ldflags +=3D safe_stack_arg endif -if get_option('safe_stack') and config_host['CONFIG_COROUTINE_BACKEND'] != =3D 'ucontext' +if get_option('safe_stack') and coroutine_backend !=3D 'ucontext' error('SafeStack is only supported with the ucontext coroutine backend') endif =20 @@ -3949,7 +3977,7 @@ summary(summary_info, bool_yn: true, section: 'Target= s and accelerators') =20 # Block layer summary_info =3D {} -summary_info +=3D {'coroutine backend': config_host['CONFIG_COROUTINE_BACK= END']} +summary_info +=3D {'coroutine backend': coroutine_backend} summary_info +=3D {'coroutine pool': have_coroutine_pool} if have_block summary_info +=3D {'Block whitelist (rw)': get_option('block_drv_rw_whit= elist')} diff --git a/meson_options.txt b/meson_options.txt index d39d2a060ae7..126f89517e9a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -33,6 +33,9 @@ option('fuzzing_engine', type : 'string', value : '', description: 'fuzzing engine library for OSS-Fuzz') option('trace_file', type: 'string', value: 'trace', description: 'Trace file prefix for simple backend') +option('coroutine_backend', type: 'combo', + choices: ['ucontext', 'sigaltstack', 'windows', 'auto'], + value: 'auto', description: 'coroutine backend to use') =20 # Everything else can be set via --enable/--disable-* option # on the configure script command line. After adding an option diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 8e4e5c4e8bd6..66a79cf37ea8 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -35,6 +35,7 @@ OPTION_NAMES =3D { "b_coverage": "gcov", "b_lto": "lto", + "coroutine_backend": "with-coroutine", "debug": "debug-info", "malloc": "enable-malloc", "pkgversion": "with-pkgversion", diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 237220d9b308..29695ac88eea 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -59,6 +59,8 @@ meson_options_help() { printf "%s\n" ' --sysconfdir=3DVALUE Sysconf data directory [etc]' printf "%s\n" ' --tls-priority=3DVALUE Default TLS protocol/cipher = priority string' printf "%s\n" ' [NORMAL]' + printf "%s\n" ' --with-coroutine=3DCHOICE coroutine backend to use (ch= oices:' + printf "%s\n" ' auto/sigaltstack/ucontext/wind= ows)' printf "%s\n" ' --with-pkgversion=3DVALUE use specified string as sub-= version of the' printf "%s\n" ' package' printf "%s\n" ' --with-trace-file=3DVALUE Trace file prefix for simple= backend [trace]' @@ -236,6 +238,7 @@ _meson_option_parse() { --disable-cocoa) printf "%s" -Dcocoa=3Ddisabled ;; --enable-coreaudio) printf "%s" -Dcoreaudio=3Denabled ;; --disable-coreaudio) printf "%s" -Dcoreaudio=3Ddisabled ;; + --with-coroutine=3D*) quote_sh "-Dcoroutine_backend=3D$2" ;; --enable-coroutine-pool) printf "%s" -Dcoroutine_pool=3Dtrue ;; --disable-coroutine-pool) printf "%s" -Dcoroutine_pool=3Dfalse ;; --enable-crypto-afalg) printf "%s" -Dcrypto_afalg=3Denabled ;; diff --git a/util/coroutine-win32.c b/util/coroutine-windows.c similarity index 100% rename from util/coroutine-win32.c rename to util/coroutine-windows.c diff --git a/util/meson.build b/util/meson.build index 25b9b61f9817..b2a0aea21beb 100644 --- a/util/meson.build +++ b/util/meson.build @@ -74,7 +74,7 @@ if have_block or have_ga util_ss.add(files('lockcnt.c')) util_ss.add(files('main-loop.c')) util_ss.add(files('qemu-coroutine.c', 'qemu-coroutine-lock.c', 'qemu-cor= outine-io.c')) - util_ss.add(files('coroutine-@0@.c'.format(config_host['CONFIG_COROUTINE= _BACKEND']))) + util_ss.add(files(f'coroutine-@coroutine_backend@.c')) util_ss.add(files('thread-pool.c', 'qemu-timer.c')) util_ss.add(files('qemu-sockets.c')) endif --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670586132; cv=none; d=zohomail.com; s=zohoarc; b=jLmYNLuZNiHl6BAquwCPJX7iY0EjgNes/t2p/gAWFAwnHjDuqPHd8iNkGfCt48umG8DYmc4wM6ul+O6+FdzCd9KVOBoFQ0XonnuBq7PmRkOh1PmOYSytKxJBkmx9REh2+ca/nMSRfdzRFMNEVuIT0Nz5M0OUybZufGFrq5T1VoY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670586132; h=Content-Type:Content-Transfer-Encoding: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=bFXGWFkeLVolrLGcr3Zg8bJ0ywua5CC1+rJ/U6t4suM=; b=PlsufARdOvw5yhIcKxxFdxtOYZ1oLmJ3K2jgHKgb3Wk/caI2g739E1Fp7U2l34ajGpNNUQITVf6gEB8w6lnb4q3Jhanv1p8MceVisGpc9kQqER9bsPXv8ouZYOrxrXGOOvutsm/dEqCAxE6FQLxxwRgPBgEpBpYwvAok6cQpgTk= 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 1670586132472978.6412296551097; Fri, 9 Dec 2022 03:42:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bX8-0005sG-JY; Fri, 09 Dec 2022 06:27:15 -0500 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 1p3bVy-0004X8-2K for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:26:03 -0500 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 1p3bVq-0001Yf-19 for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:26:01 -0500 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_128_GCM_SHA256) id us-mta-330-kyTNXACOOi6euw29JXscRg-1; Fri, 09 Dec 2022 06:25:37 -0500 Received: by mail-ed1-f70.google.com with SMTP id z4-20020a05640240c400b0046c51875c17so1210019edb.1 for ; Fri, 09 Dec 2022 03:25:36 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id k8-20020a17090632c800b007aece68483csm434355ejk.193.2022.12.09.03.25.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:25:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585138; 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=bFXGWFkeLVolrLGcr3Zg8bJ0ywua5CC1+rJ/U6t4suM=; b=BS1vUEbOyRuS5HzZ44EUD1hbSSkH2OpdaCOnrMTDIdEmhHKoJDT6W1GQo/ILv3t9kTcgM3 3qkHv9mEWyddY+fCDKzK5xqjkbc2ov3RGDgk1noe9D13GPCq6p/n6hPY3+FIZXr2FkgHHH kwhd2ubbQNao68AWawtDs48Qtb7IvZM= X-MC-Unique: kyTNXACOOi6euw29JXscRg-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bFXGWFkeLVolrLGcr3Zg8bJ0ywua5CC1+rJ/U6t4suM=; b=Az/s9kaiEIkERucQa4oukR9sxm/M1eigNXQf7XUuWCmeJLzILrmasqwm4e8NPi+x3K hFkVQ42gxxS0JZcj2WwhF+Am/wtjGjPe6KRNlTk9ZC8c8jGk8Le3cPMcBKWxcUivsmKr hHdg4xXt7yhQp6rLgdmPobVZKdtlge3O5gyF2ls5ywlhI/vWwwQMaYsZNCcncyAbgcEj Ic2cf0EWVdD7ZYcEfmuiRylJLQY2BXLYH+M5jss/dTJwvXX5q8dqBvFIsmuPD7tWYyz1 DXP3VK2Ir0W1ilak9u4wHx6VS9rYBngykhoByOkYlAZdQ0eDQR5zQA+C4pMwP5owv2sH XGEQ== X-Gm-Message-State: ANoB5pkEnvyufsM+h87RcIXK+QbLYGTvmGzhUzGJ1fuqZ4ETGrAYTIA1 2py5fkDEeJI7Q4Sk6dIV1+yHcup4ENYPRXpM9m5W1QWnrvEecW+pvHM/QgR7xfUfWLyeZugW5yW thHvXX4/BRMv7PCf32XcXKB4YiUOtDuroFCSNcfaUJ2/uNWC5Ylj53NOI7iGuaruAzb8= X-Received: by 2002:a17:906:a410:b0:7c0:e5ca:411c with SMTP id l16-20020a170906a41000b007c0e5ca411cmr4368794ejz.17.1670585135622; Fri, 09 Dec 2022 03:25:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf4c0Hzam+Ci4Cu42126H7PNn5W3AKcyuA0q+V2yGqwgy/HhdbcefUvw9bGGU4hnIZg4D0jkNA== X-Received: by 2002:a17:906:a410:b0:7c0:e5ca:411c with SMTP id l16-20020a170906a41000b007c0e5ca411cmr4368769ejz.17.1670585135141; Fri, 09 Dec 2022 03:25:35 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 24/30] build: move stack protector flag selection to meson Date: Fri, 9 Dec 2022 12:24:03 +0100 Message-Id: <20221209112409.184703-25-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670586134293100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 44 ++--------------------------------- meson.build | 28 +++++++++++++++++++++- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 34 insertions(+), 43 deletions(-) diff --git a/configure b/configure index 1f7c5bbba4b9..5d31294f316f 100755 --- a/configure +++ b/configure @@ -175,7 +175,7 @@ compile_prog() { local_cflags=3D"$1" local_ldflags=3D"$2" do_cc $CFLAGS $EXTRA_CFLAGS $CONFIGURE_CFLAGS $QEMU_CFLAGS $local_cflags= -o $TMPE $TMPC \ - $LDFLAGS $EXTRA_LDFLAGS $CONFIGURE_LDFLAGS $QEMU_LDFLAGS $local_ldfl= ags + $LDFLAGS $EXTRA_LDFLAGS $CONFIGURE_LDFLAGS $local_ldflags } =20 # symbolically link $1 to $2. Portable version of "ln -sf". @@ -221,7 +221,6 @@ static=3D"no" cross_compile=3D"no" cross_prefix=3D"" host_cc=3D"cc" -stack_protector=3D"" use_containers=3D"yes" gdb_bin=3D$(command -v "gdb-multiarch" || command -v "gdb") =20 @@ -370,8 +369,6 @@ sdl2_config=3D"${SDL2_CONFIG-${cross_prefix}sdl2-config= }" QEMU_CFLAGS=3D"-fno-strict-aliasing -fno-common -fwrapv" QEMU_CFLAGS=3D"-D_GNU_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_LARGEFILE_SOURCE = $QEMU_CFLAGS" =20 -QEMU_LDFLAGS=3D - # Flags that are needed during configure but later taken care of by Meson CONFIGURE_CFLAGS=3D"-std=3Dgnu11 -Wall" CONFIGURE_LDFLAGS=3D @@ -773,10 +770,6 @@ for opt do ;; --disable-werror) werror=3D"no" ;; - --enable-stack-protector) stack_protector=3D"yes" - ;; - --disable-stack-protector) stack_protector=3D"no" - ;; --enable-cfi) cfi=3D"true"; meson_option_add -Db_lto=3Dtrue @@ -944,7 +937,6 @@ Advanced options (experts only): --with-devices-ARCH=3DNAME override default configs/devices --enable-debug enable common debug build options --disable-werror disable compilation abort on warning - --disable-stack-protector disable compiler-provided stack protection --cpu=3DCPU Build for host CPU [$cpu] --enable-plugins enable plugins via shared library loading @@ -1157,7 +1149,7 @@ EOF optflag=3D"$(echo $1 | sed -e 's/^-Wno-/-W/')" do_objc -Werror $optflag \ $OBJCFLAGS $EXTRA_OBJCFLAGS $CONFIGURE_OBJCFLAGS $QEMU_OBJCFLAGS \ - -o $TMPE $TMPM $QEMU_LDFLAGS + -o $TMPE $TMPM } =20 for flag in $gcc_flags; do @@ -1169,37 +1161,6 @@ for flag in $gcc_flags; do fi done =20 -if test "$stack_protector" !=3D "no"; then - cat > $TMPC << EOF -int main(int argc, char *argv[]) -{ - char arr[64], *p =3D arr, *c =3D argv[argc - 1]; - while (*c) { - *p++ =3D *c++; - } - return 0; -} -EOF - gcc_flags=3D"-fstack-protector-strong -fstack-protector-all" - sp_on=3D0 - for flag in $gcc_flags; do - # We need to check both a compile and a link, since some compiler - # setups fail only on a .c->.o compile and some only at link time - if compile_object "-Werror $flag" && - compile_prog "-Werror $flag" ""; then - QEMU_CFLAGS=3D"$QEMU_CFLAGS $flag" - QEMU_LDFLAGS=3D"$QEMU_LDFLAGS $flag" - sp_on=3D1 - break - fi - done - if test "$stack_protector" =3D yes; then - if test $sp_on =3D 0; then - error_exit "Stack protector not supported" - fi - fi -fi - # Disable -Wmissing-braces on older compilers that warn even for # the "universal" C zero initializer {0}. cat > $TMPC << EOF @@ -1968,7 +1929,6 @@ echo "PKG_CONFIG=3D${pkg_config_exe}" >> $config_host= _mak echo "CC=3D$cc" >> $config_host_mak echo "QEMU_CFLAGS=3D$QEMU_CFLAGS" >> $config_host_mak echo "QEMU_OBJCFLAGS=3D$QEMU_OBJCFLAGS" >> $config_host_mak -echo "QEMU_LDFLAGS=3D$QEMU_LDFLAGS" >> $config_host_mak echo "EXESUF=3D$EXESUF" >> $config_host_mak =20 # use included Linux headers diff --git a/meson.build b/meson.build index b9df49667a19..c5a8dce9e1d6 100644 --- a/meson.build +++ b/meson.build @@ -200,7 +200,7 @@ foreach arg : config_host['QEMU_CFLAGS'].split() endif endforeach qemu_objcflags =3D config_host['QEMU_OBJCFLAGS'].split() -qemu_ldflags =3D config_host['QEMU_LDFLAGS'].split() +qemu_ldflags =3D [] =20 if get_option('gprof') qemu_common_flags +=3D ['-p'] @@ -211,6 +211,32 @@ if get_option('prefer_static') qemu_ldflags +=3D get_option('b_pie') ? '-static-pie' : '-static' endif =20 +if not get_option('stack_protector').disabled() + stack_protector_probe =3D ''' + int main(int argc, char *argv[]) + { + char arr[64], *p =3D arr, *c =3D argv[argc - 1]; + while (*c) { + *p++ =3D *c++; + } + return 0; + }''' + have_stack_protector =3D false + foreach arg : ['-fstack-protector-strong', '-fstack-protector-all'] + # We need to check both a compile and a link, since some compiler + # setups fail only on a .c->.o compile and some only at link time + if cc.compiles(stack_protector_probe, args: ['-Werror', arg]) and \ + cc.links(stack_protector_probe, args: ['-Werror', arg]) + have_stack_protector =3D true + qemu_cflags +=3D arg + qemu_ldflags +=3D arg + break + endif + endforeach + get_option('stack_protector') \ + .require(have_stack_protector, error_message: 'Stack protector not sup= ported') +endif + coroutine_backend =3D get_option('coroutine_backend') ucontext_probe =3D ''' #include diff --git a/meson_options.txt b/meson_options.txt index 126f89517e9a..98456b7cf2ea 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -93,6 +93,8 @@ option('sanitizers', type: 'boolean', value: false, description: 'enable default sanitizers') option('tsan', type: 'boolean', value: false, description: 'enable thread sanitizer') +option('stack_protector', type: 'feature', value: 'auto', + description: 'compiler-provided stack protection') option('cfi', type: 'boolean', value: false, description: 'Control-Flow Integrity (CFI)') option('cfi_debug', type: 'boolean', value: false, diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 29695ac88eea..a87b3702e955 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -157,6 +157,7 @@ meson_options_help() { printf "%s\n" ' sparse sparse checker' printf "%s\n" ' spice Spice server support' printf "%s\n" ' spice-protocol Spice protocol support' + printf "%s\n" ' stack-protector compiler-provided stack protection' printf "%s\n" ' tcg TCG support' printf "%s\n" ' tools build support utilities that come with = QEMU' printf "%s\n" ' tpm TPM support' @@ -424,6 +425,8 @@ _meson_option_parse() { --disable-spice) printf "%s" -Dspice=3Ddisabled ;; --enable-spice-protocol) printf "%s" -Dspice_protocol=3Denabled ;; --disable-spice-protocol) printf "%s" -Dspice_protocol=3Ddisabled ;; + --enable-stack-protector) printf "%s" -Dstack_protector=3Denabled ;; + --disable-stack-protector) printf "%s" -Dstack_protector=3Ddisabled ;; --enable-strip) printf "%s" -Dstrip=3Dtrue ;; --disable-strip) printf "%s" -Dstrip=3Dfalse ;; --sysconfdir=3D*) quote_sh "-Dsysconfdir=3D$2" ;; --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585934; cv=none; d=zohomail.com; s=zohoarc; b=Wq3nDZfC4v2fYbVHuR6nPKwDYImdRDH33Ckq8MZjnEzRE0syKTbcdOSERgVgUs2cvhJRg66OC9v5IVnk+wfa7fH+jdBldz+WYT+M7eVd5kCSdKWMd1+WK37IZLujvam5qB64s080V2pvE+GBgJuyBNfsqqdxolx/3BgHGtT7KEE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585934; h=Content-Type:Content-Transfer-Encoding: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=KZ9ZXklDjX5+p2BH+atkHNrEIUqXaenKUpdY1uzmlM8=; b=NBZP7ksENxvBAzmabZxhkPYo10TU7yEI4HpZJXqUfYd4C2Hq9EC/9LfjvOUILguTYSkY0fZ9z/r4W6f6PkChvw2rmcPQGePzQjdhr4Y/Chztk7NWdeTU6wJnuCxlLHFjcjBc/wuVdihKGrfW6hYkcn6PbJ1jBDO4PsQ1/1bNBtg= 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 1670585934898419.7810640754625; Fri, 9 Dec 2022 03:38:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bX6-0005rJ-U5; Fri, 09 Dec 2022 06:27:12 -0500 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 1p3bW3-0004gl-Fh for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:26:08 -0500 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 1p3bVp-0001Z6-RL for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:26:06 -0500 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_128_GCM_SHA256) id us-mta-183--7Byw8FwMoSFnGmyFZm3cQ-1; Fri, 09 Dec 2022 06:25:40 -0500 Received: by mail-ej1-f70.google.com with SMTP id hp16-20020a1709073e1000b007adf5a83df7so2910129ejc.1 for ; Fri, 09 Dec 2022 03:25:40 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id s4-20020a170906960400b007be2687186fsm456348ejx.21.2022.12.09.03.25.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:25:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585141; 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=KZ9ZXklDjX5+p2BH+atkHNrEIUqXaenKUpdY1uzmlM8=; b=fAZ8mWKQM04dNBSMzQNZ/lsBQQZF13aYHzUYLJAa0BCCmUcQ6z8NIQEvGnvnFxj43mHtEZ voEIiqJ83o9oys+QcKujSbGAnsU4qonWIWlGyj7037ckkX0wi04yrgtwmNOvK/nW+ulM22 7h6ljAcldZTJypudX1X02sILKhHnIDQ= X-MC-Unique: -7Byw8FwMoSFnGmyFZm3cQ-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KZ9ZXklDjX5+p2BH+atkHNrEIUqXaenKUpdY1uzmlM8=; b=qOEzGrmeCRfwmJMZIArr7HByT0rpf4kNpWAWxXaDEZAPAT25oSMxxWQ+ekWe8G91zw SnOc+aPM9A/KkADOEq7pZ21m2V2T+HG8rgsCew9Cesh54scA90Fe/iWKweLGLebCrPDW Hd82k+XXdxFrQTBPGExR+x5xZAXytisqrFV7CtxJXK0lNNG2lzdwxck5eRkoy5AZ0mY0 28UQ9M+Zhpxh2FI0J2lo23xBmtOHeqoRqv9Q9FCdsyN2yJ5ikvEMZDE8+l4yxspkgBCO dxvcV/t9ayjMUL+v+QD0GS+ibWU+aBnI27U6n5pjs5sEVHYYsQqgdS9+uLWz7nhuSu/x CZPw== X-Gm-Message-State: ANoB5plfgQ9colSsb7ujw3e41PzSxmDl3ya3xTmzno30fyhH0uaNz7BO o9F3Iqw2RN2tWk94E9gCwSMxyNPI8iQV10a6NtnccczNx8URA7AqqVibXEnzG0eJ79DzUsCKo2p ozrssxYcyE0K2tBtgYkuLxSfsmplRbKPA5aT2PF2hWIGXlvxXivWOFjyzcqRjhO8KVTU= X-Received: by 2002:a17:906:4dc9:b0:7c1:6fc:6048 with SMTP id f9-20020a1709064dc900b007c106fc6048mr4310042ejw.24.1670585138607; Fri, 09 Dec 2022 03:25:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf6SqpPVXRnwKkP3GsvItdgQQzPQMs77kcmKrqLSzrTdMH9KsOiJP8pNajaDHm6o0hYQ1y8Zxg== X-Received: by 2002:a17:906:4dc9:b0:7c1:6fc:6048 with SMTP id f9-20020a1709064dc900b007c106fc6048mr4310022ejw.24.1670585138065; Fri, 09 Dec 2022 03:25:38 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 25/30] build: move warning flag selection to meson Date: Fri, 9 Dec 2022 12:24:04 +0100 Message-Id: <20221209112409.184703-26-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585936930100003 Content-Type: text/plain; charset="utf-8" Meson already knows to test with the positive form of the flag, which simplifies the test. Warnings are now tested explicitly for the C++ compiler, instead of hardcoding those that are only available for the C language. At this point all compiler flags in QEMU_CFLAGS are global and only depend on the OS. No feature tests are performed in configure. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 94 ---------------------------------------- contrib/plugins/Makefile | 3 +- meson.build | 72 ++++++++++++++++++++---------- 3 files changed, 51 insertions(+), 118 deletions(-) diff --git a/configure b/configure index 5d31294f316f..6df61f4337e4 100755 --- a/configure +++ b/configure @@ -75,7 +75,6 @@ fi TMPB=3D"qemu-conf" TMPC=3D"${TMPDIR1}/${TMPB}.c" TMPO=3D"${TMPDIR1}/${TMPB}.o" -TMPM=3D"${TMPDIR1}/${TMPB}.m" TMPE=3D"${TMPDIR1}/${TMPB}.exe" =20 rm -f config.log @@ -157,15 +156,6 @@ do_cc() { do_compiler_werror "$cc" $CPU_CFLAGS "$@" } =20 -do_objc() { - do_compiler_werror "$objcc" $CPU_CFLAGS "$@" -} - -# Append $2 to the variable named $1, with space separation -add_to() { - eval $1=3D\${$1:+\"\$$1 \"}\$2 -} - compile_object() { local_cflags=3D"$1" do_cc $CFLAGS $EXTRA_CFLAGS $CONFIGURE_CFLAGS $QEMU_CFLAGS $local_cflags= -c -o $TMPO $TMPC @@ -1091,89 +1081,6 @@ if ! compile_prog "" "" ; then error_exit "You need at least GCC v7.4 or Clang v6.0 (or XCode Clang v= 10.0)" fi =20 -# Accumulate -Wfoo and -Wno-bar separately. -# We will list all of the enable flags first, and the disable flags second. -# Note that we do not add -Werror, because that would enable it for all -# configure tests. If a configure test failed due to -Werror this would -# just silently disable some features, so it's too error prone. - -warn_flags=3D -add_to warn_flags -Wundef -add_to warn_flags -Wwrite-strings -add_to warn_flags -Wmissing-prototypes -add_to warn_flags -Wstrict-prototypes -add_to warn_flags -Wredundant-decls -add_to warn_flags -Wold-style-declaration -add_to warn_flags -Wold-style-definition -add_to warn_flags -Wtype-limits -add_to warn_flags -Wformat-security -add_to warn_flags -Wformat-y2k -add_to warn_flags -Winit-self -add_to warn_flags -Wignored-qualifiers -add_to warn_flags -Wempty-body -add_to warn_flags -Wnested-externs -add_to warn_flags -Wendif-labels -add_to warn_flags -Wexpansion-to-defined -add_to warn_flags -Wimplicit-fallthrough=3D2 - -nowarn_flags=3D -add_to nowarn_flags -Wno-initializer-overrides -add_to nowarn_flags -Wno-missing-include-dirs -add_to nowarn_flags -Wno-shift-negative-value -add_to nowarn_flags -Wno-string-plus-int -add_to nowarn_flags -Wno-typedef-redefinition -add_to nowarn_flags -Wno-tautological-type-limit-compare -add_to nowarn_flags -Wno-psabi -add_to nowarn_flags -Wno-gnu-variable-sized-type-not-at-end - -gcc_flags=3D"$warn_flags $nowarn_flags" - -cc_has_warning_flag() { - write_c_skeleton; - - # Use the positive sense of the flag when testing for -Wno-wombat - # support (gcc will happily accept the -Wno- form of unknown - # warning options). - optflag=3D"$(echo $1 | sed -e 's/^-Wno-/-W/')" - compile_prog "-Werror $optflag" "" -} - -objcc_has_warning_flag() { - cat > $TMPM < $TMPC << EOF -struct { - int a[2]; -} x =3D {0}; -EOF -if compile_object "-Werror" "" ; then - : -else - QEMU_CFLAGS=3D"$QEMU_CFLAGS -Wno-missing-braces" -fi - # Resolve default for --enable-plugins if test "$static" =3D "yes" ; then if test "$plugins" =3D "yes"; then @@ -1928,7 +1835,6 @@ echo "NINJA=3D$ninja" >> $config_host_mak echo "PKG_CONFIG=3D${pkg_config_exe}" >> $config_host_mak echo "CC=3D$cc" >> $config_host_mak echo "QEMU_CFLAGS=3D$QEMU_CFLAGS" >> $config_host_mak -echo "QEMU_OBJCFLAGS=3D$QEMU_OBJCFLAGS" >> $config_host_mak echo "EXESUF=3D$EXESUF" >> $config_host_mak =20 # use included Linux headers diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile index 8a316cd76f2f..b2b9db9f51af 100644 --- a/contrib/plugins/Makefile +++ b/contrib/plugins/Makefile @@ -27,8 +27,7 @@ SONAMES :=3D $(addsuffix .so,$(addprefix lib,$(NAMES))) # The main QEMU uses Glib extensively so it's perfectly fine to use it # in plugins (which many example do). CFLAGS :=3D $(shell $(PKG_CONFIG) --cflags glib-2.0) -CFLAGS +=3D -fPIC -Wall $(filter -W%, $(QEMU_CFLAGS)) -CFLAGS +=3D $(if $(findstring no-psabi,$(QEMU_CFLAGS)),-Wpsabi) +CFLAGS +=3D -fPIC -Wall CFLAGS +=3D $(if $(CONFIG_DEBUG_TCG), -ggdb -O0) CFLAGS +=3D -I$(SRC_PATH)/include/qemu =20 diff --git a/meson.build b/meson.build index c5a8dce9e1d6..4ec8104b73a3 100644 --- a/meson.build +++ b/meson.build @@ -190,16 +190,8 @@ endif # Compiler flags # ################## =20 -qemu_common_flags =3D [] +qemu_common_flags =3D config_host['QEMU_CFLAGS'].split() qemu_cflags =3D [] -foreach arg : config_host['QEMU_CFLAGS'].split() - if arg.startswith('-W') - qemu_cflags +=3D arg - else - qemu_common_flags +=3D arg - endif -endforeach -qemu_objcflags =3D config_host['QEMU_OBJCFLAGS'].split() qemu_ldflags =3D [] =20 if get_option('gprof') @@ -380,20 +372,49 @@ endif add_global_arguments(qemu_common_flags, native: false, language: all_langu= ages) add_global_link_arguments(qemu_ldflags, native: false, language: all_langu= ages) =20 +# Collect warnings that we want to enable + +warn_flags =3D [ + '-Wundef', + '-Wwrite-strings', + '-Wmissing-prototypes', + '-Wstrict-prototypes', + '-Wredundant-decls', + '-Wold-style-declaration', + '-Wold-style-definition', + '-Wtype-limits', + '-Wformat-security', + '-Wformat-y2k', + '-Winit-self', + '-Wignored-qualifiers', + '-Wempty-body', + '-Wnested-externs', + '-Wendif-labels', + '-Wexpansion-to-defined', + '-Wimplicit-fallthrough=3D2', + '-Wno-initializer-overrides', + '-Wno-missing-include-dirs', + '-Wno-shift-negative-value', + '-Wno-string-plus-int', + '-Wno-typedef-redefinition', + '-Wno-tautological-type-limit-compare', + '-Wno-psabi', + '-Wno-gnu-variable-sized-type-not-at-end', +] + +if not cc.compiles(''' + struct { + int a[2]; + } x =3D {0};''', args: ['-Werror']) + warn_flags +=3D ['-Wno-missing-braces'] +endif + # Check that the C++ compiler exists and works with the C compiler. link_language =3D 'c' linker =3D cc qemu_cxxflags =3D [] if 'cpp' in all_languages - 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 - + qemu_cxxflags =3D ['-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', = '-D__STDC_FORMAT_MACROS'] + qemu_cflags if cxx.links(files('scripts/main.c'), args: qemu_cflags) link_language =3D 'cpp' linker =3D cxx @@ -413,9 +434,16 @@ if get_option('optimization') !=3D '0' and targetos = =3D=3D 'linux' endif endif =20 -add_project_arguments(qemu_cflags, native: false, language: 'c') -add_project_arguments(qemu_cxxflags, native: false, language: 'cpp') -add_project_arguments(qemu_objcflags, native: false, language: 'objc') +add_project_arguments(qemu_cflags, native: false, language: 'objc') +add_project_arguments(cc.get_supported_arguments(warn_flags), native: fals= e, language: 'c') +if 'cpp' in all_languages + add_project_arguments(qemu_cxxflags, native: false, language: 'cpp') + add_project_arguments(cxx.get_supported_arguments(warn_flags), native: f= alse, language: 'cpp') +endif +if 'objc' in all_languages + # Note sanitizer flags are not applied to Objective-C sources! + add_project_arguments(objc.get_supported_arguments(warn_flags), native: = false, language: 'objc') +endif if targetos =3D=3D 'linux' add_project_arguments('-isystem', meson.current_source_dir() / 'linux-he= aders', '-isystem', 'linux-headers', @@ -3927,7 +3955,7 @@ if 'cpp' in all_languages summary_info +=3D {'QEMU_CXXFLAGS': ' '.join(qemu_common_flags + qem= u_cxxflags)} endif if 'objc' in all_languages - summary_info +=3D {'QEMU_OBJCFLAGS': ' '.join(qemu_common_flags + qem= u_objcflags)} + summary_info +=3D {'QEMU_OBJCFLAGS': ' '.join(qemu_common_flags)} endif summary_info +=3D {'QEMU_LDFLAGS': ' '.join(qemu_ldflags)} summary_info +=3D {'profiler': get_option('profiler')} --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670585870; cv=none; d=zohomail.com; s=zohoarc; b=jnin5RNTpCaSMraGwrW5mg8LN/DLp/4AKk0uMJniMIal6GyMDB4MLHjhTvLwQtZ8xBFS46TiRq0hf2bKVOqBjLtk11aw0kn+aDeMIOx3TQ5S/sKjrY7gMpmU3jaGvcrtoKCWwG1iUDWKI6pMmFQ9ugm2gy125UJ++moIU5wIMuk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670585870; h=Content-Type:Content-Transfer-Encoding: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=Hi9wAKVzCZ1hT1TsF3V5eUrMQ7ppn0EvxBQacimafSo=; b=C2NkgVw2UcEe+TX8RZSkdpp3+dRGDk930H9T/Tfo7xxzdwyjUc5oysfAToqW/RKZsCa14uJq0QaYl5q2ah//EtMPgfX+ZvHnKWseiLoX0qIh4Te+NG4bCoOdXK2zM238Sek3m8KG6vNos2umWKI8zokRwpF/VyphZO6yNgNkIRs= 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 1670585869864348.36412850164345; Fri, 9 Dec 2022 03:37:49 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bXF-0005wm-Gw; Fri, 09 Dec 2022 06:27:21 -0500 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 1p3bW1-0004ca-G6 for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:26:05 -0500 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 1p3bVq-0001ZN-0w for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:26:01 -0500 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_128_GCM_SHA256) id us-mta-358-kXKQrkhkMUiTKBIAY7sH5Q-1; Fri, 09 Dec 2022 06:25:42 -0500 Received: by mail-ej1-f71.google.com with SMTP id ds15-20020a170907724f00b007c0abebc958so2892867ejc.2 for ; Fri, 09 Dec 2022 03:25:42 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id v9-20020a170906292900b007c0aefd9339sm451176ejd.175.2022.12.09.03.25.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:25:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585144; 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=Hi9wAKVzCZ1hT1TsF3V5eUrMQ7ppn0EvxBQacimafSo=; b=EYOCI+0oCmuuqGMqvNPCOsI7OM+2KGw0Ex7SrKqHnJov0+pIKItbuEw0Gon3jGoLECUYJg oEZ4MynlqnulKoQ15OimB3Ck5DXkwwtxJR8VX47EKZpeqGyT3MHQUitrlro9ORjZAROYYz AKzVjKZ+2tEyJbAuUF/it9gX6oC8UEc= X-MC-Unique: kXKQrkhkMUiTKBIAY7sH5Q-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Hi9wAKVzCZ1hT1TsF3V5eUrMQ7ppn0EvxBQacimafSo=; b=nnbxcsP06hsuHKqj9yKrH5leTNj4mouD5MTyYWksqrmIUw/HAxN8CCp4MMUE5xolhr pZBDMcNLnq5Z4h1/ZkI53Fv0AoVPerqvpEZHC9p3JxQJSNjm2M5g6ciFALraQKOCz4rh deA0l3JJbIk9w6pHSq8YWNrPDURuwDy82FjNB1gW4jnIXYt+Jmk1RGRBxMLnAgGS9z7T SMQvPf+br1iP9OVhqaOXZoGl12nExVNK84loOawuHgaEwhPzC0dH4HRCDh6+QQOaWPL4 kwchYoFYdb0891SEMDh9HYhPPTZ3+ppU1ha59j78eS9R5eySy88LosuMyLzku+V/+B+Y 9LCg== X-Gm-Message-State: ANoB5pkfmajsA4yXqJS6uVuCI0dncu8vALpGvVTACsl/fOSTnUSkSqrS ARTmlIztDQp3cxEY5Z1WuJ7gjgEacdM46CkqNP1gzWKh3kdhLCbDFTTR3KTktLz/qf98CfhcqW1 9dWItv1jRzt2V+unVaDCANvX+0Bfr9pUQI4eGu6qlUi0lqJo94yjg/kSBuV/gtD3aZPA= X-Received: by 2002:a17:906:f856:b0:7c0:b0f9:e360 with SMTP id ks22-20020a170906f85600b007c0b0f9e360mr4512634ejb.16.1670585141299; Fri, 09 Dec 2022 03:25:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf4H+o29F1rU7fRcwelOoA8l+BetiuHfH9JhrPQcIDCtTKZ1v4ifg9lzPVjC9Jlmj75G3ry4ew== X-Received: by 2002:a17:906:f856:b0:7c0:b0f9:e360 with SMTP id ks22-20020a170906f85600b007c0b0f9e360mr4512613ejb.16.1670585140755; Fri, 09 Dec 2022 03:25:40 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 26/30] build: move remaining compiler flag tests to meson Date: Fri, 9 Dec 2022 12:24:05 +0100 Message-Id: <20221209112409.184703-27-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670585870583100003 Content-Type: text/plain; charset="utf-8" Remove the only remaining uses of QEMU_CFLAGS. Now that no feature tests are done in configure, it is possible to remove CONFIGURE_CFLAGS and CONFIGURE_LDFLAGS as well. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 79 ++++++++--------------------------------------------- meson.build | 49 ++++++++++++++++++++++++++++++++- 2 files changed, 59 insertions(+), 69 deletions(-) diff --git a/configure b/configure index 6df61f4337e4..d5491fc3b986 100755 --- a/configure +++ b/configure @@ -158,14 +158,14 @@ do_cc() { =20 compile_object() { local_cflags=3D"$1" - do_cc $CFLAGS $EXTRA_CFLAGS $CONFIGURE_CFLAGS $QEMU_CFLAGS $local_cflags= -c -o $TMPO $TMPC + do_cc $CFLAGS $EXTRA_CFLAGS $local_cflags -c -o $TMPO $TMPC } =20 compile_prog() { local_cflags=3D"$1" local_ldflags=3D"$2" - do_cc $CFLAGS $EXTRA_CFLAGS $CONFIGURE_CFLAGS $QEMU_CFLAGS $local_cflags= -o $TMPE $TMPC \ - $LDFLAGS $EXTRA_LDFLAGS $CONFIGURE_LDFLAGS $local_ldflags + do_cc $CFLAGS $EXTRA_CFLAGS $local_cflags -o $TMPE $TMPC \ + $LDFLAGS $EXTRA_LDFLAGS $local_ldflags } =20 # symbolically link $1 to $2. Portable version of "ln -sf". @@ -351,19 +351,6 @@ windres=3D"${WINDRES-${cross_prefix}windres}" pkg_config=3D"${PKG_CONFIG-${cross_prefix}pkg-config}" sdl2_config=3D"${SDL2_CONFIG-${cross_prefix}sdl2-config}" =20 -# default flags for all hosts -# We use -fwrapv to tell the compiler that we require a C dialect where -# left shift of signed integers is well defined and has the expected -# 2s-complement style results. (Both clang and gcc agree that it -# provides these semantics.) -QEMU_CFLAGS=3D"-fno-strict-aliasing -fno-common -fwrapv" -QEMU_CFLAGS=3D"-D_GNU_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_LARGEFILE_SOURCE = $QEMU_CFLAGS" - -# Flags that are needed during configure but later taken care of by Meson -CONFIGURE_CFLAGS=3D"-std=3Dgnu11 -Wall" -CONFIGURE_LDFLAGS=3D - - check_define() { cat > $TMPC < $TMPC << EOF -static int sfaa(int *ptr) -{ - return __sync_fetch_and_and(ptr, 0); -} - -int main(void) -{ - int val =3D 42; - val =3D __sync_val_compare_and_swap(&val, 0, 1); - sfaa(&val); - return val; -} -EOF - if ! compile_prog "" "" ; then - QEMU_CFLAGS=3D"-march=3Di486 $QEMU_CFLAGS" - fi -fi =20 if test -z "${target_list+xxx}" ; then default_targets=3Dyes @@ -1834,7 +1778,6 @@ echo "MESON=3D$meson" >> $config_host_mak echo "NINJA=3D$ninja" >> $config_host_mak echo "PKG_CONFIG=3D${pkg_config_exe}" >> $config_host_mak echo "CC=3D$cc" >> $config_host_mak -echo "QEMU_CFLAGS=3D$QEMU_CFLAGS" >> $config_host_mak echo "EXESUF=3D$EXESUF" >> $config_host_mak =20 # use included Linux headers diff --git a/meson.build b/meson.build index 4ec8104b73a3..01c6ac0045bc 100644 --- a/meson.build +++ b/meson.build @@ -190,10 +190,50 @@ endif # Compiler flags # ################## =20 -qemu_common_flags =3D config_host['QEMU_CFLAGS'].split() +# default flags for all hosts +# We use -fwrapv to tell the compiler that we require a C dialect where +# left shift of signed integers is well defined and has the expected +# 2s-complement style results. (Both clang and gcc agree that it +# provides these semantics.) + +qemu_common_flags =3D [ + '-D_GNU_SOURCE', '-D_FILE_OFFSET_BITS=3D64', '-D_LARGEFILE_SOURCE', + '-fno-strict-aliasing', '-fno-common', '-fwrapv' ] qemu_cflags =3D [] qemu_ldflags =3D [] =20 +if targetos =3D=3D 'darwin' + # Disable attempts to use ObjectiveC features in os/object.h since they + # won't work when we're compiling with gcc as a C compiler. + qemu_common_flags +=3D '-DOS_OBJECT_USE_OBJC=3D0' +elif targetos =3D=3D 'solaris' + # needed for CMSG_ macros in sys/socket.h + qemu_common_flags +=3D '-D_XOPEN_SOURCE=3D600' + # needed for TIOCWIN* defines in termios.h + qemu_common_flags +=3D '-D__EXTENSIONS__' +elif targetos =3D=3D 'haiku' + qemu_common_flags +=3D ['-DB_USE_POSITIVE_POSIX_ERRORS', '-D_BSD_SOURCE'= , '-fPIC'] +endif + +# __sync_fetch_and_and requires at least -march=3Di486. Many toolchains +# use i686 as default anyway, but for those that don't, an explicit +# specification is necessary +if host_arch =3D=3D 'i386' and not cc.links(''' + static int sfaa(int *ptr) + { + return __sync_fetch_and_and(ptr, 0); + } + + int main(void) + { + int val =3D 42; + val =3D __sync_val_compare_and_swap(&val, 0, 1); + sfaa(&val); + return val; + }''') + qemu_common_flags =3D ['-march=3Di486'] + qemu_common_flags +endif + if get_option('gprof') qemu_common_flags +=3D ['-p'] qemu_ldflags +=3D ['-p'] @@ -203,6 +243,13 @@ if get_option('prefer_static') qemu_ldflags +=3D get_option('b_pie') ? '-static-pie' : '-static' endif =20 +# Meson currently only handles pie as a boolean for now, so if the user +# has explicitly disabled PIE we need to extend our cflags. +if not get_option('b_pie') + qemu_cflags +=3D cc.get_supported_arguments('-fno-pie') + qemu_ldflags +=3D cc.get_supported_link_arguments('-no-pie') +endif + if not get_option('stack_protector').disabled() stack_protector_probe =3D ''' int main(int argc, char *argv[]) --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670586037; cv=none; d=zohomail.com; s=zohoarc; b=aSA3eq5EklAsn6r1k/0zUJt6iYJsb9l1GNb1zTVekSKq/j6NzJrDz9JlMlB5kGjz045z07INf7vZgOjuOUt98DTvx2XiZuTw8p20f6LWc+9m38GVhEKhqzUuoBTpAvhYcXkQJecoeK1mVslJ/Gs+nrahDmyWf6VwujLiMAgG/1o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670586037; h=Content-Type:Content-Transfer-Encoding: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=XL3SE4D+sFTguF12ERUOqOKoyGEmbAcXchpRDTm09AA=; b=cpB8nStaF5EyNDswL1qgbAHS3nZBEvTuFnD7IGIOTENYUxMclYclw5fmrXYZC2cPm6zEM3FpX9OfnEN9K60PkXTFkR+uTgiMdmVNHrRUNfq0AQYTDxdGTrgSA8wgn6ixQfPATsa/6+n8GOr0DgvsIskN8cs3gLO4D9039CDr7H4= 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 1670586037442877.6211809258375; Fri, 9 Dec 2022 03:40:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bXF-0005wX-Cz; Fri, 09 Dec 2022 06:27:21 -0500 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 1p3bVq-0004Sn-9s for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:57 -0500 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 1p3bVl-0001aE-RI for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:52 -0500 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_128_GCM_SHA256) id us-mta-456-nDCjX1qjMXCyXQ6P3XYEvw-1; Fri, 09 Dec 2022 06:25:45 -0500 Received: by mail-ej1-f70.google.com with SMTP id hd17-20020a170907969100b007c117851c81so2942875ejc.10 for ; Fri, 09 Dec 2022 03:25:44 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id y15-20020a056402170f00b0045726e8a22bsm513811edu.46.2022.12.09.03.25.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:25:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585146; 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=XL3SE4D+sFTguF12ERUOqOKoyGEmbAcXchpRDTm09AA=; b=YfajYAGymRKajT//1OwwWnIOjFRR4qKXddFbC7tMJ2qfncrUJH/pGIAov2Y/D+uBwnmSGT +WqE8rHHjzM7dJaAA6zfwLmREYmpiy0cjoLzl7aps78CoXCxSPNVwSm0EeH7u7hNCkEpws kpAAHVJG1NxTzRUkme589Mth4pzZqxQ= X-MC-Unique: nDCjX1qjMXCyXQ6P3XYEvw-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XL3SE4D+sFTguF12ERUOqOKoyGEmbAcXchpRDTm09AA=; b=3VzZPHLGBxnPXZrznN49Wj+dzukN3QsMb0Hv1NcCld8sBfQmKaLuJLxIV/2fL7rwmT B8SIjL5WOmhgA9VfOic9vIEpxZg/YvPV6UUSJnROOxh+u0jrBFMYC4pnFYDsOFBWr1Hj 00I4CyBCt7uc46MPM2ZmFtz4ALNPLkBPGeW7gLgD0cKifp+qCHfvpGtwAq8dIlpuqx3S nZdseSFRv3CxWmnt+HJlP8L2MJkaXmhncoTZoEL2sRbV+MtcFChpjfXBnMp+kuDxVI6V 9awkcwImjhYsba5L7YoWzo7KDACTh5bWK8Yr4HXqtU9L3DMwdgE1fu77jr7gBKULOHS7 IFjA== X-Gm-Message-State: ANoB5pngGGUfxa4iGWEAmPA1aLt7F4s5nkBXzglM6gboeoRc5Q3HUePm lJ9Rhq2bnFskg2TfSnZgaNcjVZpb+Ixk2RYVPqkomG2B/mBdns65BH57JBDTs0w3AK/pAY27QeF XOS6ZicQwAZvg6KWP/MDIkQXy4m0/nvixibO49xRc4i+OpO0KVx2wnXzrlIT8MiZHgUA= X-Received: by 2002:a05:6402:4029:b0:462:555e:1e95 with SMTP id d41-20020a056402402900b00462555e1e95mr5262439eda.35.1670585143766; Fri, 09 Dec 2022 03:25:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf4JnnnYDIS7YHQgIjSTdvVc7501fIn8nvhmG2fAv1TB8+SNB8aZXI3ccvaux9x4loieDOM5cA== X-Received: by 2002:a05:6402:4029:b0:462:555e:1e95 with SMTP id d41-20020a056402402900b00462555e1e95mr5262416eda.35.1670585143464; Fri, 09 Dec 2022 03:25:43 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 27/30] build: move compiler version check to meson Date: Fri, 9 Dec 2022 12:24:06 +0100 Message-Id: <20221209112409.184703-28-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670586037741100001 Content-Type: text/plain; charset="utf-8" Instead of checking with preprocessor defines, use the Meson compiler objec= t. Because of the mess Apple does with its versioning scheme, check for an option that was added in clang 6.0 instead of looking at the version number. Signed-off-by: Paolo Bonzini --- configure | 25 ------------------------- meson.build | 11 +++++++++++ 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/configure b/configure index d5491fc3b986..a7c95535fd01 100755 --- a/configure +++ b/configure @@ -1033,31 +1033,6 @@ if test "$targetos" =3D "bogus"; then error_exit "Unrecognized host OS (uname -s reports '$(uname -s)')" fi =20 -# Check whether the compiler matches our minimum requirements: -cat > $TMPC << EOF -#if defined(__clang_major__) && defined(__clang_minor__) -# ifdef __apple_build_version__ -# if __clang_major__ < 10 || (__clang_major__ =3D=3D 10 && __clang_minor_= _ < 0) -# error You need at least XCode Clang v10.0 to compile QEMU -# endif -# else -# if __clang_major__ < 6 || (__clang_major__ =3D=3D 6 && __clang_minor__ = < 0) -# error You need at least Clang v6.0 to compile QEMU -# endif -# endif -#elif defined(__GNUC__) && defined(__GNUC_MINOR__) -# if __GNUC__ < 7 || (__GNUC__ =3D=3D 7 && __GNUC_MINOR__ < 4) -# error You need at least GCC v7.4.0 to compile QEMU -# endif -#else -# error You either need GCC or Clang to compiler QEMU -#endif -int main (void) { return 0; } -EOF -if ! compile_prog "" "" ; then - error_exit "You need at least GCC v7.4 or Clang v6.0 (or XCode Clang v= 10.0)" -fi - # Resolve default for --enable-plugins if test "$static" =3D "yes" ; then if test "$plugins" =3D "yes"; then diff --git a/meson.build b/meson.build index 01c6ac0045bc..3316ff005cfc 100644 --- a/meson.build +++ b/meson.build @@ -190,6 +190,17 @@ endif # Compiler flags # ################## =20 +foreach lang : all_languages + compiler =3D meson.get_compiler(lang) + if compiler.get_id() =3D=3D 'gcc' and compiler.version().version_compare= ('>=3D7.4') + # ok + elif compiler.get_id() =3D=3D 'clang' and compiler.has_argument('-Wpragm= a-pack') + # ok + else + error('You either need GCC v7.4 or Clang v6.0 (or XCode Clang v10.0) t= o compile QEMU') + endif +endforeach + # default flags for all hosts # We use -fwrapv to tell the compiler that we require a C dialect where # left shift of signed integers is well defined and has the expected --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670586177; cv=none; d=zohomail.com; s=zohoarc; b=d5Gazk6+08q/gQQQ9fPusF7/gAQ7LX64Uf5HmfuLrS3eUgrOuRsDXvlNCeZWpVKxU9Yp4qM2Rra7V6kkFaxLO8tIjokun3l6tlzyajrbGDiLRHYcxpb+K//6Vf+eyqQOUds0knF1+adXrph+TTqMHYF6HOSQa/SMuVQORilvAuQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670586177; h=Content-Type:Content-Transfer-Encoding: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=WtWq+anltFcsZMBRZFyItpTqeGtjAFRTgq25axWJ1Uw=; b=Vkshzw+uPN9G2yT7+ykDEubgnQunHGjyn3hSFq5IGzwJSh2KctytP8CaLpT1iUDq/kAsj89FVa/KCq6KhnAvhYnbnRhQNjN2s8rXVvs47YNT3PSLES4o22NX1Ms7EU4bxTQ441os+MZDs8lmsTb88ZwWzidsJkL7bBVHwrz1hds= 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 1670586177125152.99332710340025; Fri, 9 Dec 2022 03:42:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bWM-0005GU-Lg; Fri, 09 Dec 2022 06:26:26 -0500 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 1p3bVs-0004Tj-IB for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:26:00 -0500 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 1p3bVn-0001bp-Sj for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:25:56 -0500 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-48-jLGfGITnPvSYLxrzdwmcGw-1; Fri, 09 Dec 2022 06:25:48 -0500 Received: by mail-ej1-f69.google.com with SMTP id sc5-20020a1709078a0500b007c0ca93c161so2913892ejc.7 for ; Fri, 09 Dec 2022 03:25:48 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id b11-20020a1709065e4b00b007c0b9500129sm455074eju.68.2022.12.09.03.25.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:25:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585149; 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=WtWq+anltFcsZMBRZFyItpTqeGtjAFRTgq25axWJ1Uw=; b=e9Hn3k3K8+glaJt2427zhn6lIEKTIaOFD2lURUJZGcU+MXoFUmixUtozDkl5Htz/r/2RvI k82Wtqlk/ruT3Mh3reQ8D3CyBrvOKS+WFNlTZujfl6xXPghOKcF84sWGNXxWzGp3LOqgr2 UrzKjcTWgxRmzAGODoTUmjsUNFl4/LE= X-MC-Unique: jLGfGITnPvSYLxrzdwmcGw-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WtWq+anltFcsZMBRZFyItpTqeGtjAFRTgq25axWJ1Uw=; b=u+obmRWp8P0H/ndZ20+d054Ndom4BhHF+5Sbh+cK+rery29ZFP/beIPGJToeLcpfHx ZV66DY3gjUCFUZ+iKB78kewl6O36g205ALsQlvwxY7c9havUWwSIo4f2HjB9GuPxH8Hd NFmBLrt+LDbngv9JJovBE4clkTCLc61aAmi7NJcPVornGRDn4DN/zEgTFuwVaOJAXSQ3 ui+k4CwQE3kj9zMd9et/v1U6Wp06xnqvFH05kJedChig2bLZLQLtIsJFoOVOrDs/5cSG 2ZKs/ynlHkvwfIscm1mSBTP4WibAyfjGtJ6wOTgRSaGjJIO1r+nJb6ixZmiGHypmVSpw AKdA== X-Gm-Message-State: ANoB5pnTpHYIkuJUvwSLeW8YBezPfjtEn2RcAf12WwZi2JzyQFQba7rP lF/RfpYJyLBdbyN6wevGm7xms4m3vKJ5jeR6aJF0z0JHwrmJ2p1rHDG5h8C4dfa7uoYJL56w3DC zjjuc2072t3giKWGdvdcHjtpte1VqtaUojMHaK7WEVVUbVwPWXsKVfHp1bbcnMP41ggE= X-Received: by 2002:a17:907:8b0a:b0:7c1:484b:81bd with SMTP id sz10-20020a1709078b0a00b007c1484b81bdmr280616ejc.60.1670585146785; Fri, 09 Dec 2022 03:25:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf4zChqralGSzqC7srisz0aTxiLaJkEPgtp40rgHUkD4W18PHXK2gRSjchqNCHQvPC2huD91Zg== X-Received: by 2002:a17:907:8b0a:b0:7c1:484b:81bd with SMTP id sz10-20020a1709078b0a00b007c1484b81bdmr280569ejc.60.1670585146023; Fri, 09 Dec 2022 03:25:46 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 28/30] docs: update build system docs Date: Fri, 9 Dec 2022 12:24:07 +0100 Message-Id: <20221209112409.184703-29-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670586179006100003 Content-Type: text/plain; charset="utf-8" Now that configure is only doing compiler and host setup, adjust the relevant documentation. It is also possible to build emulators with ninja directly if one is so inclined. Signed-off-by: Paolo Bonzini --- docs/devel/build-system.rst | 275 +++++++++++++++++++++--------------- 1 file changed, 164 insertions(+), 111 deletions(-) diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst index 4a733fc0a747..a25070fcaac8 100644 --- a/docs/devel/build-system.rst +++ b/docs/devel/build-system.rst @@ -4,30 +4,14 @@ The QEMU build system architecture =20 This document aims to help developers understand the architecture of the QEMU build system. As with projects using GNU autotools, the QEMU build -system has two stages, first the developer runs the "configure" script +system has two stages; first the developer runs the "configure" script to determine the local build environment characteristics, then they run -"make" to build the project. There is about where the similarities with +"make" to build the project. This is about where the similarities with GNU autotools end, so try to forget what you know about them. =20 +The two general ways to perform a build are as follows: =20 -Stage 1: configure -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - -The QEMU configure script is written directly in shell, and should be -compatible with any POSIX shell, hence it uses #!/bin/sh. An important -implication of this is that it is important to avoid using bash-isms on -development platforms where bash is the primary host. - -In contrast to autoconf scripts, QEMU's configure is expected to be -silent while it is checking for features. It will only display output -when an error occurs, or to show the final feature enablement summary -on completion. - -Because QEMU uses the Meson build system under the hood, only VPATH -builds are supported. There are two general ways to invoke configure & -perform a build: - - - VPATH, build artifacts outside of QEMU source tree entirely:: + - build artifacts outside of QEMU source tree entirely:: =20 cd ../ mkdir build @@ -35,80 +19,114 @@ perform a build: ../qemu/configure make =20 - - VPATH, build artifacts in a subdir of QEMU source tree:: + - build artifacts in a subdir of QEMU source tree:: =20 mkdir build cd build ../configure make =20 -The configure script automatically recognizes -command line options for which a same-named Meson option exists; -dashes in the command line are replaced with underscores. +Most of the actual build process uses Meson under the hood, therefore +build artifacts cannot be placed in the source tree itself. =20 -Many checks on the compilation environment are still found in configure -rather than ``meson.build``, but new checks should be added directly to -``meson.build``. =20 -Patches are also welcome to move existing checks from the configure -phase to ``meson.build``. When doing so, ensure that ``meson.build`` does -not use anymore the keys that you have removed from ``config-host.mak``. -Typically these will be replaced in ``meson.build`` by boolean variables, -``get_option('optname')`` invocations, or ``dep.found()`` expressions. -In general, the remaining checks have little or no interdependencies, -so they can be moved one by one. +Stage 1: configure +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -Helper functions ----------------- +The configure script has four tasks: =20 -The configure script provides a variety of helper functions to assist -developers in checking for system features: + - detect the host architecture =20 -``do_cc $ARGS...`` - Attempt to run the system C compiler passing it $ARGS... + - list the targets for which to build emulators; the list of + targets also affects which firmware binaries and tests to build =20 -``do_cxx $ARGS...`` - Attempt to run the system C++ compiler passing it $ARGS... + - find the compilers (native and cross) used to build executables, + firmware and tests. The results are written as either Makefile + fragments (``config-host.mak``) or a Meson machine file + (``config-meson.cross``) =20 -``compile_object $CFLAGS`` - Attempt to compile a test program with the system C compiler using - $CFLAGS. The test program must have been previously written to a file - called $TMPC. The replacement in Meson is the compiler object ``cc``, - which has methods such as ``cc.compiles()``, - ``cc.check_header()``, ``cc.has_function()``. + - invoke Meson to perform the actual configuration step for the + emulator build =20 -``compile_prog $CFLAGS $LDFLAGS`` - Attempt to compile a test program with the system C compiler using - $CFLAGS and link it with the system linker using $LDFLAGS. The test - program must have been previously written to a file called $TMPC. - The replacement in Meson is ``cc.find_library()`` and ``cc.links()``. +The configure script automatically recognizes command line options for +which a same-named Meson option exists; dashes in the command line are +replaced with underscores. + +Almost all QEMU developers that need to modify the build system will +only be concerned with Meson, and therefore can skip the rest of this +section. + + +Modifying ``configure`` +----------------------- + +``configure`` is a shell script; it uses ``#!/bin/sh`` and therefore +should be compatible with any POSIX shell. It is important to avoid +using bash-isms to avoid breaking development platforms where bash is +the primary host. + +The configure script provides a variety of functions to help writing +portable shell code and providing consistent behavior across architectures +and operating systems: + +``error_exit $MESSAGE $MORE...`` + Print $MESSAGE to stderr, followed by $MORE... and then exit from the + configure script with non-zero status. =20 ``has $COMMAND`` Determine if $COMMAND exists in the current environment, either as a shell builtin, or executable binary, returning 0 on success. The replacement in Meson is ``find_program()``. =20 +``probe_target_compiler $TARGET`` + Detect a cross compiler and cross tools for the QEMU target $TARGET (e.g= ., + ``$CPU-softmmu``, ``$CPU-linux-user``, ``$CPU-bsd-user``). If a working + compiler is present, return success and set variables ``$target_cc``, + ``$target_ar``, etc. to non-empty values. + +``write_target_makefile`` + Write a Makefile fragment to stdout, exposing the result of the most + ``probe_target_compiler`` call as the usual Make variables (``CC``, + ``AR``, ``LD``, etc.). + + +Configure does not generally perform tests for compiler options beyond +basic checks to detect the host platform and ensure the compiler is +functioning. These are performed using a few more helper functions: + +``compile_object $CFLAGS`` + Attempt to compile a test program with the system C compiler using + $CFLAGS. The test program must have been previously written to a file + called $TMPC. + +``compile_prog $CFLAGS $LDFLAGS`` + Attempt to compile a test program with the system C compiler using + $CFLAGS and link it with the system linker using $LDFLAGS. The test + program must have been previously written to a file called $TMPC. + ``check_define $NAME`` - Determine if the macro $NAME is defined by the system C compiler + Determine if the macro $NAME is defined by the system C compiler. + +``do_compiler $CC $ARGS...`` + Attempt to run the C compiler $CC, passing it $ARGS... This function + does not use flags passed via options such as ``--extra-cflags``, and + therefore can be used to check for cross compilers. However, most + such checks are done at ``make`` time instead (see for example the + ``cc-option`` macro in ``pc-bios/option-rom/Makefile``). =20 ``write_c_skeleton`` Write a minimal C program main() function to the temporary file - indicated by $TMPC - -``error_exit $MESSAGE $MORE...`` - Print $MESSAGE to stderr, followed by $MORE... and then exit from the - configure script with non-zero status + indicated by $TMPC. =20 =20 Stage 2: Meson =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -The Meson build system is currently used to describe the build -process for: +The Meson build system describes the build and install process for: =20 1) executables, which include: =20 - - Tools - ``qemu-img``, ``qemu-nbd``, ``qga`` (guest agent), etc + - Tools - ``qemu-img``, ``qemu-nbd``, ``qemu-ga`` (guest agent), etc =20 - System emulators - ``qemu-system-$ARCH`` =20 @@ -118,7 +136,8 @@ process for: =20 2) documentation =20 -3) ROMs, which can be either installed as binary blobs or compiled +3) ROMs, whether provided as binary blobs in the QEMU distributions + or cross compiled under the direction of the configure script =20 4) other data files, such as icons or desktop files =20 @@ -273,8 +292,7 @@ system/userspace emulation target Adding checks ------------- =20 -New checks should be added to Meson. Compiler checks can be as simple as -the following:: +Compiler checks can be as simple as the following:: =20 config_host_data.set('HAVE_BTRFS_H', cc.has_header('linux/btrfs.h')) =20 @@ -351,22 +369,30 @@ script, which may point to something other than the f= irst python3 binary on the path. =20 =20 -Stage 3: makefiles -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +Stage 3: Make +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -The use of GNU make is required with the QEMU build system. +The next step in building QEMU is to invoke make. GNU Make is required +to build QEMU, and may be installed as ``gmake`` on some hosts. =20 -The output of Meson is a build.ninja file, which is used with the Ninja -build system. QEMU uses a different approach, where Makefile rules are -synthesized from the build.ninja file. The main Makefile includes these -rules and wraps them so that e.g. submodules are built before QEMU. -The resulting build system is largely non-recursive in nature, in -contrast to common practices seen with automake. +The output of Meson is a ``build.ninja`` file, which is used with the +Ninja build tool. However, QEMU's build comprises other components than +just the emulators (namely firmware and the tests in ``tests/tcg``) which +need different cross compilers. The QEMU Makefile wraps both Ninja and +the smaller build systems for firmware and tests; it also takes care of +running ``configure`` again when the script changes. Apart from invoking +these sub-Makefiles, the resulting build is largely non-recursive. =20 -Tests are also ran by the Makefile with the traditional ``make check`` -phony target, while benchmarks are run with ``make bench``. Meson test -suites such as ``unit`` can be ran with ``make check-unit`` too. It is al= so -possible to run tests defined in meson.build with ``meson test``. +Tests, whether defined in ``meson.build`` or not, are also ran by the +Makefile with the traditional ``make check`` phony target, while benchmarks +are run with ``make bench``. Meson test suites such as ``unit`` can be ran +with ``make check-unit``, and ``make check-tcg`` builds and runs "non-Meso= n" +tests for all targets. + +If desired, it is also possible to use ``ninja`` and ``meson test``, +respectively to build emulators and run tests defined in meson.build. +The main difference is that ``make`` needs the ``-jN`` flag in order to +enable parallel builds or tests. =20 Useful make targets ------------------- @@ -378,6 +404,7 @@ Useful make targets Print the value of the variable VAR. Useful for debugging the build system. =20 + Important files for the build system =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 @@ -391,8 +418,7 @@ number of dynamically created files listed later. ``Makefile`` The main entry point used when invoking make to build all the components of QEMU. The default 'all' target will naturally result in the build of - every component. Makefile takes care of recursively building submodules - directly via a non-recursive set of rules. + every component. =20 ``*/meson.build`` The meson.build file in the root directory is the main entry point for t= he @@ -401,59 +427,86 @@ number of dynamically created files listed later. other meson.build files spread throughout the QEMU source tree. =20 ``tests/Makefile.include`` - Rules for external test harnesses. These include the TCG tests, - ``qemu-iotests`` and the Avocado-based integration tests. + Rules for external test harnesses. These include the TCG tests + and the Avocado-based integration tests. =20 ``tests/docker/Makefile.include`` - Rules for Docker tests. Like tests/Makefile, this file is included - directly by the top level Makefile, anything defined in this file will - influence the entire build system. + Rules for Docker tests. Like ``tests/Makefile.include``, this file is + included directly by the top level Makefile, anything defined in this + file will influence the entire build system. =20 ``tests/vm/Makefile.include`` - Rules for VM-based tests. Like tests/Makefile, this file is included - directly by the top level Makefile, anything defined in this file will - influence the entire build system. + Rules for VM-based tests. Like ``tests/Makefile.include``, this file is + included directly by the top level Makefile, anything defined in this + file will influence the entire build system. =20 Dynamically created files ------------------------- =20 -The following files are generated dynamically by configure in order to -control the behaviour of the statically defined makefiles. This avoids -the need for QEMU makefiles to go through any pre-processing as seen -with autotools, where Makefile.am generates Makefile.in which generates -Makefile. +The following files are generated at run-time in order to control the +behaviour of the Makefiles. This avoids the need for QEMU makefiles to +go through any pre-processing as seen with autotools, where configure +generates ``Makefile`` from ``Makefile.in`. =20 Built by configure: =20 ``config-host.mak`` When configure has determined the characteristics of the build host it - will write a long list of variables to config-host.mak file. This - provides the various install directories, compiler / linker flags and a + will write them to this file for use in ``Makefile`` and to a smaller + extent ``meson.build``. These include the paths to various tools and a variety of ``CONFIG_*`` variables related to optionally enabled features. - This is imported by the top level Makefile and meson.build in order to - tailor the build output. =20 - config-host.mak is also used as a dependency checking mechanism. If make + ``config-host.mak`` is also used as a dependency checking mechanism. If = make sees that the modification timestamp on configure is newer than that on - config-host.mak, then configure will be re-run. + ``config-host.mak``, then configure will be re-run. =20 - The variables defined here are those which are applicable to all QEMU - build outputs. Variables which are potentially different for each - emulator target are defined by the next file... + The variables defined here apply to all QEMU + build outputs. + +``config-meson.cross`` + + A Meson "cross file" (or native file) used to communicate the paths to + the toolchain and other configuration options. + +``config.status`` + + A small shell script that will invoke configure again with the same + environment variables that were set during the first run. It's used to + rerun configure after changes to the source code, but it can also be + inspected manually to check the contents of the environment. + +``Makefile.prereqs`` + + A set of Makefile dependencies that order the build and execution of + firmware and tests after the container images and emulators that they + need. + +``pc-bios/*/config.mak``, ``tests/tcg/config-host.mak``, ``tests/tcg/*/con= fig-target.mak`` + + Configuration variables used to build the firmware and TCG tests, + including paths to cross compilation toolchains. =20 =20 Built by Meson: =20 -``${TARGET-NAME}-config-devices.mak`` - TARGET-NAME is again the name of a system or userspace emulator. The - config-devices.mak file is automatically generated by make using the - scripts/make_device_config.sh program, feeding it the - default-configs/$TARGET-NAME file as input. +``config-host.h`` + Used by C code to determine the properties of the build environment + and the set of enabled features for the entire build. =20 -``config-host.h``, ``$TARGET_NAME-config-target.h``, ``$TARGET_NAME-config= -devices.h`` - These files are used by source code to determine what features are - enabled. They are generated from the contents of the corresponding - ``*.mak`` files using Meson's ``configure_file()`` function. +``${TARGET-NAME}-config-devices.mak`` + TARGET-NAME is the name of a system emulator. The file is + generated by Meson using files under ``configs/devices`` as input. + +``${TARGET-NAME}-config-target.mak`` + TARGET-NAME is the name of a system or usermode emulator. The file is + generated by Meson using files under ``configs/targets`` as input. + +``$TARGET_NAME-config-target.h``, ``$TARGET_NAME-config-devices.h`` + Used by C code to determine the properties and enabled + features for each target. enabled. They are generated from + the contents of the corresponding ``*.mak`` files using Meson's + ``configure_file()`` function; each target can include them using + the ``CONFIG_TARGET`` and ``CONFIG_DEVICES`` macro respectively. =20 ``build.ninja`` The build rules. --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670586152; cv=none; d=zohomail.com; s=zohoarc; b=n9r9s5+vleVIOOYbgRAERMPgho8lwwP1sXUuZ5dZT9pJGbsyWhOUS7spZRR0ZOi2MAb45j4ontYv2pF7i6DWomS6s99rA+BlbWgsKhnrhM900vKzbIj5Ct9ooKoqFXKftQh91AZNfWSw3IhGnpqLUNexjkB6+sUGDamv4dijrM8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670586152; h=Content-Type:Content-Transfer-Encoding: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=//v7SoiJ42pMuRusU6eYsYZW80KH1CVh3F2I1OPuAPw=; b=P/UauRfkwJKfJIKUa5v5HJIp2H/x6qy25QpF6G9HEa8snSxgVa+muxOVuSxnsaB4jawavhyv0NWmecEWlZ6aLgExksSpbIxpIbLgEyrxPuqawyD2SI51sAmO/dthFqWAucNIj9u8k7pwIgjCJT/rvMVVVqJ0vLrC+Ln81iOVzPA= 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 1670586152695896.1635130171578; Fri, 9 Dec 2022 03:42:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bX4-0005lC-FE; Fri, 09 Dec 2022 06:27:10 -0500 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 1p3bW1-0004cY-Gf for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:26:05 -0500 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 1p3bVq-0001cK-5a for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:26:01 -0500 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_128_GCM_SHA256) id us-mta-416-poYghpcWMAyHGSKIgCywDA-1; Fri, 09 Dec 2022 06:25:50 -0500 Received: by mail-ej1-f70.google.com with SMTP id xc12-20020a170907074c00b007416699ea14so2907657ejb.19 for ; Fri, 09 Dec 2022 03:25:50 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id v1-20020a170906292100b0078e0973d1f5sm684939ejd.0.2022.12.09.03.25.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:25:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585151; 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=//v7SoiJ42pMuRusU6eYsYZW80KH1CVh3F2I1OPuAPw=; b=YijOnAWWxHzk3tfNlAxpEJ35HfJaC4WYGrMr86/IqAE9FVI5keEaG8cn+grqNy/+F4RKSr dgd+U1jtUUBUVxyrMAnLAO/5eDWW0iAdw5jyJum4SJsBHGHBVdBzgxlKilW/eAXDjZ+enw uCeC1TFq2XDF61ESg08p8P62D6mX8kI= X-MC-Unique: poYghpcWMAyHGSKIgCywDA-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=//v7SoiJ42pMuRusU6eYsYZW80KH1CVh3F2I1OPuAPw=; b=D7lNeAtgN4kMmajzlrb3LrWOK0Sn2U4oQ5QbxdRKzH2BYRx49NbniR8N1h+k+XHk1J QiFEZB0hZ7t64btbp0K2fYOvOZGGDbnXW6UDgxTtVgQzPVMhI827/9vY2iR7rD2beWFR j+ZG0c0h+l9DpHAr5GcKNeu0NwtgfJqN0QGFhIlIWjqzUrEHv3OihADtJU81Q1eINGON uczDlDgWjMsn8+T57OWoLULXEccb9fTKNdnwGdwbDEApj6nsLB2585EJvZrpe+RTNsHo oNQCTgsKY1FAUehV9EFdbbuo1650+9hoSpPOK0b/+gyoSyDru8N9Fiq+QA5+hxxjC6+D b8qg== X-Gm-Message-State: ANoB5pl1Hp2o4kSoB3Utd3QQn4cPSwnAgkgunzchuuSvJoQLDddQ43od q/nHpLvRDF74724dIDZiOeTyQ3yyHdVQ9OJw7jlRblMzqrHqu50VgvicpBdpcHrdixUXo4Cz8Q0 IpKWOVa/lys3rSHdfVFfvCuF4ZqLPjVoAHHUNqmfAItkKQMDUs56QnDMmDJIyI9gYJT4= X-Received: by 2002:a17:907:c05:b0:7ae:b2e4:7b3f with SMTP id ga5-20020a1709070c0500b007aeb2e47b3fmr6183219ejc.8.1670585148933; Fri, 09 Dec 2022 03:25:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf7rZ17XwYpt2SdwVbAx5gUh1u0lhdmSXyRV9kUfz540aTC8wddom3Y9gnAZc7zfRXKq2V1+2w== X-Received: by 2002:a17:907:c05:b0:7ae:b2e4:7b3f with SMTP id ga5-20020a1709070c0500b007aeb2e47b3fmr6183196ejc.8.1670585148611; Fri, 09 Dec 2022 03:25:48 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 29/30] configure: do not rerun the tests with -Werror Date: Fri, 9 Dec 2022 12:24:08 +0100 Message-Id: <20221209112409.184703-30-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670586154340100003 Content-Type: text/plain; charset="utf-8" Tests run in configure are pretty trivial at this point, so do not bother with the extra complication of running tests both with and without -Werror. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/configure b/configure index a7c95535fd01..745745ded35b 100755 --- a/configure +++ b/configure @@ -119,41 +119,8 @@ lines: ${BASH_LINENO[*]}" $compiler "$@" >> config.log 2>&1 || return $? } =20 -do_compiler_werror() { - # Run the compiler, capturing its output to the log. First argument - # is compiler binary to execute. - compiler=3D"$1" - shift - if test -n "$BASH_VERSION"; then eval ' - echo >>config.log " -funcs: ${FUNCNAME[*]} -lines: ${BASH_LINENO[*]}" - '; fi - echo $compiler "$@" >> config.log - $compiler "$@" >> config.log 2>&1 || return $? - # Test passed. If this is an --enable-werror build, rerun - # the test with -Werror and bail out if it fails. This - # makes warning-generating-errors in configure test code - # obvious to developers. - if test "$werror" !=3D "yes"; then - return 0 - fi - # Don't bother rerunning the compile if we were already using -Werror - case "$*" in - *-Werror*) - return 0 - ;; - esac - echo $compiler -Werror "$@" >> config.log - $compiler -Werror "$@" >> config.log 2>&1 && return $? - error_exit "configure test passed without -Werror but failed with -Wer= ror." \ - "This is probably a bug in the configure script. The failing comma= nd" \ - "will be at the bottom of config.log." \ - "You can run configure with --disable-werror to bypass this check." -} - do_cc() { - do_compiler_werror "$cc" $CPU_CFLAGS "$@" + do_compiler "$cc" $CPU_CFLAGS "$@" } =20 compile_object() { --=20 2.38.1 From nobody Fri May 17 21:03:22 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=1670586290; cv=none; d=zohomail.com; s=zohoarc; b=IHpKZ7+P0A+5PTyzNu/uQi312OIDmELH2Uv0WAUI7o/6mMUCAOZO/NfGjqMYFrm+hvL3QVDAfPWLYC2yb3ThRQ6TO12VcvRLkGwdoc5pATOQCHYTIljf7tMTYd1RhkE2GMfHs8AmFkNvdPAc0s43omj0TPmxq8n7e9dJOHSEBlU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670586290; h=Content-Type:Content-Transfer-Encoding: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=m2hMf9alh7YbvmJ7YWt4RfER0BN+85HoMYH6M0caVJk=; b=JQVqOq1PTIHtbwBOaA1pzqEYnGV/88nwQ5TbBzTdvFY+OFxbwjbgVsXYrF5aixvX2W08godod+PsQS+x19Rpjqe6DLm8I8NWGaAyof2QOYfklY+KkDvECFE0SsOvnZRa5d7a60/2Eq56vxgiNVH9wtxPzrtnU70N8hJ4sl6qHOo= 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 1670586290729557.3969967970355; Fri, 9 Dec 2022 03:44:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3bWM-0005Gj-NH; Fri, 09 Dec 2022 06:26:27 -0500 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 1p3bW1-0004cX-Fv for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:26:05 -0500 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 1p3bVr-0001e7-80 for qemu-devel@nongnu.org; Fri, 09 Dec 2022 06:26:01 -0500 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-241-jzTHEkGcMgme60bhDrhNaQ-1; Fri, 09 Dec 2022 06:25:53 -0500 Received: by mail-ed1-f69.google.com with SMTP id dz11-20020a0564021d4b00b0046cc3f565e5so1201409edb.8 for ; Fri, 09 Dec 2022 03:25:52 -0800 (PST) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id j9-20020a17090623e900b0077b523d309asm431517ejg.185.2022.12.09.03.25.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 03:25:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670585154; 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=m2hMf9alh7YbvmJ7YWt4RfER0BN+85HoMYH6M0caVJk=; b=Mw0YUE32vcfnLpd4bYIFtx4QJiO0jGW+5gFAPv3ATbUULNXr8w33jZqJLgurOBIzc78S/O 4FdMGp3xtO0IB7iPZErHmJ6T+hO+gm4JvugMwzGFPT5bJaPIQhTC2eO3YyroGJT9N444St y4n8hngL2NmajQh7Xx/E1UL43ytL9i8= X-MC-Unique: jzTHEkGcMgme60bhDrhNaQ-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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m2hMf9alh7YbvmJ7YWt4RfER0BN+85HoMYH6M0caVJk=; b=QpoNs80Y+xnKbXaQBsP0cGjqgqovKsIewIVoURcIY/RqgMqMPGQn2hgDGKhjDsumEG xv6R1iu+geAHdJzkU5Xp0HleQZ5WRA7OztEDKtQTH5u0rcBxdsYIt1QdR7g53wFPAwCk XaoHuHuQ/ygLdIG+x95klXdUxF7xzgEDhHmeiJH6oQkW9Q2yHD+D6toBC6tj2QVY5TJq ko+jskcsd0JDOWniPb7MzWuOuCzwwMzuq8kI9VertOSnhI2LB0t9mU0Gqx7ukeXhZRHO ANyJ7uC42I+/HCFPtYHV3oVA1cNWKPHH72f9o3ex1vyxt/JylS4XBS5t/cWUc2wrTz85 9PSg== X-Gm-Message-State: ANoB5pnFmGcWbjLwDCChV1cALn8/CU0vX6XC8Y9jdvVqKZ+ynBFDPLJD eZVthYcXtwhSjghIPi3ahW0qmMu90VJ2jR+A17hN6gc5FufYFKan+no5dF8LM5e2ynrbFDJW3/j MfIbPExMrIXa/htNgd9CupeGd3PTUuw5DBczOH8pwEnEkpoarlJgRczMILD84g8lspWM= X-Received: by 2002:a17:906:647:b0:7ad:d7f9:38b8 with SMTP id t7-20020a170906064700b007add7f938b8mr4741808ejb.57.1670585151634; Fri, 09 Dec 2022 03:25:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf6PIs9lyIFwXwZkjFd6tiYuTlmndaM+V3NSFul+Ot8kLVlypWPNy3EliWL6mL/m6LhbNaBZHg== X-Received: by 2002:a17:906:647:b0:7ad:d7f9:38b8 with SMTP id t7-20020a170906064700b007add7f938b8mr4741796ejb.57.1670585151397; Fri, 09 Dec 2022 03:25:51 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 30/30] meson: always log qemu-iotests verbosely Date: Fri, 9 Dec 2022 12:24:09 +0100 Message-Id: <20221209112409.184703-31-pbonzini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209112409.184703-1-pbonzini@redhat.com> References: <20221209112409.184703-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: -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, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670586291597100003 Content-Type: text/plain; charset="utf-8" --- tests/qemu-iotests/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build index 583468c5b9b3..3d8637c8f2b6 100644 --- a/tests/qemu-iotests/meson.build +++ b/tests/qemu-iotests/meson.build @@ -43,5 +43,6 @@ foreach format, speed: qemu_iotests_formats protocol: 'tap', suite: suites, timeout: 0, + verbose: true, is_parallel: false) endforeach --=20 2.38.1