Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cmake: disable gcc's stack protector outright

causes only problems for people on distributions partially forcing it
  • Loading branch information...
commit b2f481471440b5d181b5dd3211c2bb906a74d7d3 1 parent 4ef8be8
@lynxlynxlynx lynxlynxlynx authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 CMakeLists.txt
View
4 CMakeLists.txt
@@ -143,6 +143,10 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
IF (VISIBILITY_HIDDEN AND NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
ENDIF ()
+ CHECK_CXX_COMPILER_FLAG("-fno-stack-protector" STACK_PROTECTOR)
+ IF (STACK_PROTECTOR)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-stack-protector")
+ ENDIF ()
if (WIN32)
# GCC 4.5.0+ has shared libstdc++ without dllimport
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--enable-auto-import")
Please sign in to comment.
Something went wrong with that request. Please try again.