ruby-changes:26291
From: naruse <ko1@a...>
Date: Wed, 12 Dec 2012 16:36:42 +0900 (JST)
Subject: [ruby-changes:26291] naruse:r38342 (trunk): * configure.in: add -fno-omit-frame-pointer if libexecinfo is used.
naruse 2012-12-12 16:36:32 +0900 (Wed, 12 Dec 2012) New Revision: 38342 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38342 Log: * 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. Modified files: trunk/ChangeLog trunk/configure.in trunk/vm_dump.c Index: configure.in =================================================================== --- configure.in (revision 38341) +++ configure.in (revision 38342) @@ -2378,6 +2378,12 @@ AS_CASE(["$target_cpu-$target_os"], https://github.com/ruby/ruby/blob/trunk/configure.in#L2378 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) Index: ChangeLog =================================================================== --- ChangeLog (revision 38341) +++ ChangeLog (revision 38342) @@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Dec 12 15:30:11 2012 NARUSE, Yui <naruse@r...> + + * 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@r...> * test/rdoc/test_rdoc_rdoc.rb (TestRDocRDoc#test_normalized_file_list_non_file_directory): Index: vm_dump.c =================================================================== --- vm_dump.c (revision 38341) +++ vm_dump.c (revision 38342) @@ -424,9 +424,6 @@ rb_vmdebug_thread_dump_state(VALUE self) https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L424 return Qnil; } -#if defined(__FreeBSD__) && defined(__OPTIMIZE__) -#undef HAVE_BACKTRACE -#endif #ifndef HAVE_BACKTRACE #define HAVE_BACKTRACE 0 #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/