diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-07 02:01:07 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-07 02:01:07 +0000 |
commit | 2b5f033cb5dfddb66d9103fd1cce103bde35d60e (patch) | |
tree | a607b956a939a770995996ae836f94a78c0981ff /configure.in | |
parent | 0241a4485737ecbef70bc11218d547e39ae76fe2 (diff) | |
download | ruby-2b5f033cb5dfddb66d9103fd1cce103bde35d60e.tar.gz |
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].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 10 |
1 files changed, 7 insertions, 3 deletions
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] ]) ]) |