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 X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29B2FC433DF for ; Mon, 12 Oct 2020 07:06:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A06B92076E for ; Mon, 12 Oct 2020 07:06:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Yliuc5PI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726340AbgJLHGc (ORCPT ); Mon, 12 Oct 2020 03:06:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726216AbgJLHGb (ORCPT ); Mon, 12 Oct 2020 03:06:31 -0400 Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFFA9C0613CE; Mon, 12 Oct 2020 00:06:31 -0700 (PDT) Received: by mail-il1-x143.google.com with SMTP id q7so14971175ile.8; Mon, 12 Oct 2020 00:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=SRoIVG6H/Y91QXxgqhGCHvTR9cPOGgBN0laolAnXTB8=; b=Yliuc5PIIDYE3gdaIPk5I885ofQSSAeTB1cjLn38xOO1eZ9MCVMzSbcQZuwzoDrgWd s7xonkYufqJkNGYWYHON783DAGCjAS/wQZ9vdQsGZhiSY2WwyDqPKQ02xwo4IWjzqlSw lyZ6JWONaZeLnEDVwjXBytGO0U+aZEtJVf8I3a++o0KaeOCXb/uplt0V7WCEm31sejaX NXj+kgZ14QNmo0adPHCUGo4jV5rYwE3gvje7QOgBch07vtgilC+DFc6qC11ibFUU1Jwf bX7czaYK9NkS4WE/r0mfAsBqnrXBjttL8tSWXShwdGzFUheYqJJYs0lqG9QNUphZ4uii ADCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=SRoIVG6H/Y91QXxgqhGCHvTR9cPOGgBN0laolAnXTB8=; b=YJcHQgt8d4+FvJJ+HdfrHz4eyLLi+lnaKhKRq2GZZFh3LaKClcm8yz0vxu9eajTBg9 /HdFYZCmzD+/svxZYwfFJUgKcSdZWs12+cc4AhAf9sQQyxBTsp20C4oPLO2zWFY/Fgsw uxieI2ztgzAcGzMTN5HcIHr09uDKHHzfQ+dCt8Rb0L8K3mOr2CW16/sS9L18QjjKnKyk mI2qOqIalkmCB+BxSkSKoDkeX+HwllxoZPttjjjiERZwoO0f0GPLqdOKpMa5pWufAk8o uwX/BwFOjcIZxGUkSKZjC2aLH/yLFeiMRFlnOfAW8hf1Edx+J98sKCirbqpWOG59vePp bfOg== X-Gm-Message-State: AOAM532Vi6R783arnfo0qczP7sObzXh/leDI+rkjwnA7wT7HbWhiOTyu ZOGHT4OzrzcKDdgsnWKb3CF4npcp4ugPfqcPjFZPYkoj0VA= X-Google-Smtp-Source: ABdhPJwFv69oxeR9rSNckDagw2DpAldHoeht35URq3zDQ0LOTiz62VTmJrRKYRHst/a5B169av6GUd3BhLnLDdxOnqs= X-Received: by 2002:a92:c986:: with SMTP id y6mr17476173iln.10.1602486390850; Mon, 12 Oct 2020 00:06:30 -0700 (PDT) MIME-Version: 1.0 References: <20201009112327.GC656950@krava> In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Mon, 12 Oct 2020 09:06:17 +0200 Message-ID: Subject: Re: [PATCH RESEND 1/1] perf build: Allow nested externs to enable BUILD_BUG() usage To: Vasily Gorbik Cc: Jiri Olsa , Arnaldo Carvalho de Melo , Josh Poimboeuf , Peter Zijlstra , Stephen Rothwell , Ingo Molnar , Thomas Gleixner , Mark Rutland , Alexander Shishkin , Namhyung Kim , "H. Peter Anvin" , Masami Hiramatsu , Linux Kernel Mailing List , Linux Next Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-next@vger.kernel.org On Fri, Oct 9, 2020 at 8:35 PM Vasily Gorbik wrote: > > Currently BUILD_BUG() macro is expanded to smth like the following: Two feedbacks: #1: Greg KH told me to expand abbreviated words, here "smth = something". #2: Interesting to see an ASCII-art in the signature is causing such troubles. - Sedat - > do { > extern void __compiletime_assert_0(void) > __attribute__((error("BUILD_BUG failed"))); > if (!(!(1))) > __compiletime_assert_0(); > } while (0); > > If used in a function body this obviously would produce build errors > with -Wnested-externs and -Werror. > > To enable BUILD_BUG() usage in tools/arch/x86/lib/insn.c which perf > includes in intel-pt-decoder, build perf without -Wnested-externs. > > Reported-by: Stephen Rothwell > Signed-off-by: Vasily Gorbik > --- > Resend with no fancy signatures. > > tools/perf/Makefile.config | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config > index 854da830b5ca..834061e94e7c 100644 > --- a/tools/perf/Makefile.config > +++ b/tools/perf/Makefile.config > @@ -16,7 +16,7 @@ $(shell printf "" > $(OUTPUT).config-detected) > detected = $(shell echo "$(1)=y" >> $(OUTPUT).config-detected) > detected_var = $(shell echo "$(1)=$($(1))" >> $(OUTPUT).config-detected) > > -CFLAGS := $(EXTRA_CFLAGS) $(EXTRA_WARNINGS) > +CFLAGS := $(EXTRA_CFLAGS) $(filter-out -Wnested-externs,$(EXTRA_WARNINGS)) > > include $(srctree)/tools/scripts/Makefile.arch > > -- > 2.25.4