From patchwork Wed Oct 9 20:41:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 175682 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1264075ill; Wed, 9 Oct 2019 13:41:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUP09pG1zLwhTKT5LfMfjAWzsmV0cky2Mj51T1ap5vRWPEj22ejl+c/idaDeIBbPaI7nzn X-Received: by 2002:a17:906:792:: with SMTP id l18mr4596170ejc.170.1570653714248; Wed, 09 Oct 2019 13:41:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570653714; cv=none; d=google.com; s=arc-20160816; b=CqK0In1u2Rq+5J4vdImoeyeUSuAe8H5vA/MvphVbXkbItBp3fb+gmUNBoqkMu6twH9 MyNaNl5ZkbmXBGVUnqAQmEkoCzFKFxpY4o45GiBiR4U6kSxntoGC5Y2gNGbTli0a5/WA ftFFSqdYCj0JZ2g74eGQ2NvWzLhXW309nQTNx9Iq1Qt4te/yo2ziFGuctq2MKDCb0PwF EMds0L9lM+ZYj2tgzP6XH0LUDplpxY81lYNewWOth69xNslKIKBcBVgLFkAj35K0zYlu xwyhmvp4EnkrextUPvDIJnXEaOmB9QQpXlThShK5mu/zskf5ogYPUIKd+iciVlITFDK2 IJ0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=j9oehlPvbpQ/3mUr7ILsjkWG9P4RuU3Cq2akh+BGeG4=; b=HHzWwJliEbAAWB6uLuwIbDwViayuWRMe6r1W6rDHQjOFa76nNAlhanNEpgmMTGjXm1 GZ4o/p4pPbudix4A5x0qkULn6EOexO0OW3VsNp+tRkKZZi2QHlCTLAa45j6NnGmzU0tk FiNoVtvvtcItoqbza1EMZ7RYdY1BiHdT2F4EBdS11ggbk0451IzklaI160oe43bXrdeC ZdQzvkyYT/BxvO3Tv/ZvnNN4qAMlKA7eHZtZGUh7VX2z5Bd7gIo2AejCpl3PjrJqbScH Zue3bqftNSyZYu5j0XsDzV09kC+zOuMwerfAxZtS25aYw6ycsoT++YOFZOlv1pVRmyrM mEzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u9WblPuD; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 g9si2182433edg.58.2019.10.09.13.41.54; Wed, 09 Oct 2019 13:41:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-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=u9WblPuD; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 S1732012AbfJIUlr (ORCPT + 8 others); Wed, 9 Oct 2019 16:41:47 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:42215 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731977AbfJIUlr (ORCPT ); Wed, 9 Oct 2019 16:41:47 -0400 Received: by mail-lj1-f196.google.com with SMTP id y23so3848357lje.9 for ; Wed, 09 Oct 2019 13:41:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=j9oehlPvbpQ/3mUr7ILsjkWG9P4RuU3Cq2akh+BGeG4=; b=u9WblPuD1rsm0jyX6rOP8LRDXId4vkuFAucoTNQKldbU28hMIlJ4Ye49sY+S9r4GVw FZlnYg+q4HiKAE96sVNakxmBf34Y9mWy3RWPbEpycFz6xT78/mZDLFsz7FEXaIXy1EXt XrgaMdZhH+hP/js5F/dJ3Em5ta0eRVre0FAswR5FWcDfAnxpFAk1mWdRFBtU+/IJF0Ty TBQ4ItMejqowBuKLezbZXsMP0uNYRa5YzBKTB7STXrYiiISY8jmZs0OxMlAXJTxMw2Uo ah+j28+8X6x/K5OMYVKofwMOJqb+8KuBfI6BQFyAyyrKkwdciKWqLYwXUnPM8odBEyds lLKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=j9oehlPvbpQ/3mUr7ILsjkWG9P4RuU3Cq2akh+BGeG4=; b=KJLPSaxySGvJMxz3BzDNKCGWLgOx1I5tTsHqR28KFB3tIQrRyuNy7M/5toqxQdgz/x ZPJ9yPwJD0vvGyO/jiInVPpkt1dpSMMkerT/h3E8Fi/GY3M0tKtmdD/46drcKAmc4O+4 BjkB/faVpVOjGeZsFSsQS8vzS9mcRiVVk2OfXjQOVRC88GYxFi3iIDIhHehfQ0ggwchE AUjHzlv7a8A5cGz8308BSruu7E5CtT0JSF2mnP892P5vHfAfP58+lsSUwrwZEr/YakTa XdiFs+k03MD9oML5jqRakzgLT5rQmm8lRjkGATVzl6jObvwAbryJ3Rz4fDl5B0btCb+2 b2iA== X-Gm-Message-State: APjAAAXCzd58dQrASgPDBExHEP0bzm59LUr7pjoT1Ifs9CTUujNub+nu SYSwUlZ7Tgh5BbcHb2UzsdyoIiPsc98= X-Received: by 2002:a2e:9b12:: with SMTP id u18mr3696925lji.142.1570653705253; Wed, 09 Oct 2019 13:41:45 -0700 (PDT) Received: from localhost.localdomain (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id h3sm730871ljf.12.2019.10.09.13.41.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2019 13:41:44 -0700 (PDT) From: Ivan Khoronzhuk To: ast@kernel.org, daniel@iogearbox.net, yhs@fb.com, davem@davemloft.net, jakub.kicinski@netronome.com, hawk@kernel.org, john.fastabend@gmail.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, clang-built-linux@googlegroups.com, ilias.apalodimas@linaro.org, sergei.shtylyov@cogentembedded.com, Ivan Khoronzhuk Subject: [PATCH v4 bpf-next 04/15] samples/bpf: use own EXTRA_CFLAGS for clang commands Date: Wed, 9 Oct 2019 23:41:23 +0300 Message-Id: <20191009204134.26960-5-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191009204134.26960-1-ivan.khoronzhuk@linaro.org> References: <20191009204134.26960-1-ivan.khoronzhuk@linaro.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org It can overlap with CFLAGS used for libraries built with gcc if not now then in next patches. Correct it here for simplicity. Acked-by: Andrii Nakryiko Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 9c8c9872004d..cf882e43648a 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 + BPF_EXTRA_CFLAGS += -g else ifneq ($(and $(BTF_LLC_PROBE),$(BTF_PAHOLE_PROBE),$(BTF_OBJCOPY_PROBE)),) - EXTRA_CFLAGS += -g + BPF_EXTRA_CFLAGS += -g LLC_FLAGS += -mattr=dwarfris DWARF2BTF = y endif @@ -280,8 +280,9 @@ $(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/ -I$(srctree)/tools/lib/bpf/ \ + $(Q)$(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(BPF_EXTRA_CFLAGS) \ + -I$(obj) -I$(srctree)/tools/testing/selftests/bpf/ \ + -I$(srctree)/tools/lib/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 \