--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -262,12 +262,8 @@
 add_c_flag_if_supported(-fPIC C_SECURITY_FLAGS)
 add_cxx_flag_if_supported(-fPIC CXX_SECURITY_FLAGS)

-message(STATUS "Using C security hardening flags: ${C_SECURITY_FLAGS}")
-message(STATUS "Using C++ security hardening flags: ${CXX_SECURITY_FLAGS}")
-message(STATUS "Using linker security hardening flags: ${LD_SECURITY_FLAGS}")
-
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 ${C_SECURITY_FLAGS}")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${CXX_SECURITY_FLAGS}")
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${STATIC_FLAGS}")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -Wa,--noexecstack")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wa,--noexecstack")
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,noexecstack ${STATIC_FLAGS}")

 add_subdirectory(src)
