From patchwork Fri Aug 30 00:50:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 172658 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp3000337ily; Thu, 29 Aug 2019 17:50:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxI7QEwY9kuIpuPXIZIx+5G/YWjeQqFiemD2BSLcUs+qQ+xP9csI25STJCA8YNfEymKwGj X-Received: by 2002:a63:30c6:: with SMTP id w189mr10396996pgw.398.1567126254848; Thu, 29 Aug 2019 17:50:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567126254; cv=none; d=google.com; s=arc-20160816; b=cmfKM8YF8khL2Ir7Eq4e99WBFCbYNRROJ5ZYFcZ6mgJcgHufhy+M0Y0Ox3NUDrXyqC iNVl3k0hNtMBr5LSkmJ0SFiDNitbsKHYRJQNmrO3TK4Q8fs6x2HzDdYN9XRIvYiSKPwq 1bK2/LkMZDDzCaoXYZjEckTBo4FIG16tG6tloJYNWenJkrc1IwnqeIEwztFV3Ai+Btqm Jj+ITWcrlb5lPa9zxji0W99eOEyraCXLV7fH9aq3PN47I81NzHFGtpy0jVaBbb0VmTKk c7wyZqG7AH3RGp0euq7Pqmy/ndkjd9xXHVHW1jfujc08NRjILABAeyz5XfRSAVDpkrH6 gUmg== 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=Q+vZM4cZektdF572TqWkVl3QkOoJAXjpmJXjWwwbKzE=; b=r5mrtG+qhtc5PNjnC+UaBuBozMuP/PL2olDmHSOuz89AcQFiGqq0vaTpzo7mD/S8Iu Fbd36PHDvrFuThq+tmFsfU4Dtb6mi2QzFczoJMJv6YdL47kcRsc863RJxo7g+fBSae2Y SwMbEkMWQom8/LJPpOnicjxN2/rUzSa6kDOWgsarHyYCZuFlm6dSBzeZBOLi9NeObgAB QTrU/1m7oAkEg3Mu8SqPNwUgUwtGz9JmiwAxfifpkDZtQAObv37uPqKyAHVGjO64vJH0 JHlGLHmPYrfigvoVD0RcsEzKzbYFFUTcUnI26MzR2ZzAEvDUQZyuLV0Sc6QdCm5hGZcS HxWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LEYfqXzZ; 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 t9si3330408pgv.225.2019.08.29.17.50.54; Thu, 29 Aug 2019 17:50:54 -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=LEYfqXzZ; 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 S1727859AbfH3Aux (ORCPT + 28 others); Thu, 29 Aug 2019 20:50:53 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:37007 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727600AbfH3Aut (ORCPT ); Thu, 29 Aug 2019 20:50:49 -0400 Received: by mail-lf1-f68.google.com with SMTP id w67so3981330lff.4 for ; Thu, 29 Aug 2019 17:50:47 -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=Q+vZM4cZektdF572TqWkVl3QkOoJAXjpmJXjWwwbKzE=; b=LEYfqXzZUPeIuy93SH8GAssQsvlBou/hIWteBhvmXq1F9JVWj2wTkzeZdfRJclvOXa Ml9kVrTIeDyM2A/3eaEvzVK9/pGt5qEqzLTWvJqdBmLcHkvvh07Ut09wAvSKXrIMNobx r2RNchETr9Z4KWTcRDbMNJ6rLBGv3sDWxx1Z8Z5O54FYC/zPoXMdoQJR1eWto+H3GBER DlMphrpkhbPZGMzNxrWnt0/mC94HVFKOY0k+/6wVxcaRK9ftaqDrp/Dypqjz3DpeV74s 5LHndEkamECTgyLl93XSkTDSnp9E79AvMzRJuicO+St87f2BsjM+kyYugZH0KcXkbFhW G9ig== 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=Q+vZM4cZektdF572TqWkVl3QkOoJAXjpmJXjWwwbKzE=; b=inT0L6vcY7IasPlXxu3RoFvYD+axgCnflXGjcKJyVSNMqzH2wNpOHSS6TaAzRSUjOV bj83n4Plv6nUOn2G1AnmDaLsQAdt+faugVPBFDFkgv3CmbDucYqmA2q2/fixBzJDTT9d /9ArLRFlfAzpacl6HvwbawoHGYIY+KeAltMc51mT/7WVKWJLRd+gjGcqe2XUF4B/uboI AdlTSeysWjdVVqtu2IEuGq6BAfNzTuS1XRzqwM/fbHoPat4RdPSgMDrZKKEMVTrwQuJS sQ3s6plygFWoVGJI5FAwmFkiK6x3+yXWCgvIJlK56N7yXlM/sDPJ7krSaNzomhDVoCfs VXZA== X-Gm-Message-State: APjAAAUctDAmMIlrgk/w7Rvdkhc4fgCPo37ZWT/4O9ULvqYnQjoCDarX 0zhtfirZIGMGppkot3RCmJh0JYEiuQY= X-Received: by 2002:a19:ae0b:: with SMTP id f11mr2637945lfc.28.1567126246924; Thu, 29 Aug 2019 17:50:46 -0700 (PDT) Received: from localhost.localdomain (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id f19sm628149lfk.43.2019.08.29.17.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 17:50:46 -0700 (PDT) From: Ivan Khoronzhuk To: linux@armlinux.org.uk, 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-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, clang-built-linux@googlegroups.com, Ivan Khoronzhuk Subject: [PATCH RFC bpf-next 04/10] samples: bpf: use own EXTRA_CFLAGS for clang commands Date: Fri, 30 Aug 2019 03:50:31 +0300 Message-Id: <20190830005037.24004-5-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190830005037.24004-1-ivan.khoronzhuk@linaro.org> References: <20190830005037.24004-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 following 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 \