summaryrefslogtreecommitdiff
path: root/arch/powerpc/lib/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/lib/Makefile')
-rw-r--r--arch/powerpc/lib/Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 5f85502..2065b6d 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -40,6 +40,19 @@ COBJS-y += interrupts.o
COBJS-$(CONFIG_CMD_KGDB) += kgdb.o
COBJS-y += time.o
+# Workaround for local bus unaligned access problems
+# on MPC512x and MPC5200
+ifdef CONFIG_MPC512X
+$(obj)ppcstring.o: AFLAGS += -Dmemcpy=__memcpy
+COBJS-y += memcpy_mpc5200.o
+endif
+ifdef CONFIG_MPC5200
+$(obj)ppcstring.o: AFLAGS += -Dmemcpy=__memcpy
+COBJS-y += memcpy_mpc5200.o
+endif
+
+COBJS += $(sort $(COBJS-y))
+
SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))