[PATCH kdumpid 2/3] Use -lz unconditionally
Stephen Brennan <[email protected]>
| Newsgroups | org.kernel.vger.linux-debuggers |
|---|---|
| Message-ID | <[email protected]> |
The file util.c uses inflate* functions, so there's no point in testing for libz: we need it regardless. If the test in libs.sh fails, then -lz will not be appended to the link, and linking will fail. So remove the test and add -lz to the Makefile regardless. Signed-off-by: Stephen Brennan <[email protected]> --- Makefile | 2 +- libs.sh | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Makefile b/Makefile index b8e88c0..eebcafb 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ MANDIR=$(PREFIX)/man endif CUSTOM_CFLAGS= -ggdb -Wall -I/home/petr/.local/include -LIBS += -L/home/petr/.local/lib64 -lkdumpfile -laddrxlat $(shell ./libs.sh) +LIBS += -L/home/petr/.local/lib64 -lkdumpfile -laddrxlat -lz $(shell ./libs.sh) LD=ld diff --git a/libs.sh b/libs.sh index cd491d6..6cc40bd 100755 --- a/libs.sh +++ b/libs.sh @@ -28,9 +28,6 @@ if nm -u disas.o | grep -q '^ *U \(htab_create\|splay_tree_new\)$' ; then LIBS="$LIBS -liberty" rebuild fi -if nm -u disas.o | grep -q '^ *U inflate$' ; then - LIBS="$LIBS -lz" -fi if nm -u disas.o | grep -q '^ *U ZSTD_' ; then LIBS="$LIBS -lzstd" fi -- 2.39.2