diff options
author | Markus Goetz <markus@woboq.com> | 2017-12-04 14:12:21 +0300 |
---|---|---|
committer | Markus Goetz <markus@woboq.com> | 2017-12-04 14:37:03 +0300 |
commit | 0479322c1d44fd8ec5af098b4e8e2c23b795d8ba (patch) | |
tree | 372efb9ed55724db4eb225e3b4a9fc361f8bdc2e | |
parent | 0be7b6fe1ff97493fb234cae0687799df803f178 (diff) |
fstack-protector: Improve previous commit
-rw-r--r-- | src/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 69d805cb9..f2802b624 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -17,7 +17,13 @@ elseif(UNIX AND NOT APPLE) if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-strong") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong") + else() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector --param=ssp-buffer-size=4") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector --param=ssp-buffer-size=4") endif() + else() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-strong") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong") endif() string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER) |