public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Jon Turney <jturney@sourceware.org> To: cygwin-cvs@sourceware.org, newlib-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: dumper: also link with libzstd, as libbfd may require it Date: Tue, 14 Feb 2023 16:29:36 +0000 (GMT) [thread overview] Message-ID: <20230214162936.08A4D3858D1E@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=1387ea9f984d5a7aa096a66b67d61dc2cc565d21 commit 1387ea9f984d5a7aa096a66b67d61dc2cc565d21 Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Tue Feb 14 13:52:39 2023 +0000 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. Diff: --- .appveyor.yml | 1 + .github/workflows/cygwin.yml | 1 + winsup/configure.ac | 10 ++++++---- winsup/doc/faq-programming.xml | 2 +- winsup/utils/Makefile.am | 7 ++----- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 50a9101b7..9f20f6d83 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -35,6 +35,7 @@ patch,\ cocom,\ gettext-devel,\ libiconv-devel,\ +libzstd-devel,\ zlib-devel,\ %PKGARCH%-gcc-core,\ %PKGARCH%-gcc-g++,\ diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 10d0255ef..575ff1fdc 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -81,6 +81,7 @@ jobs: gettext-devel, libiconv, libiconv-devel, + libzstd-devel, make, mingw64-${{ matrix.pkgarch }}-gcc-g++, mingw64-${{ matrix.pkgarch }}-zlib, diff --git a/winsup/configure.ac b/winsup/configure.ac index 76baf0a7d..13fce0da6 100644 --- a/winsup/configure.ac +++ b/winsup/configure.ac @@ -118,10 +118,12 @@ AC_ARG_ENABLE([dumper], AM_CONDITIONAL(BUILD_DUMPER, [test "x$build_dumper" = "xyes"]) -AC_CHECK_LIB([sframe], [sframe_decode], - AC_MSG_NOTICE([Detected libsframe; Assuming that libbfd depends on it]), [true]) - -AM_CONDITIONAL(HAVE_LIBSFRAME, [test "x$ac_cv_lib_sframe_sframe_decode" = "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 diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml index 24c7f928e..7fc6baf25 100644 --- a/winsup/doc/faq-programming.xml +++ b/winsup/doc/faq-programming.xml @@ -684,7 +684,7 @@ installed; you at least need <literal>gcc-g++</literal>, <para> Additionally, building the <code>dumper</code> utility requires -<literal>gettext-devel</literal>, <literal>libiconv-devel</literal> +<literal>gettext-devel</literal>, <literal>libiconv-devel</literal>, <literal>libzstd-devel</literal> and <literal>zlib-devel</literal>. Building this program can be disabled with the <literal>--disable-dumper</literal> option to <literal>configure</literal>. </para> diff --git a/winsup/utils/Makefile.am b/winsup/utils/Makefile.am index f59cf9f50..57a4f377c 100644 --- a/winsup/utils/Makefile.am +++ b/winsup/utils/Makefile.am @@ -79,7 +79,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 @@ -89,10 +90,6 @@ profiler_LDADD = $(LDADD) -lntdll cygps_LDADD = $(LDADD) -lpsapi -lntdll newgrp_LDADD = $(LDADD) -luserenv -if HAVE_LIBSFRAME -dumper_LDADD += -lsframe -endif - if CROSS_BOOTSTRAP SUBDIRS = mingw endif
reply other threads:[~2023-02-14 16:29 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230214162936.08A4D3858D1E@sourceware.org \ --to=jturney@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).