aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-11-23 17:51:52 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-11-23 17:56:23 +0900
commit2939c57ca7aa80df126332e04de8a33a56978b42 (patch)
tree5bc3436eaf5e9d233fab584430b4cb8a871b9a69 /configure.ac
parent53e352fd718cd2cae6d77298e6e92736dddcfeeb (diff)
downloadruby-2939c57ca7aa80df126332e04de8a33a56978b42.tar.gz
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.ac3
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'}