Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3757496pxt; Tue, 10 Aug 2021 10:36:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvZy3eyfwgd/kMZPUXHMkZmILgxRIoxG6V9eB0ChJ06l4ysVL2ZhAviWd/y1xTl0VtZUNg X-Received: by 2002:a17:906:2c45:: with SMTP id f5mr28370053ejh.464.1628616991876; Tue, 10 Aug 2021 10:36:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628616991; cv=none; d=google.com; s=arc-20160816; b=Yl0CNrTREwKoT/ya0XkKWtYTEXWq92d10chovrAGWdV7fto4J5pHZ0FFYMSaPvR2d9 EPIWX1WQSxSKFZgGAGeLpN2iMB98eRJQinUsl0T0TwR/6Z8oe6trFtscRxExalTEMc+B vVQ0iTweFMRUaCeYFM6hQHWU1ykb/dXoZmMRCkOPxolSXCKWNq0VOkagk+YBDUXFWsJX cI69DeWycANaUl4PVk2MZ5effokaQEsEUHriKxiOvYE1BsbvlmK+0EwRkqghgZLRdtar e1EaD4OSyK1lgGadNqwgDvnHVuPJUqJ+yy9Hby0kqbTrXBno/750BKKaDgPpUQq/oOEr iXCg== 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=OrVL6nGTgJreO/mPr2qFtavgj+TsbRc41fPTeCLH8W0=; b=d0MKI11yZkAFAj0Bd8Op383gDKxZQe2DCpoRJWVnknb8vWvlJ6F9pynJ6BhnfxNfTX B1jPAnOvK2lh55F7sUG/CESzzYn4raT+V5OsKCzRwrtnWv/rmV8ns1w8Lfm8Nx3504eF TmsWbLCo5Caivjm40txwGDWsJ5EDoSgxGnWKrHKcMeYhkjsIwFLuhkxaaZPvjDVwdZ1u PHgCiCah9MRcbNErQ+S1xrQc3tummgInOxYa87iSSDR+zHaeT9NlplpOb1LjbrO6Xih0 inlQPwLdlpyNb5vaSzajL0hYG0W3CqknGmO7qeJ9tnAZ1qy3NXJ8EBnkGS1qeM327Ul0 IFKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Knfjcc/+"; 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 bs11si10042161ejb.438.2021.08.10.10.36.07; Tue, 10 Aug 2021 10:36:31 -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="Knfjcc/+"; 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 S232236AbhHJReP (ORCPT + 99 others); Tue, 10 Aug 2021 13:34:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:33730 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232553AbhHJRdb (ORCPT ); Tue, 10 Aug 2021 13:33:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 958BB61008; Tue, 10 Aug 2021 17:33:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628616789; bh=eLRgX+TjaqfiHx7QQMcIUj5KDJja7qFuzIG5aBlApqU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Knfjcc/+ceJaArXLLTJj4JOGsrJjeTLAX+ESWoFsiAlRJy3sanmZD2ZIKS2NS9SMH 78ynXWQQl1+cSxpNyy+cQKxr6IFDB4u6gXAQhxI42s60oVnRj7UUoEmtskYce3BFVW c1AoXQzDkcFiawgL3lSK2W5MkD6vpboQy14cPu7Y= 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.19 14/54] mips: Fix non-POSIX regexp Date: Tue, 10 Aug 2021 19:30:08 +0200 Message-Id: <20210810172944.654768328@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172944.179901509@linuxfoundation.org> References: <20210810172944.179901509@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 63e2ad43bd6a..8f4e169cde11 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -325,7 +325,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