Skip to content

Commit

Permalink
powerpc: uname should return ppc64le/ppcle on little endian builds
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Oct 11, 2013
1 parent de577a3 commit a058801
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions arch/powerpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a058801

Please sign in to comment.