Re: [U-Boot] [PATCH 4/4] tools/env: use host build flags

2010-11-15 Thread Mike Frysinger
On Sunday, November 14, 2010 16:59:33 Wolfgang Denk wrote:
 Mike Frysinger wrote:
 Seems this was not a fix, but introduced an error.  Dp you agree to
 revert that commit?

of course i disagree.  this change is a fix in my mind.
   
   Please reconsider.  This has been working for nearly a decade, and now
   it's broken.  I want to see this fixed.  If needed, by reverting the
   commit that broke it.
  
  it's been working for your specific use cases.  it hasnt been working
  without pains for everyone.
 
 I agree you have a point.
 
 But it is a change in behaviour, and what it makes worse it that it's
 an undocumented one. Users who have been doing the same thing for a
 decade suddenly find their old scripts are not working any more, and
 there it even a hint of what they do now.
 
 If we decide that such a change makes sense, then it must be
 explained and documented properly.

i guess i can try harder to goad Daniel into getting his work going
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] tools/env: use host build flags

2010-11-14 Thread Wolfgang Denk
Dear Mike Frysinger,

In message 201011101755.54287.vap...@gentoo.org you wrote:

Seems this was not a fix, but introduced an error.  Dp you agree to
revert that commit?
   
   of course i disagree.  this change is a fix in my mind.
  
  Please reconsider.  This has been working for nearly a decade, and now
  it's broken.  I want to see this fixed.  If needed, by reverting the
  commit that broke it.

 it's been working for your specific use cases.  it hasnt been working without 
 pains for everyone.

I agree you have a point.

But it is a change in behaviour, and what it makes worse it that it's
an undocumented one. Users who have been doing the same thing for a
decade suddenly find their old scripts are not working any more, and
there it even a hint of what they do now.

If we decide that such a change makes sense, then it must be
explained and documented properly.

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: w...@denx.de
In English, every word can be verbed.  Would that it were  so  in our
programming languages.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] tools/env: use host build flags

2010-11-10 Thread Mike Frysinger
On Monday, November 08, 2010 13:15:38 Detlev Zundel wrote:
  Mike Frysinger wrote:
  Convert the tools/env/Makefile to use the same host tool syntax as the
  other tool subdirs.
  
  Applied to next branch. Thanks
 
 It just occurred to me that this will no longer cross compile the fw_env
 tool - effectively rendering the tool useless for me.
 
 Mike, what _exactly_ was the reason to drop cross compilation?

nothing was dropped.  you need to set your HOSTCC correctly for the host on 
which you want tools to compile.

this is like arguing that none of the tools in tools/Makefile cross-compile.  
they do.  i simply fixed tools/env/Makefile to operate the same.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] tools/env: use host build flags

2010-11-10 Thread Wolfgang Denk
Dear Mike Frysinger,

In message 201011100419.10315.vap...@gentoo.org you wrote:

  Mike, what _exactly_ was the reason to drop cross compilation?
 
 nothing was dropped.  you need to set your HOSTCC correctly for the host on 
 which you want tools to compile.

But it is WRONG to use HOSTCC for fw_* - these are _target_ tools, and
they need to be CROSS compiled.

 this is like arguing that none of the tools in tools/Makefile cross-compile.  
 they do.  i simply fixed tools/env/Makefile to operate the same.

Seems this was not a fix, but introduced an error.  Dp you agree to
revert that commit?

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: w...@denx.de
The more we disagree, the more chance there is that at least  one  of
us is right.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] tools/env: use host build flags

2010-11-10 Thread Mike Frysinger
On Wednesday, November 10, 2010 14:54:17 Wolfgang Denk wrote:
 Mike Frysinger wrote:
   Mike, what _exactly_ was the reason to drop cross compilation?
  
  nothing was dropped.  you need to set your HOSTCC correctly for the
  host on which you want tools to compile.
 
 But it is WRONG to use HOSTCC for fw_* - these are _target_ tools, and
 they need to be CROSS compiled.

so do what i said -- set the HOSTCC to the host you want the tools to run on.  
this will work for *all* tools instead of arbitrarily picking some to use 
HOSTCC while picking others to use CROSS.

  this is like arguing that none of the tools in tools/Makefile
  cross-compile. they do.  i simply fixed tools/env/Makefile to operate
  the same.
 
 Seems this was not a fix, but introduced an error.  Dp you agree to
 revert that commit?

of course i disagree.  this change is a fix in my mind.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] tools/env: use host build flags

2010-11-10 Thread Wolfgang Denk
Dear Mike Frysinger,

In message 201011101711.17574.vap...@gentoo.org you wrote:

 so do what i said -- set the HOSTCC to the host you want the tools to run on. 
  
 this will work for *all* tools instead of arbitrarily picking some to use 
 HOSTCC while picking others to use CROSS.

Why are you so ignorant?

There are tools that are supposed to run on the build host (like
mkimage or gen_eth_addr), and  there are tools that are supposed to
run on the target (like fw_*).

Your one size fits all approach is broken.

  Seems this was not a fix, but introduced an error.  Dp you agree to
  revert that commit?

 of course i disagree.  this change is a fix in my mind.


Please reconsider.  This has been working for nearly a decade, and now
it's broken.  I want to see this fixed.  If needed, by reverting the
commit that broke it.

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: w...@denx.de
Programmer's Lament: (Shakespeare, Macbeth, Act I, Scene vii)
That we but teach bloody instructions,
which, being taught, return to plague the inventor...
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] tools/env: use host build flags

2010-11-10 Thread Mike Frysinger
On Wednesday, November 10, 2010 17:29:52 Wolfgang Denk wrote:
 Mike Frysinger wrote:
  so do what i said -- set the HOSTCC to the host you want the tools to run
  on. this will work for *all* tools instead of arbitrarily picking some
  to use HOSTCC while picking others to use CROSS.
 
 Why are you so ignorant?

cut the crap

 There are tools that are supposed to run on the build host (like
 mkimage or gen_eth_addr), and  there are tools that are supposed to
 run on the target (like fw_*).

you're assuming too much here as well.  i need to support cross-compiling all 
the tools for when the build==host==target and build!=host==target and 
build!=host!=target.  this is the stuff i hit every day with package managers 
and distro setups.

   Seems this was not a fix, but introduced an error.  Dp you agree to
   revert that commit?
  
  of course i disagree.  this change is a fix in my mind.
 
 Please reconsider.  This has been working for nearly a decade, and now
 it's broken.  I want to see this fixed.  If needed, by reverting the
 commit that broke it.

it's been working for your specific use cases.  it hasnt been working without 
pains for everyone.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] tools/env: use host build flags

2010-11-09 Thread Daniel Hobi
Hi Steve,

On 09.11.2010 01:01, Steve Sakoman wrote:
 On Mon, Nov 8, 2010 at 3:15 PM, Wolfgang Denk w...@denx.de wrote:
 In message m2k4knd6lx@ohwell.denx.de you wrote:
 It just occurred to me that this will no longer cross compile the fw_env
 tool - effectively rendering the tool useless for me.

 Argh... Indeed, that's broken.
 
 I ran into this issue this week too.
 
 Reverting is one option. I also tried Daniel Hobi's patch tools/env:
 cleanup host build flags and that worked for me.

You are refering to this WIP patch:

http://article.gmane.org/gmane.comp.boot-loaders.u-boot/86236

It makes the fw_env tool Makefile similar to the imls Makefile and
solves the errno inclusion problem reported by Detlev.

I still think we need a third set of CC, CFLAGS, SRCS, etc defines for
compiling tools running on the target. However, we probably can default
to the combination CC+HOSTCFLAGS for most platforms.

Best regards,
Daniel

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] tools/env: use host build flags

2010-11-08 Thread Detlev Zundel
Hi,

 Dear Mike Frysinger,

 In message 1281845002-26525-4-git-send-email-vap...@gentoo.org you wrote:
 Convert the tools/env/Makefile to use the same host tool syntax as the
 other tool subdirs.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org
 ---
  tools/env/Makefile |6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)

 Applied to next branch. Thanks

It just occurred to me that this will no longer cross compile the fw_env
tool - effectively rendering the tool useless for me.

Mike, what _exactly_ was the reason to drop cross compilation?

Cheers
  Detlev

-- 
By all means let's be open-minded, but not so open-minded that our
brains drop out.
-- Richard Dawkins
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] tools/env: use host build flags

2010-11-08 Thread Wolfgang Denk
Dear Detlev Zundel,

In message m2k4knd6lx@ohwell.denx.de you wrote:

  Applied to next branch. Thanks
 
 It just occurred to me that this will no longer cross compile the fw_env
 tool - effectively rendering the tool useless for me.

Argh... Indeed, that's broken.

 Mike, what _exactly_ was the reason to drop cross compilation?

Mike, I think we should revert that commit?

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: w...@denx.de
There is nothing new under the sun, but there are lots of old things
we don't know yet.  - Ambrose Bierce
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] tools/env: use host build flags

2010-11-08 Thread Steve Sakoman
On Mon, Nov 8, 2010 at 3:15 PM, Wolfgang Denk w...@denx.de wrote:
 Dear Detlev Zundel,

 In message m2k4knd6lx@ohwell.denx.de you wrote:

  Applied to next branch. Thanks

 It just occurred to me that this will no longer cross compile the fw_env
 tool - effectively rendering the tool useless for me.

 Argh... Indeed, that's broken.

 Mike, what _exactly_ was the reason to drop cross compilation?

 Mike, I think we should revert that commit?

I ran into this issue this week too.

Reverting is one option. I also tried Daniel Hobi's patch tools/env:
cleanup host build flags and that worked for me.

Steve
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] tools/env: use host build flags

2010-09-12 Thread Wolfgang Denk
Dear Mike Frysinger,

In message 1281845002-26525-4-git-send-email-vap...@gentoo.org you wrote:
 Convert the tools/env/Makefile to use the same host tool syntax as the
 other tool subdirs.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org
 ---
  tools/env/Makefile |6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)

Applied to next branch. 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: w...@denx.de
UNIX was not designed to stop you from doing stupid things,  because
that would also stop you from doing clever things.   - Doug Gwyn
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/4] tools/env: use host build flags

2010-08-14 Thread Mike Frysinger
Convert the tools/env/Makefile to use the same host tool syntax as the
other tool subdirs.

Signed-off-by: Mike Frysinger vap...@gentoo.org
---
 tools/env/Makefile |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/env/Makefile b/tools/env/Makefile
index 2df631e..f893040 100644
--- a/tools/env/Makefile
+++ b/tools/env/Makefile
@@ -26,16 +26,16 @@ include $(TOPDIR)/config.mk
 SRCS   := $(obj)crc32.c  fw_env.c  fw_env_main.c
 HEADERS:= fw_env.h
 
-CPPFLAGS := -Wall -DUSE_HOSTCC -I$(SRCTREE)/include
+HOSTCFLAGS += -Wall -DUSE_HOSTCC -I$(SRCTREE)/include
 
 ifeq ($(MTD_VERSION),old)
-CPPFLAGS += -DMTD_OLD
+HOSTCFLAGS += -DMTD_OLD
 endif
 
 all:   $(obj)fw_printenv
 
 $(obj)fw_printenv: $(SRCS) $(HEADERS)
-   $(CROSS_COMPILE)gcc $(CPPFLAGS) $(SRCS) -o $(obj)fw_printenv
+   $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $(SRCS)
 
 clean:
rm -f $(obj)fw_printenv $(obj)crc32.c
-- 
1.7.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot