summaryrefslogtreecommitdiff
path: root/baserock-bootstrap
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-01-17 17:41:10 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-01-17 17:41:10 +0000
commit99f06853351b7e70c653106662c328117814c760 (patch)
tree8a4f93690fba62027ac03750d5bdb393045afe13 /baserock-bootstrap
parent35d77de0bd185776630344973a9cc6c8265e3458 (diff)
downloadmorph-99f06853351b7e70c653106662c328117814c760.tar.gz
Avoid bc as a dependency for baserock-bootstrap
We want to avoid having to have bc in the bootstrap environment, since it's yet another thing to install there, and to build in the bootstrap process. bc is only used to compute the number of parallel make jobs. We can approximate the answer easily with expr (but need integer arithmetic so the result is slightly different).
Diffstat (limited to 'baserock-bootstrap')
-rwxr-xr-xbaserock-bootstrap5
1 files changed, 2 insertions, 3 deletions
diff --git a/baserock-bootstrap b/baserock-bootstrap
index ab1e4c96..e77ae916 100755
--- a/baserock-bootstrap
+++ b/baserock-bootstrap
@@ -10,9 +10,8 @@ sources="$LFS/sources"
tools="$LFS/tools"
SNAPSHOT="${1:-'no'}"
-JOBS=$((echo -n '1.5*'; grep -c '^processor' /proc/cpuinfo) |
- bc -lq |
- sed 's/\..*//')
+CPUS=$(grep -c '^processor' /proc/cpuinfo)
+JOBS=$(expr 2 '*' $CPUS)
export LC_ALL=C
export LFS_TGT=$(uname -m)-lfs-linux-gnu