Skip to content

Commit 4704d29

Browse files
committed
dumper: avoid linker problem when libbfd depends on libsframe
A recent binutils version introduced `libsframe` and made it a dependency of `libbfd`. Which means that we have to link that library into `dumper.exe`, too, if it exists. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 65ce633 commit 4704d29

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

winsup/configure.ac

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ AC_CHECK_LIB([bfd], [bfd_init], [true],
110110

111111
AM_CONDITIONAL(BUILD_DUMPER, [test "x$ac_cv_lib_bfd_bfd_init" = "xyes"])
112112

113+
AC_CHECK_LIB([sframe], [sframe_decode],
114+
AC_MSG_NOTICE([Detected libsframe; Assuming that libbfd depends on it]), [true])
115+
116+
AM_CONDITIONAL(HAVE_LIBSFRAME, [test "x$ac_cv_lib_sframe_sframe_decode" = "xyes"])
117+
113118
AC_CONFIG_FILES([
114119
Makefile
115120
cygwin/Makefile

winsup/utils/Makefile.am

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ profiler_CXXFLAGS = -I$(srcdir) -idirafter ${top_srcdir}/cygwin -idirafter ${top
8787
profiler_LDADD = $(LDADD) -lntdll
8888
cygps_LDADD = $(LDADD) -lpsapi -lntdll
8989

90+
if HAVE_LIBSFRAME
91+
dumper_LDADD += -lsframe
92+
endif
93+
9094
if CROSS_BOOTSTRAP
9195
SUBDIRS = mingw
9296
endif

0 commit comments

Comments
 (0)