summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorPeter Tyser <ptyser@xes-inc.com>2010-06-15 19:48:25 (GMT)
committerWolfgang Denk <wd@denx.de>2010-06-29 20:29:13 (GMT)
commit620bbba524fbaa26971a5004793010b169824f1b (patch)
tree3c80dc3a8bca2b3e819c1d6a238bdd16930792d7 /examples
parent3bf74a4183fdf32e9be2742594ed8199e626650c (diff)
downloadu-boot-620bbba524fbaa26971a5004793010b169824f1b.tar.xz
examples/standalone: Remove relocation compile flags for PowerPC
Previously, standalone applications were compiled with gcc flags that produced relocatable executables on the PowerPC architecture (eg with the -mrelocatable and -fPIC flags). There's no reason for these applications to be fully relocatable at this time since no relocation fixups are performed on standalone applications. Additionally, removing the gcc relocation flags results in the entry point of applications residing at the base of the image. When a standalone application was relocatable, the entry point was generally located at an offset into the image which was confusing and prone to errors. This change moves the entry point of PowerPC standalone applications from 0x40004 (usually) to 0x40000. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'examples')
-rw-r--r--examples/standalone/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile
index 6ea3b93..5f1f800 100644
--- a/examples/standalone/Makefile
+++ b/examples/standalone/Makefile
@@ -72,6 +72,16 @@ gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
CPPFLAGS += -I..
+# For PowerPC there's no need to compile standalone applications as a
+# relocatable executable. The relocation data is not needed, and
+# also causes the entry point of the standalone application to be
+# inconsistent.
+ifeq ($(ARCH),powerpc)
+AFLAGS := $(filter-out $(RELFLAGS),$(AFLAGS))
+CFLAGS := $(filter-out $(RELFLAGS),$(CFLAGS))
+CPPFLAGS := $(filter-out $(RELFLAGS),$(CPPFLAGS))
+endif
+
all: $(obj).depend $(OBJS) $(LIB) $(SREC) $(BIN) $(ELF)
#########################################################################