Cygwin: dumper: also link with libzstd, as libbfd may require it

Also allow that linkage to be dynamic, as libzstd-devel doesn't
currently provide a static library.
This commit is contained in:
Jon Turney 2023-02-14 13:52:39 +00:00
parent b675df6e72
commit 2fd459c3b1
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
5 changed files with 12 additions and 2 deletions

View File

@ -35,6 +35,7 @@ patch,\
cocom,\
gettext-devel,\
libiconv-devel,\
libzstd-devel,\
zlib-devel,\
%PKGARCH%-gcc-core,\
%PKGARCH%-gcc-g++,\

View File

@ -80,6 +80,7 @@ jobs:
gettext-devel,
libiconv,
libiconv-devel,
libzstd-devel,
make,
mingw64-${{ matrix.pkgarch }}-gcc-g++,
mingw64-${{ matrix.pkgarch }}-zlib,

View File

@ -116,6 +116,13 @@ AC_CHECK_LIB([bfd], [bfd_init], [true],
AM_CONDITIONAL(BUILD_DUMPER, [test "x$ac_cv_lib_bfd_bfd_init" = "xyes"])
# libbfd.a doesn't have a pkgconfig file, so we guess what it's dependencies
# are, based on what's present in the build environment
BFD_LIBS="-lintl -liconv -liberty -lz"
AC_CHECK_LIB([sframe], [sframe_decode], [BFD_LIBS="${BFD_LIBS} -lsframe"])
AC_CHECK_LIB([zstd], [ZSTD_isError], [BFD_LIBS="${BFD_LIBS} -lzstd"])
AC_SUBST([BFD_LIBS])
AC_CONFIG_FILES([
Makefile
cygwin/Makefile

View File

@ -679,7 +679,7 @@ rewriting the runtime library in question from specs...
installed; you at least need <literal>gcc-g++</literal>,
<literal>make</literal>, <literal>automake</literal>,
<literal>autoconf</literal>, <literal>git</literal>, <literal>perl</literal>,
<literal>gettext-devel</literal>, <literal>libiconv-devel</literal>
<literal>gettext-devel</literal>, <literal>libiconv-devel</literal>, <literal>libzstd-devel</literal>,
<literal>zlib-devel</literal>, <literal>cocom</literal> and <literal>patch</literal>.
</para>

View File

@ -78,7 +78,8 @@ LDADD = -lnetapi32
cygpath_CXXFLAGS = -fno-threadsafe-statics $(AM_CXXFLAGS)
cygpath_LDADD = $(LDADD) -luserenv -lntdll
dumper_CXXFLAGS = -I$(top_srcdir)/../include $(AM_CXXFLAGS)
dumper_LDADD = $(LDADD) -lpsapi -lbfd -lintl -liconv -liberty -lz -lntdll
dumper_LDADD = $(LDADD) -lpsapi -lntdll -lbfd @BFD_LIBS@
dumper_LDFLAGS =
ldd_LDADD = $(LDADD) -lpsapi -lntdll
mount_CXXFLAGS = -DFSTAB_ONLY $(AM_CXXFLAGS)
minidumper_LDADD = $(LDADD) -ldbghelp