diff mbox

[U-Boot] kbuild: define DO_DEPS_ONLY for u-boot.cfg to fix build error

Message ID 1432612285-24160-1-git-send-email-yamada.masahiro@socionext.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Masahiro Yamada May 26, 2015, 3:51 a.m. UTC
Since 741e58e0fc8e (Create a .cfg file containing the CONFIG options
used to build), all the Blackfin boards fail to build if the parallel
(-j) option is passed.

  $ make -s bf506f-ezkit_defconfig
  #
  # configuration written to .config
  #
  $ make -j8 CROSS_COMPILE=bfin-elf-
  scripts/kconfig/conf --silentoldconfig Kconfig
    CHK     include/config.h
    UPD     include/config.h
    GEN     include/autoconf.mk
    GEN     include/autoconf.mk.dep
    CHK     include/config/uboot.release
    CHK     include/generated/timestamp_autogenerated.h
    UPD     include/generated/timestamp_autogenerated.h
    CFG     u-boot.cfg
  include/asm-offsets.h:3:43: fatal error:
  generated/generic-asm-offsets.h: No such file or directory
  compilation terminated.
  make: *** [u-boot.cfg] Error 1

When parsing header files for defined CONFIG options, DO_DEPS_ONLY
must be defined to exclude generated headers that might not have
been available yet.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 Makefile             | 2 +-
 scripts/Makefile.spl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Glass May 27, 2015, 3:55 p.m. UTC | #1
On 25 May 2015 at 21:51, Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> Since 741e58e0fc8e (Create a .cfg file containing the CONFIG options
> used to build), all the Blackfin boards fail to build if the parallel
> (-j) option is passed.
>
>   $ make -s bf506f-ezkit_defconfig
>   #
>   # configuration written to .config
>   #
>   $ make -j8 CROSS_COMPILE=bfin-elf-
>   scripts/kconfig/conf --silentoldconfig Kconfig
>     CHK     include/config.h
>     UPD     include/config.h
>     GEN     include/autoconf.mk
>     GEN     include/autoconf.mk.dep
>     CHK     include/config/uboot.release
>     CHK     include/generated/timestamp_autogenerated.h
>     UPD     include/generated/timestamp_autogenerated.h
>     CFG     u-boot.cfg
>   include/asm-offsets.h:3:43: fatal error:
>   generated/generic-asm-offsets.h: No such file or directory
>   compilation terminated.
>   make: *** [u-boot.cfg] Error 1
>
> When parsing header files for defined CONFIG options, DO_DEPS_ONLY
> must be defined to exclude generated headers that might not have
> been available yet.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
>  Makefile             | 2 +-
>  scripts/Makefile.spl | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini May 28, 2015, 1:24 p.m. UTC | #2
On Tue, May 26, 2015 at 12:51:25PM +0900, Masahiro Yamada wrote:

> Since 741e58e0fc8e (Create a .cfg file containing the CONFIG options
> used to build), all the Blackfin boards fail to build if the parallel
> (-j) option is passed.
> 
>   $ make -s bf506f-ezkit_defconfig
>   #
>   # configuration written to .config
>   #
>   $ make -j8 CROSS_COMPILE=bfin-elf-
>   scripts/kconfig/conf --silentoldconfig Kconfig
>     CHK     include/config.h
>     UPD     include/config.h
>     GEN     include/autoconf.mk
>     GEN     include/autoconf.mk.dep
>     CHK     include/config/uboot.release
>     CHK     include/generated/timestamp_autogenerated.h
>     UPD     include/generated/timestamp_autogenerated.h
>     CFG     u-boot.cfg
>   include/asm-offsets.h:3:43: fatal error:
>   generated/generic-asm-offsets.h: No such file or directory
>   compilation terminated.
>   make: *** [u-boot.cfg] Error 1
> 
> When parsing header files for defined CONFIG options, DO_DEPS_ONLY
> must be defined to exclude generated headers that might not have
> been available yet.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/Makefile b/Makefile
index bc47d98..da8cb05 100644
--- a/Makefile
+++ b/Makefile
@@ -876,7 +876,7 @@  endif
 # Create a file containing the configuration options the image was built with
 quiet_cmd_cpp_cfg = CFG     $@
 cmd_cpp_cfg = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \
-		-D__ASSEMBLY__ -x assembler-with-cpp -P -dM -E -o $@ $<
+	-DDO_DEPS_ONLY -D__ASSEMBLY__ -x assembler-with-cpp -P -dM -E -o $@ $<
 
 MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \
 	-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index ea67137..fd572f4 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -167,7 +167,7 @@  all:	$(ALL-y)
 
 quiet_cmd_cpp_cfg = CFG     $@
 cmd_cpp_cfg = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \
-		-D__ASSEMBLY__ -x assembler-with-cpp -P -dM -E -o $@ $<
+	-DDO_DEPS_ONLY -D__ASSEMBLY__ -x assembler-with-cpp -P -dM -E -o $@ $<
 
 $(obj)/$(SPL_BIN).cfg:	include/config.h
 	$(call if_changed,cpp_cfg)