Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp875817pxb; Fri, 13 Aug 2021 08:13:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJKc/s17vZfsUqfiBi7lqxzem873dtog9iB+tcDj+2C3Ev12W9najOxq9VRewvgM2sH+7d X-Received: by 2002:a02:c6d5:: with SMTP id r21mr2725950jan.71.1628867628126; Fri, 13 Aug 2021 08:13:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628867628; cv=none; d=google.com; s=arc-20160816; b=F0eyRsZmaESqSY/TWNfx5mZq33/QToebt53fVu0ChrTQMxpqhcX4w0h2MYONFutFxA md8Q3JY5NZkKnDSdCISQ3SZbcOlUF83RK/f56YCvR2IrxO9Y48vVgRNjQONTRG7E6tS6 E9+J1IZ4e2soPwP3RwCtmdgbvMUcW/OUwj3m6wRpEAJhvOLgB44Lb6m4MrGi8E0ziDL9 vRqOnKybcON9+VAL5j7l5u/e60vfFD+C4hxWidFK2Eo2Do6+Ec6gEvXd0JxQtnOink6W v55Wi1zeN/XxsRLWQRpt9KNXj308crAuGjbaitae8daOyY12u7JQOMW4u69Bq1zCc1O+ tOCg== 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=TkfwE6iaA3VBw/2HObeZ4dRwsQdMNJR1ZvUaHp4L3Q0=; b=ScOKaAOdJD2BuWpLq4qr3X8liXG/EuTFDAiS1RDWPxmIppwsFTgCvOGDBlaZE59NNg RnlZRM4Yzha5agJ7t1f0qFddrjtno0Ah5/kZU54r760+RRb3CLWIYEPKWpjSwkH45iCs 6FV5qWxSzBgguIfhey+f2Nvvn78EijLXn3Pgw9Kgsbzq/H1zM9UGZSDYHHlhQ+48Di02 8ddZ+C1yZkxWpXMmVJ+3z5IROO/jDfWDJ0GdyZWFDXGhiwufH3es26YHxHziOfqCcdDp +G/t8VShCN/iCihjkGVCZvoBTPlY9Fc58AWKeXB9iJiniIa6L22pi/AH9+gKYRenCnzo D5Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Pyh+e2l5; 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 r7si2111706ilg.55.2021.08.13.08.13.36; Fri, 13 Aug 2021 08:13:48 -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=Pyh+e2l5; 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 S241417AbhHMPKw (ORCPT + 99 others); Fri, 13 Aug 2021 11:10:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:53688 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241522AbhHMPKU (ORCPT ); Fri, 13 Aug 2021 11:10:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4E26F6112F; Fri, 13 Aug 2021 15:09:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628867393; bh=KIz3KZERk00/VUrFyp6E9O2ygsPMZz2rCEzrJMPj+oI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pyh+e2l5Fopbvpxp192ZebumuXYZloUeN/dKEEPkLGLF16VLp0RjB8kqNyZgAlWn+ yS1VXAOfkvBX975YONIJJOQaGDzlf7OGhzmAbXidmRLx5SLOISC0x27tQ7WtFqS+SP iYP/lvOP1X4zfG4dibivzCTyNDnyEq3+rrOsCNwY= 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.9 05/30] mips: Fix non-POSIX regexp Date: Fri, 13 Aug 2021 17:06:33 +0200 Message-Id: <20210813150522.615538452@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210813150522.445553924@linuxfoundation.org> References: <20210813150522.445553924@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 25f3bfef9b39..af4eff7d22ec 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -286,7 +286,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