From patchwork Mon Mar 17 08:53:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 330791 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 32E4B2C00CB for ; Mon, 17 Mar 2014 19:55:47 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D27D64B601; Mon, 17 Mar 2014 09:55:39 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xMWBSAP0gflg; Mon, 17 Mar 2014 09:55:39 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5FE454B664; Mon, 17 Mar 2014 09:54:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0F11F4B5D3 for ; Mon, 17 Mar 2014 09:53:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ry7ztJjl5Zvb for ; Mon, 17 Mar 2014 09:53:51 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by theia.denx.de (Postfix) with ESMTP id DDB5F4B5E9 for ; Mon, 17 Mar 2014 09:53:36 +0100 (CET) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile11) with ESMTP id s2H8rMDP024260; Mon, 17 Mar 2014 17:53:22 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili17) with ESMTP id s2H8rN311990; Mon, 17 Mar 2014 17:53:23 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi14) id s2H8rN6Y008604; Mon, 17 Mar 2014 17:53:23 +0900 Received: from poodle by lomi14.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s2H8rMOt008529; Mon, 17 Mar 2014 17:53:22 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id C8FA82740043; Mon, 17 Mar 2014 17:53:22 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 17 Mar 2014 17:53:12 +0900 Message-Id: <1395046392-1212-18-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1395046392-1212-1-git-send-email-yamada.m@jp.panasonic.com> References: <1395046392-1212-1-git-send-email-yamada.m@jp.panasonic.com> Cc: Tom Rini Subject: [U-Boot] [RFC PATCH 17/17] kconfig: add CONFIG_CROSS_COMPILE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Copy from Linux Kernel (with a few adjustments in comments). Signed-off-by: Masahiro Yamada --- Kconfig | 9 +++++++++ Makefile | 20 ++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/Kconfig b/Kconfig index 4e383d2..1bf488e 100644 --- a/Kconfig +++ b/Kconfig @@ -41,6 +41,15 @@ config TPL prompt "Build TPL image" if !SPL_BUILD default y if TPL_BUILD +config CROSS_COMPILE + string "Cross-compiler tool prefix" + depends on !SPL_BUILD + help + Same as running 'make CROSS_COMPILE=prefix-' but stored for + default make runs in this U-Boot build directory. You don't + need to set this unless you want the configured U-Boot build + directory to select the cross-compiler automatically. + endmenu # General setup source "arch/Kconfig" diff --git a/Makefile b/Makefile index 8953922..440defd 100644 --- a/Makefile +++ b/Makefile @@ -188,12 +188,20 @@ HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \ export HOSTARCH HOSTOS -######################################################################### - -# set default to nothing for native builds -ifeq ($(HOSTARCH),$(ARCH)) -CROSS_COMPILE ?= -endif +# Cross compiling and selecting different set of gcc/bin-utils +# --------------------------------------------------------------------------- +# +# CROSS_COMPILE specify the prefix used for all executables used +# during compilation. Only gcc and related bin-utils executables +# are prefixed with $(CROSS_COMPILE). +# CROSS_COMPILE can be set on the command line +# make CROSS_COMPILE=ia64-linux- +# Alternatively CROSS_COMPILE can be set in the environment. +# A third alternative is to store a setting in .config so that plain +# "make" in the configured kernel build directory always uses that. +# Default value for CROSS_COMPILE is not to prefix executables +# Note: Some architectures assign CROSS_COMPILE in their arch/*/config.mk +CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%) KCONFIG_CONFIG ?= .config export KCONFIG_CONFIG