[CMAKE] Fix GCC -fstack-protector usage

This commit is contained in:
Jérôme Gardou 2020-12-31 17:56:39 +01:00
parent a853102a7b
commit c8d07514c8
15 changed files with 121 additions and 35 deletions

View file

@ -105,7 +105,7 @@ target_link_libraries(bootmgfw bootlib cportlib cmlib rtl libcntpr)
# dynamic analysis switches
if(STACK_PROTECTOR)
target_link_libraries(bootmgfw gcc_ssp)
target_sources(bootmgfw PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>)
endif()
if(RUNTIME_CHECKS)
@ -153,7 +153,7 @@ target_link_libraries(rosload bootlib cportlib cmlib rtl libcntpr)
# dynamic analysis switches
if(STACK_PROTECTOR)
target_link_libraries(rosload gcc_ssp)
target_sources(rosload PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>)
endif()
if(RUNTIME_CHECKS)

View file

@ -312,8 +312,8 @@ target_link_libraries(freeldr_pe_dbg freeldr_common cportlib cmlib rtl libcntpr)
# dynamic analysis switches
if(STACK_PROTECTOR)
target_link_libraries(freeldr_pe gcc_ssp)
target_link_libraries(freeldr_pe_dbg gcc_ssp)
target_sources(freeldr_pe PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>)
target_sources(freeldr_pe_dbg PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>)
endif()
if(RUNTIME_CHECKS)