From f432ebf7d51833e9d9844f2ca83f21ef2e29480b Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 13 Oct 2021 10:24:29 +0100 Subject: [PATCH] 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 --- .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'