public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] libctf: remove unnecessary zstd constructs
@ 2022-12-11  0:26 Indu Bhagat
  2022-12-11  7:33 ` Mike Frysinger
  2022-12-12 16:00 ` Nick Clifton
  0 siblings, 2 replies; 6+ messages in thread
From: Indu Bhagat @ 2022-12-11  0:26 UTC (permalink / raw)
  To: binutils; +Cc: nick.alcock, vapier, i, Indu Bhagat

This patch is essentially a revert of
commit-id: 8818c80cbd4116ef5af171ec47c61167179e225c
(libctf: Add ZSTD_LIBS to LIBS so that ac_cv_libctf_bfd_elf can be true)

As the specific configure check now uses libtool, this explicit mention of the
dependency $ZSTD_LIBS is not needed anymore.

As for AC_ZSTD, it was suggested to clean it up (https://sourceware.org/pipermail/binutils/2022-December/125026.html)
as it is unused. Althought this patch does remove AC_ZSTD from
libctf/configure.ac, I am not completely sure anymore: libctf may have
plans to support zstd compressed CTF sections soon/later ?

ChangeLog:

	* libctf/Makefile.in: Regenerated.
	* libctf/aclocal.m4: Likewise.
	* libctf/config.h.in: Likewise.
	* libctf/configure: Likewise.
	* libctf/configure.ac: Remove ZSTD_LIBS from LIBS. Cleanup AC_ZSTD.
---
 libctf/Makefile.in  |   9 +-
 libctf/aclocal.m4   |   2 -
 libctf/config.h.in  |   3 -
 libctf/configure    | 269 +-------------------------------------------
 libctf/configure.ac |   3 +-
 5 files changed, 6 insertions(+), 280 deletions(-)

diff --git a/libctf/Makefile.in b/libctf/Makefile.in
index 036a63fa720..1984f50867a 100644
--- a/libctf/Makefile.in
+++ b/libctf/Makefile.in
@@ -141,10 +141,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
 	$(top_srcdir)/../config/jobserver.m4 \
 	$(top_srcdir)/../config/lead-dot.m4 \
 	$(top_srcdir)/../config/override.m4 \
-	$(top_srcdir)/../config/pkg.m4 \
 	$(top_srcdir)/../config/warnings.m4 \
-	$(top_srcdir)/../config/zlib.m4 \
-	$(top_srcdir)/../config/zstd.m4 $(top_srcdir)/../libtool.m4 \
+	$(top_srcdir)/../config/zlib.m4 $(top_srcdir)/../libtool.m4 \
 	$(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
 	$(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
 	$(top_srcdir)/configure.ac
@@ -443,9 +441,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 POSUB = @POSUB@
 RANLIB = @RANLIB@
 SED = @SED@
@@ -460,8 +455,6 @@ VERSION_FLAGS_NOBFD = @VERSION_FLAGS_NOBFD@
 WARN_PEDANTIC = @WARN_PEDANTIC@
 WERROR = @WERROR@
 XGETTEXT = @XGETTEXT@
-ZSTD_CFLAGS = @ZSTD_CFLAGS@
-ZSTD_LIBS = @ZSTD_LIBS@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
diff --git a/libctf/aclocal.m4 b/libctf/aclocal.m4
index 96b27970c9f..4607d728564 100644
--- a/libctf/aclocal.m4
+++ b/libctf/aclocal.m4
@@ -1235,10 +1235,8 @@ m4_include([../config/gettext-sister.m4])
 m4_include([../config/jobserver.m4])
 m4_include([../config/lead-dot.m4])
 m4_include([../config/override.m4])
-m4_include([../config/pkg.m4])
 m4_include([../config/warnings.m4])
 m4_include([../config/zlib.m4])
-m4_include([../config/zstd.m4])
 m4_include([../libtool.m4])
 m4_include([../ltoptions.m4])
 m4_include([../ltsugar.m4])
diff --git a/libctf/config.h.in b/libctf/config.h.in
index ef122aea3f2..5db637c7903 100644
--- a/libctf/config.h.in
+++ b/libctf/config.h.in
@@ -97,9 +97,6 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
-/* Define to 1 if zstd is enabled. */
-#undef HAVE_ZSTD
-
 /* Define to the sub-directory in which libtool stores uninstalled libraries.
    */
 #undef LT_OBJDIR
diff --git a/libctf/configure b/libctf/configure
index 82c3fb0588d..17463a74cca 100755
--- a/libctf/configure
+++ b/libctf/configure
@@ -648,11 +648,6 @@ NEED_CTF_QSORT_R_FALSE
 NEED_CTF_QSORT_R_TRUE
 ENABLE_LIBCTF_HASH_DEBUGGING_FALSE
 ENABLE_LIBCTF_HASH_DEBUGGING_TRUE
-ZSTD_LIBS
-ZSTD_CFLAGS
-PKG_CONFIG_LIBDIR
-PKG_CONFIG_PATH
-PKG_CONFIG
 zlibinc
 zlibdir
 ac_libctf_warn_cflags
@@ -811,7 +806,6 @@ enable_werror_always
 enable_maintainer_mode
 enable_install_libbfd
 with_system_zlib
-with_zstd
 enable_libctf_hash_debugging
 '
       ac_precious_vars='build_alias
@@ -822,12 +816,7 @@ CFLAGS
 LDFLAGS
 LIBS
 CPPFLAGS
-CPP
-PKG_CONFIG
-PKG_CONFIG_PATH
-PKG_CONFIG_LIBDIR
-ZSTD_CFLAGS
-ZSTD_LIBS'
+CPP'
 
 
 # Initialize some variables set by options.
@@ -1475,8 +1464,6 @@ Optional Packages:
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-system-zlib      use installed libz
-  --with-zstd             support zstd compressed debug sections
-                          (default=auto)
 
 Some influential environment variables:
   CC          C compiler command
@@ -1487,13 +1474,6 @@ Some influential environment variables:
   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
-  PKG_CONFIG  path to pkg-config utility
-  PKG_CONFIG_PATH
-              directories to add to pkg-config's search path
-  PKG_CONFIG_LIBDIR
-              path overriding pkg-config's built-in search path
-  ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
-  ZSTD_LIBS   linker flags for ZSTD, overriding pkg-config
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -11652,7 +11632,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11655 "configure"
+#line 11635 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11758,7 +11738,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11761 "configure"
+#line 11741 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14298,247 +14278,6 @@ fi
 
 
 
-
-
-
-
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-	if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
-  ac_pt_PKG_CONFIG=$PKG_CONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $ac_pt_PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_pt_PKG_CONFIG" = x; then
-    PKG_CONFIG=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    PKG_CONFIG=$ac_pt_PKG_CONFIG
-  fi
-else
-  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-fi
-if test -n "$PKG_CONFIG"; then
-	_pkg_min_version=0.9.0
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
-	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	else
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-		PKG_CONFIG=""
-	fi
-fi
-
-
-# Check whether --with-zstd was given.
-if test "${with_zstd+set}" = set; then :
-  withval=$with_zstd;
-else
-  with_zstd=auto
-fi
-
-
-if test "$with_zstd" != no; then :
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
-$as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
-
-if test -n "$ZSTD_CFLAGS"; then
-    pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$ZSTD_LIBS"; then
-    pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-if test $pkg_failed = no; then
-  pkg_save_LDFLAGS="$LDFLAGS"
-  LDFLAGS="$LDFLAGS $pkg_cv_ZSTD_LIBS"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-else
-  pkg_failed=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  LDFLAGS=$pkg_save_LDFLAGS
-fi
-
-
-
-if test $pkg_failed = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
-        else
-	        ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$ZSTD_PKG_ERRORS" >&5
-
-
-    if test "$with_zstd" = yes; then
-      as_fn_error $? "--with-zstd was given, but pkgconfig/libzstd.pc is not found" "$LINENO" 5
-    fi
-
-elif test $pkg_failed = untried; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-    if test "$with_zstd" = yes; then
-      as_fn_error $? "--with-zstd was given, but pkgconfig/libzstd.pc is not found" "$LINENO" 5
-    fi
-
-else
-	ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
-	ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-
-$as_echo "#define HAVE_ZSTD 1" >>confdefs.h
-
-
-fi
-
-fi
-
-
  # Check whether --enable-libctf-hash-debugging was given.
 if test "${enable_libctf_hash_debugging+set}" = set; then :
   enableval=$enable_libctf_hash_debugging;
@@ -14578,7 +14317,7 @@ CC="./libtool --quiet --mode=link $OLD_CC"
 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
-LIBS="-lbfd -liberty $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 0e0495ba6ef..65686fedc5a 100644
--- a/libctf/configure.ac
+++ b/libctf/configure.ac
@@ -69,7 +69,6 @@ AC_FUNC_MMAP
 # Needed for BFD capability checks.
 AC_SEARCH_LIBS(dlsym, dl)
 AM_ZLIB
-AC_ZSTD
 
 GCC_ENABLE([libctf-hash-debugging], [no], [], [Enable expensive debugging of CTF deduplication type hashing])
 if test "${enable_libctf_hash_debugging}" = yes; then
@@ -89,7 +88,7 @@ CC="./libtool --quiet --mode=link $OLD_CC"
 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
-LIBS="-lbfd -liberty $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] 6+ messages in thread

* Re: [PATCH] libctf: remove unnecessary zstd constructs
  2022-12-11  0:26 [PATCH] libctf: remove unnecessary zstd constructs Indu Bhagat
@ 2022-12-11  7:33 ` Mike Frysinger
  2022-12-12  6:44   ` Fangrui Song
                     ` (2 more replies)
  2022-12-12 16:00 ` Nick Clifton
  1 sibling, 3 replies; 6+ messages in thread
From: Mike Frysinger @ 2022-12-11  7:33 UTC (permalink / raw)
  To: Indu Bhagat; +Cc: binutils, nick.alcock, i

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

On 10 Dec 2022 16:26, Indu Bhagat wrote:
> This patch is essentially a revert of
> commit-id: 8818c80cbd4116ef5af171ec47c61167179e225c
> (libctf: Add ZSTD_LIBS to LIBS so that ac_cv_libctf_bfd_elf can be true)
> 
> As the specific configure check now uses libtool, this explicit mention of the
> dependency $ZSTD_LIBS is not needed anymore.
> 
> As for AC_ZSTD, it was suggested to clean it up (https://sourceware.org/pipermail/binutils/2022-December/125026.html)
> as it is unused. Althought this patch does remove AC_ZSTD from
> libctf/configure.ac, I am not completely sure anymore: libctf may have
> plans to support zstd compressed CTF sections soon/later ?

if libctf ever gains such support, it's easy enough to add back in.

lgtm
-mike

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

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

* Re: [PATCH] libctf: remove unnecessary zstd constructs
  2022-12-11  7:33 ` Mike Frysinger
@ 2022-12-12  6:44   ` Fangrui Song
       [not found]   ` <DS7PR12MB5765BBA01B80D4CAB3C51C9DCBE29@DS7PR12MB5765.namprd12.prod.outlook.com>
  2022-12-13 13:20   ` Nick Alcock
  2 siblings, 0 replies; 6+ messages in thread
From: Fangrui Song @ 2022-12-12  6:44 UTC (permalink / raw)
  To: Indu Bhagat; +Cc: Mike Frysinger, binutils, nick.alcock

On Sat, Dec 10, 2022 at 9:33 PM Mike Frysinger <vapier@gentoo.org> wrote:
>
> On 10 Dec 2022 16:26, Indu Bhagat wrote:
> > This patch is essentially a revert of
> > commit-id: 8818c80cbd4116ef5af171ec47c61167179e225c
> > (libctf: Add ZSTD_LIBS to LIBS so that ac_cv_libctf_bfd_elf can be true)
> >
> > As the specific configure check now uses libtool, this explicit mention of the
> > dependency $ZSTD_LIBS is not needed anymore.
> >
> > As for AC_ZSTD, it was suggested to clean it up (https://sourceware.org/pipermail/binutils/2022-December/125026.html)
> > as it is unused. Althought this patch does remove AC_ZSTD from
> > libctf/configure.ac, I am not completely sure anymore: libctf may have
> > plans to support zstd compressed CTF sections soon/later ?
>
> if libctf ever gains such support, it's easy enough to add back in.
>
> lgtm
> -mike

The revert will likely be problematic. Some members of libbfd.a
reference ZSTD_* symbols. Without -lzstd, these references will be
dangling unless -Wl,--gc-sections is specifies and essentially
discards input sections which reference ZSTD_*.

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

* Re: [PATCH] libctf: remove unnecessary zstd constructs
       [not found]   ` <DS7PR12MB5765BBA01B80D4CAB3C51C9DCBE29@DS7PR12MB5765.namprd12.prod.outlook.com>
@ 2022-12-12  9:47     ` Mike Frysinger
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2022-12-12  9:47 UTC (permalink / raw)
  To: Fangrui Song; +Cc: Indu Bhagat, binutils, nick.alcock

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

On 11 Dec 2022 20:44, Fangrui Song wrote:
> On Sat, Dec 10, 2022 at 9:33 PM Mike Frysinger wrote:
> > On 10 Dec 2022 16:26, Indu Bhagat wrote:
> > > This patch is essentially a revert of
> > > commit-id: 8818c80cbd4116ef5af171ec47c61167179e225c
> > > (libctf: Add ZSTD_LIBS to LIBS so that ac_cv_libctf_bfd_elf can be true)
> > >
> > > As the specific configure check now uses libtool, this explicit mention of the
> > > dependency $ZSTD_LIBS is not needed anymore.
> > >
> > > As for AC_ZSTD, it was suggested to clean it up (https://sourceware.org/pipermail/binutils/2022-December/125026.html)
> > > as it is unused. Althought this patch does remove AC_ZSTD from
> > > libctf/configure.ac, I am not completely sure anymore: libctf may have
> > > plans to support zstd compressed CTF sections soon/later ?
> >
> > if libctf ever gains such support, it's easy enough to add back in.
> >
> > lgtm
> 
> The revert will likely be problematic. Some members of libbfd.a
> reference ZSTD_* symbols. Without -lzstd, these references will be
> dangling unless -Wl,--gc-sections is specifies and essentially
> discards input sections which reference ZSTD_*.

we don't link -lbfd, we link libbfd.la via libtool, and it takes care of
specifying any dependent libraries that libbfd uses.
-mike

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

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

* Re: [PATCH] libctf: remove unnecessary zstd constructs
  2022-12-11  0:26 [PATCH] libctf: remove unnecessary zstd constructs Indu Bhagat
  2022-12-11  7:33 ` Mike Frysinger
@ 2022-12-12 16:00 ` Nick Clifton
  1 sibling, 0 replies; 6+ messages in thread
From: Nick Clifton @ 2022-12-12 16:00 UTC (permalink / raw)
  To: Indu Bhagat, binutils; +Cc: nick.alcock, vapier, i

Hi Indu,

> ChangeLog:
> 
> 	* libctf/Makefile.in: Regenerated.
> 	* libctf/aclocal.m4: Likewise.
> 	* libctf/config.h.in: Likewise.
> 	* libctf/configure: Likewise.
> 	* libctf/configure.ac: Remove ZSTD_LIBS from LIBS. Cleanup AC_ZSTD.
  Approved - please apply.

Cheers
   Nick


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

* Re: [PATCH] libctf: remove unnecessary zstd constructs
  2022-12-11  7:33 ` Mike Frysinger
  2022-12-12  6:44   ` Fangrui Song
       [not found]   ` <DS7PR12MB5765BBA01B80D4CAB3C51C9DCBE29@DS7PR12MB5765.namprd12.prod.outlook.com>
@ 2022-12-13 13:20   ` Nick Alcock
  2 siblings, 0 replies; 6+ messages in thread
From: Nick Alcock @ 2022-12-13 13:20 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: Indu Bhagat, binutils, i

On 11 Dec 2022, Mike Frysinger verbalised:

> On 10 Dec 2022 16:26, Indu Bhagat wrote:
>> This patch is essentially a revert of
>> commit-id: 8818c80cbd4116ef5af171ec47c61167179e225c
>> (libctf: Add ZSTD_LIBS to LIBS so that ac_cv_libctf_bfd_elf can be true)
>> 
>> As the specific configure check now uses libtool, this explicit mention of the
>> dependency $ZSTD_LIBS is not needed anymore.
>> 
>> As for AC_ZSTD, it was suggested to clean it up (https://sourceware.org/pipermail/binutils/2022-December/125026.html)
>> as it is unused. Althought this patch does remove AC_ZSTD from
>> libctf/configure.ac, I am not completely sure anymore: libctf may have
>> plans to support zstd compressed CTF sections soon/later ?
>
> if libctf ever gains such support, it's easy enough to add back in.

Yeah, that's part of the v4 plans, and adding this back would be a tiny
part of that. (And pulling this out seems harmless for now in any case
-- it was only there to see if bfd would need it to successfully link,
and that is no longer needed with the bfd configure check using
libtool.)

-- 
NULL && (void)

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

end of thread, other threads:[~2022-12-13 13:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-11  0:26 [PATCH] libctf: remove unnecessary zstd constructs Indu Bhagat
2022-12-11  7:33 ` Mike Frysinger
2022-12-12  6:44   ` Fangrui Song
     [not found]   ` <DS7PR12MB5765BBA01B80D4CAB3C51C9DCBE29@DS7PR12MB5765.namprd12.prod.outlook.com>
2022-12-12  9:47     ` Mike Frysinger
2022-12-13 13:20   ` Nick Alcock
2022-12-12 16:00 ` Nick Clifton

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