From patchwork Wed Jan 12 23:06:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 78623 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 3922FB6F14 for ; Thu, 13 Jan 2011 10:06:30 +1100 (EST) Received: (qmail 5891 invoked by alias); 12 Jan 2011 23:06:28 -0000 Received: (qmail 5880 invoked by uid 22791); 12 Jan 2011 23:06:27 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 12 Jan 2011 23:06:23 +0000 Received: from kpbe20.cbf.corp.google.com (kpbe20.cbf.corp.google.com [172.25.105.84]) by smtp-out.google.com with ESMTP id p0CN6KQv027113 for ; Wed, 12 Jan 2011 15:06:20 -0800 Received: from pwi5 (pwi5.prod.google.com [10.241.219.5]) by kpbe20.cbf.corp.google.com with ESMTP id p0CN6I7G011497 for ; Wed, 12 Jan 2011 15:06:18 -0800 Received: by pwi5 with SMTP id 5so367474pwi.25 for ; Wed, 12 Jan 2011 15:06:18 -0800 (PST) Received: by 10.142.140.16 with SMTP id n16mr292729wfd.122.1294873578204; Wed, 12 Jan 2011 15:06:18 -0800 (PST) Received: from coign.google.com (dhcp-172-22-121-189.mtv.corp.google.com [172.22.121.189]) by mx.google.com with ESMTPS id w22sm1450526wfd.7.2011.01.12.15.06.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 12 Jan 2011 15:06:17 -0800 (PST) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: libgo patch committed: Use right nm, use -p rather than -s Date: Wed, 12 Jan 2011 15:06:15 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-System-Of-Record: true 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 This patch to libgo changes the gotest testing script to pick up NM from the environment so that it runs the right nm program, and to use the -p option rather than the -s option. Using -s was a mistake copied from the original gotest script, which used the 6nm program. The -p option is the one intended when using GNU nm, and has the fortunate side effect that it should cause the right thing to happen with Solaris nm. This patch was based on one by Rainer Orth. Bootstrapped and ran libgo testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r 12a47f0928b3 libgo/testsuite/gotest --- a/libgo/testsuite/gotest Wed Jan 12 13:54:48 2011 -0800 +++ b/libgo/testsuite/gotest Wed Jan 12 15:03:28 2011 -0800 @@ -19,6 +19,8 @@ GOLIBS= export GC GL GOLIBS +NM=${NM:-nm} + # srcdir is where the source files are found. basedir is where the # source file paths are relative to. # gofiles are the test files. pkgfiles are the source files. @@ -272,7 +274,7 @@ # the grep -v eliminates methods and other special names # that have multiple dots. pattern='Test([^a-z].*)?' - tests=$(nm -s _gotest_.o $xofile | egrep ' T .*\.'$pattern'$' | grep -v '\..*\..*\.' | sed 's/.* //' | sed 's/.*\.\(.*\.\)/\1/') + tests=$($NM -p _gotest_.o $xofile | egrep ' T .*\.'$pattern'$' | grep -v '\..*\..*\.' | sed 's/.* //' | sed 's/.*\.\(.*\.\)/\1/') if [ "x$tests" = x ]; then echo 'gotest: warning: no tests matching '$pattern in _gotest_.o $xofile 1>&2 exit 2