From patchwork Tue Nov 2 16:38:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 69911 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 33252B6EF0 for ; Wed, 3 Nov 2010 03:38:41 +1100 (EST) Received: (qmail 21489 invoked by alias); 2 Nov 2010 16:38:38 -0000 Received: (qmail 21422 invoked by uid 22791); 2 Nov 2010 16:38:36 -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, 02 Nov 2010 16:38:32 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 26094E4E; Tue, 2 Nov 2010 17:38:30 +0100 (CET) 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 eWbLpd-TmS+M; Tue, 2 Nov 2010 17:38:27 +0100 (CET) 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 C194FE4D; Tue, 2 Nov 2010 17:38:27 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id oA2GcRep000767; Tue, 2 Nov 2010 17:38:27 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Uros Bizjak Subject: [testsuite] Avoid -Wl,-M, in gcc.target/i386 test summary Date: Tue, 02 Nov 2010 17:38:27 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (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 When using Sun ld, the gcc.target/i386 part of the testsuite is run with a linker map to remove the capability info emitted by Sun as. Unfortunately, in the current implementation, the -Wl,-M, option used is emitted to the gcc.sum (and thus mail-report.log) files, making it difficult to compare testsuite runs from different trees (like unmodified mainline and a local tree). The following patch fixes this by passing the necessary -Wl,-M, argument not via the flags argument to dg-runtest, but by adding additional_flags=$clearcap_ldflags to the gcc_target_compile options argument. Since I've found no way to get this through the call chain from dg-runtest -> dg-test -> gcc-dg-test -> gcc-dg-test-1 -> gcc_target_compile, I've chosen to wrap gcc_target_compile by a function that does so. Bootstrapped without regressions on i386-pc-solaris2.11. Since this only affects Solaris, I'll commit in a day or two unless someone objects or comes up with a better solution. Rainer 2010-10-30 Rainer Orth * gcc.target/i386/i386.exp (FLAGS): Remove. Wrap gcc_target_compile with $clearcap_ldflags added to options. diff -r 1da1ccf26cd6 gcc/testsuite/gcc.target/i386/i386.exp --- a/gcc/testsuite/gcc.target/i386/i386.exp Mon Nov 01 21:16:18 2010 +0100 +++ b/gcc/testsuite/gcc.target/i386/i386.exp Mon Nov 01 21:19:15 2010 +0100 @@ -188,13 +188,24 @@ # If the linker used understands -M , pass it to clear hardware # capabilities set by the Sun assembler. -set FLAGS "" set clearcap_ldflags "-Wl,-M,$srcdir/$subdir/clearcap.map" if [check_no_compiler_messages mapfile executable { int main (void) { return 0; } } $clearcap_ldflags ] { - set FLAGS $clearcap_ldflags + + if { [info procs gcc_target_compile] != [list] \ + && [info procs saved_gcc_target_compile] == [list] } { + rename gcc_target_compile saved_gcc_target_compile + + proc gcc_target_compile { source dest type options } { + global clearcap_ldflags + # Always pass -Wl,-M,, but don't let it show up in gcc.sum. + lappend options "additional_flags=$clearcap_ldflags" + + return [saved_gcc_target_compile $source $dest $type $options] + } + } } # If a testcase doesn't have special options, use these. @@ -221,7 +232,7 @@ set tests [prune $tests $srcdir/$subdir/vect-args.c] # Main loop. -dg-runtest $tests $FLAGS $DEFAULT_CFLAGS +dg-runtest $tests "" $DEFAULT_CFLAGS # All done. dg-finish