32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
From 6ab64f1d0686817d17420a39284efdbe46b42f61 Mon Sep 17 00:00:00 2001
|
|
From: Chris Kelley <ckelley@redhat.com>
|
|
Date: Thu, 2 Dec 2021 14:40:58 +0000
|
|
Subject: [PATCH] Use -fstack-protector-strong compiler flag
|
|
|
|
* Fixes gating issues with annobin
|
|
|
|
Resolves: #1936636
|
|
---
|
|
cmake/Modules/DefineCompilerFlags.cmake | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/cmake/Modules/DefineCompilerFlags.cmake b/cmake/Modules/DefineCompilerFlags.cmake
|
|
index 10d30f1a9..413648d13 100644
|
|
--- a/cmake/Modules/DefineCompilerFlags.cmake
|
|
+++ b/cmake/Modules/DefineCompilerFlags.cmake
|
|
@@ -22,9 +22,9 @@ if (UNIX AND NOT WIN32)
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
|
endif (WITH_FPIC)
|
|
|
|
- check_c_compiler_flag_ssp("-fstack-protector" WITH_STACK_PROTECTOR)
|
|
+ check_c_compiler_flag_ssp("-fstack-protector-strong" WITH_STACK_PROTECTOR)
|
|
if (WITH_STACK_PROTECTOR)
|
|
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
|
|
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-strong")
|
|
endif (WITH_STACK_PROTECTOR)
|
|
|
|
check_c_compiler_flag("-D_FORTIFY_SOURCE=2" WITH_FORTIFY_SOURCE)
|
|
--
|
|
2.33.1
|
|
|