diff options
author | nicoo <nicoo@debian.org> | 2020-02-23 14:29:45 +0000 |
---|---|---|
committer | nicoo <nicoo@debian.org> | 2020-02-23 14:29:45 +0000 |
commit | 28215e6c161c70cb1bcae7d01195fefcffb09d32 (patch) | |
tree | 9ac45dce216a9a3182073b0d099411c0fe19d644 /debian | |
parent | dd6879395a03ab2008866c0a8149e33d1c72de8a (diff) | |
parent | 9483147049d84ef447d9df8b755680639ca7bd8b (diff) |
Merge branch 'conditional-stack-protector-all' into 'debian/sid'
Only use -fstack-protector-all if it is supported
See merge request auth-team/libfido2!2
Diffstat (limited to 'debian')
-rw-r--r-- | debian/patches/conditional-stack-protector-all.patch | 31 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 32 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..99fa85e --- /dev/null +++ b/debian/patches/conditional-stack-protector-all.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Subject: Only use -fstack-protector-all if it is supported | ||
2 | |||
3 | This flag isn't available on all Debian ports. | ||
4 | |||
5 | Origin: vendor | ||
6 | From: Colin Watson <cjwatson@debian.org> | ||
7 | Reviewed-by: nicoo <nicoo@debian.org> | ||
8 | Forwarded: https://github.com/Yubico/libfido2/pull/130 | ||
9 | Applied-Upstream: not-yet | ||
10 | Last-Update: 2020-02-23 | ||
11 | |||
12 | --- | ||
13 | CMakeLists.txt | 5 ++++- | ||
14 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
17 | index c7c5991..07ca5e1 100644 | ||
18 | --- a/CMakeLists.txt | ||
19 | +++ b/CMakeLists.txt | ||
20 | @@ -114,7 +114,10 @@ else() | ||
21 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wbad-function-cast") | ||
22 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic") | ||
23 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic-errors") | ||
24 | - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-all") | ||
25 | + check_c_compiler_flag("-fstack-protector-all" HAVE_STACK_PROTECTOR_ALL) | ||
26 | + if(HAVE_STACK_PROTECTOR_ALL) | ||
27 | + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-all") | ||
28 | + endif() | ||
29 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") | ||
30 | |||
31 | 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 | |||