From patchwork Wed Sep 4 21:22:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 173074 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp454796ilq; Wed, 4 Sep 2019 14:23:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxf1GQY0jU6MW+n6Rqi9e3MvuDJ8FTgh1heHOtOc/0kyLmvM3wNlE/998F2LnWdJPz0JfgX X-Received: by 2002:a63:205f:: with SMTP id r31mr158227pgm.159.1567632190300; Wed, 04 Sep 2019 14:23:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567632190; cv=none; d=google.com; s=arc-20160816; b=RhSDRoec6vFZle5iC4kd5jvJ15TzJmTxO/v+Ih/dpJLPKsRFxcnbUBQk1Ni16hUFgJ w62LSZrPlSKkVMgXQ9Wd5Cvy6PQxZu9gk/JncgFKuTSwwh0tWqlvb0kdsKVlnEj719iY bofMqI9n6C0Qsci79bkNwgJFGxy0Ye7mQRMUwI2p/ZBIES0cjsoIBzyaK3cifUBUR8Za veyM9yLxPDXmp3HpuLOSd3dWhthh+gfovJm71jrktZP7zy26IbxxE8EoIFGdm8B8jo8p 0ZoaKpw0Fn5595ZRjYhw7qFszkFRuAFRL0NMWG67EACyW1FwG+M0NqtTgMd0cbjDY/9K Qzcw== 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=Jcr7utRE+skJcsLIDmCcqhAtcA7yd+FAfx8VSIjlEN0=; b=IMoH5uD0cgCDgTrCwMvMIDX+uc4cgm6aPeAn8Pm3L1uSlirPKVn/MnvESB8k+PNoC1 kD2lTtn1xXRQ608GDPs/YyMLqD7BNJDejMUATFvKzwh0JB9+/uiTsekk1Vv10UiluoFa A/QpEB26e8OBRM04ISbCFPMoNHr1pidUCpez10jpvnXGtpWVak9ZNHRLQE9YX8EcelDh DC3+x6QPlqsMFp18KBCrmQ1T3IncpHinyD9RI69/t50R3DJ9gWp7PbUTh2/2uL31PdLm V5MKpDq9Tcedgjc9+vGWC3+Euf+OvvTIxGS7nZNZmcZVE2Um8xh+THEJvSk8qv+AxsNF tzZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ABJbZSLC; 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 u8si206860pjy.20.2019.09.04.14.23.10; Wed, 04 Sep 2019 14:23:10 -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=ABJbZSLC; 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 S1730541AbfIDVXJ (ORCPT + 28 others); Wed, 4 Sep 2019 17:23:09 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:40330 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730404AbfIDVXI (ORCPT ); Wed, 4 Sep 2019 17:23:08 -0400 Received: by mail-lj1-f194.google.com with SMTP id 7so181731ljw.7 for ; Wed, 04 Sep 2019 14:23:06 -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=Jcr7utRE+skJcsLIDmCcqhAtcA7yd+FAfx8VSIjlEN0=; b=ABJbZSLCV3FsQTMEMvdQFXH1D6yKF8jjS3/RsTHVZzVIkAvo/W1a9b9X01mzy8erDf IvqzyVfDgOZy32aa2l5oCtncvHQ6pMbPDxg7JN2j46uWoAF42oXFeCw9S7iXZ3TCsDU7 bXlTQlfFkgg8VgBDXwIJy5jEQ0IpJoX1rT+fT8L3uKAjbYVAbZx8BJhUff53hbdBvUil 4ImdVopvHM5krnUPckUJAQOEh8YvcljPij/nQuBCc39DZ9KGfce2McYBf7MWkJe1ieJm DCHDm8Q5yTXSRrFzvxF7e4WBVf0/ob1Bhcsx52IZEldzSy51EfyGwBs/8oSuQ/oTYIPU 9AlQ== 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=Jcr7utRE+skJcsLIDmCcqhAtcA7yd+FAfx8VSIjlEN0=; b=j1+nycbZbZ73nVJFe9wulsRg8mi89JMgZ41VlqalCTMARVZG+FmwCPLGTXzTXK1LzJ g94IMsEqxHPESadxK7bT7s2vcKXhZ50W+4ruOUHcKyXuevDQylQXAtgJFDzEb0EvlYJJ 6rzA5Wqbog/uVabGr77gaEGufwg2uI7bG2BwQ42UpXqMVpZN2lAUf1MQTWG0Lp6qG03K I0PCZmVQxrKcxT8wUTZlJr+Znf6yC4bde/n8RHOu/n39fFDfIXVwcKY7fizz91QB2kLA YczICHhAypPvj1chvEa1LGWy1rDw9wNbznJdD9e1fwzMPOntjh/oVr6JCV4Uk1ica6an sJWA== X-Gm-Message-State: APjAAAVEon6GMaKnQAPmFtOCpy3oArw2whM5qGTBLZ3VoH860fGvSXcD iVC45BiHBmvjsjm3dsoXu62A2g== X-Received: by 2002:a2e:8103:: with SMTP id d3mr3392965ljg.105.1567632185972; Wed, 04 Sep 2019 14:23:05 -0700 (PDT) Received: from localhost.localdomain (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id s8sm3540836ljd.94.2019.09.04.14.23.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 14:23:05 -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, Ivan Khoronzhuk Subject: [PATCH bpf-next 4/8] samples: bpf: use own EXTRA_CFLAGS for clang commands Date: Thu, 5 Sep 2019 00:22:08 +0300 Message-Id: <20190904212212.13052-5-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190904212212.13052-1-ivan.khoronzhuk@linaro.org> References: <20190904212212.13052-1-ivan.khoronzhuk@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index a2953357927e..cdd742c05200 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -219,10 +219,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 @@ -281,8 +281,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 \