diff options
author | Martijn van Beurden <mvanb1@gmail.com> | 2022-05-16 21:35:12 +0200 |
---|---|---|
committer | Martijn van Beurden <mvanb1@gmail.com> | 2022-05-20 16:09:39 +0200 |
commit | 7e4d8189d853da0434d1596a7985e770c0d1457f (patch) | |
tree | b07638e45a3d13ffbfc5b23316c4a0799375bb2a /CMakeLists.txt | |
parent | 5f4fa0ad737eff3ed5ae3420b226b003339341ca (diff) | |
download | flac-7e4d8189d853da0434d1596a7985e770c0d1457f.tar.gz |
[CMake] Remove _FORTIFY_SOURCE=1 on not having libssp
Based on some information somewhere on the internet, CMakeLists.txt
sets _FORTIFY_SOURCE=2 when its runtime functions are available and
_FORTIFY_SOURCE=1 when they are not. However, _FORTIFY_SOURCE=1
also requires runtime functions.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b6d0682..20b5db2c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,10 +160,8 @@ add_compile_options( $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:${HAVE_WEFFCXX_FLAG}>>:-Weffc++> $<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:${HAVE_DECL_AFTER_STMT_FLAG}>>:-Wdeclaration-after-statement>) -if(HAVE_LIBSSP) # Implies WITH_FORTIFY_SOURCE +if(WITH_FORTIFY_SOURCE AND HAVE_LIBSSP) add_definitions(-D_FORTIFY_SOURCE=2) -else(WITH_FORTIFY_SOURCE) - add_definitions(-D_FORTIFY_SOURCE=1) endif() if(HAVE_STACK_PROTECTOR_FLAG AND HAVE_LIBSSP) |