From patchwork Tue Jul 13 15:25:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 58791 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 7EBACB6F16 for ; Wed, 14 Jul 2010 01:31:34 +1000 (EST) Received: (qmail 710 invoked by alias); 13 Jul 2010 15:31:06 -0000 Received: (qmail 29125 invoked by uid 22791); 13 Jul 2010 15:26:16 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, TW_BJ X-Spam-Check-By: sourceware.org Received: from c2bthomr09.btconnect.com (HELO c2bthomr09.btconnect.com) (213.123.20.127) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Jul 2010 15:26:10 +0000 Received: from thor.office (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by c2bthomr09.btconnect.com with ESMTP id FUV54754; Tue, 13 Jul 2010 16:25:42 +0100 (BST) X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=0001.0A0B0301.4C3C8576.013B, actions=tag Message-Id: From: IainS To: GCC Patches Mime-Version: 1.0 (Apple Message framework v936) Subject: [patch, testsuite, objc] committed fix testsuite aspect of PR44488 Date: Tue, 13 Jul 2010 16:25:41 +0100 Cc: mrs@gcc.gnu.org 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 committed, under mike's pre-appr. of objc testsuite fixes. tested on {powerpc,i686}-apple-darwin9, x86_64-apple-darwin10, x86_64- unknown-linux-gnu, cris-elf (sim), mipsia64(sim). will let it settle for a few days, and then apply to 4.5 r162144 Iain PR objc/44488 * lib/objc-torture.exp (objc-set-runtime-options): Base runtime list on the target. Make sure that we can assemble the emitted asm when the test type is 'compile'. + lappend rtlist $other + } } set OBJC_RUNTIME_OPTIONS "" @@ -49,8 +56,10 @@ proc objc-set-runtime-options { dowhat args } { if [info exists dowhat] { switch $dowhat { "compile" { - set compile_type "assembly" - set output_file "trivial.s" + # We should check that the generated asm is sensible, so do + # the equivalent of -c. + set compile_type "object" + set output_file "trivial.o" set comp_output [objc_target_compile \ "$srcdir/$subdir/trivial.m" "$output_file" "$compile_type" $options] Index: gcc/testsuite/lib/objc-torture.exp =================================================================== --- gcc/testsuite/lib/objc-torture.exp (revision 162143) +++ gcc/testsuite/lib/objc-torture.exp (working copy) @@ -23,17 +23,24 @@ load_lib target-supports.exp # Make sure that the runtime list is re-evaluated for each multilib. proc objc-set-runtime-options { dowhat args } { global OBJC_RUNTIME_OPTIONS - if ![info exists OBJC_RUNTIME_OPTIONS] { - set rtlist [list "-fgnu-runtime" "-fnext-runtime" ] - } else { - set rtlist [list "-fgnu-runtime" "-fnext-runtime" ] - foreach other $OBJC_RUNTIME_OPTIONS { - # Don't do tests twice... - if { ( $other == "-fnext-runtime" || $other == "-fgnu- runtime" ) } { - continue - } - lappend rtlist $other + set rtlist [list "-fgnu-runtime" ] + # At present (4.6), the only NeXT runtime target is Darwin. + # The previously used approach of testing trivial compiles is not reliable + # for determining the absence of the NeXT runtime, since a non- Darwin + # installation can have the objc headers present in the same locations + # that Darwin uses. If NeXT is ported to another target, then it should + # be listed here. + if [istarget "*-*-darwin*" ] { + lappend rtlist "-fnext-runtime" + } + if [info exists OBJC_RUNTIME_OPTIONS] { + foreach other $OBJC_RUNTIME_OPTIONS { + # Don't do tests twice... + if { ( $other == "-fnext-runtime" || $other == "-fgnu-runtime" ) } { + continue }