diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/patches/conditional-stack-protector-all.patch | 27 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 28 insertions, 0 deletions
diff --git a/debian/patches/conditional-stack-protector-all.patch b/debian/patches/conditional-stack-protector-all.patch new file mode 100644 index 0000000..d58f7ee --- /dev/null +++ b/debian/patches/conditional-stack-protector-all.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From: Colin Watson <cjwatson@debian.org> | ||
2 | Date: Fri, 21 Feb 2020 23:23:49 +0000 | ||
3 | Subject: Only use -fstack-protector-all if it is supported | ||
4 | |||
5 | This flag isn't available on all Debian ports. | ||
6 | |||
7 | Last-Update: 2020-02-21 | ||
8 | --- | ||
9 | CMakeLists.txt | 5 ++++- | ||
10 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
13 | index c7c5991..07ca5e1 100644 | ||
14 | --- a/CMakeLists.txt | ||
15 | +++ b/CMakeLists.txt | ||
16 | @@ -114,7 +114,10 @@ else() | ||
17 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wbad-function-cast") | ||
18 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic") | ||
19 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic-errors") | ||
20 | - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-all") | ||
21 | + check_c_compiler_flag("-fstack-protector-all" HAVE_STACK_PROTECTOR_ALL) | ||
22 | + if(HAVE_STACK_PROTECTOR_ALL) | ||
23 | + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-all") | ||
24 | + endif() | ||
25 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") | ||
26 | |||
27 | set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g2") | ||
diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..d5d2276 --- /dev/null +++ b/debian/patches/series | |||
@@ -0,0 +1 @@ | |||
conditional-stack-protector-all.patch | |||