[U-Boot] libfdt/fdt_ro.c build issues...

JerryVanBaren gerald.vanbaren at ge.com
Wed Aug 27 13:42:48 CEST 2008


Wolfgang Denk wrote:
> Dear Jerry Van Baren,
> 
> In message <48B4B62E.5000301 at gmail.com> you wrote:
>>> ...
>>> tools/fdt_ro.c: In function 'fdt_path_offset':
>>> tools/fdt_ro.c:158: warning: implicit declaration of function 'fdt_getprop_namelen'
>>> tools/fdt_ro.c:158: warning: assignment makes pointer from integer without a cast
>>> tools/fdt_ro.c: At top level:
>>> tools/fdt_ro.c:281: error: conflicting types for 'fdt_getprop_namelen'
>>> tools/fdt_ro.c:158: error: previous implicit declaration of 'fdt_getprop_namelen' was here
>>> ...
> ...
> 
>> ??? I'm not seeing this, even with a fresh pull from the u-boot repository.
>>
>> The function is declared in include/libfdt.h, properly in my copy.

(from your previous email):

> It seems it happens only for out-of-tree builds  (which is my standard
> mode of operation).

Yes, after I hit "send" and thought about the "../include", I had a bad 
feeling that that was the problem.

> The problem comes from tools/fdt_host.h which includes:
> 
> 	/* Make sure to include u-boot version of libfdt include files */
> 	#include "../include/fdt.h"
> 	#include "../include/libfdt.h"
> 	#include "../include/fdt_support.h"

There has to be a better way than the USE_HOSTCC / #include "fdt_host.h" 
(with a "up & over" relative path) mechanism.  Unfortunately, I don't 
have any good ideas at the moment.

What we really need is $(obj)include instead of "../include", but that 
is crossing the make $(obj) and the C preprocessor.  We could do it by 
running sed on fdt_host.h, but that wouldn't be a better way, just ugly.

[snip]

> Hm... not sure how to fix this.

Ditto.  :-(

> Best regards,
> 
> Wolfgang Denk

...thinking...
gvb
(...but don't expect much this weekend, it is Labor Day weekend in the 
USofA, the traditional last "hurrah" of summer).


More information about the U-Boot mailing list