mysql/0000-mysql-add-fstack-protector-strong.patch

31 lines
1.2 KiB
Diff
Raw Normal View History

2021-11-24 15:24:02 +08:00
From cb5dfd6d62419ce6d84bed6600eca7d894fd683b Mon Sep 17 00:00:00 2001
2020-08-08 17:52:50 +08:00
---
2021-11-24 15:24:02 +08:00
cmake/build_configurations/compiler_options.cmake | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
2020-08-08 17:52:50 +08:00
2020-03-18 13:41:46 +08:00
diff --git a/cmake/build_configurations/compiler_options.cmake b/cmake/build_configurations/compiler_options.cmake
2021-11-24 15:24:02 +08:00
index a30eafe1..d93575bd 100644
2020-03-18 13:41:46 +08:00
--- a/cmake/build_configurations/compiler_options.cmake
+++ b/cmake/build_configurations/compiler_options.cmake
2021-11-24 15:24:02 +08:00
@@ -38,6 +38,7 @@ IF(UNIX)
2020-03-18 13:41:46 +08:00
# Default GCC flags
2020-08-08 17:52:50 +08:00
IF(MY_COMPILER_IS_GNU)
2020-03-18 13:41:46 +08:00
SET(COMMON_C_FLAGS "-fno-omit-frame-pointer")
+ SET(COMMON_C_FLAGS "-fstack-protector-strong")
# Disable inline optimizations for valgrind testing to avoid false positives
IF(WITH_VALGRIND)
STRING_PREPEND(COMMON_C_FLAGS "-fno-inline ")
2021-11-24 15:24:02 +08:00
@@ -47,7 +48,7 @@ IF(UNIX)
STRING_APPEND(COMMON_C_FLAGS " -ffp-contract=off")
2020-08-08 17:52:50 +08:00
ENDIF()
2021-11-24 15:24:02 +08:00
- SET(COMMON_CXX_FLAGS "-std=c++17 -fno-omit-frame-pointer")
+ SET(COMMON_CXX_FLAGS "-std=c++17 -fno-omit-frame-pointer -fstack-protector-strong")
2020-03-18 13:41:46 +08:00
# Disable inline optimizations for valgrind testing to avoid false positives
IF(WITH_VALGRIND)
STRING_PREPEND(COMMON_CXX_FLAGS "-fno-inline ")
2020-08-08 17:52:50 +08:00
--
2021-11-24 15:24:02 +08:00
2.27.0
2020-08-08 17:52:50 +08:00