linux-debuggers.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Brennan <stephen.s.brennan@oracle.com>
To: Petr Tesarik <petr@tesarici.cz>
Cc: linux-debuggers@vger.kernel.org,
	Stephen Brennan <stephen.s.brennan@oracle.com>
Subject: [PATCH kdumpid 2/3] Use -lz unconditionally
Date: Wed, 28 Jun 2023 14:03:43 -0700	[thread overview]
Message-ID: <20230628210344.357073-3-stephen.s.brennan@oracle.com> (raw)
In-Reply-To: <20230628210344.357073-1-stephen.s.brennan@oracle.com>

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 <stephen.s.brennan@oracle.com>
---
 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


  parent reply	other threads:[~2023-06-28 21:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28 21:03 [PATCH kdumpid 0/3] Prevent segfault on missing disassembler Stephen Brennan
2023-06-28 21:03 ` [PATCH kdumpid 1/3] cdefs.sh: require bash Stephen Brennan
2023-06-28 21:03 ` Stephen Brennan [this message]
2023-06-28 21:03 ` [PATCH kdumpid 3/3] Gracefully handle missing dissasembler function Stephen Brennan
2023-06-28 22:12 ` [PATCH kdumpid 0/3] Prevent segfault on missing disassembler Stephen Brennan
2023-06-29  6:26 ` Petr Tesařík

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230628210344.357073-3-stephen.s.brennan@oracle.com \
    --to=stephen.s.brennan@oracle.com \
    --cc=linux-debuggers@vger.kernel.org \
    --cc=petr@tesarici.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).