Commit 06a119a03147aec3cf1fe746a6ef0aa1c66e7e72

Authored by Tom Rini
Committed by Albert ARIBAUD
1 parent 19a695f84b

Makefile: Add a 'checkthumb' rule

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 <trini@ti.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>

Showing 2 changed files with 12 additions and 0 deletions Side-by-side Diff

... ... @@ -556,6 +556,13 @@
556 556 $(obj)System.map: $(obj)u-boot
557 557 @$(call SYSTEM_MAP,$<) > $(obj)System.map
558 558  
  559 +checkthumb:
  560 + @if test $(call cc-version) -lt 0404; then \
  561 + echo -n '*** Your GCC does not produce working '; \
  562 + echo 'binaries in THUMB mode.'; \
  563 + echo '*** Your board is configured for THUMB mode.'; \
  564 + false; \
  565 + fi
559 566 #
560 567 # Auto-generate the autoconf.mk file (which is included by all makefiles)
561 568 #
... ... @@ -44,6 +44,11 @@
44 44 $(call cc-option,-mno-thumb-interwork,)
45 45 endif
46 46  
  47 +# Only test once
  48 +ifneq ($(CONFIG_SPL_BUILD),y)
  49 +ALL-$(CONFIG_SYS_THUMB_BUILD) += checkthumb
  50 +endif
  51 +
47 52 # Try if EABI is supported, else fall back to old API,
48 53 # i. e. for example:
49 54 # - with ELDK 4.2 (EABI supported), use: