Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp958573pxb; Fri, 13 Aug 2021 10:03:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/IWyvcS1zl7Sfw7aULTukcGpQoLuwjCQnwHosvl42FLSMr1psN1MxF4yb2HoWZqoYgHya X-Received: by 2002:a05:6638:37a9:: with SMTP id w41mr3243096jal.142.1628874227172; Fri, 13 Aug 2021 10:03:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628874227; cv=none; d=google.com; s=arc-20160816; b=zTKdL7W0ME+ZYP5v8+wPG6Ms5gsFME2WB3oaDGeEaHlZOMaV9p3e8izrvo4lrscLgL XQoPkcG6cisbhHd2AB4LstnOC32/Cykf/U5/xSmvtkDsiNinSNlazPrerVaOKuVWLQQX pFbjmKZrcza+O/yY2azjEwuV9MNDH5vRiRfXMfNkaA4ubrGm7SumupA9/WlRxrTQu/4G HZ72Br6F7mKVhRStUieJ6Rrwq3nYytqP62oHZHgtXKeyvaYbgZbKtzVnrLi2ry4Z7wGb +gBNNRKEjbMxoT2ZuUbuh8pGrY4feAJQ/QLqppyIcD17zlBolHtVWnPgiHWsQ3V0Cyma +7xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=O6Z++B4jlnt+8Zh9MI5tFr+UnW0dBB2Cix1c1U7evAk=; b=KOTr8vHVNPZ/MA8Pbe/FDifNSLnR+Rt2perUbnlpPZs3u02ihIy5XcGVWoUfE7QeA1 lBY5clyTGbFUTv/yyUHHfaDkyWzT1RSdesPqhrqXFva5c6sAAncfkdotQijkM0GLg90g jIqSlTdavCMf2jGnuDWHdr5airu+b12dmkGOMxWEHK8L9ClSt7X85ML7jPbwunJWDsHc k5mXq8oompu+G5T0psRPLC8kQ3gSBMkRBSPc7KkjT+MdLkeYSaets0NkFAWXotvYfXkm c+XvcP4C9rx86fadY+iiJdkFXiL6PySpeQPq7Oei+4cHYC47uWqSZrkL634ZTYWAINsI JIUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aWk8NBPb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o22si2397700jat.46.2021.08.13.10.03.35; Fri, 13 Aug 2021 10:03:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aWk8NBPb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241339AbhHMPJL (ORCPT + 99 others); Fri, 13 Aug 2021 11:09:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:51406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241252AbhHMPJA (ORCPT ); Fri, 13 Aug 2021 11:09:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 490FF610A5; Fri, 13 Aug 2021 15:08:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628867313; bh=yDPIGuMexPghYZNCHX3Fwg7l5cormIYMvgJIf8fu6XE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aWk8NBPbE7Lm/EUlXgJDerMSHEQIsqse16F+imMXpzmD+FmgmNCJo7MG2pPixV3gv 5VINLdGAgDaHLKxD6PampiPi072Ov0rsROjon4bvjqxg1aLDGbapJnYOyJqe+LsGIV 6/KajDVo98unJ73f+4jNEzCXFBhbrBBxJSqTTlUU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "H. Nikolaus Schaller" , Masahiro Yamada , Sasha Levin Subject: [PATCH 4.4 05/25] mips: Fix non-POSIX regexp Date: Fri, 13 Aug 2021 17:06:29 +0200 Message-Id: <20210813150520.905190010@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210813150520.718161915@linuxfoundation.org> References: <20210813150520.718161915@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: H. Nikolaus Schaller [ Upstream commit 28bbbb9875a35975904e46f9b06fa689d051b290 ] When cross compiling a MIPS kernel on a BSD based HOSTCC leads to errors like SYNC include/config/auto.conf.cmd - due to: .config egrep: empty (sub)expression UPD include/config/kernel.release HOSTCC scripts/dtc/dtc.o - due to target missing It turns out that egrep uses this egrep pattern: (|MINOR_|PATCHLEVEL_) This is not valid syntax or gives undefined results according to POSIX 9.5.3 ERE Grammar https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html It seems to be silently accepted by the Linux egrep implementation while a BSD host complains. Such patterns can be replaced by a transformation like "(|p1|p2)" -> "(p1|p2)?" Fixes: 48c35b2d245f ("[MIPS] There is no __GNUC_MAJOR__") Signed-off-by: H. Nikolaus Schaller Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- arch/mips/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 252e347958f3..ca010bce5d65 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -269,7 +269,7 @@ LDFLAGS += -m $(ld-emul) ifdef CONFIG_MIPS CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \ - egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \ + egrep -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \ sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g') ifdef CONFIG_64BIT CHECKFLAGS += -m64 -- 2.30.2