]> sourceware.org Git - newlib-cygwin.git/commitdiff
dumper: avoid linker problem when `libbfd` depends on `libsframe`
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 1 Feb 2023 14:08:16 +0000 (15:08 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 1 Feb 2023 19:00:01 +0000 (20:00 +0100)
A recent binutils version introduced `libsframe` and made it a
dependency of `libbfd`. This caused a linker problem in the MSYS2
project, and once Cygwin upgrades to that binutils version it would
cause the same problems there.

Let's preemptively detect the presence of `libsframe` and if detected,
link to it in addition to `libbfd`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
winsup/configure.ac
winsup/utils/Makefile.am

index b155cabe4374de86aa014665d69d01cbc1540f0a..76baf0a7da629f51c0f722a51656653666de7bde 100644 (file)
@@ -118,6 +118,11 @@ 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"])
+
 AC_CONFIG_FILES([
     Makefile
     cygwin/Makefile
index d4d56386f72ea81a793ced42612174c6ef0e99e0..f59cf9f50c750a271a49a7f9b86e3bbd025b3917 100644 (file)
@@ -89,6 +89,10 @@ 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
This page took 0.032465 seconds and 5 git commands to generate.