Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3299957imm; Mon, 8 Oct 2018 01:23:25 -0700 (PDT) X-Google-Smtp-Source: ACcGV605jEkFUBLjzhiVsKc2oRwkDNA24qMhFHdVE7IhVmpE3uWFU/YgaUTHo+fu0+5N9BwRYaEL X-Received: by 2002:a62:4bd2:: with SMTP id d79-v6mr23949242pfj.38.1538987005812; Mon, 08 Oct 2018 01:23:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538987005; cv=none; d=google.com; s=arc-20160816; b=Sm39Ludm9c+X4e8f1nqVi8WjzkEXtzjJind2aIZIaEtSG+r0TTSpVNk5atCLBzd7i8 76btdTs9dz4bWeiDj6uphRnGN0LtyM6d2SmrI7pi21/I2jUIIJ8XQJayf0aReSYi3pMp R/XVB108cMXcMr9SQF09wu/2OTXpofpYhw2g2aMUssG8Hv2t/hHzBviXm+IDs4Ie7PN7 ecKQt43RDaHaEZShCklciFe0rf62BdUeyJQtOxh6Xa3Eo6+0FKPkBDdqQ86roVONZVai +r1EM0MxTOyxQGXS9rfIDqUaE7mQMfJe/AmiExaotbryHFkR9gT9bZ7likxk4vgl5ka9 kPvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=/K3aax/1yNS/TvhEz0yZarDsQ/EvvlKXx/EDgcZvkYQ=; b=cW9UzqZMn4K6ejL1+V2MIrlzefTS8MNXluzO4E5oLv69N+KRd8ee8SbCoxalnjz/yv jZYCOYr+NOHfilKYhJOPoQvfrj8kQ59gF6Ig17i5TRimddnWLz1F6PNxIEHIOAbdoWbA M7diZK9F5nE24qa7aRl496GFmnY8P1sw+awm59Hc/5vER8z3EeNENEserRNnOQs39lIC h/tLioHQbGhEMdcYD0E1qOL/5RbU1e1f2ViW8iFRvpxqz7cltqx9EZMS+zLoKtYQiT8+ h290sLLFXvv0ZUT8tNyE9KfsTqtWHVq2lihFf4iwNOAxa4LjGRBw3geIhXTTes4ytPL3 rkqg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q200-v6si19438614pfc.159.2018.10.08.01.23.08; Mon, 08 Oct 2018 01:23:25 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727029AbeJHPdc (ORCPT + 99 others); Mon, 8 Oct 2018 11:33:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60878 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725983AbeJHPdc (ORCPT ); Mon, 8 Oct 2018 11:33:32 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 106613082A30; Mon, 8 Oct 2018 08:23:01 +0000 (UTC) Received: from krava.brq.redhat.com (unknown [10.43.17.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id D9F8A1057069; Mon, 8 Oct 2018 08:22:59 +0000 (UTC) From: Jiri Olsa To: Alexei Starovoitov , Daniel Borkmann Cc: lkml , netdev@vger.kernel.org Subject: [PATCH 1/2] bpftool: Allow to add compiler flags via EXTRA_CFLAGS variable Date: Mon, 8 Oct 2018 10:22:58 +0200 Message-Id: <20181008082259.26742-1-jolsa@kernel.org> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Mon, 08 Oct 2018 08:23:01 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding EXTRA_CFLAGS allowing user to specify extra flags for CFLAGS variable. Signed-off-by: Jiri Olsa --- tools/bpf/bpftool/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile index 74288a2197ab..5bfa07e3f2f7 100644 --- a/tools/bpf/bpftool/Makefile +++ b/tools/bpf/bpftool/Makefile @@ -46,6 +46,10 @@ CFLAGS += -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ \ -I$(srctree)/tools/lib/bpf \ -I$(srctree)/tools/perf CFLAGS += -DBPFTOOL_VERSION='"$(BPFTOOL_VERSION)"' +ifneq ($(EXTRA_CFLAGS),) +CFLAGS += $(EXTRA_CFLAGS) +endif + LIBS = -lelf -lbfd -lopcodes $(LIBBPF) INSTALL ?= install -- 2.17.2