From patchwork Tue Apr 5 14:28:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 89874 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id A3533B6F8A for ; Wed, 6 Apr 2011 00:28:41 +1000 (EST) Received: (qmail 30378 invoked by alias); 5 Apr 2011 14:28:40 -0000 Received: (qmail 30370 invoked by uid 22791); 5 Apr 2011 14:28:39 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Apr 2011 14:28:06 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 90BEAE38; Tue, 5 Apr 2011 16:28:05 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OdUbDHBNBPcl; Tue, 5 Apr 2011 16:28:04 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 47058E37; Tue, 5 Apr 2011 16:28:04 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p35ES3rj022631; Tue, 5 Apr 2011 16:28:03 +0200 (MEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Ian Lance Taylor , Ralf Wildenhues Subject: [libgo, build] Avoid echo -n in gotest Date: Tue, 05 Apr 2011 16:28:03 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Inspecting the Solaris 8 libgo.sum file, I was reminded that echo -n isn't portable. The autoconf manual agrees and suggests printf as a replacement. The following patch implements this. Bootstrapped on i386-pc-solaris2.8 with gas. Rainer 2011-04-05 Rainer Orth * testsuite/gotest: Use printf instead of echo -n. diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest --- a/libgo/testsuite/gotest +++ b/libgo/testsuite/gotest @@ -231,7 +231,7 @@ mkdir _test case "x$gofiles" in x) - gofiles=$(echo -n $(ls *_test.go 2>/dev/null)) + gofiles=$(printf "%s" "$(ls *_test.go 2>/dev/null)") esac case "x$gofiles" in @@ -250,7 +250,7 @@ GC="$holdGC" case "x$pkgfiles" in x) - pkgbasefiles=$(echo -n $(ls *.go | grep -v _test.go 2>/dev/null)) + pkgbasefiles=$(printf "%s" "$(ls *.go | grep -v _test.go 2>/dev/null)") ;; *) for f in $pkgfiles; do