kernel.mk: Refactor LINUX_KARCH affectation

Switch to a dumber implementation that will be easier to maintain in the long
run, with only if statements instead of having nested subst calls.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

SVN-Revision: 43671
This commit is contained in:
Felix Fietkau 2014-12-12 18:28:03 +00:00
parent d7b4bf8966
commit fb5e8d203b

View file

@ -64,13 +64,20 @@ endif
ifneq (,$(findstring uml,$(BOARD))) ifneq (,$(findstring uml,$(BOARD)))
LINUX_KARCH=um LINUX_KARCH=um
else ifneq (,$(findstring $(ARCH), aarch64 aarch64_be))
LINUX_KARCH := arm64
else ifneq (,$(findstring $(ARCH), armeb))
LINUX_KARCH := arm
else ifneq (,$(findstring $(ARCH), mipsel mips64 mips64el))
LINUX_KARCH := mips
else ifneq (,$(findstring $(ARCH), sh2 sh3 sh4))
LINUX_KARCH := sh
else ifneq (,$(findstring $(ARCH), i386))
LINUX_KARCH := x86
else else
ifeq (,$(LINUX_KARCH)) LINUX_KARCH := $(ARCH)
LINUX_KARCH=$(strip $(subst i386,x86,$(subst armeb,arm,$(subst mipsel,mips,$(subst mips64,mips,$(subst mips64el,mips,$(subst sh2,sh,$(subst sh3,sh,$(subst sh4,sh,$(subst aarch64,arm64,$(subst aarch64_be,arm64,$(ARCH))))))))))))
endif
endif endif
define KernelPackage/Defaults define KernelPackage/Defaults
FILES:= FILES:=
AUTOLOAD:= AUTOLOAD:=