[U-Boot] Building under Cygwin - "-ansi" flag?

Masahiro Yamada yamada.m at jp.panasonic.com
Fri Jun 6 12:42:59 CEST 2014


Hi.


> 
> I've finally found time to look deeper into this problem. Let me outline
> the situation:
> 1. The problems with Cygwin build arise in code built for the "host"
>    architecture i.e. stuff in "tools" sub-directory.
> 2. Along the years, there were several commits targeting the problems.
>    All were related to include search paths/their order:
>     a. e1a3f6b (July 2004): U-Boot include paths for "tools" build were
>        changed to "-idirafter", i.e. host headers were given higher
>        priority than headers in U-Boot tree.
>     b. 883e392 (Jan 2008): The above patch caused "asm/types.h" shipped
>        with Cygwin to be included. Turned out Cygwin does not define
>        __u64, so this patch tried to workaround it by adding the "-ansi"
>        flag. This flag dropped some include search paths effectively
>        returning the use of "asm/types.h" from U-Boot tree.

So, with Sandbox configuration,  host-tools include arch/sandbox/include/asm/types.h
With beagle bone configuration,  they include arch/arm/include/asm/type.h

How amazing!



>     c. 669dfc2 (March 2013): Yet another header was included from the
>        host paths and caused problems: "libfdt_env.h". This time it was
>        worked around by adding the following flag to override it:
>        "-include $(SRCTREE)/include/libfdt_env.h"

Seems people are only adding new features with ridiculous workarounds,
without refactrong the code,
without thinking what the proper implementing is.
Sadly.


Best Regards
Masahiro Yamada



More information about the U-Boot mailing list