summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-09 05:27:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-09 05:27:07 +0000
commit9ee25c70df7f761f1d182e82c749e524762ba788 (patch)
treecec437131d9567dde717886c403dc7bdbacace2f
parent48a9d17105932636d603514c8e07a8f36050ad01 (diff)
configure.in: check for setjmp type with CCDLFLAGS
* configure.in (RUBY_SETJMP_TYPE): check for setjmp type after CCDLFLAGS is appended to CFLAGS, since __builtin_setjmp can be affected. [ruby-core:62469] [Bug #9818] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--configure.in6
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f22ddb74c9b..1d84a2044e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri May 9 14:27:05 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (RUBY_SETJMP_TYPE): check for setjmp type after
+ CCDLFLAGS is appended to CFLAGS, since __builtin_setjmp can be
+ affected. [ruby-core:62469] [Bug #9818]
+
Fri May 9 03:59:06 2014 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
* lib/delegate.rb: Fix example of using delegator.
diff --git a/configure.in b/configure.in
index e50e717d46a..dc96f2f1dec 100644
--- a/configure.in
+++ b/configure.in
@@ -2151,6 +2151,7 @@ AC_CACHE_CHECK(for sigsetjmp as a macro or function, ac_cv_func_sigsetjmp,
ac_cv_func_sigsetjmp=yes,
ac_cv_func_sigsetjmp=no)])
+AC_DEFUN(RUBY_CHECK_BUILTIN_SETJMP, [
if test x"${ac_cv_func___builtin_setjmp}" = xyes; then
unset ac_cv_func___builtin_setjmp
fi
@@ -2172,10 +2173,13 @@ AC_CACHE_CHECK(for __builtin_setjmp, ac_cv_func___builtin_setjmp,
])
test "$ac_cv_func___builtin_setjmp" = no || break
done])
+])
# we don't use _setjmp if _longjmp doesn't exist.
test x$ac_cv_func__longjmp = xno && ac_cv_func__setjmp=no
+AC_DEFUN(RUBY_SETJMP_TYPE, [
+RUBY_CHECK_BUILTIN_SETJMP
AC_MSG_CHECKING(for setjmp type)
setjmp_suffix=
AC_ARG_WITH(setjmp-type,
@@ -2220,6 +2224,7 @@ AC_MSG_RESULT(${setjmp_prefix}setjmp${setjmp_suffix}${setjmp_cast:+\($setjmp_cas
AC_DEFINE_UNQUOTED([RUBY_SETJMP(env)], [${setjmp_prefix}setjmp${setjmp_suffix}($setjmp_cast(env)${setjmp_sigmask+,0})])
AC_DEFINE_UNQUOTED([RUBY_LONGJMP(env,val)], [${setjmp_prefix}longjmp($setjmp_cast(env),val)])
AC_DEFINE_UNQUOTED(RUBY_JMP_BUF, ${setjmp_sigmask+${setjmp_prefix}}jmp_buf)
+])
# End of setjmp check.
AC_ARG_ENABLE(setreuid,
@@ -3474,6 +3479,7 @@ AC_SUBST(DTRACE_OBJ)
AC_SUBST(DTRACE_GLOMMED_OBJ)
AC_SUBST(LIBRUBY_A_OBJS)
+RUBY_SETJMP_TYPE
}
{ # build section