[U-Boot] fw_printenv cross compilation issue

Hi List,
I tried crosscompiling fw_printenv lately (on 2011.03 RC1) but I kept ending with a natively compiled version of fw_printenv. When looking at the tools/env/Makefile I saw it was using $(HOSTCC) and friends, basicly ever since: http://git.denx.de/?p=u-boot.git;a=commitdiff;h=abd315a1357ab05e82f0d61ebad6...
Is there a rationale for this ? Just reverting this change to http://git.denx.de/?p=u-boot.git;a=blob;f=tools/env/Makefile;hb=78acc472d971...
Makes building a crosscompiled fw_printenv possible again.
gr E.

On 03/14/2011 02:15 PM, Elie De Brauwer wrote:
Hi List,
I tried crosscompiling fw_printenv lately (on 2011.03 RC1) but I kept ending with a natively compiled version of fw_printenv. When looking at the tools/env/Makefile I saw it was using $(HOSTCC) and friends, basicly ever since: http://git.denx.de/?p=u-boot.git;a=commitdiff;h=abd315a1357ab05e82f0d61ebad6...
Is there a rationale for this ?
Yes, there is an issue requiring to compile the env tools with native compiler.
Just reverting this change to http://git.denx.de/?p=u-boot.git;a=blob;f=tools/env/Makefile;hb=78acc472d971...
Makes building a crosscompiled fw_printenv possible again.
You do not need, try this:
make HOSTCC=<your CC cross-compiler> env
for example, make HOSTCC=arm-linux-gcc env
Best regards, Stefano Babic

On 03/14/11 14:37, Stefano Babic wrote:
On 03/14/2011 02:15 PM, Elie De Brauwer wrote:
Hi List,
I tried crosscompiling fw_printenv lately (on 2011.03 RC1) but I kept ending with a natively compiled version of fw_printenv. When looking at the tools/env/Makefile I saw it was using $(HOSTCC) and friends, basicly ever since: http://git.denx.de/?p=u-boot.git;a=commitdiff;h=abd315a1357ab05e82f0d61ebad6...
Is there a rationale for this ?
Yes, there is an issue requiring to compile the env tools with native compiler.
Just reverting this change to http://git.denx.de/?p=u-boot.git;a=blob;f=tools/env/Makefile;hb=78acc472d971...
Makes building a crosscompiled fw_printenv possible again.
You do not need, try this:
make HOSTCC=<your CC cross-compiler> env
for example, make HOSTCC=arm-linux-gcc env
Allright,
Thanks for the info, guessed reading some older docs on the internet confused me.
gr E

Dear Elie De Brauwer,
In message 4D7E14ED.1050500@gmail.com you wrote:
I tried crosscompiling fw_printenv lately (on 2011.03 RC1) but I kept ending with a natively compiled version of fw_printenv. When looking at the tools/env/Makefile I saw it was using $(HOSTCC) and friends, basicly ever since: http://git.denx.de/?p=u-boot.git;a=commitdiff;h=abd315a1357ab05e82f0d61ebad6...
Is there a rationale for this ? Just reverting this change to http://git.denx.de/?p=u-boot.git;a=blob;f=tools/env/Makefile;hb=78acc472d971...
Makes building a crosscompiled fw_printenv possible again.
There is a rationale for that, and Mike Frisinger explained it when this patch was being discussed, and later again. Please see the archives.
I have to admit that I share your confusion, but even rational is relative ;-)
Best regards,
Wolfgang Denk
participants (3)
-
Elie De Brauwer
-
Stefano Babic
-
Wolfgang Denk