mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 10:07:38 -04:00
build: Use 'nproc' instead of counting /proc/cpuinfo entries
Change-Id: If3b31504bcd37692ad109bb2779620e2302aa9fa
This commit is contained in:
parent
5323c49fe6
commit
5a1a5de3e3
1 changed files with 6 additions and 7 deletions
|
@ -35,13 +35,12 @@ elsif ($^O eq 'solaris') {
|
||||||
$cores = 1 if ($?);
|
$cores = 1 if ($?);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (open CPUINFO, "</proc/cpuinfo") {
|
chomp($cores = `/usr/bin/nproc`);
|
||||||
$cores = scalar grep /^processor/i, <CPUINFO>;
|
$cores = 1 if ($?);
|
||||||
close CPUINFO;
|
# if (open CPUINFO, "</proc/cpuinfo") {
|
||||||
}
|
# $cores = scalar grep /^processor/i, <CPUINFO>;
|
||||||
else {
|
# close CPUINFO;
|
||||||
$cores = 1;
|
# }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# fork children
|
# fork children
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue