1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Check if _FORTIFY_SOURCE really works

i686-pc-cygwin gcc 6.4.0 seems broken around ssp.h, when compiling
with both of optimization and _FORTIFY_SOURCE.
This commit is contained in:
Nobuyoshi Nakada 2020-11-23 17:51:52 +09:00
parent 53e352fd71
commit 2939c57ca7
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -673,7 +673,8 @@ AS_IF([test "$GCC" = yes], [
[disable -D_FORTIFY_SOURCE=2 option, which causes link error on mingw]),
[fortify_source=$enableval])
AS_IF([test "x$fortify_source" != xno], [
RUBY_TRY_CFLAGS(-D_FORTIFY_SOURCE=2, [RUBY_APPEND_OPTION(XCFLAGS, -D_FORTIFY_SOURCE=2)])
RUBY_TRY_CFLAGS([$optflags -D_FORTIFY_SOURCE=2], [RUBY_APPEND_OPTION(XCFLAGS, -D_FORTIFY_SOURCE=2)], [],
[@%:@include <stdio.h>])
])
: ${MJIT_HEADER_FLAGS='-P -dD'}