Skip to content

Commit

Permalink
export -lssp for static libraries (#704)
Browse files Browse the repository at this point in the history
.a files in MinGW don't list the other static libraries they depend on.
We need to provide it through the pkg-config file.
  • Loading branch information
robUx4 authored Jun 13, 2024
1 parent d6204ea commit a0f6661
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ if(MINGW AND (WITH_FORTIFY_SOURCE OR WITH_STACK_PROTECTOR))
message(WARNING "Could not find libssp in MinGW, stack protection and/or FORTIFY_SOURCE are unavailable")
else()
link_libraries("ssp.a")
# static libraries don't carry over other static libraries in mingw
# we need to export it in the pkg-config
set(FLAC_STATIC_LIBS "-lssp")
endif()
elseif(NOT MSVC)
set(HAVE_LIBSSP 1)
Expand Down
2 changes: 1 addition & 1 deletion src/libFLAC/flac.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Description: Free Lossless Audio Codec Library
Version: @VERSION@
Requires.private: @OGG_PACKAGE@
Libs: -L${libdir} -lFLAC
Libs.private: -lm
Libs.private: -lm @FLAC_STATIC_LIBS@
Cflags: -I${includedir}

2 comments on commit a0f6661

@gitoss
Copy link

@gitoss gitoss commented on a0f6661 Jun 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks media-autobuild_suite m-ab-s/media-autobuild_suite#2718

@ktmf01
Copy link
Collaborator

@ktmf01 ktmf01 commented on a0f6661 Jun 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reporting

Please sign in to comment.