直接给出示例配置:
Paths and misc options
(4) Number of parallel jobs
其help的说明为:
┌────────────────────────── Number of parallel jobs ───────────────────────────┐
│ CT_PARALLEL_JOBS: │
│ │
│ Number of jobs make will be allowed to run concurently. │
│ Set this higher than the number of processors you have, but not too high. │
│ A good rule of thumb is twice the number of processors you have. │
│ │
│ Enter 1 to have only one job at a time. │
│ │
│ Enter 0 to set automatically based on how many processors the host has. │
│ │
│ Symbol: PARALLEL_JOBS [=4] │
│ Type : integer │
│ Prompt: Number of parallel jobs │
│ Defined at config/global/build-behave.in:8 │
│ Depends on: !BACKEND [=n] │
│ Location: │
│ -> Paths and misc options │
此处,设置为4,意思是:
同时运行4个进程(去执行crosstool-ng的编译过程)
很明显,多线程去编译的话,会大大缩短整个的编译时间。
此数字的设置,当然,不能随便胡乱设置。
比较常见的做法是:
CPU内核数 x 2
比如,你的是Intel的双核的CPU,那么此值就是:
2 x 2 =4
了。




![[提示]](https://www.crifan.com/files/res/docbook/images/tip.png)

