From patchwork Mon Mar 14 13:27:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aneesh V X-Patchwork-Id: 86741 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 6107AB6F7B for ; Tue, 15 Mar 2011 00:27:32 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 05D692816D; Mon, 14 Mar 2011 14:27:26 +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 11WCjPwNWgY8; Mon, 14 Mar 2011 14:27:25 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 31B8128164; Mon, 14 Mar 2011 14:27:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5105828157 for ; Mon, 14 Mar 2011 14:27:13 +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 zD0Yj9ZJikUt for ; Mon, 14 Mar 2011 14:27:10 +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 devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by theia.denx.de (Postfix) with ESMTPS id 2344528159 for ; Mon, 14 Mar 2011 14:27:08 +0100 (CET) Received: from dbdp31.itg.ti.com ([172.24.170.98]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p2EDR1Jw012094 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 14 Mar 2011 08:27:03 -0500 Received: from localhost (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p2EDQv96025474; Mon, 14 Mar 2011 18:56:58 +0530 (IST) From: Aneesh V To: u-boot@lists.denx.de Date: Mon, 14 Mar 2011 18:57:37 +0530 Message-Id: <1300109258-12496-1-git-send-email-aneesh@ti.com> X-Mailer: git-send-email 1.7.0.4 Cc: loic.minier@linaro.org, steve@sakoman.com Subject: [U-Boot] [RFC PATCH 1/2] armv7: enable Thumb build for armv7 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 Signed-off-by: Aneesh V --- README | 9 +++++++++ arch/arm/cpu/armv7/config.mk | 5 +++++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/README b/README index f1547a4..ff3a345 100644 --- a/README +++ b/README @@ -370,6 +370,15 @@ The following options need to be configured: 2. The core frequency as calculated above is multiplied by this value. +- ARM Options: + CONFIG_SYS_THUMB_BUILD + + Use this flag to build U-Boot using the Thumb instruction + set for ARM architectures. Thumb instruction set provides + better code density. For ARM architectures that support + Thumb2 this flag will result in Thumb2 code generated by + GCC. + - Linux Kernel Interface: CONFIG_CLOCKS_IN_MHZ diff --git a/arch/arm/cpu/armv7/config.mk b/arch/arm/cpu/armv7/config.mk index 49ac9c7..b7bebad 100644 --- a/arch/arm/cpu/armv7/config.mk +++ b/arch/arm/cpu/armv7/config.mk @@ -31,3 +31,8 @@ PLATFORM_CPPFLAGS += -march=armv5 # ========================================================================= PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,\ $(call cc-option,-malignment-traps,)) + +ifeq ($(CONFIG_SYS_THUMB_BUILD),y) +# Enable Thumb mode build if compiler supports it +PLATFORM_CPPFLAGS += $(call cc-option,-mthumb -mthumb-interwork) +endif