diff mbox

[U-Boot,1/2] kbuild: move "checkthumb" to ARM archprepare

Message ID 1394009363-21833-2-git-send-email-yamada.m@jp.panasonic.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Masahiro Yamada March 5, 2014, 8:49 a.m. UTC
"checkthumb" makes sense only for ARM architecture.
Move it to arch/arm/config.mk.

To make sure gcc supports THUMB mode before beginning build,
run "checkthumb" during "archprepare".

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

 Makefile           |  8 --------
 arch/arm/config.mk | 12 +++++++++++-
 2 files changed, 11 insertions(+), 9 deletions(-)

Comments

Simon Glass March 7, 2014, 10:20 p.m. UTC | #1
On 5 March 2014 01:49, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> "checkthumb" makes sense only for ARM architecture.
> Move it to arch/arm/config.mk.
>
> To make sure gcc supports THUMB mode before beginning build,
> run "checkthumb" during "archprepare".
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Acked-by: Simon Glass <sjg@chromium.org>
Tom Rini March 7, 2014, 10:29 p.m. UTC | #2
On Wed, Mar 05, 2014 at 05:49:22PM +0900, Masahiro Yamada wrote:

> "checkthumb" makes sense only for ARM architecture.
> Move it to arch/arm/config.mk.
> 
> To make sure gcc supports THUMB mode before beginning build,
> run "checkthumb" during "archprepare".
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 6882d10..7ed2d97 100644
--- a/Makefile
+++ b/Makefile
@@ -1114,14 +1114,6 @@  SYSTEM_MAP = \
 System.map:	u-boot
 		@$(call 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
-
 # GCC 3.x is reported to have problems generating the type of relocation
 # that U-Boot wants.
 # See http://lists.denx.de/pipermail/u-boot/2012-September/135156.html
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index c5fd22f..be9e4c7 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -41,7 +41,17 @@  endif
 
 # Only test once
 ifneq ($(CONFIG_SPL_BUILD),y)
-ALL-$(CONFIG_SYS_THUMB_BUILD)	+= checkthumb
+ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
+archprepare: checkthumb
+
+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
+endif
 endif
 
 # Try if EABI is supported, else fall back to old API,