From patchwork Tue Apr 3 18:27:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 150519 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 2F8C9B6F9A for ; Wed, 4 Apr 2012 04:27:55 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1334082476; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Subject:Date:Message-ID:User-Agent: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=7Se0XnrB/d9f6pV8JEHs1X9pbKY=; b=wKo/V7dp85UP4F/ sC+ZV68cWPdgdkMaLLr324eA4yZpLbtdbi3OkNpPlfqIvg9znGZ9XiI6ApFjhaVx XJFqIRWZCj9eKobRnG1tda529Bp7CZHryVbZ78BfjcrAoct5RL1IW1k1YPdR8eZe OYZbDcSc/JjcWfiwCFsoHQ65hGPM= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:Received:Received:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=k0eT32rhwnN+AMW6zqyNGVbRuC3mBeFxSEZZl/DDbSZBLiu2eWbs7lMqc5+KW0 3xSxE2fHR2HSc90KWVXpFc4YE+43E41Y5/1H2Knsxvq8PW509Y4/+4D0Q0dcj3ai bPoil7tXD4RJqoLF6hIM36wIJmd5rNcpPjxaEOAGoAOug=; Received: (qmail 535 invoked by alias); 3 Apr 2012 18:27:43 -0000 Received: (qmail 435 invoked by uid 22791); 3 Apr 2012 18:27:40 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mail-yw0-f46.google.com (HELO mail-yw0-f46.google.com) (209.85.213.46) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Apr 2012 18:27:26 +0000 Received: by yhmm54 with SMTP id m54so2201yhm.5 for ; Tue, 03 Apr 2012 11:27:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type:x-gm-message-state; bh=XlQRPoClzjEA7q+jL6R+zjOU0UF9Z41QpAxI/pbhd3Y=; b=c1OxWCKRf3nTFPSX8j674/YAg4Dvx8Az2upnNBhTLKx0Af1O+EUSvrkoZcw4/beZXA +JnCR4eqcOg/6lE7WC55nN3AFzx36kM9/LQHKq/MM2gsujzETGddyxSKas5eypKqCf7K j4DVARHqNSlA1hF/b5y/erRrBxKvwQF2SlyYYMiYPn1fFj5c3FMwPIgHu2Vw/u9myi/i M/YrxuQpatWbgVUzVZaubhjP8HhVF+Jg/sgTba1mOXM/trx7pC3+a38qcs6+TyodCCI8 4rSAcHmuVXRrm6U+EGawdj5qOT0j6O+w+BlndznB1YVu3APL2rsS23ttu4NzZU7DVU8l rTnQ== Received: by 10.50.88.168 with SMTP id bh8mr10078815igb.29.1333477645355; Tue, 03 Apr 2012 11:27:25 -0700 (PDT) Received: by 10.50.88.168 with SMTP id bh8mr10078802igb.29.1333477645279; Tue, 03 Apr 2012 11:27:25 -0700 (PDT) Received: from coign.google.com ([2620:0:1000:2301:f2de:f1ff:fe40:72a8]) by mx.google.com with ESMTPS id re5sm2172297igb.0.2012.04.03.11.27.24 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Apr 2012 11:27:24 -0700 (PDT) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: libgo patch committed: Fix testsuite on PPC Date: Tue, 03 Apr 2012 11:27:23 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkdX2ByBgfujaFYm4xK4ulT2DFi63ABovhLKGoNYa73MPy6owkVUQ8KjHe2b0uXhS6ABBlq6d+h8ZV6eH0B5PuaTh+cnhg/wDEujM2WK/JKV4ip62yK/KgRQW5pCJnFpdQ0pcH8mv5mLfysKxDdlEbqO81KAzikDoQKEQa6svBAYKNKLOA= 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 The libgo testsuite looks for functions that match a certain name. On PPC functions are in the data segment, not the text segment. This patch to the testsuite script makes the script look in the data segment for functions on PPC. Bootstrapped and ran libgo testsuite on x86_64-unknown-linux-gnu. Committed to mainline and 4.7 branch. Ian diff -r 5016046ebbfe libgo/Makefile.am --- a/libgo/Makefile.am Fri Mar 30 15:30:22 2012 -0700 +++ b/libgo/Makefile.am Tue Apr 03 10:54:59 2012 -0700 @@ -1808,9 +1808,9 @@ prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \ test "$${prefix}" != "." || prefix="$(@D)"; \ if test "$(use_dejagnu)" = "yes"; then \ - $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" $(GOTESTFLAGS); \ + $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS); \ else \ - if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \ + if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \ echo "PASS: $(@D)" >> $@-testlog; \ echo "PASS: $(@D)"; \ echo "PASS: $(@D)" > $@-testsum; \ diff -r 5016046ebbfe libgo/testsuite/gotest --- a/libgo/testsuite/gotest Fri Mar 30 15:30:22 2012 -0700 +++ b/libgo/testsuite/gotest Tue Apr 03 10:54:59 2012 -0700 @@ -32,6 +32,7 @@ keep=false prefix= dejagnu=no +GOARCH="" timeout=240 testname="" trace=false @@ -86,6 +87,15 @@ dejagnu=`echo $1 | sed -e 's/^--dejagnu=//'` shift ;; + x--goarch) + GOARCH=$2 + shift + shift + ;; + x--goarch=*) + GOARCH=`echo $1 | sed -e 's/^--goarch=//'` + shift + ;; x--timeout) timeout=$2 shift @@ -326,13 +336,18 @@ } { + text="T" + case "$GOARCH" in + ppc*) text="D" ;; + esac + # test functions are named TestFoo # the grep -v eliminates methods and other special names # that have multiple dots. pattern='Test([^a-z].*)?' # The -p option tells GNU nm not to sort. # The -v option tells Solaris nm to sort by value. - tests=$($NM -p -v _gotest_.o $xofile | egrep ' T .*\.'$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | sed 's/.* //' | sed 's/.*\.\(.*\.\)/\1/') + tests=$($NM -p -v _gotest_.o $xofile | egrep " $text .*\."$pattern'$' | grep -v '\..*\..*\.' | fgrep -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