[U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory
Peter Tyser
ptyser at xes-inc.com
Fri Mar 13 00:53:53 CET 2009
On Fri, 2009-03-13 at 00:19 +0100, Wolfgang Denk wrote:
> Dear Mike Frysinger,
>
> In message <200903121901.23433.vapier at gentoo.org> you wrote:
> >
> > On Thursday 12 March 2009 15:49:06 Peter Tyser wrote:
> > > Update include search path so that the includes in U-Boot's include/
> > > directory have precedence over system includes. This allows crc32.c
> > > to use U-Boot's zlib.h header which removes the previously required
> > > symlinked zlib.h.
> >
> > this seems pretty risky. the headers in include/ are pretty much for u-boot.
> > making those with the host headers seems like it's doomed to failure.
>
> Indeed.
>
> Full NAK from me, too.
So what's a good fix? U-Boot's crc32() prototype uses uint32_t while
the standard zlib uses ulongs (It looks like Mike tried to keep U-Boot's
zlib.h header in line with the standard zlib.h, but then resorted to
using uint32_t's a year ago:
http://www.mail-archive.com/u-boot-users@lists.sourceforge.net/msg03726.html ).
The first workarounds that popped to mind are:
1. link with zlib to provide crc32() instead of compiling u-boot's
version
2. keep doing the symlink song and dance to give u-boot's zlib.h
priority
3. put u-boot's crc32() prototype back in line with zlib's and implement
Mike's original solution
4. put u-boot's crc32() prototype back in line with zlib's and do some
preprocessor magic (look at __SIZE_TYPE__, __LONG_MAX__, etc) - not sure
if this is possible/portable
5. some other idea?
Thanks,
Peter
More information about the U-Boot
mailing list