diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 9c78ef298257..cbc7c05a6165 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -29,11 +29,10 @@ endif export CROSS32CC CROSS32AR -ifeq ($(CROSS_COMPILE),) -KBUILD_DEFCONFIG := $(shell uname -m)_defconfig -else -KBUILD_DEFCONFIG := ppc64_defconfig -endif +# If we're on a ppc/ppc64/ppc64le machine use that defconfig, otherwise just use +# ppc64_defconfig because we have nothing better to go on. +uname := $(shell uname -m) +KBUILD_DEFCONFIG := $(if $(filter ppc%,$(uname)),$(uname),ppc64)_defconfig ifeq ($(CONFIG_PPC64),y) new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi)