Meta: Enable glibc fortify checks on Linux
Define _FORTIFY_SOURCE=3 for Linux builds so glibc can use dynamic object size checks around fortified libc calls.
This commit is contained in:
parent
65eddc925c
commit
ec3ea7ed25
1 changed files with 1 additions and 0 deletions
|
|
@ -198,6 +198,7 @@ if(CMAKE_CXX_LINK_PIE_SUPPORTED)
|
|||
endif()
|
||||
|
||||
if (LINUX)
|
||||
add_cxx_compile_definitions(_FORTIFY_SOURCE=3)
|
||||
add_cxx_compile_definitions(_FILE_OFFSET_BITS=64)
|
||||
add_cxx_compile_options(-fstack-clash-protection)
|
||||
add_cxx_link_option_if_supported(LINKER:-z,relro)
|
||||
|
|
|
|||
Loading…
Reference in a new issue