bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Stanislav Fomichev <sdf@fomichev.me>
Cc: Stanislav Fomichev <sdf@google.com>,
	Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: [PATCH bpf] selftests/bpf: bring back c++ include/link test
Date: Mon, 2 Dec 2019 13:57:12 -0800	[thread overview]
Message-ID: <CAEf4BzYzY2WsiDoGokeo9AjmYfnrAhEn0YhTeQV6Gt-53WhR4A@mail.gmail.com> (raw)
In-Reply-To: <20191202214935.GA202854@mini-arch>

On Mon, Dec 2, 2019 at 1:49 PM Stanislav Fomichev <sdf@fomichev.me> wrote:
>
> On 12/02, Andrii Nakryiko wrote:
> > On Mon, Dec 2, 2019 at 12:28 PM Stanislav Fomichev <sdf@google.com> wrote:
> > > +# Make sure we are able to include and link libbpf against c++.
> > > +$(OUTPUT)/test_cpp: test_cpp.cpp $(BPFOBJ)
> > > +       $(CXX) $(CFLAGS) $^ -lelf -o $@
> >
> > let's use $(LDLIBS) instead here
> Sure, I'll send a v2 with $(LDLIBS); it might be worth doing for
> consistency.
>
> Just curious: any particular reason you want to do it?
> (looking it tools/build/features, I don't see any possible -lelf
> cross-dependency)

The main reason is that I'd like to only have one (at least one per
Makefile) place where we specify expected library dependencies. In my
extern libbpf change I was adding explicit dependency on zlib, for
instance, and having to grep for -lxxx to see where I should add -lz
is error-prone and annoying. Nothing beyond that.

  reply	other threads:[~2019-12-02 21:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02 20:21 [PATCH bpf] selftests/bpf: bring back c++ include/link test Stanislav Fomichev
2019-12-02 21:30 ` Andrii Nakryiko
2019-12-02 21:49   ` Stanislav Fomichev
2019-12-02 21:57     ` Andrii Nakryiko [this message]
2019-12-02 22:15       ` Stanislav Fomichev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEf4BzYzY2WsiDoGokeo9AjmYfnrAhEn0YhTeQV6Gt-53WhR4A@mail.gmail.com \
    --to=andrii.nakryiko@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@fomichev.me \
    --cc=sdf@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).