From patchwork Tue Apr 19 18:06:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1619194 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=q0R42BHn; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KjWwD6BfSz9sFk for ; Wed, 20 Apr 2022 04:06:51 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 06153385780D for ; Tue, 19 Apr 2022 18:06:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 06153385780D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1650391609; bh=LwGWdzZNA/k5NT05xj4ML2ECd1O8LNV+WBIjCYU6x3k=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=q0R42BHnY90fCEybJehAfLscHysj4i4YUOgvY3Ky4+AwlSw51rQ34drGAyG++nTqp hwUwSMTDO1VUhbgfZi9r6Ot/koznOg2v7AeFKqO2u2PA0SB2bxWQx5z/kRn15/wlwS ioASgS1NSc/C7u7fLxTbUWt/EFZyPBqtlV314Dd8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 93AAB3858D3C for ; Tue, 19 Apr 2022 18:06:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 93AAB3858D3C Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-473-yu9hHnnKN4W0V5j_wnx07w-1; Tue, 19 Apr 2022 14:06:04 -0400 X-MC-Unique: yu9hHnnKN4W0V5j_wnx07w-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 89D563C02B87; Tue, 19 Apr 2022 18:06:03 +0000 (UTC) Received: from localhost (unknown [10.33.36.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4548B145B975; Tue, 19 Apr 2022 18:06:03 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [PATCH] libgo: Fix non-portable sed commands Date: Tue, 19 Apr 2022 19:06:02 +0100 Message-Id: <20220419180602.1155345-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Cc: Ian Lance Taylor Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" This fixes the libgo build if /usr/bin/sed is found before /usr/xpg4/bin/sed on Solaris. Tested sparc-sun-solaris2.11, OK for trunk? -- >8 -- Solaris sed does not allow '^' and '$' anchors inside groups, and does not support the '+' meta-character. ChangeLog: * libgo/Makefile.am (check-tail): Fix non-portable sed command. * libgo/Makefile.in: Regenerate. * libgo/match.sh (gobuild): Fix non-portable sed command. --- libgo/Makefile.am | 2 +- libgo/Makefile.in | 2 +- libgo/match.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libgo/Makefile.am b/libgo/Makefile.am index e0a1eec52a2..a5d4b6a3525 100644 --- a/libgo/Makefile.am +++ b/libgo/Makefile.am @@ -1305,7 +1305,7 @@ check-tail: check-recursive check-multi if test "$$untested" -ne "0"; then \ echo "# of untested testcases $$untested" >> libgo.sum; \ fi; \ - echo `echo $(GOC) | sed -e 's/ .*//'` `$(GOC) -v 2>&1 | grep " version" | sed -n -e 's/.* \(version.*$$\)/\1/p'` >> libgo.sum; \ + echo `echo $(GOC) | sed -e 's/ .*//'` `$(GOC) -v 2>&1 | grep " version" | sed -n -e 's/.* \(version.*\)$$/\1/p'` >> libgo.sum; \ echo >> libgo.log; \ echo "runtest completed at `date`" >> libgo.log; \ if test "$$fail" -ne "0"; then \ diff --git a/libgo/Makefile.in b/libgo/Makefile.in index 7bef5df90d1..22f48a52938 100644 --- a/libgo/Makefile.in +++ b/libgo/Makefile.in @@ -3189,7 +3189,7 @@ check-tail: check-recursive check-multi if test "$$untested" -ne "0"; then \ echo "# of untested testcases $$untested" >> libgo.sum; \ fi; \ - echo `echo $(GOC) | sed -e 's/ .*//'` `$(GOC) -v 2>&1 | grep " version" | sed -n -e 's/.* \(version.*$$\)/\1/p'` >> libgo.sum; \ + echo `echo $(GOC) | sed -e 's/ .*//'` `$(GOC) -v 2>&1 | grep " version" | sed -n -e 's/.* \(version.*\)$$/\1/p'` >> libgo.sum; \ echo >> libgo.log; \ echo "runtest completed at `date`" >> libgo.log; \ if test "$$fail" -ne "0"; then \ diff --git a/libgo/match.sh b/libgo/match.sh index 139d0cdbe64..7ed587ff794 100755 --- a/libgo/match.sh +++ b/libgo/match.sh @@ -100,7 +100,7 @@ fi gobuild() { line=$(echo "$1" | sed -e 's|//go:build ||') - line=$(echo "$line" | sed -e 's/go1\.[0-9]\+/1/g' -e 's/goexperiment\./goexperiment/') + line=$(echo "$line" | sed -e 's/go1\.[0-9][0-9]*/1/g' -e 's/goexperiment\./goexperiment/') line=" $line " wrap='[ ()!&|]' for ones in $goarch $goos $cgotag $cmdlinetag gccgo goexperimentfieldtrack; do