From 00fac76efac8b30e32cd8c7fa8ef060bb083f651 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Mon, 19 Nov 2018 23:05:11 +0000 Subject: configure.ac: avoid crashing MJIT with -fcf-protection by avoiding using __builtin_longjmp, like r64983. [Bug #15307] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 2c9b5de6fc..a0882a0c0f 100644 --- a/configure.ac +++ b/configure.ac @@ -1001,6 +1001,12 @@ main() AS_CASE(["$target_cpu"], [powerpc64*], [ 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_IF([test "$cf_protection" = yes], [ + ac_cv_func___builtin_setjmp=no + ]) ], [ LIBS="-lm $LIBS"]) : ${ORIG_LIBS=$LIBS} -- cgit v1.2.3