Re: [BUGFIX PATCH] selftests: Fix pthread link option
From: Masami Hiramatsu
Date: Wed Jan 15 2020 - 17:17:56 EST
On Wed, 15 Jan 2020 11:25:30 -0800
Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> wrote:
> On Wed, Jan 15, 2020 at 06:16:07PM +0900, Masami Hiramatsu wrote:
> > To support pthread correctly, it is better to use -pthread
> > instead of -lpthread.
> >
> > Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
> > ---
> > tools/testing/selftests/bpf/Makefile | 2 +-
> > tools/testing/selftests/membarrier/Makefile | 2 +-
> > tools/testing/selftests/mqueue/Makefile | 2 +-
> > tools/testing/selftests/net/Makefile | 4 ++--
> > .../testing/selftests/powerpc/benchmarks/Makefile | 4 ++--
> > tools/testing/selftests/powerpc/dscr/Makefile | 2 +-
> > tools/testing/selftests/powerpc/mm/Makefile | 2 +-
> > tools/testing/selftests/rseq/Makefile | 2 +-
> > tools/testing/selftests/rtc/Makefile | 2 +-
> > tools/testing/selftests/seccomp/Makefile | 2 +-
> > tools/testing/selftests/timers/Makefile | 2 +-
> > tools/testing/selftests/vm/Makefile | 2 +-
> > 12 files changed, 14 insertions(+), 14 deletions(-)
> >
> > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> > index e2fd6f8d579c..419f58c53d12 100644
> > --- a/tools/testing/selftests/bpf/Makefile
> > +++ b/tools/testing/selftests/bpf/Makefile
> > @@ -22,7 +22,7 @@ CFLAGS += -g -Wall -O2 $(GENFLAGS) -I$(APIDIR) -I$(LIBDIR) -I$(BPFDIR) \
> > -I$(GENDIR) -I$(TOOLSDIR) -I$(CURDIR) \
> > -Dbpf_prog_load=bpf_prog_test_load \
> > -Dbpf_load_program=bpf_test_load_program
> > -LDLIBS += -lcap -lelf -lrt -lpthread
> > +LDLIBS += -lcap -lelf -lrt -pthread
>
> Please split this bit into separate patch and send it to bpf@vger targeting
> bpf-next. selftests/bpf are going through a lot of changes and I'd like to
> avoid any chance of conflicts.
OK, I'll split it.
Thank you,
--
Masami Hiramatsu <mhiramat@xxxxxxxxxx>