Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3773792pxu; Mon, 12 Oct 2020 00:08:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuC5ZKKHTFQp+gjTd9b+TGCFKYoxS5WC0xqY0pdP3h+ZF8654ftt/zUisOuSciGzxW53UN X-Received: by 2002:a50:ee19:: with SMTP id g25mr12998427eds.160.1602486487867; Mon, 12 Oct 2020 00:08:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602486487; cv=none; d=google.com; s=arc-20160816; b=pEN6OMZWNwlPiAEQ8uTJNLErKV0eLaD+wn3ako3U8li8VrmMQyHVvtpzTo7csvN6v1 sboFRfcpxrIgot73Kd9z/Gx3Hpxj+/ocLwXO403lMT88lbF/NPtHCAcaWk3xf4LKBZRU vhH2Toy/gy//eNGWnos/f42yCrhAvL2AYEUci7QEM7aOA3dBII/sb80Ulpw3+dgCwcU0 xrXeivi1mCFqShw/ckfuJeNdTKGyksgEswkSrZfSfKXmdMYPMFODcFUpuD3rojjX6EKd XyRHYP54I22vWXQjpGeLc5EANLDI7XqGBcnW2fmo4Fn70jnZaT1boHxbSqeXixIZMGXI scbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=SRoIVG6H/Y91QXxgqhGCHvTR9cPOGgBN0laolAnXTB8=; b=kxN1aZBIMzoiHUlplvUPgKOLE8KM2o//qVua+Nj6RaGxtSpojA5MA5yDlbUAg9DzLs HA/g6V1KLXgK+/nA8SwpHelPzu9izLJDNw+e67d7Ddm9DfZAqj119BPUdJkFQfIt04fp 3yGpF5D1cIeBDUKTJ4akvTWWjWotdQuHzhSaJtMcHdnJozxyl5gXXKc7y3BV2qHd3k+E 98KTOQsJgnFfFELHMzRedEZILLvV2bP2BIa0N0Nlx2o8kRPscjtkM5ppKvVJ03seBpL8 oq8nuJb8kZgKf/qmZlzw3PsmJAsv27L/sQIFeHe0oDLEp4zTEzCItmMh7Vo6dyyzFFnX 1shQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Yliuc5PI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h10si4531106eje.596.2020.10.12.00.07.44; Mon, 12 Oct 2020 00:08:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Yliuc5PI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726600AbgJLHGc (ORCPT + 99 others); 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-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-kernel@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