Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp566780pxt; Thu, 5 Aug 2021 06:33:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIjOU84AT6Ccjr9oh51gdSPI85n1oRKpb0oiuk6CNeSfgnSUONjhaSHfJSFk42lRNia1QM X-Received: by 2002:a05:6e02:2162:: with SMTP id s2mr65170ilv.99.1628170409600; Thu, 05 Aug 2021 06:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628170409; cv=none; d=google.com; s=arc-20160816; b=PNOM84tahj2K3JPbYR4CH/6KGQOQN+TeR/8cJaFYuiDhWhGf4pdkQRn501MDraYaZ+ LiARwytQNX7EkjJSczinFsj+vU5/ZN/VvoA8K4dQekPsrkeDwtXMU9l/QdVm1VJrYSU3 X1XYYF8i9O12ze7lTeoloGKOvPvbTeR6k8ui6BlsMz/lPccqTOMAqPKplXvkzialOf68 9iyBUnpDTwtCHY5dYetwdJ9epEiSWKPD2wrX/7Va5OkZrYTxz3gECLLL5CPkhAbNpsHX leeFaRnt0UFRk5Z3KpIaBeKgLcJWMMmzjQ+6l5KsKljlQCC1FdtIZAE4nyKg/Pj1Y0PN oQ/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=CsrL3IdMWK0F9Biu26lz+I5XiXsODgPZHQpYed3cgks=; b=0VIvt+j9/08SsKUhcMdg7MSL4nz//n4gEvQFKEGIXi40BykJIwTo9V2Y9fzXyh+Vkl jDEHfC57/97IjXKtS8tC/46vknI83QuIgjTC25vwxtelzcwIS5FU19CBJT3nY/RIHkYq 20yWMJSyukzKyrtjMWcr06kNph/nZa6A5M1RpcaisIeOAwB1rgzHUph8id58/gvlVFhM AJ/0thyYpS5gnPttl5HFuRjMbW/aYZvAzyRwUt5AyO+St5HV4MrYuwEXLQwmkdpwiki2 vKfzfZNotfc9s4QwFtTPB2qvewtom0gGKdYMubaVvbbrI1MH841nbrDHvWIJKw0bfcUL 7QDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=BhiQqijI; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i16si5717416jan.31.2021.08.05.06.33.17; Thu, 05 Aug 2021 06:33:29 -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=@nifty.com header.s=dec2015msa header.b=BhiQqijI; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241156AbhHELyS (ORCPT + 99 others); Thu, 5 Aug 2021 07:54:18 -0400 Received: from conssluserg-06.nifty.com ([210.131.2.91]:41085 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230446AbhHELyR (ORCPT ); Thu, 5 Aug 2021 07:54:17 -0400 Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) (authenticated) by conssluserg-06.nifty.com with ESMTP id 175BrnGx002703; Thu, 5 Aug 2021 20:53:49 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 175BrnGx002703 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1628164430; bh=CsrL3IdMWK0F9Biu26lz+I5XiXsODgPZHQpYed3cgks=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=BhiQqijILqqkwp0ix5/EpdHf/4twm9517pnXfbplS6d9UdnvNrPJkSHskduecFwHm eLon+nSw1xcefwJcu8/Ju8wYrfe8HeaBkzR8HgXs6z4qTLbEY20zZGvkniShuCF17m d5lThuwhO4zKXlsWf2FlqFhvhu1Wxm5wZ9ndEzFNaN9zCgluttX91uXILjMX+mQXXp rtUQ5PJ2+se/m2HrGL7kaL8T1dkO1KofqyYRK+Dik7MzWK97iRwODjvj/il++o8odn mo5X2CXmKTH0qtc7vieNhn+whDEwpHTy6xp1kbrERK4o8J3v+/QRgQoqJtpK7Omrvs 8jus/uBUBf35g== X-Nifty-SrcIP: [209.85.216.44] Received: by mail-pj1-f44.google.com with SMTP id l19so8152561pjz.0; Thu, 05 Aug 2021 04:53:49 -0700 (PDT) X-Gm-Message-State: AOAM5325ZJDNBbOMNYU7wIxSDGGKRICm/xuEDrPGP6v2qIZehb0RvXNG q46hez1pg91VSjliKQlrZYRXDxvHNN6up2xH9hw= X-Received: by 2002:a63:1b5c:: with SMTP id b28mr420310pgm.175.1628164429105; Thu, 05 Aug 2021 04:53:49 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Masahiro Yamada Date: Thu, 5 Aug 2021 20:53:12 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] arch: mips: Fix non-POSIX regexp To: "H. Nikolaus Schaller" Cc: Thomas Bogendoerfer , Thomas Gleixner , Ingo Molnar , Borislav Petkov , X86 ML , Jessica Yu , Miroslav Benes , Emil Velikov , Nick Desaulniers , Discussions about the Letux Kernel , "H. Peter Anvin" , "open list:BROADCOM NVRAM DRIVER" , Linux Kernel Mailing List , kernel@pyra-handheld.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 8, 2021 at 5:57 PM H. Nikolaus Schaller wrote: > > 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 > --- Applied to linux-kbuild/fixes. Thanks. > 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 > -- Best Regards Masahiro Yamada