From d7d0ee10653afad2ace63cbf557eb0204097e1d7 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 20 Nov 2018 00:39:07 +0000 Subject: [PATCH] Check -fcf-protection * configure.ac: Check if CFLAGS actually includes -fcf-protection instead of checking if the flag is valid by RUBY_TRY_CFLAGS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- configure.ac | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index a0882a0c0f..f4be92039d 100644 --- a/configure.ac +++ b/configure.ac @@ -1002,8 +1002,7 @@ main() ac_cv_func___builtin_setjmp=no ]) # With gcc-8's -fcf-protection, MJIT's __builtin_longjmp fails. - # TODO: Check if CFLAGS actually includes -fcf-protection instead of using RUBY_TRY_CFLAGS - RUBY_TRY_CFLAGS(-fcf-protection, [cf_protection=yes], [cf_protection=no]) + AS_CASE(["$CC $CFLAGS "], [*" -fcf-protection "*], [cf_protection=yes], [cf_protection=no]) AS_IF([test "$cf_protection" = yes], [ ac_cv_func___builtin_setjmp=no ])