Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3759367pxt; Tue, 10 Aug 2021 10:39:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyo597NsBCNofVU84jc+7lqFaVt6RcyNqlH253LXWuC9X1cZ7e7NmlkC0SnVpssefakV5Rq X-Received: by 2002:a17:906:3c45:: with SMTP id i5mr14979390ejg.336.1628617167023; Tue, 10 Aug 2021 10:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617167; cv=none; d=google.com; s=arc-20160816; b=Aw7Hj6i1XVPEgjZnW40Q/9arfv6wuZrE2pIyMhElCVhwIaSRC+objTuor+QKt+GFi4 TI2OQTdXvzV/3B/TP4J5nKNiR3Lavh6/S60z19WGal6mu5CzY+zl5C9AgINNnaAzLzWd ffCaExAKHBu9SxXrVcvMfNIlaozb+vxsYDEgfHt3G9LU4jPaJLRpLxgUq1bFzjNlYm+2 LHa3/ZhfYrpyI6xfuMb0UtzovOBm8fXTlBvNBJzab1dXACr668xFDgJIF9KhlH2zV/9P YKWTs6iHasTnWwRITpH6W/DFbYb/2Cb/mwJ9vS4fYUtbcSkaJg+hIDtdqQqM7PB0LU9Z W+3Q== 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=As4c++SBJExq6/902CyYNNfKNBvAm52x+y6pP/z/xTU=; b=gNjQCLqF7C3BIojBDHnNynk7Tf7euGVUnc3ci4cB6n+DzMeAi09cLcbJ13Ye5uFQyF 8kROxmJ78RIf5315XgIU14SgUZ1ADr3ASyi3DPtu0N5vyTqB7F4N4fKmvPuRNx+LbfoN IWrWJ7gpQFzb/L6dASpi+LtOVBoSIYfw1Zz/2EaLg8mI18efxrQb1pD8wAOck3X6b2/4 GQ+Ifez8vkEDTSqk5hAl4U/Y1bx42Q3kBkg0qeMsKpFZNHuTGaOVhcunT4k6ALOw2PvZ wxbXw01CkwTbgX05ui3GboTAykh9/d9DT05S5TAs8xYXP8FOjQVuaoldpr5Oo5FWNtDy DBNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oNtGTFUK; 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 h29si20601160edz.349.2021.08.10.10.39.02; Tue, 10 Aug 2021 10:39:27 -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=oNtGTFUK; 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 S233315AbhHJRgQ (ORCPT + 99 others); Tue, 10 Aug 2021 13:36:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:33340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233151AbhHJRew (ORCPT ); Tue, 10 Aug 2021 13:34:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D7D32610A8; Tue, 10 Aug 2021 17:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628616870; bh=hUNZlVuOy/RNHlH250TGXEh9nB8tVl29TK3jqQjXNIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oNtGTFUKEQIxdu1BcRXRDj5lSFWJmjZ3P/Ez5PDVCMWMwavRa8jyNFy9or++wI6n4 MdD+ENwnEQJr3sbjeYVqK60AqCgIWp875c0UmHcw3GJAyGrfHfW45JJ1bFjLZbAxM7 Ljn9Ddc63qw4rt8lMbDqdbo0LrbGJj7Rmk6PzoFc= 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 5.4 29/85] mips: Fix non-POSIX regexp Date: Tue, 10 Aug 2021 19:30:02 +0200 Message-Id: <20210810172949.191453405@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172948.192298392@linuxfoundation.org> References: <20210810172948.192298392@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 5403a91ce098..9ff2c70763a0 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -320,7 +320,7 @@ KBUILD_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') endif -- 2.30.2