From patchwork Wed Jan 12 00:57:18 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: 78498 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 EEC90B6EF1 for ; Wed, 12 Jan 2011 11:57:39 +1100 (EST) Received: (qmail 7287 invoked by alias); 12 Jan 2011 00:57:37 -0000 Received: (qmail 7276 invoked by uid 22791); 12 Jan 2011 00:57:36 -0000 X-SWARE-Spam-Status: No, hits=-2.6 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) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 12 Jan 2011 00:57:30 +0000 Received: from wpaz21.hot.corp.google.com (wpaz21.hot.corp.google.com [172.24.198.85]) by smtp-out.google.com with ESMTP id p0C0vSsH029322 for ; Tue, 11 Jan 2011 16:57:28 -0800 Received: from iwn8 (iwn8.prod.google.com [10.241.68.72]) by wpaz21.hot.corp.google.com with ESMTP id p0C0ul8m019420 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Tue, 11 Jan 2011 16:57:27 -0800 Received: by iwn8 with SMTP id 8so32923iwn.20 for ; Tue, 11 Jan 2011 16:57:27 -0800 (PST) Received: by 10.231.199.19 with SMTP id eq19mr294157ibb.175.1294793847067; Tue, 11 Jan 2011 16:57:27 -0800 (PST) Received: from coign.google.com ([67.218.105.75]) by mx.google.com with ESMTPS id gy41sm67661ibb.23.2011.01.11.16.57.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 Jan 2011 16:57:26 -0800 (PST) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org Cc: Rainer Orth Subject: Go testsuite patch committed: Set GOARCH environment variable Date: Tue, 11 Jan 2011 16:57:18 -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 from Rainer Orth fixes the Go testsuite to set the GOARCH environment variable, as expected by one of the tests. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian 2011-01-11 Rainer Orth * go.test/go-test.exp (go-set-goarch): New proc. (go-gc-tests): Use it. diff -r 72fce0443d71 gcc/testsuite/go.test/go-test.exp --- a/gcc/testsuite/go.test/go-test.exp Sat Jan 08 12:30:04 2011 +0100 +++ b/gcc/testsuite/go.test/go-test.exp Sun Jan 09 12:31:06 2011 +0100 @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. # Written by Ian Lance Taylor . # This program is free software; you can redistribute it and/or modify @@ -106,6 +106,41 @@ file delete $filename } +# N.B. Keep in sync with libgo/configure.ac. +proc go-set-goarch { } { + global target_triplet + + switch -glob $target_triplet { + "arm*-*-*" - + "ep9312*-*-*" - + "strongarm*-*-*" - + "xscale-*-*" { + set goarch "arm" + } + "i?86-*-*" - + "x86_64-*-*" { + if [check_effective_target_ilp32] { + set goarch "386" + } else { + set goarch "amd64" + } + } + "sparc*-*-*" { + if [check_effective_target_ilp32] { + set goarch "sparc" + } else { + set goarch "sparcv9" + } + } + default { + perror "$target_triplet: unhandled architecture" + return "" + } + } + verbose -log "Setting GOARCH=$goarch" 1 + setenv GOARCH $goarch +} + proc go-gc-tests { } { global srcdir subdir global runtests @@ -122,6 +157,9 @@ set DEFAULT_GOCFLAGS " -pedantic-errors" } + # Set GOARCH for tests that need it. + go-set-goarch + # Running all the torture options takes too long and, since the # frontend ignores the standard options, it doesn't significantly # improve testing.