From patchwork Fri Mar 16 16:34:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 147220 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 E7B22B6EE8 for ; Sat, 17 Mar 2012 03:34:53 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AE6FE281FB; Fri, 16 Mar 2012 17:34:51 +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 zuV+R9U00uy7; Fri, 16 Mar 2012 17:34:51 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 87C4B281DF; Fri, 16 Mar 2012 17:34:49 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 47C90281DF for ; Fri, 16 Mar 2012 17:34:45 +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 zl3KAOdjiLLz for ; Fri, 16 Mar 2012 17:34:44 +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 mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by theia.denx.de (Postfix) with ESMTPS id B0FE9281D5 for ; Fri, 16 Mar 2012 17:34:41 +0100 (CET) Received: by dakl33 with SMTP id l33so6450967dak.3 for ; Fri, 16 Mar 2012 09:34:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=6i+wiouOsJWV5klD+9ZlPYLX65PFgwMRobgDSpf5R8c=; b=tk0r0Gx8k1iY1YH/aiZema/DFq5nfBYMwuMm5OLCcATOneZ98fpasPHg9oHqd3SDNV PdL9gXKyCxLeJJ687RrlzYrS9kYXmw7CNW85JSG7oAyzsj0IQav5iIhLy7j6VCi0KFus 2eERljOT4hodKKl59Vt69lCH2LXiDq7FOGOKUGhg7niVzT4BlH8n4FSN91ijHIKPr3Cb ebN4p8NKLHgne6D4JWXa6oiNdAG12j1M78wA6cNPZtL7ktX1vUpWpjMSFBZf3mS0mnQD P1ufTBbV5sQmRKwXc+v972XlBQusR+bf/4HZ9ARCC3F8mjqgAI5ra8mLZ2J9uOVBzAXw 3IBg== Received: by 10.68.234.41 with SMTP id ub9mr16098174pbc.106.1331915680121; Fri, 16 Mar 2012 09:34:40 -0700 (PDT) Received: from localhost.localdomain (ip68-230-54-74.ph.ph.cox.net. [68.230.54.74]) by mx.google.com with ESMTPS id f5sm4630899pbe.26.2012.03.16.09.34.39 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 16 Mar 2012 09:34:39 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Fri, 16 Mar 2012 09:34:35 -0700 Message-Id: <1331915675-25541-1-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1331911668-22107-2-git-send-email-trini@ti.com> References: <1331911668-22107-2-git-send-email-trini@ti.com> Subject: [U-Boot] [PATCH v2] Makefile: Add a 'checkthumb' rule 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 This rule confirms that if we're on ARM and we have enabled THUMB builds that we have a new enough toolchain to produce a working binary. Changes in v2: - Switch to ALL-$(CONFIG_SYS_THUMB_BUILD) in arch/arm/config.mk (Mike F) - Simplfy checkthumb test after doing the above Signed-off-by: Tom Rini Acked-by: Mike Frysinger --- Makefile | 7 +++++++ arch/arm/config.mk | 1 + 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index 11aac21..5af4ced 100644 --- a/Makefile +++ b/Makefile @@ -548,6 +548,13 @@ SYSTEM_MAP = \ $(obj)System.map: $(obj)u-boot @$(call SYSTEM_MAP,$<) > $(obj)System.map +checkthumb: + @if test $(call cc-version) -lt 0404; then \ + echo -n '*** Your GCC does not produce working '; \ + echo 'binaries in THUMB mode.'; \ + echo '*** Your board is configured for THUMB mode.'; \ + false; \ + fi # # Auto-generate the autoconf.mk file (which is included by all makefiles) # diff --git a/arch/arm/config.mk b/arch/arm/config.mk index d4fa1f8..367baa2 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -43,6 +43,7 @@ else PF_CPPFLAGS_ARM := $(call cc-option,-marm,) \ $(call cc-option,-mno-thumb-interwork,) endif +ALL-$(CONFIG_SYS_THUMB_BUILD) += checkthumb # Try if EABI is supported, else fall back to old API, # i. e. for example: