diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-12 07:36:32 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-12 07:36:32 +0000 |
commit | 486795d95124c8d2bdaf4ae84a282e3879cb367c (patch) | |
tree | fadb55b28cff75206adc97da09765442cc7596de | |
parent | b3f491d3cb55b06029edf790ccf26cb6be50e28a (diff) |
* configure.in: add -fno-omit-frame-pointer if libexecinfo is used.
At least on FreeBSD ruby will crash on getting C backtrace
when it is compiled with other than -O0.
* vm_dump.c: enable backtrace on FreeBSD even if with optimizations.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | configure.in | 6 | ||||
-rw-r--r-- | vm_dump.c | 3 |
3 files changed, 14 insertions, 3 deletions
@@ -1,3 +1,11 @@ +Wed Dec 12 15:30:11 2012 NARUSE, Yui <naruse@ruby-lang.org> + + * configure.in: add -fno-omit-frame-pointer if libexecinfo is used. + At least on FreeBSD ruby will crash on getting C backtrace + when it is compiled with other than -O0. + + * vm_dump.c: enable backtrace on FreeBSD even if with optimizations. + Wed Dec 12 16:08:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org> * test/rdoc/test_rdoc_rdoc.rb (TestRDocRDoc#test_normalized_file_list_non_file_directory): diff --git a/configure.in b/configure.in index ba5273a082..b38869c9fb 100644 --- a/configure.in +++ b/configure.in @@ -2378,6 +2378,12 @@ AS_CASE(["$target_cpu-$target_os"], AC_CHECK_HEADERS([execinfo.h]) if test "x$ac_cv_header_execinfo_h" = xyes; then AC_CHECK_LIB([execinfo], [backtrace]) + execinfo_frame_pointer=no + RUBY_TRY_CFLAGS(-fno-omit-frame-pointer, [execinfo_frame_pointer=yes]) + if test "x$execinfo_frame_pointer" = xyes; then + optflags="${optflags+$optflags }-fno-omit-frame-pointer" + CFLAGS="$CFLAGS -fno-omit-frame-pointer" + fi fi]) AC_CHECK_FUNCS(backtrace) @@ -424,9 +424,6 @@ rb_vmdebug_thread_dump_state(VALUE self) return Qnil; } -#if defined(__FreeBSD__) && defined(__OPTIMIZE__) -#undef HAVE_BACKTRACE -#endif #ifndef HAVE_BACKTRACE #define HAVE_BACKTRACE 0 #endif |