Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2023-02-14 16:52:39 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2023-02-14 21:42:50 +0300
commit2fd459c3b180def80b0db4b6c91e4f088e779cc1 (patch)
tree35f0008decbabecc1ebf1b4990bd3c41ad862cd6 /winsup
parentb675df6e722decfa7a4f8ed6bb8e5f90b56ac1b9 (diff)
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.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/configure.ac7
-rw-r--r--winsup/doc/faq-programming.xml2
-rw-r--r--winsup/utils/Makefile.am3
3 files changed, 10 insertions, 2 deletions
diff --git a/winsup/configure.ac b/winsup/configure.ac
index 9205a8886..49a8346fa 100644
--- a/winsup/configure.ac
+++ b/winsup/configure.ac
@@ -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
diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml
index 632d1a173..d23f32c3a 100644
--- a/winsup/doc/faq-programming.xml
+++ b/winsup/doc/faq-programming.xml
@@ -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>
diff --git a/winsup/utils/Makefile.am b/winsup/utils/Makefile.am
index 6be5b12c2..fa6499dfe 100644
--- a/winsup/utils/Makefile.am
+++ b/winsup/utils/Makefile.am
@@ -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