[U-Boot] [PATCH 2/5] kbuild: sync mixed targets handling with Linux 3.16-rc1

Masahiro Yamada yamada.m at jp.panasonic.com
Tue Jun 17 03:42:09 CEST 2014


On Mon, 16 Jun 2014 19:58:28 +0200
Jeroen Hofstee <dasuboot at myspectrum.nl> wrote:

> Hello Masahiro,
> 
> On ma, 2014-06-16 at 18:56 +0900, Masahiro Yamada wrote:
> > "make %_config all" was supported for the first time in U-Boot:
> >   commit 53bca5ab
> >   kbuild: support simultaneous board configuration and "make all"
> > 
> > Surprisingly it had not been working in Linux Kernel for a long time.
> > 
> > So I sent back the patch to the Linux Kbuild community and it was
> > accepted with a little code improvement, at commit 9319f453.
> > 
> > Now, you can do "make defconfig all" or "make %_defconfig all"
> > in Linux too.
> > 
> 
> There is some issue with this in current master I guess. I haven't
> bothered too much, but I think the one liner cause gcc to be called even
> if both compilers are set to clang. With a separate config and make step
> I have never seen such behavior. I only noticed it on FreeBSD though
> since gcc is not installed there and actually errors, so it might be
> awk / sed related as well.
> 
> Anyway, perhaps rings a bell...


Could you tell me how to reproduce the problem?

As far as I tested on FreeBSD where gcc is not installed,
I do not see that problem.

This is my repeat steps.
It fails on the halfway, but at least Clang is used for both HOSTCC and CC.


$ uname -a
FreeBSD collie.diag.org 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014     root at snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
$ gcc -v
-bash: gcc: command not found
$ git describe
v2014.07-rc3-68-gd8a97f9
$ gmake HOSTCC=clang CC=clang mrproper 
$ gmake HOSTCC=clang CC=clang NO_SDL=1 sandbox_config  all
Configuring for sandbox board...
  GEN     include/autoconf.mk.dep
warning: unknown warning option '-Werror=date-time' [-Wunknown-warning-option]
1 warning generated.
  GEN     include/autoconf.mk
warning: unknown warning option '-Werror=date-time' [-Wunknown-warning-option]
1 warning generated.
  CHK     include/config/uboot.release
  UPD     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  UPD     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  HOSTCC  scripts/basic/fixdep
  CC      lib/asm-offsets.s
warning: unknown warning option '-Werror=date-time' [-Wunknown-warning-option]
In file included from lib/asm-offsets.c:15:
In file included from include/common.h:20:
In file included from include/linux/bitops.h:110:
/usr/home/yamada/workspace/u-boot/arch/sandbox/include/asm/bitops.h:59:17: warning: variable 'flags' is uninitialized when used here [-Wuninitialized]
        local_irq_save(flags);
                       ^~~~~
/usr/home/yamada/workspace/u-boot/arch/sandbox/include/asm/bitops.h:56:21: note: initialize the variable 'flags' to silence this warning
        unsigned long flags;
                           ^
                            = 0
/usr/home/yamada/workspace/u-boot/arch/sandbox/include/asm/bitops.h:81:17: warning: variable 'flags' is uninitialized when used here [-Wuninitialized]
        local_irq_save(flags);
                       ^~~~~
/usr/home/yamada/workspace/u-boot/arch/sandbox/include/asm/bitops.h:78:21: note: initialize the variable 'flags' to silence this warning
        unsigned long flags;
                           ^
                            = 0
3 warnings generated.
  GEN     include/generated/generic-asm-offsets.h
  HOSTCC  tools/img2srec
  HOSTCC  tools/aisimage.o
  HOSTCC  tools/atmelimage.o
  WRAP    tools/common/image-fit.c
  HOSTCC  tools/common/image-fit.o
  WRAP    tools/common/image-sig.c
  HOSTCC  tools/common/image-sig.o
  WRAP    tools/common/image.c
  HOSTCC  tools/common/image.o
  HOSTCC  tools/default_image.o
  HOSTCC  tools/dumpimage.o
  HOSTCC  tools/fit_check_sign.o
  HOSTCC  tools/fit_common.o
  HOSTCC  tools/fit_image.o
  HOSTCC  tools/fit_info.o
  HOSTCC  tools/gpimage-common.o
  HOSTCC  tools/gpimage.o
  HOSTCC  tools/image-host.o
  HOSTCC  tools/imagetool.o
  HOSTCC  tools/imximage.o
  HOSTCC  tools/kwbimage.o
  WRAP    tools/lib/crc32.c
  HOSTCC  tools/lib/crc32.o
  WRAP    tools/lib/fdtdec.c
  HOSTCC  tools/lib/fdtdec.o
  WRAP    tools/lib/libfdt/fdt.c
  HOSTCC  tools/lib/libfdt/fdt.o
  WRAP    tools/lib/libfdt/fdt_ro.c
  HOSTCC  tools/lib/libfdt/fdt_ro.o
  WRAP    tools/lib/libfdt/fdt_rw.c
  HOSTCC  tools/lib/libfdt/fdt_rw.o
  WRAP    tools/lib/libfdt/fdt_strerror.c
  HOSTCC  tools/lib/libfdt/fdt_strerror.o
  WRAP    tools/lib/libfdt/fdt_wip.c
  HOSTCC  tools/lib/libfdt/fdt_wip.o
  WRAP    tools/lib/md5.c
  HOSTCC  tools/lib/md5.o
  WRAP    tools/lib/rsa/rsa-checksum.c
  HOSTCC  tools/lib/rsa/rsa-checksum.o
In file included from tools/lib/rsa/rsa-checksum.c:1:
In file included from /usr/home/yamada/workspace/u-boot/lib/rsa/rsa-checksum.c:16:
In file included from /usr/home/yamada/workspace/u-boot/include/rsa.h:16:
/usr/home/yamada/workspace/u-boot/include/image.h:404:24: error: unknown type name 'time_t'
void genimg_print_time(time_t timestamp);
                       ^
/usr/home/yamada/workspace/u-boot/include/image.h:760:53: error: unknown type name 'time_t'
int fit_get_timestamp(const void *fit, int noffset, time_t *timestamp);
                                                    ^
/usr/home/yamada/workspace/u-boot/include/image.h:776:47: error: unknown type name 'time_t'
int fit_set_timestamp(void *fit, int noffset, time_t timestamp);
                                              ^
3 errors generated.
gmake[2]: *** [tools/lib/rsa/rsa-checksum.o] Error 1
gmake[1]: *** [tools] Error 2
gmake: *** [build-one-by-one] Error 2


More information about the U-Boot mailing list