mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-20 22:21:41 +00:00
powerpc: change .fixup test to a GCC version test
This was introduced by commit 2446151974
, but it
fails in a minimal SPL build where the only thing in arch/powerpc/lib is
cache.c, which apparently doesn't generate any fixup records.
The problem is reported to occur with GCC 3.x, so insist on GCC 4.0 or newer.
Patterned after checkthumb as suggested by Tom Rini.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Tom Rini <trini@ti.com>
--
v2: test gcc version instead of testing nothing
This commit is contained in:
parent
ca2fca2235
commit
6ec63f411e
3 changed files with 15 additions and 6 deletions
10
Makefile
10
Makefile
|
@ -643,6 +643,16 @@ checkthumb:
|
||||||
echo '*** Your board is configured for THUMB mode.'; \
|
echo '*** Your board is configured for THUMB mode.'; \
|
||||||
false; \
|
false; \
|
||||||
fi
|
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
|
||||||
|
checkgcc4:
|
||||||
|
@if test $(call cc-version) -lt 0400; then \
|
||||||
|
echo -n '*** Your GCC is too old, please upgrade to GCC 4.x or newer'; \
|
||||||
|
false; \
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Auto-generate the autoconf.mk file (which is included by all makefiles)
|
# Auto-generate the autoconf.mk file (which is included by all makefiles)
|
||||||
#
|
#
|
||||||
|
|
|
@ -42,3 +42,8 @@ endif
|
||||||
ifeq ($(CROSS_COMPILE),powerpc-openbsd-)
|
ifeq ($(CROSS_COMPILE),powerpc-openbsd-)
|
||||||
PLATFORM_CPPFLAGS+= -D__PPC__
|
PLATFORM_CPPFLAGS+= -D__PPC__
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Only test once
|
||||||
|
ifneq ($(CONFIG_SPL_BUILD),y)
|
||||||
|
ALL-y += checkgcc4
|
||||||
|
endif
|
||||||
|
|
|
@ -75,12 +75,6 @@ TARGETS += $(LIB)
|
||||||
all: $(TARGETS)
|
all: $(TARGETS)
|
||||||
|
|
||||||
$(LIB): $(obj).depend $(OBJS)
|
$(LIB): $(obj).depend $(OBJS)
|
||||||
@if ! $(CROSS_COMPILE)readelf -S $(OBJS) | grep -q '\.fixup.*PROGBITS';\
|
|
||||||
then \
|
|
||||||
echo "ERROR: Your compiler doesn't generate .fixup sections!";\
|
|
||||||
echo " Upgrade to a recent toolchain."; \
|
|
||||||
exit 1; \
|
|
||||||
fi;
|
|
||||||
$(call cmd_link_o_target, $(OBJS))
|
$(call cmd_link_o_target, $(OBJS))
|
||||||
|
|
||||||
$(LIBGCC): $(obj).depend $(LGOBJS)
|
$(LIBGCC): $(obj).depend $(LGOBJS)
|
||||||
|
|
Loading…
Add table
Reference in a new issue