[U-Boot] [PATCH v2] makefiles: fixes for building build tools
Wolfgang Denk
wd at denx.de
Wed Dec 2 22:59:03 CET 2009
Dear Scott Wood,
In message <20091105004141.GB925 at loki.buserror.net> you wrote:
> Currently, some of the tools instead set CC to be HOSTCC in order to re-use
> some pattern rules -- but this fails when the user overrides CC on the make
> command line. Also, the HOSTCFLAGS in tools/Makefile are currently not
> being used because config.mk overwrites them.
>
> This patch adds static pattern rules for files that have been requested to
> be built with the native compiler using $(HOSTSRCS) and $(HOSTOBJS), and
> converts the tools to use them.
>
> It restores easylogo to using the host compiler, which was broken by commit
> 38d299c2db81bd889c601b5dfc12c4e83ef83333 (if this was an intentional change,
> please let me know -- but it seems to be a build tool).
>
> It restores -pedantic and the special flags for darwin and cygwin that were
> requested in tools/makefile (but keeps the flags added by config.mk) --
> hopefully someone can test this on those platforms. It no longer
> conditionalizes -pedantic on not being darwin; it wasn't clear that that was
> intentional, and unless there's a real problem it's just inviting people to
> contribute non-pedantic patches to those files (I'm not a fan of -pedantic
> personally, but if it's on for one platform it should be on for all).
>
> HOST_LDFLAGS is renamed HOSTLDFLAGS for consistency with the previous
> HOST_CFLAGS to HOSTCFLAGS rename. A new HOSTCFLAGS_NOPED is made available
> for those files which currently cannot be built with -pedantic, and replaces
> the old FIT_CFLAGS.
>
> imls now uses the cross compiler properly, rather than by trying to
> reconstruct CC using the typoed $(CROSS_COMPILER).
>
> envcrc.c is now dependency-processed unconditionally -- previously it would
> be built without being on (HOST)SRCS if CONFIG_ENV_IS_EMBEDDED was not
> selected.
>
> Signed-off-by: Scott Wood <scottwood at freescale.com>
> ---
> since v1:
> HOSTCFLAGS becomes HOSTCFLAGS_NOPED
> PEDCFLAGS becomes HOSTCFLAGS
> rebased to next branch
>
> I added some missing HOSTLDFLAGS references, but I decided against doing
> HOSTCOMPILE/HOSTLINK because of the number of combinations -- compile,
> compile noped, link, and link noped (because we could be compiling at the
> same time), and questions about whether we'll necessarily want HOSTCFLAGS if
> we're purely linking, whether LDFLAGS are harmful if purely compiling (and
> thus we could get rid of HOSTLINK), etc.
>
> Plus, we don't have anything analogous for the non-host case.
>
> config.mk | 34 ++++++++++++-
> rules.mk | 13 ++++-
> tools/Makefile | 121 +++++++++++++---------------------------------
> tools/easylogo/Makefile | 9 ++-
> tools/gdb/Makefile | 15 ++----
> tools/imls/Makefile | 29 ++++-------
> 6 files changed, 98 insertions(+), 123 deletions(-)
Applied to "next". Thanks.
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
The man on tops walks a lonely street; the "chain" of command is
often a noose.
More information about the U-Boot
mailing list