disable stack protection on bsd too (untested)
authorkoda
Sat, 29 Jun 2013 00:44:23 +0200
changeset 9298 2d88d01bad07
parent 9297 3f16f5e43814
child 9299 d64f80504749
disable stack protection on bsd too (untested)
cmake_modules/compilerchecks.cmake
--- a/cmake_modules/compilerchecks.cmake	Sat Jun 29 00:28:47 2013 +0200
+++ b/cmake_modules/compilerchecks.cmake	Sat Jun 29 00:44:23 2013 +0200
@@ -11,9 +11,10 @@
 
 #stack protection, when found it needs to go in the linker flags too
 #it is disabled on win32 because it adds a dll and messes with linker
+#some bsd installations reported problems too
 #(see 822312 654424 on bugzilla.redhat.com)
 check_c_compiler_flag("-fstack-protector-all -fstack-protector" HAVE_STACKPROTECTOR)
-if(HAVE_STACKPROTECTOR AND (NOT WIN32))
+if(HAVE_STACKPROTECTOR AND ((NOT WIN32) OR (CMAKE_SYSTEM_NAME MATCHES BSD.OS)))
     add_flag_append(CMAKE_C_FLAGS "-fstack-protector-all -fstack-protector")
     add_flag_append(CMAKE_CXX_FLAGS "-fstack-protector-all -fstack-protector")
     add_flag_append(CMAKE_EXE_LINKER_FLAGS "-fstack-protector-all -fstack-protector")