[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzYzY2WsiDoGokeo9AjmYfnrAhEn0YhTeQV6Gt-53WhR4A@mail.gmail.com>
Date: Mon, 2 Dec 2019 13:57:12 -0800
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Stanislav Fomichev <sdf@...ichev.me>
Cc: Stanislav Fomichev <sdf@...gle.com>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>
Subject: Re: [PATCH bpf] selftests/bpf: bring back c++ include/link test
On Mon, Dec 2, 2019 at 1:49 PM Stanislav Fomichev <sdf@...ichev.me> wrote:
>
> On 12/02, Andrii Nakryiko wrote:
> > On Mon, Dec 2, 2019 at 12:28 PM Stanislav Fomichev <sdf@...gle.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.
Powered by blists - more mailing lists