Patchwork [Darwin,ObjC] default to sjlj exceptions only on m32.

login
register
mail settings
Submitter IainS
Date Dec. 17, 2010, 10:11 a.m.
Message ID <FB6186E3-9377-46D3-A9DC-2AA83C41DAA6@sandoe-acoustics.co.uk>
Download mbox | patch
Permalink /patch/75855/
State New
Headers show

Comments

IainS - Dec. 17, 2010, 10:11 a.m.
When we get m64 ObjC, we will be using unwind tables, therefore, don't  
set sjlj exceptions for m64.

OK for trunk?
Iain

gcc:

	* config/darwin.h (SUBTARGET_C_COMMON_OVERRIDE_OPTIONS):
	Only set sjlj exceptions for NeXT/m32.

  	if (flag_use_cxa_atexit == 2)					\
Mike Stump - Dec. 17, 2010, 9:05 p.m.
On Dec 17, 2010, at 2:11 AM, IainS <developer@sandoe-acoustics.co.uk> wrote:
> When we get m64 ObjC, we will be using unwind tables, therefore, don't set sjlj exceptions for m64.
> 
> OK for trunk?

Ok.

Patch

Index: gcc/config/darwin.h
===================================================================
--- gcc/config/darwin.h	(revision 167963)
+++ gcc/config/darwin.h	(working copy)
@@ -140,6 +140,11 @@  extern GTY(()) int darwin_ms_struct;
    } while (0)

  #define SUBTARGET_C_COMMON_OVERRIDE_OPTIONS do  
{                        \
+  /* Sort out ObjC exceptions: If the runtime is NeXT we default to	\
+     sjlj for m32 only.  */						\
+  if (!global_options_set.x_flag_objc_sjlj_exceptions)			\
+    global_options.x_flag_objc_sjlj_exceptions = 			\
+				flag_next_runtime && !TARGET_64BIT;	\
      if (flag_mkernel || flag_apple_kext)				\
        {									\