From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20441 invoked by alias); 21 Oct 2011 11:57:12 -0000 Received: (qmail 20429 invoked by uid 22791); 21 Oct 2011 11:57:11 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,T_TVD_MIME_NO_HEADERS 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; Fri, 21 Oct 2011 11:56:54 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 327F9C22; Fri, 21 Oct 2011 13:56:52 +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 UoMzPNP5YGJ7; Fri, 21 Oct 2011 13:56:49 +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 3665CC21; Fri, 21 Oct 2011 13:56:49 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id p9LBul0G007181; Fri, 21 Oct 2011 13:56:47 +0200 (MEST) From: Rainer Orth To: Iain Sandoe Cc: Jan Hubicka , Hans-Peter Nilsson , GCC Patches Subject: Re: [RFA:] fix breakage with "Update testsuite to run with slim LTO" References: <20111020221932.GA13355@kam.mff.cuni.cz> <201110210229.p9L2TKmx010677@ignucius.se.axis.com> <20111021093112.GD2976@kam.mff.cuni.cz> <63B3C6F6-2C30-4A7C-A324-8805D8AA8667@sandoe-acoustics.co.uk> Date: Fri, 21 Oct 2011 12:35:00 -0000 In-Reply-To: <63B3C6F6-2C30-4A7C-A324-8805D8AA8667@sandoe-acoustics.co.uk> (Iain Sandoe's message of "Fri, 21 Oct 2011 12:10:04 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg01959.txt.bz2 --=-=-= Content-length: 2986 Iain Sandoe writes: > It looks like the gnat testsuite is also broken - but HP's fix doesn't > recover that. > .. will try and take a look - but short on time today, I think I see what's going on: in gnat.log, I find Running /vol/gcc/src/hg/trunk/local/gcc/testsuite/gnat.dg/dg.exp ... ERROR: tcl error sourcing library file /vol/gcc/src/hg/trunk/local/gcc/testsuite/lib/gcc-dg.exp. can't read "GCC_UNDER_TEST": no such variable can't read "GCC_UNDER_TEST": no such variable while executing "lappend options "compiler=$GCC_UNDER_TEST"" (procedure "gcc_target_compile" line 37) invoked from within "gcc_target_compile $source $dest $type $options" invoked from within "if [ string match "*.c" $source ] then { return [gcc_target_compile $source $dest $type $options] }" (procedure "gnat_target_compile" line 12) invoked from within "${tool}_target_compile $src $output $compile_type "$options"" (procedure "check_compile" line 39) invoked from within "check_compile linker_plugin executable { int main() { return 0; } } {-flto -fuse-linker-plugin}" ("eval" body line 1) invoked from within "eval check_compile $args" (procedure "check_no_compiler_messages_nocache" line 2) invoked from within "check_no_compiler_messages_nocache linker_plugin executable { int main() { return 0; } } "-flto -fuse-linker-plugin"" (procedure "check_linker_plugin_available" line 2) invoked from within "check_linker_plugin_available" invoked from within "if [check_effective_target_lto] { # When having plugin test both slim and fat LTO and plugin/nonplugin # path. if [check_linker_plugin_ava..." (file "/vol/gcc/src/hg/trunk/local/gcc/testsuite/lib/gcc-dg.exp" line 71) invoked from within "source /vol/gcc/src/hg/trunk/local/gcc/testsuite/lib/gcc-dg.exp" ("uplevel" body line 1) invoked from within "uplevel #0 source /vol/gcc/src/hg/trunk/local/gcc/testsuite/lib/gcc-dg.exp" If running the gnat.dg testsuite, lib/gcc-dg.exp is now calling check_linker_plugin_available early, which ultimately calls ${tool}_target_compile. For all languages but Ada, ${tool}_target_compile can compile .c files just fine, but gnat_target_compile (which uses gnatmake) cannot, so it falls back to directly calling gcc_target_compile in that case. gcc_target_compile relies on GCC_UNDER_TEST being set, which in this case hasn't yet happened, thus the error. My solution (a hack, actually) is to move the initialization of GCC_UNDER_TEST in gcc-dg.exp before the calls to check_linker_plugin_available. x86_64-unknown-linux-gnu testing in progress, will commit once that's finished. Btw., the ChangeLog entry for Jan's patch was riddled with typos and wrong pathnames. I've corrected that with a separate checkin. Rainer 2011-10-21 Rainer Orth * lib/gcc-dg.exp (GCC_UNDER_TEST): Set before calling check_linker_plugin_available. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=testsuite-gnat-linker-plugin.patch Content-length: 800 # HG changeset patch # Parent 9c45ed5cb653fa8053d3c7a9d6502a85b0ffbafc Fix gnat.dg testing with linker plugin check diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -41,6 +41,11 @@ if { [ishost "*-*-cygwin*"] } { setenv LANG C.ASCII } +global GCC_UNDER_TEST +if ![info exists GCC_UNDER_TEST] { + set GCC_UNDER_TEST "[find_gcc]" +} + if [info exists TORTURE_OPTIONS] { set DG_TORTURE_OPTIONS $TORTURE_OPTIONS } else { @@ -84,12 +89,6 @@ if [check_effective_target_lto] { } } - -global GCC_UNDER_TEST -if ![info exists GCC_UNDER_TEST] { - set GCC_UNDER_TEST "[find_gcc]" -} - global orig_environment_saved # This file may be sourced, so don't override environment settings --=-=-= Content-length: 143 -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University --=-=-=--