1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
k0kubun 2018-11-19 23:05:11 +00:00
parent 27322735af
commit 00fac76efa

View file

@ -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}