[U-Boot] [WIP] tools/env: cleanup host build flags

Daniel Hobi daniel.hobi at schmid-telecom.ch
Wed Nov 10 12:58:51 CET 2010


Hi Mike,

On 10.11.2010 10:23, Mike Frysinger wrote:
> On Monday, October 11, 2010 12:06:46 Daniel Hobi wrote:
>> - use the cross compiler again (fw_printenv is intended for a
>>   hosted environment on the target).
> 
> the cross-compiler used to create u-boot has no guarantee that it'll produce 
> executables useful for the target OS.  often this isnt the case.  HOSTCC 
> however will produce useful userspace applications for whatever host the user 
> has selection.

But in many cases the default for CC is sufficient to build such
executables, whereas the default for HOSTCC is almost never (except when
HOST==TARGET).

Usually HOSTCC refers to the system where the toolchain is running. So
maybe we should introduce TARGETCC to build executables running on the
system the toolchain is generating executables for. TARGETCC would
default to CC and could be overriden in the way you demonstrated:

> this works perfectly fine for me:
> 	make tools env HOSTCC=bfin-uclinux-gcc

Best regards,
Daniel



More information about the U-Boot mailing list