fix build with compilers with default stack-protector enabled
authorNorbert Lange <norbert.lange@andritz.com>
Thu, 19 Sep 2019 15:49:20 +0000 (17:49 +0200)
committerMichael Biebl <biebl@debian.org>
Tue, 19 Nov 2019 08:17:12 +0000 (08:17 +0000)
building systemd fails with a compiler that supports
-fstack-protector but does not enable it by default.
(will miss several __stack_chk_* symbols).

fix this by also adding the switch during linking.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
(cherry picked from commit 68e70ac2b27dcb5007fc4009553472f0b9700e66)
(cherry picked from commit 6d97aca0d50343d46cad79af3cabb46dcd56b82f)

Gbp-Pq: Name fix-build-with-compilers-with-default-stack-protector-ena.patch

meson.build

index e5ceb1e169db344f49849986a81e96c48b2cf2b0..4fc7dfa5a86c5a03e1e09d5e9fb86bb4eddbeb8b 100644 (file)
@@ -382,6 +382,7 @@ possible_cc_flags = [
 possible_link_flags = [
         '-Wl,-z,relro',
         '-Wl,-z,now',
+        '-fstack-protector',
 ]
 
 if cc.get_id() == 'clang'