diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | configure.in | 10 |
2 files changed, 18 insertions, 3 deletions
@@ -1,3 +1,14 @@ +Sun Jul 7 11:01:03 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * 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@fsij.org> * 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] ]) ]) |