Skip to content

Commit

Permalink
samples/bpf: Add missing -lz to TPROGS_LDLIBS
Browse files Browse the repository at this point in the history
Since libbpf now links against zlib, this needs to be included in the
linker invocation for the userspace programs in samples/bpf that link
statically against libbpf.

Fixes: 166750b ("libbpf: Support libbpf-provided extern variables")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Tested-by: Björn Töpel <bjorn.topel@intel.com>
Link: https://lore.kernel.org/bpf/20191216102405.353834-1-toke@redhat.com
  • Loading branch information
Toke Høiland-Jørgensen authored and Alexei Starovoitov committed Dec 16, 2019
1 parent 5984dc6 commit 5615ed4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/bpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ endif

TPROGCFLAGS_bpf_load.o += -Wno-unused-variable

TPROGS_LDLIBS += $(LIBBPF) -lelf
TPROGS_LDLIBS += $(LIBBPF) -lelf -lz
TPROGLDLIBS_tracex4 += -lrt
TPROGLDLIBS_trace_output += -lrt
TPROGLDLIBS_map_perf_test += -lrt
Expand Down

0 comments on commit 5615ed4

Please sign in to comment.