Skip to contentSkip to conversation

fw_printenv cross compilation issue

U-Boot Elie De Brauwer 3 participants 4 messages Mar 14, 2011

lore
Share & tools
lore
#0 lore raw

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=abd315a1357ab05e82f0d61ebad666bc0d5378c3

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=78acc472d9719316f22e002a009a998d9ceec29d

Makes building a crosscompiled fw_printenv possible again.

gr
E.

Signature · 1 line
Elie De Brauwer
#1 lore raw
Quoted 9 lines · Elie De Brauwer

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=abd315a1357ab05e82f0d61ebad666bc0d5378c3

Is there a rationale for this ?

Yes, there is an issue requiring to compile the env tools with native compiler.

Quoted 4 lines

Just reverting this change to
http://git.denx.de/?p=u-boot.git;a=blob;f=tools/env/Makefile;hb=78acc472d9719316f22e002a009a998d9ceec29d

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

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#3 lore raw
In reply to Elie De Brauwer

Dear Elie De Brauwer,

Quoted 11 lines · In message <[email protected]> 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=abd315a1357ab05e82f0d61ebad666bc0d5378c3

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=78acc472d9719316f22e002a009a998d9ceec29d

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

Signature · 5 lines
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
A stone was placed at a ford in a river with the inscription:
"When this stone is covered it is dangerous to ford here."
#2 lore raw
In reply to Stefano Babic
Quoted 17 lines · Stefano Babic
Quoted 9 lines · Elie De Brauwer

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=abd315a1357ab05e82f0d61ebad666bc0d5378c3

Is there a rationale for this ?

Yes, there is an issue requiring to compile the env tools with native compiler.

Quoted 3 lines

Just reverting this change to
http://git.denx.de/?p=u-boot.git;a=blob;f=tools/env/Makefile;hb=78acc472d9719316f22e002a009a998d9ceec29d

Quoted 8 lines
Quoted 1 line

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

Signature · 1 line
Elie De Brauwer