[U-Boot-Users] [PATCH] Fix host tool build breakage, take two

Kumar Gala galak at kernel.crashing.org
Wed Apr 2 19:24:49 CEST 2008


On Apr 2, 2008, at 10:59 AM, Bartlomiej Sieka wrote:
> Kumar Gala wrote:
>> On Tue, 1 Apr 2008, Wolfgang Denk wrote:
> [...]
>>>> Any ideas on how to work around this?  Do we really intend to  
>>>> pick up
>>>> the system md5.h or should we be getting the one from u-boot/ 
>>>> include/
>>>> md5.h?
>>> We need the system md5.h, I think. We'll investigate.
>> If I force things to use the md5.h in u-boot/include things seem to  
>> build.
>> Here's the patch for the forcing:
>
> I think that generally it is a better idea to use U-Boot's includes  
> when
> building for the host system, as this gives us better control over  
> what
> exactly gets included. But then on the other hand, tools/Makefils  
> has this:
>
> CPPFLAGS   = -idirafter $(SRCTREE)/include \
> 		-idirafter $(OBJTREE)/include2 \
> 		-idirafter $(OBJTREE)/include \
>
> Could anyone comment on the reasons why we try U-Boot's includes after
> system includes? Perhaps it would be a good idea to reverse the  
> order --
> see below for a quick RFC patch (compile-tested on two arm and two ppc
> boards, each arch with and without CONFIG_FIT enabled).
>
> Kumar - could you try the patch out and see if it helps your build  
> issue?
>
> Regards,
> Bartlomiej
>
> diff --git a/tools/Makefile b/tools/Makefile
> index 8784a6d..93f74aa 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -117,7 +117,7 @@ BINS        := $(addprefix $(obj),$(BIN_FILES))
> #
> # Use native tools and options
> #
> -CPPFLAGS   = -idirafter $(SRCTREE)/include \
> +CPPFLAGS   = -I $(SRCTREE)/include \
> 		-idirafter $(OBJTREE)/include2 \
> 		-idirafter $(OBJTREE)/include \
> 		-DTEXT_BASE=$(TEXT_BASE) -DUSE_HOSTCC

I get:

gcc -g -Wall -I /tmp/u-boot-85xx/include -idirafter /tmp/u-boot-85xx/ 
include2 -idirafter /tmp/u-boot-85xx/include -DTEXT_BASE=0xfff80000 - 
DUSE_HOSTCC -O -c -o image.o image.c
In file included from image.c:73:
/usr/include/md5.h:27: error: parse error before "UINT4"
/usr/include/md5.h:30: error: parse error before '}' token
/usr/include/md5.h:38: error: parse error before "PROTO_LIST"
/usr/include/md5.h:39: error: parse error before "PROTO_LIST"
/usr/include/md5.h:41: error: parse error before "PROTO_LIST"
/usr/include/md5.h:43: error: parse error before "PROTO_LIST"
image.c: In function `calculate_hash':
image.c:1944: warning: implicit declaration of function `md5'
make[1]: *** [image.o] Error 1
make[1]: Leaving directory `/tmp/u-boot-85xx/tools'
make: *** [tools] Error 2

- k




More information about the U-Boot mailing list