summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/Makefile
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2013-09-23 12:04:53 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-10-11 16:48:41 +1100
commita0588015deab1844261b27a67ae6f5b910fe2830 (patch)
treeb6defefc61390a331344d3c40b91b7b6d61f81f8 /arch/powerpc/Makefile
parentde577a356848a629b2c7f252ca3d1bc87375b52b (diff)
downloadlinux-a0588015deab1844261b27a67ae6f5b910fe2830.tar.gz
linux-a0588015deab1844261b27a67ae6f5b910fe2830.tar.bz2
linux-a0588015deab1844261b27a67ae6f5b910fe2830.zip
powerpc: uname should return ppc64le/ppcle on little endian builds
We need to distinguish between big endian and little endian environments, so fix uname to return the right thing. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/Makefile')
-rw-r--r--arch/powerpc/Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 51cfb78d4061..debfa2b1c1de 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -36,17 +36,26 @@ KBUILD_DEFCONFIG := ppc64_defconfig
endif
ifeq ($(CONFIG_PPC64),y)
-OLDARCH := ppc64
-
new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi)
ifeq ($(new_nm),y)
NM := $(NM) --synthetic
endif
+endif
+ifeq ($(CONFIG_PPC64),y)
+ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
+OLDARCH := ppc64le
+else
+OLDARCH := ppc64
+endif
+else
+ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
+OLDARCH := ppcle
else
OLDARCH := ppc
endif
+endif
# It seems there are times we use this Makefile without
# including the config file, but this replicates the old behaviour