Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4050421imm; Mon, 8 Oct 2018 14:05:42 -0700 (PDT) X-Google-Smtp-Source: ACcGV61s42dshsVkm+p/qyVQbyi7zKPtoyXmSV7lcyXMXX0DV0oOW76bX3Wlp9Ahr9f8fcy+YCWX X-Received: by 2002:a17:902:6f16:: with SMTP id w22-v6mr25382982plk.261.1539032742677; Mon, 08 Oct 2018 14:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539032742; cv=none; d=google.com; s=arc-20160816; b=uig4LiyzT5nM6+znHBwkg2nurHJKNzVIbm0UXuC1rWaqOHWMar1yVYZIilQPWq06x8 3LZ0Oi9XX/NW66xpeneZMPE2tXrefSCscsCXtdmOTMDCKbadKBVaUiSpbKQqtIZSkDeG 3+OMGw/Uc3hAhXGsaCxDaYmC7I/Pb6YPdwK8f4Vs1B42xPkV2ByvUrpx7FsLr350l1po U+3+mgM+6a7aY3pfu2C3kSxZ/FjRGpAflppIDwZ59GdRYVxNRIAsO4zvws9kL74EL0qc sWXLQ1Dj/GCwmwbfnT1f+pIWwDbBdZA/Ofs7WCBoC0OxNGgCMJMfrMiUmk2NLc6y/va9 TZ+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=tAQejBmhV/J63AbIu0NHADuMhG0c7IxLW0vdcXWmnEw=; b=DchVZoQNyYOqywlpOS89b4IIXdrD7DBOWzOoDVj87WqbclcjooZZQrnnVv9WgcQsHa G/+wmH1fymdWiwQobp6x+CiSfLUqII1yPrQICRoE8gXrEYYeyOEugn0tAVKunfqtflF3 VRkmZ/2ZJdGKs5BbFERyWBH5aIWGhrwHkDH6aO5NZEmiFQeuvnXunWPzZ+sQKwJucfD0 ykz+m5NnzEP7j3EyWL3S/iehKCU7L4DgEnq8UG/shCHvIt6LPamlAZmggfvm2suep2PJ cbhtyFUwgZqcyeQ+CqKqn4VT3ezli3/lZP682aagsiuPwrzAA51jAA53QgxNbDk+11MA Kj2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VKBGTU1f; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p7-v6si18654565plo.159.2018.10.08.14.05.27; Mon, 08 Oct 2018 14:05:42 -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=@gmail.com header.s=20161025 header.b=VKBGTU1f; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726867AbeJIEQi (ORCPT + 99 others); Tue, 9 Oct 2018 00:16:38 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:39052 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725749AbeJIEQi (ORCPT ); Tue, 9 Oct 2018 00:16:38 -0400 Received: by mail-qt1-f195.google.com with SMTP id e22-v6so15438128qto.6; Mon, 08 Oct 2018 14:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tAQejBmhV/J63AbIu0NHADuMhG0c7IxLW0vdcXWmnEw=; b=VKBGTU1fTZmhMe0T9u8pLQk2E8h7ILEMBvFDHrPODR6fDPNHLOXqLSfz3jT8wnig9M 3P3o6+KGo57eta01igJDjLAAD0HvXLeBkUFYrFW5OmYomwPS8NnqgsZ+hpURDISD8I2t KWrL9GUCVePBDcfQFvr14pqwPXz6xw69oqXSvFG98qXAfVQpZJ4XtrBckIiz9i4GpZX3 MIULv93sCISBcv6OraiMKXbNI4de4Xv1ibkFBqLeb6HSXOdnduttca7HssAVafI+WFeH 14X9osiM2JMl/pC0YR9rMY2SGwzmaS50SORuPGwoaxPH1pjwt36PueWvj+ywf3cXmvVa 7WxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tAQejBmhV/J63AbIu0NHADuMhG0c7IxLW0vdcXWmnEw=; b=OKrAnzFouul4lUgfUszibdYJnqlj3dcmAhX4D4YLQd91deeIjTPK+jmKyH4xedx48t NYoZTW6Cj2bXvLlW0AnqfgHKx/VKHT3G/UnzkXOFWefqwIMxzDkr/kV2OsvKgXcDiMzD 4GTZzhTl876mkcF6qQiU99NFmQbgR0etw8IcOtNpycZGVlt5bm7BrPEZSwNZECQjIpwp VHq0BA12SUrknu/dfgO2fZ/3/jmdv/hLKvpqzNTCV5i03JZ46h+VLIeCzWmK4KSVhNtd 076kBDvn2fxw4O4F12t/1RdJ32m9kxbiZupPQsMUaZNcuBd9MmUph5AbIv8/NZg3I2rX NQzg== X-Gm-Message-State: ABuFfoj3I5h9FiwBPv1U52Lh8j9JoyQgoJG3hX8Ppn1x08kcyz6NnTFL m4tFFL813O9KzorflzBHiUtYyPpxwwTuM0dhWQw= X-Received: by 2002:ac8:1793:: with SMTP id o19-v6mr20751511qtj.98.1539032579304; Mon, 08 Oct 2018 14:02:59 -0700 (PDT) MIME-Version: 1.0 References: <20181008082259.26742-1-jolsa@kernel.org> <20181008082259.26742-2-jolsa@kernel.org> In-Reply-To: <20181008082259.26742-2-jolsa@kernel.org> From: Song Liu Date: Mon, 8 Oct 2018 14:02:48 -0700 Message-ID: Subject: Re: [PATCH 2/2] bpftool: Allow add linker flags via EXTRA_LDFLAGS variable To: Jiri Olsa Cc: Alexei Starovoitov , Daniel Borkmann , open list , Networking Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 8, 2018 at 1:23 AM Jiri Olsa wrote: > > 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 Acked-by: Song Liu > --- > 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 >