[En-Nut-Discussion] Off-topic - Building Nut/OS fast...very fast

Ulrich Prinz uprinz2 at netscape.net
Wed Jul 20 00:29:30 CEST 2011


On 19.07.2011 17:21, Harald Kipp wrote:
> Hi Thiago,
> 
> On 7/19/2011 1:45 PM, Thiago A. Corrêa wrote:
> 
>> Maybe it's obvious, but make -j NUMBER_CORES does speed up the build
>> quite a lot. I used that in qnutconf and got build down to half the
> 
> Yes, I tried this as well and now the CPU cores are sometimes up to 90%.
> Though, I used -j instead of -j8. The latter is still a bit slow. No
> idea why.

Try Number_Of_Cores + 1 so, if you have 8, use -j9
> 
> A minor problem is, that I had to split "make clean all install" into
> "make clean", "make all" and "make install".
> 
?? I didn't and it works.

> The big problem is, that failures are much harder to find. If one
> process fails, the others are still producing more output. I observed
> the same problem with qnutconf. (Btw. sorry for adding the ugly controls
> "verbose" and "clear" in the qnutconf main window. I'll fix this next time).

So how about my modification of the Makefiles:
I collected all compiler/toolchain calls and defined them in makevars.
Then I modified compiler, assembler, linker calls to not give any output
as long as nothing fails. Instead I only do
[CC] xyr.o
[CC] abc.o
[AR] bla
[LD]...

Now you have much less screen output, everything is symmetric. But if
therre is an error, details will be printed. So if you compile with
several cores in parallel, the important error report is not scrolling
out of sight while the other 7 cores finish their job.
> 
> FYI, I'm running nut/tools/packaging/distcheck.lua. It finally produces
> a file errors-x.y.z.log, which becomes unreadable with option -j.
> 
True.




More information about the En-Nut-Discussion mailing list