Hi,
attached patch helps with parallel make (make -j) on Kconfig builds on my system.
Basically, $(obj)/build.h is made an explicit dependency of all the various object files, so make doesn't try to build any of these with build.h not around.
Also, build.h is atomically generated by writing to some other file, then renaming.
I don't say that this "fixes" parallel make, as there might be more issues.
Signed-off-by: Patrick Georgi patrick.georgi@coresystems.de
Patrick Georgi wrote:
Also, build.h is atomically generated by writing to some other file, then renaming.
- printf "#define COREBOOT_VERSION "$(KERNELVERSION)"\n" > $(obj)/build.ht
- printf "#define COREBOOT_EXTRA_VERSION "$(COREBOOT_EXTRA_VERSION)"\n" >> $(obj)/build.ht
- printf "#define COREBOOT_BUILD "`LANG= date`"\n" >> $(obj)/build.ht
- printf "\n" >> $(obj)/build.ht
- printf "#define COREBOOT_COMPILER "$(shell LANG= $(CC) --version | head -n1)"\n" >> $(obj)/build.ht
- printf "#define COREBOOT_ASSEMBLER "$(shell LANG= $(AS) --version | head -n1)"\n" >> $(obj)/build.ht
- printf "#define COREBOOT_LINKER "$(shell LANG= $(LD) --version | head -n1)"\n" >> $(obj)/build.ht
- printf "#define COREBOOT_COMPILE_TIME "`LANG= date +%T`"\n" >> $(obj)/build.ht
- printf "#define COREBOOT_COMPILE_BY "$(subst ,@,$(shell PATH=$$PATH:/usr/ucb whoami))"\n" >> $(obj)/build.ht
- printf "#define COREBOOT_COMPILE_HOST "$(shell hostname)"\n" >> $(obj)/build.ht
- printf "#define COREBOOT_COMPILE_DOMAIN "$(shell test `uname -s` = "Linux" && dnsdomainname || domainname)"\n" >> $(obj)/build.ht
- printf "#include "config.h"\n" >> $(obj)/build.ht
- mv $(obj)/build.ht $(obj)/build.h
Is build.h strictly neccessary for the build? If yes, why?
//Peter
Am 28.01.2010 02:54, schrieb Peter Stuge:
- printf "#include "config.h"\n" >> $(obj)/build.ht
- mv $(obj)/build.ht $(obj)/build.h
Is build.h strictly neccessary for the build? If yes, why?
It's included in lots of places, and drags in config.h (see last printf line). If that one doesn't exist completely, you'll get lots of warnings/errors about non-existant symbols, and sure miscompiles.
Patrick