ruby-changes:29763
From: nobu <ko1@a...>
Date: Sun, 7 Jul 2013 11:01:20 +0900 (JST)
Subject: [ruby-changes:29763] nobu:r41815 (trunk): configure.in: correctly tests dtrace -G in version 1.11
nobu 2013-07-07 11:01:07 +0900 (Sun, 07 Jul 2013) New Revision: 41815 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41815 Log: configure.in: correctly tests dtrace -G in version 1.11 * configure.in (RUBY_DTRACE_POSTPROCESS): dtrace version SUN D 1.11 introduces a check in the dtrace compiler to ensure that probes actually exist. If there are no probes, then the -G step will fail. As this test is only being used to determine whether -G is necessary (for instance, on OSX it is not), adding a real probe to the conftest allows it to succeed on newer versions of dtrace. Patch by Eric Saxby <sax AT livinginthepast.org> at [ruby-core:55826]. [Fix GH-351], [Bug #8606]. Modified files: trunk/ChangeLog trunk/configure.in Index: configure.in =================================================================== --- configure.in (revision 41814) +++ configure.in (revision 41815) @@ -560,15 +560,19 @@ AC_DEFUN([RUBY_DTRACE_AVAILABLE], https://github.com/ruby/ruby/blob/trunk/configure.in#L560 AC_DEFUN([RUBY_DTRACE_POSTPROCESS], [AC_CACHE_CHECK(whether $DTRACE needs post processing, rb_cv_prog_dtrace_g, [ - echo "int main(void){ return 0; }" > conftest.c - echo "provider conftest{};" > conftest_provider.d + echo "provider conftest{ probe fire(); };" > conftest_provider.d + dtrace -h -o conftest_provider.h -s conftest_provider.d >/dev/null 2>/dev/null + cat >conftest.c <<_CONF + #include "conftest_provider.h" + int main(void){ CONFTEST_FIRE(); return 0; } +_CONF $CC $CFLAGS -c -o conftest.o conftest.c if $DTRACE -G -s conftest_provider.d conftest.o 2>/dev/null; then rb_cv_prog_dtrace_g=yes else rb_cv_prog_dtrace_g=no fi - rm -f conftest.o conftest.c conftest_provider.d conftest_provider.o + rm -f conftest.[co] conftest_provider.[dho] ]) ]) Index: ChangeLog =================================================================== --- ChangeLog (revision 41814) +++ ChangeLog (revision 41815) @@ -1,3 +1,14 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Jul 7 11:01:03 2013 Nobuyoshi Nakada <nobu@r...> + + * configure.in (RUBY_DTRACE_POSTPROCESS): dtrace version SUN D 1.11 + introduces a check in the dtrace compiler to ensure that probes + actually exist. If there are no probes, then the -G step will + fail. As this test is only being used to determine whether -G is + necessary (for instance, on OSX it is not), adding a real probe to + the conftest allows it to succeed on newer versions of dtrace. + Patch by Eric Saxby <sax AT livinginthepast.org> at + [ruby-core:55826]. [Fix GH-351], [Bug #8606]. + Sun Jul 7 10:07:22 2013 Tanaka Akira <akr@f...> * bignum.c (bary_sq_fast): Extracted from bigsqr_fast and -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/