diff mbox

[ObjC/C++,testsuite,committed] restore darwin8 testsuite functionality.

Message ID 417459E9-229A-42E9-A4C3-71FA8AFE48DC@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe July 2, 2010, 9:18 a.m. UTC
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:.
diff mbox

Patch

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];