Commit a0588015 authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt

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: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent de577a35
...@@ -36,17 +36,26 @@ KBUILD_DEFCONFIG := ppc64_defconfig ...@@ -36,17 +36,26 @@ KBUILD_DEFCONFIG := ppc64_defconfig
endif endif
ifeq ($(CONFIG_PPC64),y) 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) new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi)
ifeq ($(new_nm),y) ifeq ($(new_nm),y)
NM := $(NM) --synthetic NM := $(NM) --synthetic
endif 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 else
OLDARCH := ppc OLDARCH := ppc
endif endif
endif
# It seems there are times we use this Makefile without # It seems there are times we use this Makefile without
# including the config file, but this replicates the old behaviour # including the config file, but this replicates the old behaviour
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment