void-packages/srcpkgs/elfutils/patches/fts-obstack.patch
Érico Rolim cc255456b1 elfutils: update to 0.182, add debuginfod subpkgs, adopt.
Cleaned up patches, remove the aarch64-fregs one (it was fixed with a
musl patch, instead), and moved closer to where upstream is moving
regarding musl compat.
2020-11-18 00:00:07 -03:00

107 lines
4.2 KiB
Diff

diff --git ChangeLog ChangeLog
index 128da6c6..565d021c 100644
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,7 @@
+2020-11-01 Érico N. Rolim <erico.erc@gmail.com>
+
+ * configure.ac: Check for fts and obstack from outside libc.
+
2020-10-28 Mark Wielaard <mark@klomp.org>
* configure.ac: Set version to 0.182.
diff --git configure.ac configure.ac
index 515ac704..c1a6954d 100644
--- configure.ac
+++ configure.ac
@@ -542,6 +542,26 @@ else
fi
AC_SUBST([argp_LDADD])
+saved_LIBS="$LIBS"
+AC_SEARCH_LIBS([fts_close], [fts])
+LIBS="$saved_LIBS"
+case "$ac_cv_search_fts_close" in
+ no) AC_MSG_FAILURE([failed to find fts_close]) ;;
+ -l*) fts_LIBS="$ac_cv_search_fts_close" ;;
+ *) fts_LIBS= ;;
+esac
+AC_SUBST([fts_LIBS])
+
+saved_LIBS="$LIBS"
+AC_SEARCH_LIBS([_obstack_free], [obstack])
+LIBS="$saved_LIBS"
+case "$ac_cv_search__obstack_free" in
+ no) AC_MSG_FAILURE([failed to find obstack_free]) ;;
+ -l*) obstack_LIBS="$ac_cv_search__obstack_free" ;;
+ *) obstack_LIBS= ;;
+esac
+AC_SUBST([obstack_LIBS])
+
dnl The directories with content.
dnl Documentation.
diff --git debuginfod/Makefile.am debuginfod/Makefile.am
index 01985600..0af3b58c 100644
--- debuginfod/Makefile.am
+++ debuginfod/Makefile.am
@@ -71,10 +71,10 @@ bin_PROGRAMS += debuginfod-find
endif
debuginfod_SOURCES = debuginfod.cxx
-debuginfod_LDADD = $(libdw) $(libelf) $(libeu) $(libdebuginfod) $(libmicrohttpd_LIBS) $(sqlite3_LIBS) $(libarchive_LIBS) -lpthread -ldl
+debuginfod_LDADD = $(libdw) $(libelf) $(libeu) $(libdebuginfod) $(argp_LDADD) $(fts_LIBS) $(libmicrohttpd_LIBS) $(sqlite3_LIBS) $(libarchive_LIBS) -lpthread -ldl
debuginfod_find_SOURCES = debuginfod-find.c
-debuginfod_find_LDADD = $(libdw) $(libelf) $(libeu) $(libdebuginfod)
+debuginfod_find_LDADD = $(libdw) $(libelf) $(libeu) $(libdebuginfod) $(argp_LDADD) $(fts_LIBS)
if LIBDEBUGINFOD
noinst_LIBRARIES = libdebuginfod.a
@@ -98,7 +98,7 @@ libdebuginfod_so_LIBS = libdebuginfod_pic.a
if DUMMY_LIBDEBUGINFOD
libdebuginfod_so_LDLIBS =
else
-libdebuginfod_so_LDLIBS = $(libcurl_LIBS)
+libdebuginfod_so_LDLIBS = $(libcurl_LIBS) $(fts_LIBS)
endif
libdebuginfod.so$(EXEEXT): $(srcdir)/libdebuginfod.map $(libdebuginfod_so_LIBS)
$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
diff --git libdw/Makefile.am libdw/Makefile.am
index 33b5838d..1dbb3d5e 100644
--- libdw/Makefile.am
+++ libdw/Makefile.am
@@ -109,7 +109,7 @@ libdw_so_LIBS = ../libebl/libebl_pic.a ../backends/libebl_backends_pic.a \
../libcpu/libcpu_pic.a libdw_pic.a ../libdwelf/libdwelf_pic.a \
../libdwfl/libdwfl_pic.a
libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so
-libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS) -pthread
+libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(fts_LIBS) $(obstack_LIBS) $(zip_LIBS) -pthread
libdw_so_SOURCES =
libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
diff --git src/Makefile.am src/Makefile.am
index e462e7d7..88d0ac8f 100644
--- src/Makefile.am
+++ src/Makefile.am
@@ -69,7 +69,7 @@ ar_no_Wstack_usage = yes
unstrip_no_Wstack_usage = yes
readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD)
-nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) \
+nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS) \
$(demanglelib)
size_LDADD = $(libelf) $(libeu) $(argp_LDADD)
strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
@@ -78,9 +78,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD)
addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib)
elfcmp_LDADD = $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
objdump_LDADD = $(libasm) $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
-ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD)
+ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS)
strings_LDADD = $(libelf) $(libeu) $(argp_LDADD)
-ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD)
+ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS)
unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) $(demanglelib)
elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)