Setting an unset variable to an empty value is useless in make; an unset variable just expands to an empty string anyway. So what we do currently has no side effect: variable set and not empty -> variable not modified variable set and empty -> variable not modified variable unset -> set to an empty string However, additional variables do have an impact on the parsing time of the Makefiles, and the more variables, the more collisions in the hash table used internally by make, which slows down the parsing. By dropping those conditionally-set-empty variables, we gain about 3%: Run Before After 1 5.572 5.325 2 5.434 5.354 3 5.490 5.320 4 5.525 5.330 5 5.476 5.330 6 5.511 5.434 7 5.498 5.388 8 5.524 5.371 9 5.479 5.346 10 5.637 5.324 Mean: 5.515 5.352 Yeah, 0.163s does not look like much, and this does not make autocompletion any more usable. Still, that 3% gain is not to be ashamed of either. Note that there are 3 others case where we do set empty variables, but those are unconditional and serve other purposes: - pkg-virtual: this is done on purpose to avoid a bug when the environment may have TOOLCHAIN_VERSION or _SOURCE set, and we really want those to be empty, so the assignment is not conditional; - pkg-python: the reason for setting those to empty is dubious at best; it's been there since the inception of the python infra, back in 2013; still, the case is different than this patch addresses; - pkg-toolchain-external: this is the case for a toolchain already installed, so indeed we want to set _SOURCE and _VERSION to empty. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> |
||
---|---|---|
arch | ||
board | ||
boot | ||
configs | ||
docs | ||
fs | ||
linux | ||
package | ||
support | ||
system | ||
toolchain | ||
utils | ||
.defconfig | ||
.flake8 | ||
.gitignore | ||
.gitlab-ci.yml | ||
CHANGES | ||
Config.in | ||
Config.in.legacy | ||
COPYING | ||
DEVELOPERS | ||
Makefile | ||
Makefile.legacy | ||
README |
Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation. The documentation can be found in docs/manual. You can generate a text document with 'make manual-text' and read output/docs/manual/manual.text. Online documentation can be found at http://buildroot.org/docs.html To build and use the buildroot stuff, do the following: 1) run 'make menuconfig' 2) select the target architecture and the packages you wish to compile 3) run 'make' 4) wait while it compiles 5) find the kernel, bootloader, root filesystem, etc. in output/images You do not need to be root to build or run buildroot. Have fun! Buildroot comes with a basic configuration for a number of boards. Run 'make list-defconfigs' to view the list of provided configurations. Please feed suggestions, bug reports, insults, and bribes back to the buildroot mailing list: buildroot@buildroot.org You can also find us on #buildroot on OFTC IRC. If you would like to contribute patches, please read https://buildroot.org/manual.html#submitting-patches