From patchwork Fri Jul 2 09:18:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 57635 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 776851007D4 for ; Fri, 2 Jul 2010 19:18:53 +1000 (EST) Received: (qmail 15214 invoked by alias); 2 Jul 2010 09:18:50 -0000 Received: (qmail 15201 invoked by uid 22791); 2 Jul 2010 09:18:50 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, TW_BJ X-Spam-Check-By: sourceware.org Received: from c2bthomr07.btconnect.com (HELO c2bthomr07.btconnect.com) (213.123.20.125) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Jul 2010 09:18:45 +0000 Received: from thor.office (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by c2bthomr07.btconnect.com with ESMTP id FUY47716; Fri, 2 Jul 2010 10:18:35 +0100 (BST) X-Mirapoint-IP-Reputation: reputation=Good-1, source=Queried, refid=0001.0A0B0302.4C2DAEEB.0119, actions=tag Message-Id: <417459E9-229A-42E9-A4C3-71FA8AFE48DC@sandoe-acoustics.co.uk> From: IainS To: GCC Patches Mime-Version: 1.0 (Apple Message framework v936) Subject: [Patch, ObjC/C++, testsuite, committed] restore darwin8 testsuite functionality. Date: Fri, 2 Jul 2010 10:18:33 +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 the next-abi header currently depends on macros from system headers, some of these are not present on darwin8 and, thus most of the OBJC/C+ + testsuite is currently broken for darwin8 (only hidden by the recently-fixed bootstrap fail). committed as obvious/partial reversion/under Mike's pre-approval for ObjC testsuite fixes. FWIW: i686-apple-darwin8 is still the only gcc platform that passes *all* the ObjC testsuite (both NeXT and gnu runtimes)... ... although I intend to improve upon that ;-) tested on *-*-darwin* and x86_64-unknown-linux-=gnu. r161687 (trunk) r161688 (4.5). Iain testsuite/Changelog: * objc-obj-c++-shared/next-abi.h: Remove dependency on system headers. Add clause to reflect that, pre-10.5, ABI is always 0. * objc/execute/forward-1.m: Depend only on __NEXT_RUNTIME__ for the method types to forward:. Index: gcc/testsuite/objc-obj-c++-shared/next-abi.h =================================================================== --- gcc/testsuite/objc-obj-c++-shared/next-abi.h (revision 161685) +++ gcc/testsuite/objc-obj-c++-shared/next-abi.h (working copy) @@ -19,7 +19,7 @@ #undef NEXT_OBJC_USE_NEW_INTERFACE #ifdef __NEXT_RUNTIME__ -# if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 || __OBJC2__) +# if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 || __OBJC2__) /* We have to use an updated interface for 32bit NeXT to avoid * 'deprecated' warnings. * For 64bit NeXT the ABI is different (and the interfaces 'deprecated' @@ -36,6 +36,9 @@ */ # define NEXT_OBJC_ABI_VERSION 0 # endif +# else + /* All before 10.5 is ABI 0 */ +# define NEXT_OBJC_ABI_VERSION 0 # endif #endif Index: gcc/testsuite/objc/execute/forward-1.m =================================================================== --- gcc/testsuite/objc/execute/forward-1.m (revision 161685) +++ gcc/testsuite/objc/execute/forward-1.m (working copy) @@ -55,13 +55,12 @@ id forwarder, receiver; receiver = theReceiver; return self; } -#ifdef NEXT_OBJC_USE_NEW_INTERFACE +#ifdef __NEXT_RUNTIME__ - forward: (SEL)theSel: (marg_list)theArgFrame -{ #else -(retval_t) forward: (SEL)theSel: (arglist_t)theArgFrame -{ #endif +{ /* If we have a reciever try to perform on that object */ if (receiver) return [receiver performv: theSel: theArgFrame];