public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Small improvements to libctf configure.ac
@ 2022-12-09 20:21 Indu Bhagat
  2022-12-09 20:21 ` [PATCH 1/2] libctf: remove unnecessary zlib constructs Indu Bhagat
  2022-12-09 20:21 ` [PATCH 2/2] libctf: remove AC_CONFIG_MACRO_DIR Indu Bhagat
  0 siblings, 2 replies; 5+ messages in thread
From: Indu Bhagat @ 2022-12-09 20:21 UTC (permalink / raw)
  To: binutils; +Cc: Indu Bhagat

Hi,

Sending two small patches which cleanup unnecessary stubs from
libctf/configure.ac. 

Testing notes:
  - regression tested on host x86_64.

Thanks,

Indu Bhagat (2):
  libctf: remove unnecessary zlib constructs
  libctf: remove AC_CONFIG_MACRO_DIR

 libctf/configure    | 12 ++++--------
 libctf/configure.ac |  8 ++------
 2 files changed, 6 insertions(+), 14 deletions(-)

-- 
2.37.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] libctf: remove unnecessary zlib constructs
  2022-12-09 20:21 [PATCH 0/2] Small improvements to libctf configure.ac Indu Bhagat
@ 2022-12-09 20:21 ` Indu Bhagat
  2022-12-10  1:07   ` Mike Frysinger
  2022-12-09 20:21 ` [PATCH 2/2] libctf: remove AC_CONFIG_MACRO_DIR Indu Bhagat
  1 sibling, 1 reply; 5+ messages in thread
From: Indu Bhagat @ 2022-12-09 20:21 UTC (permalink / raw)
  To: binutils; +Cc: Indu Bhagat

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(-)

diff --git a/libctf/configure b/libctf/configure
index d3d63407cf0..acd0298b24f 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 $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..387826b82e1 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 $intl $LIBS"
 AC_CACHE_CHECK([for ELF support in BFD], ac_cv_libctf_bfd_elf,
 [AC_TRY_LINK([#include <stdlib.h>
 	     #include <string.h>
-- 
2.37.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] libctf: remove AC_CONFIG_MACRO_DIR
  2022-12-09 20:21 [PATCH 0/2] Small improvements to libctf configure.ac Indu Bhagat
  2022-12-09 20:21 ` [PATCH 1/2] libctf: remove unnecessary zlib constructs Indu Bhagat
@ 2022-12-09 20:21 ` Indu Bhagat
  1 sibling, 0 replies; 5+ messages in thread
From: Indu Bhagat @ 2022-12-09 20:21 UTC (permalink / raw)
  To: binutils; +Cc: Indu Bhagat

ACLOCAL_AMFLAGS is being set already.  So using AC_CONFIG_MACRO_DIR is
unnecessary.

ChangeLog:

	* libctf/configure: Regenerated.
	* libctf/configure.ac: remove AC_CONFIG_MACRO_DIR usage.
---
 libctf/configure    | 7 ++-----
 libctf/configure.ac | 3 ---
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/libctf/configure b/libctf/configure
index acd0298b24f..cca00dca739 100755
--- a/libctf/configure
+++ b/libctf/configure
@@ -2328,9 +2328,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-
-
-
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   if test -f "$ac_dir/install-sh"; then
@@ -11655,7 +11652,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11658 "configure"
+#line 11655 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11761,7 +11758,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11764 "configure"
+#line 11761 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libctf/configure.ac b/libctf/configure.ac
index 387826b82e1..0d9cdf1d63d 100644
--- a/libctf/configure.ac
+++ b/libctf/configure.ac
@@ -21,9 +21,6 @@ dnl
 AC_PREREQ(2.64)
 AC_INIT([libctf], 1.2.0)
 AC_CONFIG_SRCDIR(ctf-impl.h)
-AC_CONFIG_MACRO_DIR(..)
-AC_CONFIG_MACRO_DIR(../config)
-AC_CONFIG_MACRO_DIR(../bfd)
 AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
-- 
2.37.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] libctf: remove unnecessary zlib constructs
  2022-12-09 20:21 ` [PATCH 1/2] libctf: remove unnecessary zlib constructs Indu Bhagat
@ 2022-12-10  1:07   ` Mike Frysinger
  2022-12-10  6:55     ` Indu Bhagat
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2022-12-10  1:07 UTC (permalink / raw)
  To: Indu Bhagat; +Cc: binutils

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

On 09 Dec 2022 12:21, Indu Bhagat via Binutils wrote:
> -ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
> -LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
> +LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"

$ZLIBDIR is zlib related ...

> -LIBS="-lbfd -liberty -lz $ZSTD_LIBS $intl $LIBS"
> +LIBS="-lbfd -liberty $intl $LIBS"

... but $ZSTD_LIBS is zstd related, not zlib.

commit message only says zlib.

also, you're still calling AM_ZLIB & AC_ZSTD which should be removed.
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] libctf: remove unnecessary zlib constructs
  2022-12-10  1:07   ` Mike Frysinger
@ 2022-12-10  6:55     ` Indu Bhagat
  0 siblings, 0 replies; 5+ messages in thread
From: Indu Bhagat @ 2022-12-10  6:55 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: binutils

On 12/9/22 17:07, Mike Frysinger wrote:
> On 09 Dec 2022 12:21, Indu Bhagat via Binutils wrote:
>> -ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
>> -LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
>> +LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
> 
> $ZLIBDIR is zlib related ...
> 
>> -LIBS="-lbfd -liberty -lz $ZSTD_LIBS $intl $LIBS"
>> +LIBS="-lbfd -liberty $intl $LIBS"
> 
> ... but $ZSTD_LIBS is zstd related, not zlib.
> 
> commit message only says zlib.
> 

Oops, yes, the removal of $ZSTD_LIBS was unintentional.

> also, you're still calling AM_ZLIB & AC_ZSTD which should be removed.
> -mike

AM_ZLIB cannot be removed at this time from libctf/configure.ac. There 
was a discussion earlier on this matter in context of using libtool and 
GDB: https://sourceware.org/pipermail/gdb-patches/2022-November/193771.html

Regarding removal of AC_ZSTD, perhaps, yes. I will run some tests and 
send a separate patch.

Thanks!


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-10  6:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-09 20:21 [PATCH 0/2] Small improvements to libctf configure.ac Indu Bhagat
2022-12-09 20:21 ` [PATCH 1/2] libctf: remove unnecessary zlib constructs Indu Bhagat
2022-12-10  1:07   ` Mike Frysinger
2022-12-10  6:55     ` Indu Bhagat
2022-12-09 20:21 ` [PATCH 2/2] libctf: remove AC_CONFIG_MACRO_DIR Indu Bhagat

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 read-only IMAP folder(s) and NNTP newsgroup(s).