[x265] [PATCH 5 of 6] cmake: use the more aggressive form -fstack-protector-all
Steve Borho
steve at borho.org
Fri Mar 6 18:07:22 CET 2015
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1425661270 21600
# Fri Mar 06 11:01:10 2015 -0600
# Node ID a07ea06f3ee8a5d1edb2edc584934d38f26583d8
# Parent eea4096c1503850d057f8e4c64dfc1c2b5546574
cmake: use the more aggressive form -fstack-protector-all
The simpler -fstack-protector was only instrumenting a few functions in
search.cpp (we only noticed when there were link failures because of libssp)
diff -r eea4096c1503 -r a07ea06f3ee8 source/CMakeLists.txt
--- a/source/CMakeLists.txt Fri Mar 06 10:51:00 2015 -0600
+++ b/source/CMakeLists.txt Fri Mar 06 11:01:10 2015 -0600
@@ -187,7 +187,7 @@
if(GCC)
check_cxx_compiler_flag(-fsanitize=undefined-trap CC_HAS_CATCH_UNDEFINED) # clang
check_cxx_compiler_flag(-ftrapv CC_HAS_FTRAPV) # gcc
- check_cxx_compiler_flag(-fstack-protector CC_HAS_STACK_PROTECT) # gcc
+ check_cxx_compiler_flag(-fstack-protector-all CC_HAS_STACK_PROTECT) # gcc
if(CC_HAS_FTRAPV)
add_definitions(-ftrapv)
endif()
@@ -195,7 +195,7 @@
add_definitions(-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error)
endif()
if(CC_HAS_STACK_PROTECT)
- add_definitions(-fstack-protector)
+ add_definitions(-fstack-protector-all)
if(MINGW)
list(APPEND PLATFORM_LIBS ssp)
endif()
More information about the x265-devel
mailing list