Subject: [PATCH] powerpc/boot: Specify ABI v2 when building an LE boot wrapper

From: Benjamin Herrenschmidt <[email-masked]>
Date: Tue, 15 Sep 2015 11:24:17 +1000

The kernel does it, not the boot wrapper, which breaks with some
cross compilers that still default to ABI v1.

Signed-off-by: Benjamin Herrenschmidt <[email-masked]>
CC: [email-masked]
--

diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 73eddda..4eec430 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -28,6 +28,9 @@ BOOTCFLAGS	+= -m64
 endif
 ifdef CONFIG_CPU_BIG_ENDIAN
 BOOTCFLAGS	+= -mbig-endian
+else
+BOOTCFLAGS	+= -mlittle-endian
+BOOTCFLAGS	+= $(call cc-option,-mabi=elfv2)
 endif
 
 BOOTAFLAGS	:= -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc