From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 44C5CC4332F for ; Tue, 13 Dec 2022 02:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6SPmKJsFTALI+sAkH+rA/MuehJFDP9xFVEGyomxXJYk=; b=bYKa0/cGmhyPQE IwJ4l3bq2CHDpAXisiBkAkekeFFASlGu7qZjVYFOfdFIWWCctgIdPWvfgi+7mjJglzduZNvf2p+je oxGYYJev+M+EsyrU7uODjaO45PhEzXS+6ZPTzYG0dbjDvPUv8kcXouIZJMUrTPjriq8S7/+C1UcdD bDPrad39705Jp64wLdketAZwvtn6wFjGkBimTNX7t0/4dkvovNlAO5aRiksc5+fVOe/HFAoF5EjXV O6kCclPGXQFn9wXW2E62bUXLHmS95A3ZXEty4i4wAeWY30dSmw8uXsY9c4tHc7ytZd4gv6vbNXZgp jZwo+r4bQQsBJuSJ2hsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p4unW-009d2c-Sg; Tue, 13 Dec 2022 02:13:35 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p4unS-009d1f-3h for linux-arm-kernel@lists.infradead.org; Tue, 13 Dec 2022 02:13:32 +0000 Received: by mail-pl1-x636.google.com with SMTP id t2so11087122ply.2 for ; Mon, 12 Dec 2022 18:13:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=dytxSctGH3/JU5+VUvCXKRl3djDPMXaOjikH1n5CrMU=; b=CBf3R1fmXIZ45yTb+WHxJdiyNOFL2h5rhe7iuVz+maaKt1rkPLuLZ1Vg6SAm23HMHG vQ6uXPH/ty7wkcdAYuV/Lh/0nTI9cyJfrD99XFzYtkzgINZ5bTa5LBeoIBAsqfn4QDC3 6SVFH94xQAmltYML5ctohPuMu25umC/aZZCO6gUijQK+8crcDBG5bvbVDVdxF3bugd0O rtoRLMRfttq4YtD01i5HrnVdRJstwarVuJG/T6s79sxcBeqvrkLe9Nt+5avTs3+UOplZ FkjJ/F9aFkiOlaZ3Av0iqu9jA/E5UOfBI4ocgDHSNbxKS74BDaooa/RlqBvBkybckhx2 eXVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dytxSctGH3/JU5+VUvCXKRl3djDPMXaOjikH1n5CrMU=; b=jrI2rbcACWL3/abaHFjLiSW3WJOjaGQH8ydc1sau+y/Kygsd7N3avfIspoQkIYWEo1 BtQzeHwUPXiXGhWhM3Mby/+GRcSVB8cFYDe6qCQW5F7FFgSylpS90BHHOMxvWUhbPHse /eXcaRPskbPkRMHQRTwV/70S9KJLqwLGE5XAUXIL5NyVZ8ilXLRmvrqSlU2iZ0NJA3hB 3Vd+FwtZ5cO2RliJxZGenhKxDCKv456oDLRwCUe1vq4kWlC2K43ZmvvhqMcwxnnyRjAH nxSXXsCIheBburoCXxzowibG2DzU1V/R82ZH+4blnBTeQBAV2io4GodULZ4tH4A7yB8I 9Rrw== X-Gm-Message-State: ANoB5pkAjeLQYDRUY2RYQDGt8QfhTpBdGF04avbsIruFNdWPKl0oGqIB F4mNjFN05/psumY4S+g/jKqWWQ== X-Google-Smtp-Source: AA0mqf5lyAQrJvHm7xnE6hLi9O52SD019Oq6Ie+uJ0eyRDJIM2Xscc/SexS//WPdt/sgq2p4vlI/tg== X-Received: by 2002:a17:902:7b96:b0:189:858f:b5c0 with SMTP id w22-20020a1709027b9600b00189858fb5c0mr90604pll.0.1670897608745; Mon, 12 Dec 2022 18:13:28 -0800 (PST) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id d9-20020a170902654900b00176b63535adsm7060787pln.260.2022.12.12.18.13.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 18:13:28 -0800 (PST) Date: Tue, 13 Dec 2022 02:13:25 +0000 From: Sean Christopherson To: Nick Desaulniers Cc: Paolo Bonzini , Marc Zyngier , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nathan Chancellor , James Morse , Alexandru Elisei , Suzuki K Poulose , Oliver Upton , Tom Rix , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-riscv@lists.infradead.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, Ricardo Koller , Aaron Lewis , Raghavendra Rao Ananta Subject: Re: [PATCH 11/14] KVM: selftests: Disable "gnu-variable-sized-type-not-at-end" warning Message-ID: References: <20221213001653.3852042-1-seanjc@google.com> <20221213001653.3852042-12-seanjc@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221212_181330_194091_722D1914 X-CRM114-Status: GOOD ( 14.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Dec 12, 2022, Nick Desaulniers wrote: > > diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile > > index 2487db21b177..9cff99a1cb2e 100644 > > --- a/tools/testing/selftests/kvm/Makefile > > +++ b/tools/testing/selftests/kvm/Makefile > > @@ -196,6 +196,7 @@ else > > LINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/$(ARCH)/include > > endif > > CFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \ > > + -Wno-gnu-variable-sized-type-not-at-end \ > > This is a clang-specific warning. This will need to be wrapped in a > cc-option check. Not that I'm against guarding this code, but I don't think cc-option() will do anything in this case. AFAICT, gcc stopped treating unknown "-Wno" flags as unconditional errors starting with gcc-4.4, and the kernel's min supported version is 5.1. gcc-4.4 through gcc-9.5 all print a mild warning if there's a different error, but otherwise silently ignore the uknown "-Wno". cc1: warning: unrecognized command line option '-Wno-gnu-variable-sized-type-not-at-end' gcc-10.1 is even friendlier and notes that the unknown flag may have been related to the error. cc1: note: unrecognized command-line option '-Wno-gnu-variable-sized-type-not-at-end' may have been intended to silence earlier diagnostics Because cc-option() doesn't have errors in its probing code, it will return "true" on gcc for literally any "-Wno-*" input that gcc deems syntacially valid, e.g. gcc barfs on depends on $(cc-option,-Wno-) depends on $(cc-option,-Wno) but happily succeeds with depends on $(cc-option,-Wno-lol-gcc) Various man pages suggest -Wunknown-warnings is a thing, but no gcc version supported by godbolt recognizes it. So unless I'm missing something, trying to detect lack of support will be non-trivial, and the worst case scenario is that users of older gcc version will see a potentially confusing warning when the build fails. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel