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

Wolfgang Denk wd at denx.de
Thu Apr 3 20:26:23 CEST 2008


In message <47F506DB.6010506 at semihalf.com> you wrote:
>
> I think this makes sense for code that we for example link from host's
> standard libraries. But for code compiled from files from the U-Boot
> tree (like lib_generic/md5.c), we shouldn't include host's header files.

But you, you should. Note that we are talking about host tools  here,
i.  e.  stuff that is supposed to run in the host environment. Assume
your're building for a big-endian, 32 bit Power system.  Assume  your
host is a little-endian x86_64 system.

Even simple tungs like a printf() require that you include the correct
host header files as you will link your host application against the
host libraries, too.

> > 2) Use relative file names (as suggested by Kumar) or similar methods
> >    to make sure we pick up the md5.h header file from a local
> >    directory instead from /usr/include.
> > 3) Rename md5.h to make sure we use a pick up our own file instead of
> >    some unrelated file which happens to have the same name.
> 
> 2) seems to be more robust, though -- 3) works until someone installs a

2 is not robust. It fails easily as soon as you move or rename files,
as son as you miss to create one  of  trhe  needed  directories  when
building out of tree, etc.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I had the rare misfortune of being one of the first people to try and
implement a PL/1 compiler.                             -- T. Cheatham




More information about the U-Boot mailing list