summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-19 23:05:11 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-19 23:05:11 +0000
commit00fac76efac8b30e32cd8c7fa8ef060bb083f651 (patch)
treefc428e097e1660ebc80c3980a4750a82820a8442
parent27322735afae833bcecd54fbb551ad4132e96235 (diff)
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
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2c9b5de..a0882a0 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}