Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp265001pxv; Thu, 8 Jul 2021 01:58:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/Kuq/v0UiyRRvmTOxbEp8EewogmVfyHrv8Q4/7oI2FMHpvhnfyAa42aT9S8ve4uLK8bga X-Received: by 2002:a5e:930e:: with SMTP id k14mr23370686iom.136.1625734687451; Thu, 08 Jul 2021 01:58:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625734687; cv=none; d=google.com; s=arc-20160816; b=G3igcb9+ap8Kclzkg6ukv9LBQ+wzNdksIgrNAh6CdCMZKT7R1/fD7cVKcrh700rW2p 9HFvUb6XXka7sOvWQntYX5HDS7pUyj/0vXBvY/TzpRlUCjjS867u3PD8lqHLMWqCE1Rw VTpT7ttAO0jCPBfeiLpbrGfAoqoFE9NwkPTDsJ2se/3PJzdjXO+sZfCO2flAfEjBpQ+Z DvFC6wPmnh0wUxgcMOlYG6EJ/IlMbkadaPKDCufCWePzXx3hsVeI21EpBtg4vGwqMKyG Oo1cOP2Fhww+LD1pyyPoTIU8nD/Subya5CQZUCpLMFTVptxgU17GjKp4wr8ehLz8LQx2 J4zA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=T6ETvbXoVE/hpvkyrA1LsDKpPMonbOGVOXqyXUMKr1o=; b=D6Y7a9IC9Q5esR/sacg8Oy0i9tfoP/5baEQs2h0HLKntelyh8HQBTy0PXzGfhWUrPQ tZnZboa1lNMlCnk1aRxGGonM4M7RWJ7Qa0Qkxq0+rEiSTjgyp5im0FRCo+zzR2Cbbw0c G2KGJhLlK4XBPPSJqlYfE1ybbhG5GGp5UgwYaHSv3xwx/DYtB7dCoIFBjtBW09SXeNTB woslv6KkaalTjaiQK7hqex3w/rQqBnLs+HVLtv5BM3gYjccuH1n+2AskKchexqQj0QN4 MhC+D6iJROIzkExpzSEy6tkyDVYk8J8AzXO/emEw+JzBspLS+0mF1UoalRFLJFDsCKWA 4Gtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=aC0LdQXd; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y10si1655849ilu.132.2021.07.08.01.57.54; Thu, 08 Jul 2021 01:58:07 -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=@goldelico.com header.s=strato-dkim-0002 header.b=aC0LdQXd; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231255AbhGHJAF (ORCPT + 99 others); Thu, 8 Jul 2021 05:00:05 -0400 Received: from mo4-p02-ob.smtp.rzone.de ([81.169.146.171]:33697 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231190AbhGHJAD (ORCPT ); Thu, 8 Jul 2021 05:00:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1625734633; s=strato-dkim-0002; d=goldelico.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=T6ETvbXoVE/hpvkyrA1LsDKpPMonbOGVOXqyXUMKr1o=; b=aC0LdQXdsPA9SOoqQn1OOSmMcewcyfnz9wfRA6gFvmxq9WoSJpHEN53VTo56F2yPsC haQiRWoex4akVnwn/K665Bx1Bq7+jbJQAMT4Caj/PBMPtVEwkU7TlskKhW8xV6cpwxfH u21230KZ/PIowFK4yLiuFz2VLlt0D5sHY4OFmz8krT85VvLD06lQ+lk4BpD7nJ51FdIs qV9o920mhaOjGUpIglhyvLpWjnQd2rPec+9Yc1Bh2aqAE6Uovxd9F3XV2/eu67vosisl 9nAOYpoBFFCYxKgsJoojbjYRj+QaDDHcv5c+pqR73OWzAmW0b50JiXDj18pw+qxSlnPU vbnA== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o1KHeBQyh+ITDDtsZQ==" X-RZG-CLASS-ID: mo00 Received: from iMac.fritz.box by smtp.strato.de (RZmta 47.28.1 DYNA|AUTH) with ESMTPSA id h06665x688vCcED (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 8 Jul 2021 10:57:12 +0200 (CEST) From: "H. Nikolaus Schaller" To: Thomas Bogendoerfer , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Jessica Yu , Miroslav Benes , Emil Velikov , Nick Desaulniers Cc: letux-kernel@openphoenux.org, "H. Peter Anvin" , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pyra-handheld.com, "H. Nikolaus Schaller" Subject: [PATCH 2/2] arch: mips: Fix non-POSIX regexp Date: Thu, 8 Jul 2021 10:57:10 +0200 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/mips/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 258234c35a096..674f68d16a73f 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.31.1