Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3778373pxt; Tue, 10 Aug 2021 11:06:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyD9pTZTaXtW/Z9OE8XuSgr60LKnUeRMpJI3RzZSl5tGM6qjhOUcj81pryXyJ2AtIZFeBQo X-Received: by 2002:a6b:b502:: with SMTP id e2mr286224iof.152.1628618790025; Tue, 10 Aug 2021 11:06:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628618790; cv=none; d=google.com; s=arc-20160816; b=zUhyYD+fBn+JpXsFRqDtVKijvAcoQexBeS8cIzfbX53DJO2afrRii0BwkCY1XEMNvB 3WRLYmtihuyzuG5B/WEZtlmJJsnUAXI+FKaWWrTh2a0NO8mK65SpSZ302d8t/LFmXAyq a9BzUudqyWY+uKUONpDZCsakAbXe6aGCz29kIFtZJt9bjCrhabBLC033tZLDwJhrJfYi 4YQfOIiugcCShF4KM73b4T9k0KoLV/9bz3msDHuw03xdJUJLOV3HeBkTEwBQl447kk0F OhaYzgW5OSoAGTMLdcFMByUiZDpw3XtYeqjTVzWUtQirZN1ftSLVA9JujTZp0XhWv7uu 0dNA== 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=s9n2JOqmq9N9HfOrPq/ct9ARUME/ojIjMqgoTELCZcw=; b=bohBq9+9pkrL5OJCzjz6bhAaVKXiPZaFfeMfYS9l43WsUkUFyN7LyKeqdnhl5zG0AE J5B0Ch6LFGii/uxmyfKHkbejzdnRt14Men9K5b/SlEpaFTrggEZ4wb2rivogZBa6JLH+ H29JFa1lN5ooUH5bddUoY/0r1mMt3d1dqh8p6ehheF2lxp+cLzB4i6sNkQiIbwHblOA4 K2o+TqmimU9KvMRW8MIVynroHpcQSz763r4oYkggM9Me+/SjC0rRxrdsbw+SzQF9VDf3 uBkoiFO6nnd9jJL4ZhHstyszXDAm7xLfTbjUQg9WIwVgtubzGSqsbXUw70aA/W94pV7C yOjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JxNclWpx; 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 a9si14410062jat.116.2021.08.10.11.06.18; Tue, 10 Aug 2021 11:06:30 -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=JxNclWpx; 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 S237474AbhHJSD2 (ORCPT + 99 others); Tue, 10 Aug 2021 14:03:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:49440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231580AbhHJRzP (ORCPT ); Tue, 10 Aug 2021 13:55:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9A9216136F; Tue, 10 Aug 2021 17:44:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617485; bh=ZXl1HQ99wcxq9MZ+fNUgjpA1aL/kYLNgYNhqWnGTK0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JxNclWpxlx37eCgZGq3oLvD8dZqxG/32QcwJZSpesckDRPN8FelkvJctTX6ooamo9 DiQj3s5AXmMJiUhHqhJ3FLic3X2yQIL6hFONxiMiiSVzrJTjAIkNiBc7khZ+KK0CAW V6915FeQIBZIsUI2jWqlZDC2qU3YNz/ui49+2lGs= 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.13 062/175] mips: Fix non-POSIX regexp Date: Tue, 10 Aug 2021 19:29:30 +0200 Message-Id: <20210810173002.988419973@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810173000.928681411@linuxfoundation.org> References: <20210810173000.928681411@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 258234c35a09..674f68d16a73 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -321,7 +321,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