From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 5980B3858404 for ; Wed, 25 Oct 2023 09:09:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5980B3858404 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=foss.arm.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=foss.arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5980B3858404 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698224974; cv=none; b=hItgE70HOTKQ/5YDXwU2ANy79FDSn+KC45wIxZHq2PUrKFi1t5ynP3H1t69MPAAjJx88qM8CGZmu/6GTL2U3fCu1PcsZ1gYxvCHVmLdQLaBcjjf1JfVsKK8pmHCWFq6RUT0YKASkdwe791TdE7wLX0sv75+urMBUf6GzuaOyG+4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698224974; c=relaxed/simple; bh=ElPcr6B1PL0OgXmQ1uvlkiGDUt2lCivpyfnKRdwex+I=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=eFHPVWw+I8GHDwY/sp/8ANCJNriW9NOn4kg1t67OijUTE4rI3rE149SJJBsXopDr51dIrchrYPgzoI2xXu0bI6GQDACV0sYvC6KOKY5e8YjiXjkwU2hYYB3BRgPLOFtqFpOiIjEij1gqYXu1qdqa5LBrnmdMouqYF2GCsP469sc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 560F02F4; Wed, 25 Oct 2023 02:10:14 -0700 (PDT) Received: from [10.57.3.253] (unknown [10.57.3.253]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5AB263F738; Wed, 25 Oct 2023 02:09:32 -0700 (PDT) Message-ID: <8b81df44-608a-4ce9-ae72-32c6368860cd@foss.arm.com> Date: Wed, 25 Oct 2023 10:09:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] config, aarch64: Use a more compatible sed invocation. To: iain@sandoe.co.uk, gcc-patches@gcc.gnu.org References: <20231024155318.65081-1-iain@sandoe.co.uk> Content-Language: en-GB From: Richard Earnshaw In-Reply-To: <20231024155318.65081-1-iain@sandoe.co.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3495.3 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 24/10/2023 16:53, Iain Sandoe wrote: > Although this came up initially when working on the Darwin Arm64 > port, it also breaks cross-compilers on platforms with non-GNU sed. > > Tested on x86_64-darwin X aarch64-linux-gnu, aarch64-darwin, > aarch64-linux-gnu and x86_64-linux-gnu. OK for master? > thanks, > Iain > > --- 8< --- > > Currently, the sed command used to parse --with-{cpu,tune,arch} are > using GNU-specific extension to the -e (recognising extended regex). > > This is failing on Darwin, which defaults to Posix behaviour for -e. > However '-E' is accepted to indicate an extended RE. Strictly, this > is also not really sufficient, since we should only require a Posix > sed (but it seems supported for BSD-derivatives). > The man pages I have for linux, freebsd and macos all show something pretty similar: -e script add the script to the commands to be executed Wording varies slightly, but I think the meaning is clearly the same. So this really has nothing to do with extended regexps. That means, I think, that we really want '-E -e