Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4603618ybe; Mon, 16 Sep 2019 15:18:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4ITEh0hbKvcdyZ9vSivSk8w7b1q8Z6EvtEN7f2HpymxoyTFXItlVWoaDegAwR2lOa0pXv X-Received: by 2002:a05:6402:65a:: with SMTP id u26mr1615099edx.86.1568672336830; Mon, 16 Sep 2019 15:18:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568672336; cv=none; d=google.com; s=arc-20160816; b=fWyv1Z+aROb314aRTwUS6bG6oRhvhtrGenERQZi7hJWsV4QoQAoSaY6zFf0tsWf8MQ qDAT/qnCcxaac41ToQ4hWKs2s+P0Fj1ku7Xq4hE15l+CN8TbLER2S62+UJSzY01XTYmQ DtcrzwMvuZi5vBNuUdty0HSr4pJeC0n7jqfpqUjHQhe55pmsWkv2//cKQaMa1tQCfzTk H5znXhQ28Avg63mkhpB5QuYnNLIyl+NmA3D34o5Klqf8zoxzjaiHDJ+nwVvHyqm3p5Sa paqWDzlIQX6s9fOvEc2bF9kbzeIyjmiTPz2/AqTuD/tNKANmMkikuiq1PsPgxOTeV2Qv aVMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ihyLcr/IE8dYmQPkpIxkQFwoGx9mvcYHtpb7Os1ZV9I=; b=fDcvdPayWUPSyHaAsWP50MZUL0/9DSGfpMehvbyQDlKlz89gUo9uD5aqDDyu2rVIns JeVDkSFRvHoPrZrfnno8Ox8AsQXfQo0s9ueBGhOZPj9B/B8vYm2+l1HYBMNBDu2wHzU7 /MX4++8vQtjOYiUHJ8qXtH7QWpffe8kYJVtyBcKlUMrRd6QInegXo1fRcJQi/8Pvi2Ak X20sqeRl5q4S3QhmIi4fLj1/JXMybyQZPty9AKGQoJzlmVot7j/NXiDyNKRHcmqPRAmE NwSSyV6kvFUyMe8qW+ALDFS8YTaOxF/wHYfX04/EUv2YkD9lRxxIlZzGoVwJWIpHHrkq 3+wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NVDnnS7Q; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f19si245080edb.385.2019.09.16.15.18.32; Mon, 16 Sep 2019 15:18:56 -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=@gmail.com header.s=20161025 header.b=NVDnnS7Q; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391469AbfIPUfe (ORCPT + 99 others); Mon, 16 Sep 2019 16:35:34 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:41826 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391449AbfIPUfd (ORCPT ); Mon, 16 Sep 2019 16:35:33 -0400 Received: by mail-qt1-f195.google.com with SMTP id x4so1524936qtq.8; Mon, 16 Sep 2019 13:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ihyLcr/IE8dYmQPkpIxkQFwoGx9mvcYHtpb7Os1ZV9I=; b=NVDnnS7Qjr/iIlDteTT8VdQpogh5KuOmqGAR+uyUiMRjAcDLr+uF+NSzaRmuN0SzyG DDYmyjgeGNHR6DQI/SXQxp6dBzMWV0moM0bbd/wIxEDP4cbEuylTVBW9dhtl1fLoJKir e/Xm32DiqsKNhoV3N9E/FgaWo8OCSgqeY4HAkOGfibBs6G5GbKmwrxCw1AFEl94rn6N3 Rnc/imUTNVAdFVs2RrLRgIaC+NuEht3gb6z51oHKDMXoWcRh6mpOyFGgnPRPHd+iXIlr Ke1WZ3hTXpcUkIXD1nU0spWaYs8W0axbgLtphCVsDArRicsBh2GpteOCq1ejiKhThHHP 8Oag== 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:from:date :message-id:subject:to:cc; bh=ihyLcr/IE8dYmQPkpIxkQFwoGx9mvcYHtpb7Os1ZV9I=; b=E2wfzM9LrOJysvDoS5serqsOAemdO9kavdBfdcOh2YQLcp+Ai9byzJUbuFzdklc09K EIdRpSuz0OhIJ5TafDEJKibWv/zRuSZNMCBpbTvdvuvhuPsfN3Gr2ZhoSt3jrstabaZV XddBI+elWiDMVyycEd0A5SoJyG7ZQcBt5N3V8l9LY31FMn17f/iYCJcVOqVylSx4KVJ+ NFtCbj7yw4lE0Pub0HJAUeHthvbYBBbLez+iY4AcAfZ6qKpZadJE/riU1CW43VjbOrKr TiLYNMu3j2+XyrrtzKQVBjP87EWQ7RvFygOYwTmeE3ZzkX5sVzx1Zo1OIlTLzXQZMXrN ZUCA== X-Gm-Message-State: APjAAAXnHuNl3pAp/lsfHeOCdfqd/76zA224eZ4iF79PuZZajFLXns+H tXO/J5aLwUh5qPMKCnIYoElrkPD5rfMq3Buqexo= X-Received: by 2002:ac8:7401:: with SMTP id p1mr259871qtq.141.1568666132646; Mon, 16 Sep 2019 13:35:32 -0700 (PDT) MIME-Version: 1.0 References: <20190916105433.11404-1-ivan.khoronzhuk@linaro.org> <20190916105433.11404-5-ivan.khoronzhuk@linaro.org> In-Reply-To: <20190916105433.11404-5-ivan.khoronzhuk@linaro.org> From: Andrii Nakryiko Date: Mon, 16 Sep 2019 13:35:21 -0700 Message-ID: Subject: Re: [PATCH v3 bpf-next 04/14] samples: bpf: use own EXTRA_CFLAGS for clang commands To: Ivan Khoronzhuk 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 Content-Type: text/plain; charset="UTF-8" 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 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 > 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 >