
On Mon, 11 Oct 2010 18:06:46 +0200 Daniel Hobi daniel.hobi@schmid-telecom.ch wrote:
Hi Scott,
In commit d984fed0 (makefiles: fixes for building build tools), you suggest that using $(CC) with host flags (HOSTCFLAGS, etc) is the correct way to use the cross compiler to generate binaries for a hosted environment on the target.
On the other hand, you use $(HOSTCC) to generate the .depend file in rules.mk which leads to wrong dependencies.
I think we need to differentiate three cases:
(free-standing) U-Boot: use CC and CFLAGS
native tools (mkimage, etc): use HOSTCC and HOSTCFLAGS
Linux environment on the target (imls, fw_printenv):
Can we use CC and HOSTCFLAGS, or do we need a third set of variables for flags?
If reusing HOSTCFLAGS: how do we fix dependency generation?
I don't know if a separate set of flags is needed, but we probably want separate OBJS/SRCS lists. The dependencies are going to be different based on which toolchain you use, even if the flags are the same.
-Scott