From e4516dd08ed8bc04e0d3fb1cd474e9ae0baf40ca Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 4 Oct 2011 22:36:38 +0200 Subject: [PATCH] In bisect-runner.pl, only force Configure's libpth on x86_64 Linux. Also, if /proc/cpuinfo can be opened and parsed, default the make jobs to one more than the number of CPUs. Otherwise, default to 2 jobs. --- Porting/bisect-runner.pl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl index 6d649b0..aaccdc7 100755 --- a/Porting/bisect-runner.pl +++ b/Porting/bisect-runner.pl @@ -6,9 +6,16 @@ use Pod::Usage; my @targets = qw(config.sh config.h miniperl lib/Config.pm perl test_prep); +my $cpus; +if (open my $fh, '<', '/proc/cpuinfo') { + while (<$fh>) { + ++$cpus if /^processor\s+:\s+\d+$/; + } +} + my %options = ( - jobs => 9, + jobs => defined $cpus ? $cpus + 1 : 2, 'expect-pass' => 1, clean => 1, # mostly for debugging this ); @@ -21,7 +28,7 @@ my %defines = optimize => '-g', cc => 'ccache gcc', ld => 'gcc', - 'libpth' => \@paths, + (`uname -sm` eq "Linux x86_64\n" ? (libpth => \@paths) : ()), ); unless(GetOptions(\%options, @@ -238,7 +245,8 @@ previous settings for the same parameter. -j -Number of C jobs to run in parallel. Currently defaults to 9. +Number of C jobs to run in parallel. If F exists and can +be parsed, defaults to 1 + I. Otherwise defaults to 2. =item * -- 2.7.4