Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5064338ybe; Tue, 17 Sep 2019 01:53:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqznNQYClUHpkHHzMCbJEDzhBdsT45y9omo2GyBu/2LnF9dN6wxqFjcM73c7dvBtdxdSgKTh X-Received: by 2002:aa7:d816:: with SMTP id v22mr3562831edq.28.1568710400341; Tue, 17 Sep 2019 01:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568710400; cv=none; d=google.com; s=arc-20160816; b=ep2AmeWXs0a7y55S0F/X1R6lgCv6V8zr9EKSkv6NAlVOT6AqM36wd56/jIUwFZmJKw 4AlvP0EoJpyK5Tobo2iuTXVjODhFreKP83Tt+BDnQumqKOtWRPBUvI2BZYLwFD12NgPC TgrKJbB49cWOWzTfAVEoiG1rFrcXsfolBb3fGuH5ulz9s5jk8Dk+eHu1O+pVVFmZTfq5 nr7qqtYuRY8GuhyJ33t6nzjr7NxMMWGUx6AeBXaJ2inPB8Jfr+gZ/E2fEQR1Tm2s9hLC K/xkoG0uUsrUZCgi1CrpPg6tQg54V3fW9klLvdxD3I76BCOwZOisllEaCegeVTRHwAFH wPWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=f3SMr7nW/IIKR4uf3MqZBa7hhd+3LcyORNLugjWgB8w=; b=aHmI7C/701SwAk9/7NrtbyHn/SKbuxGmEoo85lhek8AH+4gyyOslPh1gbEAab/x2ye Ag5IQeWdq3+QSkg6HFifwoInWcuP1GpI/Rz24Eb7sLwrmRkzclZ03a8dwyDI1Orap2me boqOGKirJSe6RcKVgCSw8K20ZuaRwwCBe6MG1Ae2okmyE/BFKJA2u0cKWg19aXqpRro6 nhn2J/JNOlO9LkLpWhpDdlzu5dUNyTCe2hKT2KyFf7H3eX1c554oB2F+evsYvPGxEmTq eFBqXUSmRN5+mJ2EEGLaZfe775CthQX2aiK+TYVB2M+62BNFdgmepRPTeC9iyxnUrr4I U7eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KYd1qA46; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b42si941989edb.11.2019.09.17.01.52.57; Tue, 17 Sep 2019 01:53:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KYd1qA46; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732426AbfIPWBZ (ORCPT + 99 others); Mon, 16 Sep 2019 18:01:25 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:36719 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732285AbfIPWBZ (ORCPT ); Mon, 16 Sep 2019 18:01:25 -0400 Received: by mail-lj1-f194.google.com with SMTP id v24so1439521ljj.3 for ; Mon, 16 Sep 2019 15:01:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=f3SMr7nW/IIKR4uf3MqZBa7hhd+3LcyORNLugjWgB8w=; b=KYd1qA467jctBVyDgfFJXTEnxdMaK2KiExe6nlvwlt573Sil0F2vay6dqepe6Hrqsf GXO6cWf0i4wM8q9idqXN0tKD2eV885lEJd6vjYGDIWEUPsq0ImhxXkff7dO2c1I5+C9S hrqJ12L9qPlOaKw1otwnSpiLTFSwnaAI7j7Bwu8fspXMfB+sGjVadmRIN9goc6b6XD90 pezjko2N4amqKkiesyv9P/SusWs7fax9J/8jaU3qNxkVxVxObuydTkTFPbGmJrzc4bFA lRACOpaNR5kmAhPjkySBXJjbwm4adBdd4wCGGw/i3g/Mi0CDo96EUBOA6VBwbIpnB1ZK WiRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=f3SMr7nW/IIKR4uf3MqZBa7hhd+3LcyORNLugjWgB8w=; b=hoC7NFdDMOWtaaRrMyXYzU31W0ES48d3nMkmvav27l62/dmLYnxTxyMxQIrOEaPYf5 9diafeqAL6LVr5j2DYtppcNavcllB9/VB8aJPxGO/Usbl+D2wqYMhE+gvX3SGPy2k/5d udA7ld4iZB9aJL7W7GEdQ1xBNlrFtwlbSj4UNFVCqC6+W8aLHr+BfkRAVT6u/FC4IcMW TjWKVVRwrfTdXPMWqRAE/b671iS0CEtKtBe8CaMZHfze3o44cKcLWgvAO9l5H19eLGWY eZo/x1r3b/GgiximS8qcB3vaB4yLEpePEuCSREGt6xV++wjP1xL12yaw0Sv1EOJhEVJh 8JLQ== X-Gm-Message-State: APjAAAVsJfxdl0hzDou5/yzjkCHp+IXEQz+0jU7uqL7sgS1ApxOP0Jjp GAYYDY0SErWh2aQDNIkvifMM0g== X-Received: by 2002:a2e:8805:: with SMTP id x5mr66628ljh.102.1568671281368; Mon, 16 Sep 2019 15:01:21 -0700 (PDT) Received: from khorivan (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id r8sm10192lfm.71.2019.09.16.15.01.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Sep 2019 15:01:20 -0700 (PDT) Date: Tue, 17 Sep 2019 01:01:18 +0300 From: Ivan Khoronzhuk To: Andrii Nakryiko Cc: Alexei Starovoitov , Daniel Borkmann , Yonghong Song , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , john fastabend , open list , Networking , bpf , clang-built-linux@googlegroups.com, sergei.shtylyov@cogentembedded.com Subject: Re: [PATCH v3 bpf-next 04/14] samples: bpf: use own EXTRA_CFLAGS for clang commands Message-ID: <20190916220117.GB4420@khorivan> Mail-Followup-To: Andrii Nakryiko , Alexei Starovoitov , Daniel Borkmann , Yonghong Song , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , john fastabend , open list , Networking , bpf , clang-built-linux@googlegroups.com, sergei.shtylyov@cogentembedded.com References: <20190916105433.11404-1-ivan.khoronzhuk@linaro.org> <20190916105433.11404-5-ivan.khoronzhuk@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 16, 2019 at 01:35:21PM -0700, Andrii Nakryiko wrote: >On Mon, Sep 16, 2019 at 4:01 AM Ivan Khoronzhuk > wrote: >> >> It can overlap with CFLAGS used for libraries built with gcc if >> not now then in next patches. Correct it here for simplicity. >> >> Signed-off-by: Ivan Khoronzhuk >> --- > >With GCC BPF front-end recently added, we should probably generalize >this to something like BPF_EXTRA_CFLAGS or something like that, >eventually. But for now: > >Acked-by: Andrii Nakryiko I can replace with BPF_EXTRA_CFLAGS in next v. > >> samples/bpf/Makefile | 8 ++++---- >> 1 file changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile >> index b59e77e2250e..8ecc5d0c2d5b 100644 >> --- a/samples/bpf/Makefile >> +++ b/samples/bpf/Makefile >> @@ -218,10 +218,10 @@ BTF_LLVM_PROBE := $(shell echo "int main() { return 0; }" | \ >> /bin/rm -f ./llvm_btf_verify.o) >> >> ifneq ($(BTF_LLVM_PROBE),) >> - EXTRA_CFLAGS += -g >> + CLANG_EXTRA_CFLAGS += -g >> else >> ifneq ($(and $(BTF_LLC_PROBE),$(BTF_PAHOLE_PROBE),$(BTF_OBJCOPY_PROBE)),) >> - EXTRA_CFLAGS += -g >> + CLANG_EXTRA_CFLAGS += -g >> LLC_FLAGS += -mattr=dwarfris >> DWARF2BTF = y >> endif >> @@ -280,8 +280,8 @@ $(obj)/hbm_edt_kern.o: $(src)/hbm.h $(src)/hbm_kern.h >> # useless for BPF samples. >> $(obj)/%.o: $(src)/%.c >> @echo " CLANG-bpf " $@ >> - $(Q)$(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) -I$(obj) \ >> - -I$(srctree)/tools/testing/selftests/bpf/ \ >> + $(Q)$(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(CLANG_EXTRA_CFLAGS) \ >> + -I$(obj) -I$(srctree)/tools/testing/selftests/bpf/ \ >> -D__KERNEL__ -D__BPF_TRACING__ -Wno-unused-value -Wno-pointer-sign \ >> -D__TARGET_ARCH_$(SRCARCH) -Wno-compare-distinct-pointer-types \ >> -Wno-gnu-variable-sized-type-not-at-end \ >> -- >> 2.17.1 >> -- Regards, Ivan Khoronzhuk