mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
ppc: Check for compilers that don't support relocation
Certain ppc compilers are known not to generate the .fixup section properly. The .fixup section is necessary to create a relocatable U-Boot image. A basic check for the existence of the .fixup section should hopefully catch the majority of broken compilers which don't support relocation. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
This commit is contained in:
parent
858290178f
commit
2446151974
1 changed files with 6 additions and 0 deletions
|
@ -42,6 +42,12 @@ SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
|
|||
OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
|
||||
|
||||
$(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;
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS)
|
||||
|
||||
#########################################################################
|
||||
|
|
Loading…
Reference in a new issue