From 2b5f033cb5dfddb66d9103fd1cce103bde35d60e Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 7 Jul 2013 02:01:07 +0000 Subject: [PATCH] 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 at [ruby-core:55826]. [Fix GH-351], [Bug #8606]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 11 +++++++++++ configure.in | 10 +++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2d1db5e7e..bebd7dff6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Sun Jul 7 11:01:03 2013 Nobuyoshi Nakada + + * 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 at + [ruby-core:55826]. [Fix GH-351], [Bug #8606]. + Sun Jul 7 10:07:22 2013 Tanaka Akira * bignum.c (bary_sq_fast): Extracted from bigsqr_fast and diff --git a/configure.in b/configure.in index 9dd9a387e2..9a45c1b482 100644 --- a/configure.in +++ b/configure.in @@ -560,15 +560,19 @@ AC_DEFUN([RUBY_DTRACE_AVAILABLE], 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] ]) ])