From 935884df5dfe6bc939007783bd9c9338afe75577 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 2 Nov 2015 18:12:29 +0000 Subject: include/kernel.mk - better search for ARCH If "findstring" is used without leading and trailing spaces unexpected matches may happen. For example consider ARC=arc then "findstring $(ARCH)" will report a false match with "aarch64". But "findstring $ARCH " (note trailing space) will correctly skip matches for both "aarch64" and "aarch64_be". This patch is built-tested against NetGear WNDR3800. Signed-off-by: Alexey Brodkin Cc: Felix Fietkau Cc: Jo-Philipp Wich git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47359 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- include/kernel.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/kernel.mk b/include/kernel.mk index 7a0a170c35..6a613fe1fd 100644 --- a/include/kernel.mk +++ b/include/kernel.mk @@ -62,15 +62,15 @@ endif ifneq (,$(findstring uml,$(BOARD))) LINUX_KARCH=um -else ifneq (,$(findstring $(ARCH), aarch64 aarch64_be)) +else ifneq (,$(findstring $(ARCH) , aarch64 aarch64_be )) LINUX_KARCH := arm64 -else ifneq (,$(findstring $(ARCH), armeb)) +else ifneq (,$(findstring $(ARCH) , armeb )) LINUX_KARCH := arm -else ifneq (,$(findstring $(ARCH), mipsel mips64 mips64el)) +else ifneq (,$(findstring $(ARCH) , mipsel mips64 mips64el )) LINUX_KARCH := mips -else ifneq (,$(findstring $(ARCH), sh2 sh3 sh4)) +else ifneq (,$(findstring $(ARCH) , sh2 sh3 sh4 )) LINUX_KARCH := sh -else ifneq (,$(findstring $(ARCH), i386 x86_64)) +else ifneq (,$(findstring $(ARCH) , i386 x86_64 )) LINUX_KARCH := x86 else LINUX_KARCH := $(ARCH) -- cgit v1.2.3