diff options
author | Peter Tyser <ptyser@xes-inc.com> | 2009-09-21 11:20:26 -0500 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-10-03 10:15:45 +0200 |
commit | 244615197469dd6fe75ae082f38424b97c79aeaf (patch) | |
tree | 0782128ef42c872494c3caa0d61c8ce6d2045dce /lib_ppc | |
parent | 858290178f222d998b6425d85cf06822467918f3 (diff) | |
download | u-boot-midas-244615197469dd6fe75ae082f38424b97c79aeaf.tar.gz u-boot-midas-244615197469dd6fe75ae082f38424b97c79aeaf.tar.bz2 u-boot-midas-244615197469dd6fe75ae082f38424b97c79aeaf.zip |
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>
Diffstat (limited to 'lib_ppc')
-rw-r--r-- | lib_ppc/Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib_ppc/Makefile b/lib_ppc/Makefile index 60ea0c9139..399b41e31e 100644 --- a/lib_ppc/Makefile +++ b/lib_ppc/Makefile @@ -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) ######################################################################### |