0002-build-Fix-check-for-fstack-protector-compiler-support.patch 1.2 KB

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