From patchwork Tue Sep 10 10:38: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: 173499 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp5609705ilq; Tue, 10 Sep 2019 03:38:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9bDP+wWRzt6TZHlxZkh2SwaKUJsloka+Xh54uprUVsZYa9BiCR4Rf5I/pLtnonTvm1XmI X-Received: by 2002:a17:906:3443:: with SMTP id d3mr1765797ejb.221.1568111929253; Tue, 10 Sep 2019 03:38:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568111929; cv=none; d=google.com; s=arc-20160816; b=D0R+JNx1J4MOfvuJXp3u12Na8goJjV5OZVmw+AQ2pLhQDJnBH1L0ofc6TAyXcZjej9 zqJIDqe+tBtW5uemwTGEVJtGj2nxrBemG1/2dfqukU1BuIrw5/a3CVhgdfsfI45+OM1p OCWtsg5op8iRec6576iPkcjiJnBb+Oj5NJZsXbBa1C4QzsLzyAs8SI5WR1fLvzzzpcOW KjjcVB999Kq997Zy8iwhzwrCDZzgakO8zTnkYA2a9pIj42ZmpLdo25AFIBEXWaeFvM/d 7njMh/UoJKwuRlPjFSjEvLtHerPjQHJlN/Tfd7jde6t85X2J2xuMYVKjO74lLp2i2QWO RJ/Q== 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=4FRJ5Ph8qMbMU6/W3VLuGrqprbT0bDHz0d1WvLmMb4M=; b=wk9VMRRQNllTB+IsiJ1WH1zOOeZkuKfz50qIk6sL14PfyC5OAmc7oDvfBaMoF0BAWG LvoOoIRJnp7tPpaoPN/T1nMki3bRi6tQhpWeplwQDiD1s3UytYXjfEG2Ndu6Gw757jCf kqUKv1x1jMVcMsRjPRtSAlOhio5DGySaD7i4eXcE3it4Wk/ZYWNcO/tsul+u4V4KwpXw Pni1+HYSvCbP9F6Bri8huG7gt5d1MNHtuQnd9Umv2J8H+hmE8seC53wVvIFlZPKuYWoy UUGpvVe29rxJybNQmMnWTe5cpMQ0zq5sKkt2jI5HJUymO0B7zGseiZAdqY55S04Hw0Sx wANw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TXCPyNiE; 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 y9si8966603ejb.5.2019.09.10.03.38.49; Tue, 10 Sep 2019 03:38:49 -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=TXCPyNiE; 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 S2406090AbfIJKip (ORCPT + 8 others); Tue, 10 Sep 2019 06:38:45 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:41699 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403802AbfIJKio (ORCPT ); Tue, 10 Sep 2019 06:38:44 -0400 Received: by mail-lf1-f67.google.com with SMTP id j4so13017853lfh.8 for ; Tue, 10 Sep 2019 03:38:43 -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=4FRJ5Ph8qMbMU6/W3VLuGrqprbT0bDHz0d1WvLmMb4M=; b=TXCPyNiEYJm+z3P9BrsgCARerEq9GOj2cQ11CYeYMNRuDkg/mY0M0tQui+vUdL1k87 8+ECvYjDRTCIoulo93XPu0RXJvzn/1Nz7YG2evAYLUkNhWIqO7VIZZ0QYmn63vEKS+8G fn70QxPlntFDMw950+14w5b79yXsySEIlftqcIt9K+GAVfYjfmsfhQRDGCiQjDqcenl/ 4Jq9v5fuFPTeUqaF4pzLPWOcipfkFql5KD6lqmjwOEZpE2e5y+2S8Fs5jznuqUTZGezp RQQM60F5JHcdeChUHuytyct8VKXIhAVM7CZetbmTUFxRt208i+TlHTzDlk4C2rVJorC3 SQRw== 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=4FRJ5Ph8qMbMU6/W3VLuGrqprbT0bDHz0d1WvLmMb4M=; b=uUeiFF7pvIX+8VMdyUeV6zpOKA+NSfEHNMx/s7ktH65pgHeRvWnQJtONYoY98lWgIy Qa9DYLMospgk3q3Oz9z7ZriNM3zpEzvgb0c0V+IGfx0V12NFleOMn+fPEBn3C/jMRsLY RbDzZK49g4ILRaU8p77dqxU2d8lOaoouYwU8lqyJAOTDNIxIlgMYHVfjdR1b9zdqWJ46 qTUIGODuIHIzA6t9GYjfs9TyFIiEpYlNduLPCmaLAUbqHeqNnCP9+/PXcVWcJPcKNPuL Jl8QE9LpczaRhv39rEmCLKUCEA1B00C/bC+bgf+TDlaJh95S+uUVXml5Fy/TQd3JOeSZ 5VGg== X-Gm-Message-State: APjAAAWcEEQHlAcx1a5TVuArnoW/yizfZCvNPP5s6u0MEYhsrexQVJGR tc1tRtO5+JzjMdTQvyJ0ylGpJw== X-Received: by 2002:a19:14f:: with SMTP id 76mr19346797lfb.92.1568111922493; Tue, 10 Sep 2019 03:38:42 -0700 (PDT) Received: from localhost.localdomain (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id g5sm4005563lfh.2.2019.09.10.03.38.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2019 03:38:41 -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 04/11] samples: bpf: use own EXTRA_CFLAGS for clang commands Date: Tue, 10 Sep 2019 13:38:23 +0300 Message-Id: <20190910103830.20794-5-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190910103830.20794-1-ivan.khoronzhuk@linaro.org> References: <20190910103830.20794-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. 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 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 \