[BusyBox] Compilation Speed
Mike Frysinger
vapier at gentoo.org
Fri Jul 29 03:18:51 UTC 2005
On Thursday 28 July 2005 03:39 pm, Rob Landley wrote:
> On Thursday 28 July 2005 12:48, busybox at rich-paul.net wrote:
> > I've noticed that when I compile busybox on my laptop, it compiles more
> > slowly than one would expect, and although it's a (more-or-less)
> > multiprocessor system and I use -j5, make never seems to run more than
> > one job at a time.
> >
> > I believe I have found the culprit: each time a file is compiled, gcc
> > runs about 5 times. This is because the $(check_gcc) macros and the
> > TARGET_ARCH macros are late binding.
> >
> > The attached patch cuts the compilation time by 66%, from 1.5 minutes to
> > 30 seconds. Your mileage may very. These statements have not been
> > evaluated by the FDA.
>
> Applied.
ive done some more tweaks such that now the $(CC) is only executed once for
most people and four times for i386 (since i386 has some extra calls) ...
however, i had to introduce this check to check_gcc:
if [ "$(1)" != "" ]
because for some reason or another, check_gcc was being called by something
without any arguments ... can anyone else verify / figure this out ?
the way i tested this stuff is to modify check_gcc to read:
check_gcc=$(shell \
echo "$(1)" >> $(HOME)/check ; \
...
then i do `rm -f ~/check` followed by `make clean -s` ... reviewing the output
of ~/check would show a lot of empty lines :( doing `make -s` would show a
lot more empty lines which meant gcc was executed a ton of times
needlessly ...
-mike
More information about the busybox
mailing list