Message ID | 1331911668-22107-2-git-send-email-trini@ti.com |
---|---|
State | Superseded |
Headers | show |
On Friday 16 March 2012 11:27:48 Tom Rini wrote: > --- a/Makefile > +++ b/Makefile > > # Explicitly make _depend in subdirs containing multiple targets to > prevent # parallel sub-makes creating .depend files simultaneously. > -depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \ > +depend dep: checkthumb $(TIMESTAMP_FILE) $(VERSION_FILE) \ > $(obj)include/autoconf.mk \ > $(obj)include/generated/generic-asm-offsets.h \ > $(obj)include/generated/asm-offsets.h > @@ -548,6 +548,15 @@ SYSTEM_MAP = \ > $(obj)System.map: $(obj)u-boot > @$(call SYSTEM_MAP,$<) > $(obj)System.map > > +checkthumb: > + @if test "$(ARCH)" = "arm" -a "$(CONFIG_SYS_THUMB_BUILD)" = "y"; then \ > + 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 ; \ > + fi couldn't you do: arch/arm/config.mk:ALL-$(CONFIG_SYS_THUMB_BUILD) += checkthumb -mike
On Fri, Mar 16, 2012 at 12:07:23PM -0400, Mike Frysinger wrote: > On Friday 16 March 2012 11:27:48 Tom Rini wrote: > > --- a/Makefile > > +++ b/Makefile > > > > # Explicitly make _depend in subdirs containing multiple targets to > > prevent # parallel sub-makes creating .depend files simultaneously. > > -depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \ > > +depend dep: checkthumb $(TIMESTAMP_FILE) $(VERSION_FILE) \ > > $(obj)include/autoconf.mk \ > > $(obj)include/generated/generic-asm-offsets.h \ > > $(obj)include/generated/asm-offsets.h > > @@ -548,6 +548,15 @@ SYSTEM_MAP = \ > > $(obj)System.map: $(obj)u-boot > > @$(call SYSTEM_MAP,$<) > $(obj)System.map > > > > +checkthumb: > > + @if test "$(ARCH)" = "arm" -a "$(CONFIG_SYS_THUMB_BUILD)" = "y"; then \ > > + 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 ; \ > > + fi > > couldn't you do: > arch/arm/config.mk:ALL-$(CONFIG_SYS_THUMB_BUILD) += checkthumb I thought I had tried that and it didn't work, but.. it does. Thanks.
diff --git a/Makefile b/Makefile index 11aac21..b7f5848 100644 --- a/Makefile +++ b/Makefile @@ -515,7 +515,7 @@ updater: # Explicitly make _depend in subdirs containing multiple targets to prevent # parallel sub-makes creating .depend files simultaneously. -depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \ +depend dep: checkthumb $(TIMESTAMP_FILE) $(VERSION_FILE) \ $(obj)include/autoconf.mk \ $(obj)include/generated/generic-asm-offsets.h \ $(obj)include/generated/asm-offsets.h @@ -548,6 +548,15 @@ SYSTEM_MAP = \ $(obj)System.map: $(obj)u-boot @$(call SYSTEM_MAP,$<) > $(obj)System.map +checkthumb: + @if test "$(ARCH)" = "arm" -a "$(CONFIG_SYS_THUMB_BUILD)" = "y"; then \ + 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 ; \ + fi # # Auto-generate the autoconf.mk file (which is included by all makefiles) #
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. Signed-off-by: Tom Rini <trini@ti.com> --- Makefile | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-)