Skip to content

Commit

Permalink
CMake: Fix build on Solaris the stack_protector feature enabled
Browse files Browse the repository at this point in the history
Solaris requires the ssp library to be linked when
-fstack-protector-strong is passed to the compiler.

Pick-to: 6.8
Fixes: QTBUG-129085
Change-Id: I55396fd9dc102ffd98bef54fc3dfc1aadf18a404
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
  • Loading branch information
jobor committed Oct 9, 2024
1 parent 2ced94b commit 73875b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/QtInternalTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,9 @@ endif()

if(QT_FEATURE_stack_protector)
target_compile_options(PlatformCommonInternal INTERFACE -fstack-protector-strong)
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
target_link_libraries(PlatformCommonInternal INTERFACE ssp)
endif()
endif()

if(QT_FEATURE_stack_clash_protection)
Expand Down

0 comments on commit 73875b8

Please sign in to comment.