aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorYulia Kartseva <hex@fb.com>2020-01-30 15:13:10 -0800
committerAlexei Starovoitov <ast@kernel.org>2020-01-30 16:19:47 -0800
commit2577e373bbc07f18680287b3958d3b2fdebe4b20 (patch)
tree48a10d37021cb4641f66e7e8af8e90a99c39a3e3 /tools
parentbpf: Reuse log from btf_prase_vmlinux() in btf_struct_ops_init() (diff)
downloadlinux-dev-2577e373bbc07f18680287b3958d3b2fdebe4b20.tar.xz
linux-dev-2577e373bbc07f18680287b3958d3b2fdebe4b20.zip
runqslower: Fix Makefile
Fix undefined reference linker errors when building runqslower with gcc 7.4.0 on Ubuntu 18.04. The issue is with misplaced -lelf, -lz options in Makefile: $(Q)$(CC) $(CFLAGS) -lelf -lz $^ -o $@ -lelf, -lz options should follow the list of target dependencies: $(Q)$(CC) $(CFLAGS) $^ -lelf -lz -o $@ or after substitution cc -g -Wall runqslower.o libbpf.a -lelf -lz -o runqslower The current order of gcc params causes failure in libelf symbols resolution, e.g. undefined reference to `elf_memory' Fixes: 9c01546d26d2 ("tools/bpf: Add runqslower tool to tools/bpf") Signed-off-by: Julia Kartseva <hex@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/908498f794661c44dca54da9e09dc0c382df6fcb.1580425879.git.hex@fb.com
Diffstat (limited to 'tools')
-rw-r--r--tools/bpf/runqslower/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/runqslower/Makefile b/tools/bpf/runqslower/Makefile
index 0c021352beed..87eae5be9bcd 100644
--- a/tools/bpf/runqslower/Makefile
+++ b/tools/bpf/runqslower/Makefile
@@ -41,7 +41,7 @@ clean:
$(OUTPUT)/runqslower: $(OUTPUT)/runqslower.o $(BPFOBJ)
$(call msg,BINARY,$@)
- $(Q)$(CC) $(CFLAGS) -lelf -lz $^ -o $@
+ $(Q)$(CC) $(CFLAGS) $^ -lelf -lz -o $@
$(OUTPUT)/runqslower.o: runqslower.h $(OUTPUT)/runqslower.skel.h \
$(OUTPUT)/runqslower.bpf.o