2011-04-24 21:11:43

by Peter Foley

[permalink] [raw]
Subject: [PATCH] arch: blackfin: use cc-cross-prefix to set CROSS_COMPILE

This patch updates the blackfin Makefile to use cc-cross-prefix
to only set CROSS_COMPILE if bfin-uclinux-gcc exists.

Signed-off-by: Peter Foley <[email protected]>
---
arch/blackfin/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile
index 46f42b2..3f47d26 100644
--- a/arch/blackfin/Makefile
+++ b/arch/blackfin/Makefile
@@ -7,7 +7,7 @@
#

ifeq ($(CROSS_COMPILE),)
-CROSS_COMPILE := bfin-uclinux-
+CROSS_COMPILE := $(call cc-cross-prefix, bfin-uclinux-)
endif
LDFLAGS_vmlinux := -X
OBJCOPYFLAGS := -O binary -R .note -R .comment -S
--
1.7.5.rc1


2011-04-24 21:20:07

by Mike Frysinger

[permalink] [raw]
Subject: Re: [PATCH] arch: blackfin: use cc-cross-prefix to set CROSS_COMPILE

On Sun, Apr 24, 2011 at 17:10, Peter Foley wrote:
> This patch updates the blackfin Makefile to use cc-cross-prefix
> to only set CROSS_COMPILE if bfin-uclinux-gcc exists.

i'm not sure this is useful. if bfin-uclinux- doesnt exist, it's
going to use the native gcc, and there is no native gcc for Blackfin
targets (since it's a nommu arch). getting a missing bfin-uclinux-gcc
error is a lot more useful than the native compiler rejecting Blackfin
insns.
-mike

2011-04-24 21:32:28

by Peter Foley

[permalink] [raw]
Subject: Re: [PATCH] arch: blackfin: use cc-cross-prefix to set CROSS_COMPILE

On 4/24/2011 5:19 PM, Mike Frysinger wrote:
> On Sun, Apr 24, 2011 at 17:10, Peter Foley wrote:
>> This patch updates the blackfin Makefile to use cc-cross-prefix
>> to only set CROSS_COMPILE if bfin-uclinux-gcc exists.
>
> i'm not sure this is useful. if bfin-uclinux- doesnt exist, it's
> going to use the native gcc, and there is no native gcc for Blackfin
> targets (since it's a nommu arch). getting a missing bfin-uclinux-gcc
> error is a lot more useful than the native compiler rejecting Blackfin
> insns.
> -mike

Okay, that makes sense.

Peter