From 2939c57ca7aa80df126332e04de8a33a56978b42 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 23 Nov 2020 17:51:52 +0900 Subject: [PATCH] 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. --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ]) ]) : ${MJIT_HEADER_FLAGS='-P -dD'}