ppc476: Enable a linker work around for IBM errata #46
[firefly-linux-kernel-4.4.55.git] / arch / powerpc / Makefile
index 4c0cedf4e2c7dda768378223deb024c03a94b7c9..31b96942c0a79c081a4e383a9cf41821898a3105 100644 (file)
@@ -159,6 +159,11 @@ CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)
 
 KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
 
+ifeq ($(CONFIG_476FPE_ERR46),y)
+       KBUILD_LDFLAGS_MODULE += --ppc476-workaround \
+               -T $(srctree)/arch/powerpc/platforms/44x/ppc476_modules.lds
+endif
+
 # No AltiVec or VSX instructions when building kernel
 KBUILD_CFLAGS += $(call cc-option,-mno-altivec)
 KBUILD_CFLAGS += $(call cc-option,-mno-vsx)