arm64: big-endian: add big-endian support to top-level arch Makefile
authorWill Deacon <will.deacon@arm.com>
Fri, 11 Oct 2013 13:52:08 +0000 (14:52 +0100)
committerVictor Kamensky <victor.kamensky@linaro.org>
Fri, 14 Mar 2014 01:26:00 +0000 (18:26 -0700)
This patch adds big-endian support to the AArch64 top-level Makefile.
This currently just passes the relevant flags to the toolchain and is
predicated on a Kconfig option that will be introduced later on.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit a0974e6e217aead196033d72f898e2acb575304d)

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
arch/arm64/Makefile

index c95c5cb212fd65b49f3fe801466fae90ea2f6739..3a926eb93c9507464478172c2c8eff85407eefee 100644 (file)
@@ -20,9 +20,15 @@ LIBGCC               := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
 KBUILD_DEFCONFIG := defconfig
 
 KBUILD_CFLAGS  += -mgeneral-regs-only
+ifeq ($(CONFIG_CPU_BIG_ENDIAN), y)
+KBUILD_CPPFLAGS        += -mbig-endian
+AS             += -EB
+LD             += -EB
+else
 KBUILD_CPPFLAGS        += -mlittle-endian
 AS             += -EL
 LD             += -EL
+endif
 
 comma = ,