This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Allow TIME_HIRES_DONT_RUN_PROBES=1 to aid cross-compiling
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 17 Feb 2016 14:37:25 +0000 (09:37 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 17 Feb 2016 14:37:25 +0000 (09:37 -0500)
If that is true, the probes are compiled but not run.

https://rt.cpan.org/Ticket/Display.html?id=111391

Patch kindly supplied by Niko Tyni.

dist/Time-HiRes/Makefile.PL

index 89594e6..087ab79 100644 (file)
@@ -150,7 +150,7 @@ __EOD__
            my $res = system($cccmd);
            $ok = defined($res) && $res == 0 && -s $tmp_exe && -x _;
 
-           if ( $ok && exists $args{run} && $args{run}) {
+           if ( $ok && exists $args{run} && $args{run} && !$ENV{TIME_HIRES_DONT_RUN_PROBES} ) {
                my $tmp_exe =
                    File::Spec->catfile(File::Spec->curdir, $tmp_exe);
                my @run = $tmp_exe;