Skip to content

Commit

Permalink
Add sframe to libbfd's dependencies list
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
LucasChollet committed Jul 1, 2023
1 parent dc8b8c7 commit 11b2d6d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions BackwardConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ if (${STACK_DETAILS_AUTO_DETECT})
# If we attempt to link against static bfd, make sure to link its dependencies, too
get_filename_component(bfd_lib_ext "${LIBBFD_LIBRARY}" EXT)
if (bfd_lib_ext STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")
find_library(LIBSFRAME_LIBRARY NAMES sframe)
if (LIBSFRAME_LIBRARY)
list(APPEND _BACKWARD_LIBRARIES ${LIBSFRAME_LIBRARY})
endif()

list(APPEND _BACKWARD_LIBRARIES iberty z)
endif()

Expand Down

0 comments on commit 11b2d6d

Please sign in to comment.