linux_dsm_epyc7002/tools/bpf/runqslower
Yulia Kartseva 2577e373bb 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: 9c01546d26 ("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
2020-01-30 16:19:47 -08:00
..
.gitignore tools/bpf: Add runqslower tool to tools/bpf 2020-01-13 17:48:13 -08:00
Makefile runqslower: Fix Makefile 2020-01-30 16:19:47 -08:00
runqslower.bpf.c tools/runqslower: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
runqslower.c tools/runqslower: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
runqslower.h tools/bpf: Add runqslower tool to tools/bpf 2020-01-13 17:48:13 -08:00