diff options
author | José Bollo <jose.bollo@iot.bzh> | 2019-07-25 18:56:53 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2019-07-25 19:53:03 +0200 |
commit | ebd63ecc0db4e4fbba69b03ea211e94d46e01dea (patch) | |
tree | 6da5ca796cb18eeb65549b54dacaf63df556f21a /CMakeLists.txt | |
parent | 77474b9416830a83551453b3a857cc9ed6674267 (diff) |
Avoid fortify false positive
Change-Id: Iceb888ed5cccc46bde9e479a2b1ae9a5a6c4ee53
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d4ed7c5..80a68aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,9 +65,10 @@ add_compile_options(-Werror=implicit-function-declaration) add_compile_options(-ffunction-sections -fdata-sections) add_compile_options(-fPIC) add_compile_options(-g) +add_compile_options(-fstack-protector -D_FORTIFY_SOURCE=2 -O2) -set(CMAKE_C_FLAGS_PROFILING "-g -O2 -pg -Wp,-U_FORTIFY_SOURCE") -set(CMAKE_C_FLAGS_DEBUG "-g -ggdb -Wp,-U_FORTIFY_SOURCE") +set(CMAKE_C_FLAGS_PROFILING "-g -O2 -pg") +set(CMAKE_C_FLAGS_DEBUG "-g -ggdb --fstack-protector -D_FORTIFY_SOURCE=2") set(CMAKE_C_FLAGS_RELEASE "-g -O2") set(CMAKE_C_FLAGS_CCOV "-g -O2 --coverage") |