public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [RFC PATCH] kbuild: use "cc-cross-prefix" to choose CROSS_COMPILE
@ 2014-03-05  9:24 Masahiro Yamada
  2014-03-05 10:06 ` Detlev Zundel
  2014-03-05 13:37 ` Tom Rini
  0 siblings, 2 replies; 7+ messages in thread
From: Masahiro Yamada @ 2014-03-05  9:24 UTC (permalink / raw)
  To: u-boot

CROSS_COMPILE is generally passed from the command line
or by the environment variable because cross tools
vary from user to user.

But, having some choices of often used CROSS_COMPILE
seems reasonable.

$(call cc-cross-prefix, ...) returns the first prefix
where a prefix$(CC) is found in PATH.

If your cross tools exist in the argument of
$(call cc-cross-prefix, ...), you do not have to
specify it explicitly.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

My question is which cross tools are popular enough
to be added to the list.

In my opition, arm-linux-gnueabi-gcc is popular
because it is distributed in Ubuntu.

On the other hand, I am not sure ppc_8xx-gcc is currently
being used.

Which one should be to added/deleted to our default list.
Your comments are very welcome.
(I am not familiar with compilers very much.)


 arch/arm/config.mk        | 2 +-
 arch/microblaze/config.mk | 2 +-
 arch/powerpc/config.mk    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 792cb43..c5fd22f 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -6,7 +6,7 @@
 #
 
 ifeq ($(CROSS_COMPILE),)
-CROSS_COMPILE := arm-linux-
+CROSS_COMPILE := $(call cc-cross-prefix, arm-linux- arm-linux-gnueabi-)
 endif
 
 ifndef CONFIG_STANDALONE_LOAD_ADDR
diff --git a/arch/microblaze/config.mk b/arch/microblaze/config.mk
index cdb321a..dae74f8 100644
--- a/arch/microblaze/config.mk
+++ b/arch/microblaze/config.mk
@@ -9,7 +9,7 @@
 #
 
 ifeq ($(CROSS_COMPILE),)
-CROSS_COMPILE := mb-
+CROSS_COMPILE := $(call cc-cross-prefix, mb- microblaze-linux-)
 endif
 
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x80F00000
diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
index e398f97..ac94b2e 100644
--- a/arch/powerpc/config.mk
+++ b/arch/powerpc/config.mk
@@ -6,7 +6,7 @@
 #
 
 ifeq ($(CROSS_COMPILE),)
-CROSS_COMPILE := ppc_8xx-
+CROSS_COMPILE := $(call cc-cross-prefix, ppc_8xx- powerpc-linux-)
 endif
 
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-03-12  5:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-05  9:24 [U-Boot] [RFC PATCH] kbuild: use "cc-cross-prefix" to choose CROSS_COMPILE Masahiro Yamada
2014-03-05 10:06 ` Detlev Zundel
2014-03-05 10:27   ` Masahiro Yamada
2014-03-05 10:38     ` Detlev Zundel
2014-03-05 21:45     ` Gerhard Sittig
2014-03-05 13:37 ` Tom Rini
2014-03-12  5:47   ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox