[glib: 9/10] ci: Add -fstack-protector to mingw64 cross file




commit f432ebf7d51833e9d9844f2ca83f21ef2e29480b
Author: Philip Withnall <pwithnall endlessos org>
Date:   Wed Oct 13 10:24:29 2021 +0100

    ci: Add -fstack-protector to mingw64 cross file
    
    See the comment in the code. As suggested by Nirbheek:
    https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2287#note_1285058.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 .gitlab-ci/cross_file_mingw64.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci/cross_file_mingw64.txt b/.gitlab-ci/cross_file_mingw64.txt
index 7c9176b01..38d2c6703 100644
--- a/.gitlab-ci/cross_file_mingw64.txt
+++ b/.gitlab-ci/cross_file_mingw64.txt
@@ -4,9 +4,12 @@ cpu_family = 'x86_64'
 cpu = 'x86_64'
 endian = 'little'
 
+# Fedora builds GCC with --enable-default-ssp by default, but mingw64 puts its
+# stack-protected functions in a separate library which needs to be linked
+# explicitly, hence this flag.
 [properties]
 c_args = []
-c_link_args = []
+c_link_args = ['-fstack-protector']
 
 [binaries]
 c = 'x86_64-w64-mingw32-gcc'


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]