Skip to content

Commit 0717cb8

Browse files
committed
Try -fstack-protector-strong on MinGW
The CI for MinGW has used it.
1 parent 2821423 commit 0717cb8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/mingw.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ jobs:
3232
MSYSTEM: ${{ matrix.msystem }}
3333
MSYS2_ARCH: x86_64
3434
CHOST: "x86_64-w64-mingw32"
35-
CFLAGS: "-march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong"
35+
CFLAGS: "-march=x86-64 -mtune=generic -O3 -pipe"
3636
CXXFLAGS: "-march=x86-64 -mtune=generic -O3 -pipe"
3737
CPPFLAGS: "-D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048"
38-
LDFLAGS: "-pipe -fstack-protector-strong"
38+
LDFLAGS: "-pipe"
3939
UPDATE_UNICODE: "UNICODE_FILES=. UNICODE_PROPERTY_FILES=. UNICODE_AUXILIARY_FILES=. UNICODE_EMOJI_FILES=."
4040
GITPULLOPTIONS: --no-tags origin ${{github.ref}}
4141
strategy:

configure.ac

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ AS_IF([test "$GCC" = yes], [
794794
795795
# -fstack-protector
796796
AS_CASE(["$target_os"],
797-
[mingw*|emscripten*|wasi*], [
797+
[emscripten*|wasi*], [
798798
stack_protector=no
799799
])
800800
AS_IF([test -z "${stack_protector+set}"], [
@@ -806,6 +806,8 @@ AS_IF([test "$GCC" = yes], [
806806
AS_IF([test "x$stack_protector" = xyes], [stack_protector=option; break])
807807
])
808808
])
809+
AC_MSG_CHECKING([for -fstack-protector])
810+
AC_MSG_RESULT(["$stack_protector"])
809811
AS_CASE(["$stack_protector"], [-*], [
810812
RUBY_APPEND_OPTION(XCFLAGS, $stack_protector)
811813
RUBY_APPEND_OPTION(XLDFLAGS, $stack_protector)

0 commit comments

Comments
 (0)