Skip to content

Commit 9acb704

Browse files
dscholazka
authored andcommitted
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 <[email protected]>
1 parent eeed7e5 commit 9acb704

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
@@ -120,6 +120,11 @@ AC_CHECK_LIB([bfd], [bfd_init], [true],
120120

121121
AM_CONDITIONAL(BUILD_DUMPER, [test "x$ac_cv_lib_bfd_bfd_init" = "xyes"])
122122

123+
AC_CHECK_LIB([sframe], [sframe_decode],
124+
AC_MSG_NOTICE([Detected libsframe; Assuming that libbfd depends on it]), [true])
125+
126+
AM_CONDITIONAL(HAVE_LIBSFRAME, [test "x$ac_cv_lib_sframe_sframe_decode" = "xyes"])
127+
123128
AC_CONFIG_FILES([
124129
Makefile
125130
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/local_includes -
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)