1From e32dba1d5cf884959af5b2c0691db00c263ea048 Mon Sep 17 00:00:00 2001 2From: Christian Persch <chpe@src.gnome.org> 3Date: Mon, 27 Dec 2021 19:24:46 +0100 4Subject: [PATCH] build: Fix check for -fstack-protector* compiler support 5 6Need to use has_link_argument() on some platforms. 7 8Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/2535 9 10[Retrieved from: 11https://gitlab.gnome.org/GNOME/vte/-/commit/e32dba1d5cf884959af5b2c0691db00c263ea048] 12Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 13--- 14 meson.build | 6 ++++-- 15 1 file changed, 4 insertions(+), 2 deletions(-) 16 17diff --git a/meson.build b/meson.build 18index 93b7f376..381d5d58 100644 19--- a/meson.build 20+++ b/meson.build 21@@ -461,8 +461,6 @@ compiler_flags_common = [ 22 '-fdiagnostics-show-option', 23 '-fno-common', 24 '-fno-semantic-interposition', 25- '-fstack-protector', 26- '-fstack-protector-strong', 27 ] 28 29 if enable_debug 30@@ -550,6 +548,10 @@ add_project_arguments(global_cxxflags, language: 'cpp') 31 linker_flags = [ 32 ['-Wl,-Bsymbolic', false,], 33 ['-Wl,-Bsymbolic-functions', get_option('_b_symbolic_functions'),], 34+ 35+ # See issue vte#2535. 36+ ['-fstack-protector', false], 37+ ['-fstack-protector-strong', false], 38 ] 39 40 foreach flag: linker_flags 41-- 42GitLab 43 44