[V2,1/2] libctf: remove unnecessary zlib constructs

Message ID 20221211001022.564137-2-indu.bhagat@oracle.com
State Accepted
Headers
Series Small improvements to libctf configure.ac |

Checks

Context Check Description
snail/binutils-gdb-check success Github commit url

Commit Message

Indu Bhagat Dec. 11, 2022, 12:10 a.m. UTC
  [Changes in V2]
  - Stick to the intended effect (remove only zlib constructs). Added back
  the $ZSTD_LIBS.
  - Will discuss removal of AC_ZSTD in a separate patch.
  I am not sure of the future plans for zstd compressed CTF sections, so I
  would rather take that in a separate patch.
[End of changes in V2]

------------

This dependency is managed via libtool.  So explicit addition to LDFLAGS
and LIBS is not necessary anymore.

ChangeLog:

	* libctf/configure: Regenerated.
	* libctf/configure.ac: remove zlib from LDFLAGS and LIBS.
---
 libctf/configure    | 5 ++---
 libctf/configure.ac | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)
  

Comments

Mike Frysinger Dec. 11, 2022, 7:32 a.m. UTC | #1
lgtm
-mike
  

Patch

diff --git a/libctf/configure b/libctf/configure
index d3d63407cf0..cdfc0008fe5 100755
--- a/libctf/configure
+++ b/libctf/configure
@@ -14579,10 +14579,9 @@  OLD_CC=$CC
 # always want our bfd.
 CC="./libtool --quiet --mode=link $OLD_CC"
 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
-ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
-LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
+LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
-LIBS="-lbfd -liberty -lz $ZSTD_LIBS $intl $LIBS"
+LIBS="-lbfd -liberty $ZSTD_LIBS $intl $LIBS"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
 $as_echo_n "checking for ELF support in BFD... " >&6; }
 if ${ac_cv_libctf_bfd_elf+:} false; then :
diff --git a/libctf/configure.ac b/libctf/configure.ac
index ba4a144ce37..652e95e3968 100644
--- a/libctf/configure.ac
+++ b/libctf/configure.ac
@@ -90,10 +90,9 @@  OLD_CC=$CC
 # always want our bfd.
 CC="./libtool --quiet --mode=link $OLD_CC"
 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
-ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
-LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
+LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
-LIBS="-lbfd -liberty -lz $ZSTD_LIBS $intl $LIBS"
+LIBS="-lbfd -liberty $ZSTD_LIBS $intl $LIBS"
 AC_CACHE_CHECK([for ELF support in BFD], ac_cv_libctf_bfd_elf,
 [AC_TRY_LINK([#include <stdlib.h>
 	     #include <string.h>