Skip to content

Commit 11b2d6d

Browse files
committed
Add sframe to libbfd's dependencies list
This is required when linking on a system without a dynamic library for libbfd. Note that `libsframe` is a recent addition to `libbfd`, so we test for the library existence before adding it to the dependency list. It allows us to remain compatible with older distributions.
1 parent dc8b8c7 commit 11b2d6d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

BackwardConfig.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,11 @@ if (${STACK_DETAILS_AUTO_DETECT})
152152
# If we attempt to link against static bfd, make sure to link its dependencies, too
153153
get_filename_component(bfd_lib_ext "${LIBBFD_LIBRARY}" EXT)
154154
if (bfd_lib_ext STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")
155+
find_library(LIBSFRAME_LIBRARY NAMES sframe)
156+
if (LIBSFRAME_LIBRARY)
157+
list(APPEND _BACKWARD_LIBRARIES ${LIBSFRAME_LIBRARY})
158+
endif()
159+
155160
list(APPEND _BACKWARD_LIBRARIES iberty z)
156161
endif()
157162

0 commit comments

Comments
 (0)