Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3299966imm; Mon, 8 Oct 2018 01:23:26 -0700 (PDT) X-Google-Smtp-Source: ACcGV63CdzkHvGfzckYuccMOLDLzWOGtjMj2hwy94mSZIOtRhJfFNYeOrLZkKYQRAxPT17aVN7S3 X-Received: by 2002:a62:8891:: with SMTP id l139-v6mr23901295pfd.198.1538987006670; Mon, 08 Oct 2018 01:23:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538987006; cv=none; d=google.com; s=arc-20160816; b=tGBFuJgNUjQKL87+LV/GHjiBIOvbXoE1yJe25h0RP0VGURdm/d0+F/TBQDW6JRjuLE Cfk3LSswJ4c3bSAcNtPbp3YNULBBiToN+BJoY3jg6hyFhcDwABF46H8QHZvxASLBNoii 04zjdG1CqLTaHgezSWsiYexYCVQgyCPAgEhh3exAEGZX9+KSPSh5GRw17GCWJOMewUKc nkKx46Ccysfyktcr7Wg6KJbzeSf4vJkPVg1b3Vuay5iAbdb43l/L39+dY8AkF7z7+L33 7zTkkNapyDcNOTuBN8OJq6WFOYdV09bZSuQTzsKNETeruXSyiWZ1EBxNc5GFJj+G79pl ILMA== 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; bh=oflmjuCg3wUN2L4ja0kXtKPhg3G2vNJVSpxE1HxWpzM=; b=WkwXtzn4zOZiEHYqnZa8tQ+DRXVIrGPufb2DHtRoMZPI8HkPsMFqlSfGGwDe2kW05Z OfHCNTxnPQeaN9v5O9L+X992hFUkvTeYr8TO81c6Efmhxc7lQysDUXg8wYu73GnXsckn 6pCNluRwfvq4RUxBc9oOSffEHZhrxryyU1PbgfHu+ks3kV7jOWJc14RdZSRSSI8pyj/q TpdpwZ9RNdCl/mfbhDbcGQlN/6Ebg8IZV9koQuRDflyuOjH/qVHLpPZqCmlUcqQIrPw0 XH3/a3H3/ij3k7rTlQNtBc9wgCW5DFDjAKkXfi6KhxbGvFreN2Zp4/nrpnoRi/7R6L5w rXFg== 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 t7-v6si16559601ply.150.2018.10.08.01.23.11; Mon, 08 Oct 2018 01:23:26 -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 S1727148AbeJHPdf (ORCPT + 99 others); Mon, 8 Oct 2018 11:33:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60896 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725983AbeJHPde (ORCPT ); Mon, 8 Oct 2018 11:33:34 -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 85CFC3082A24; Mon, 8 Oct 2018 08:23:02 +0000 (UTC) Received: from krava.brq.redhat.com (unknown [10.43.17.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 58FF31057069; Mon, 8 Oct 2018 08:23:01 +0000 (UTC) From: Jiri Olsa To: Alexei Starovoitov , Daniel Borkmann Cc: lkml , netdev@vger.kernel.org Subject: [PATCH 2/2] bpftool: Allow add linker flags via EXTRA_LDFLAGS variable Date: Mon, 8 Oct 2018 10:22:59 +0200 Message-Id: <20181008082259.26742-2-jolsa@kernel.org> In-Reply-To: <20181008082259.26742-1-jolsa@kernel.org> References: <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:02 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding EXTRA_LDFLAGS allowing user to specify extra flags for LD_FLAGS variable. Also adding LDFLAGS to build command line. Signed-off-by: Jiri Olsa --- tools/bpf/bpftool/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile index 5bfa07e3f2f7..dac7eff4c7e5 100644 --- a/tools/bpf/bpftool/Makefile +++ b/tools/bpf/bpftool/Makefile @@ -49,6 +49,9 @@ CFLAGS += -DBPFTOOL_VERSION='"$(BPFTOOL_VERSION)"' ifneq ($(EXTRA_CFLAGS),) CFLAGS += $(EXTRA_CFLAGS) endif +ifneq ($(EXTRA_LDFLAGS),) +LDFLAGS += $(EXTRA_LDFLAGS) +endif LIBS = -lelf -lbfd -lopcodes $(LIBBPF) @@ -94,7 +97,7 @@ $(OUTPUT)disasm.o: $(srctree)/kernel/bpf/disasm.c $(QUIET_CC)$(COMPILE.c) -MMD -o $@ $< $(OUTPUT)bpftool: $(OBJS) $(LIBBPF) - $(QUIET_LINK)$(CC) $(CFLAGS) -o $@ $^ $(LIBS) + $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(OUTPUT)%.o: %.c $(QUIET_CC)$(COMPILE.c) -MMD -o $@ $< -- 2.17.2