diff mbox

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

Message ID FB6186E3-9377-46D3-A9DC-2AA83C41DAA6@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe Dec. 17, 2010, 10:11 a.m. UTC
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)					\

Comments

Mike Stump Dec. 17, 2010, 9:05 p.m. UTC | #1
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.
diff mbox

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)				\
        {									\