diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-11-23 17:51:52 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-11-23 17:56:23 +0900 |
commit | 2939c57ca7aa80df126332e04de8a33a56978b42 (patch) | |
tree | 5bc3436eaf5e9d233fab584430b4cb8a871b9a69 /configure.ac | |
parent | 53e352fd718cd2cae6d77298e6e92736dddcfeeb (diff) |
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.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 3174781f03..c2b1a078a0 100644 --- a/configure.ac +++ b/configure.ac @@ -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'} |