diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -38,6 +38,8 @@ add_linker_flag(-pie) endif() +add_compiler_flag(-fstack-protector-all) + # Enable warning add_c_compiler_flag(-Wnested-externs -Wstrict-prototypes) add_compiler_flag( @@ -52,6 +54,7 @@ # FIXME: Activating this flag cause cmake to fail on leveldb. # -Wthread-safety-analysis -Wshadow + -Wstack-protector ) option(EXTRA_WARNINGS "Enable extra warnings" OFF)