[U-Boot-Users] [patch] drop special case for ppc hosts

for some reason there's a special case for ppc HOSTARCH's when setting up the default CROSS_COMPILE value ... this messes up my default env builds when going between my x86/amd64/ppc dev hosts ;)
attached patch simply drops this special case handling -mike

Dear Mike,
in message 200701080332.57705.vapier@gentoo.org you wrote:
for some reason there's a special case for ppc HOSTARCH's when setting up the default CROSS_COMPILE value ... this messes up my default env builds when going between my x86/amd64/ppc dev hosts ;)
What exactly happens?
ifndef CROSS_COMPILE
... if CROSS_COMPILE is *NOT* set ...
-ifeq ($(HOSTARCH),ppc)
... and you are on a PPC host ...
-CROSS_COMPILE =
... then define CROSS_COMPILE as empty string, i. e. use the native PPC compiler.
This looks ok to me.
-else ifeq ($(ARCH),ppc) CROSS_COMPILE = powerpc-linux-
With your patch applies, we would use powerpc-linux-gcc even if we are on a PPC host; this may be wanted (in which case you should have CROSS_COMPILE set when running make, and the "ifndef CROSS_COMPILE" will not apply), but usually you want to run the native tools.
So what is your problem?
Best regards,
Wolfgang Denk

On Monday 08 January 2007 05:56, Wolfgang Denk wrote:
in message 200701080332.57705.vapier@gentoo.org you wrote:
for some reason there's a special case for ppc HOSTARCH's when setting up the default CROSS_COMPILE value ... this messes up my default env builds when going between my x86/amd64/ppc dev hosts ;)
What exactly happens?
on my ppc host, CROSS_COMPILE is set to "" by default
on my x86/amd64 host, CROSS_COMPILE is set to my target by default (bfin-uclinux- in my case)
... then define CROSS_COMPILE as empty string, i. e. use the native PPC compiler.
how does that make sense ? the logic is "if you are on a ppc host, then regardless of your target, use the native ppc compiler"
the logic on x86/amd64 is "if you are on a x86 host, then set the default CROSS_COMPILE based upon your target"
why should these two be different ? -mike

In message 200701080825.57752.vapier@gentoo.org you wrote:
... then define CROSS_COMPILE as empty string, i. e. use the native PPC compiler.
how does that make sense ? the logic is "if you are on a ppc host, then regardless of your target, use the native ppc compiler"
Argh.. of course you are right.
This is a remnant from the time when this was still called PPCBoot, i. e. when PPC was the only supported target architecture.
I think the test should be changed into
ifndef CROSS_COMPILE ifeq ($(HOSTARCH),$(ARCH)) CROSS_COMPILE = else ...
Then we can also drop the other special case, i. e. get rid of this:
ifeq ($(HOSTARCH),i386) CROSS_COMPILE = else
Does this work for you?
Best regards,
Wolfgang Denk

In message 200703061145.16718.vapier@gentoo.org you wrote:
I think the test should be changed into
ifndef CROSS_COMPILE ifeq ($(HOSTARCH),$(ARCH)) CROSS_COMPILE = else ...
patch attached to do this
Thanks, applied.
Best regards,
Wolfgang Denk
participants (2)
-
Mike Frysinger
-
Wolfgang Denk