darwin.h (SUBTARGET_C_COMMON_OVERRIDE_OPTIONS): Move NeXT runtime exceptions model...
authorIain Sandoe <iain@codesourcery.com>
Mon, 9 Jul 2012 19:16:37 +0000 (19:16 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Mon, 9 Jul 2012 19:16:37 +0000 (19:16 +0000)
* config/darwin.h (SUBTARGET_C_COMMON_OVERRIDE_OPTIONS): Move NeXT
runtime exceptions model setting from here ...
* config/darwin.c (darwin_override_options): ... to here.

From-SVN: r189390

gcc/ChangeLog
gcc/config/darwin.c
gcc/config/darwin.h

index d8edad09b3c000557edfc14b7a576cc10073ef12..ed6c43905f5fb8449dcbe55eafcffbc76028ebad 100644 (file)
@@ -1,3 +1,9 @@
+2012-07-09  Iain Sandoe  <iain@codesourcery.com>
+
+       * config/darwin.h (SUBTARGET_C_COMMON_OVERRIDE_OPTIONS): Move NeXT
+       runtime exceptions model setting from here ...
+       * config/darwin.c (darwin_override_options): ... to here.
+
 2012-07-09  Steven Bosscher  <steven@gcc.gnu.org>
 
        PR tree-optimization/53887
index 6805cf1264e1d040da1c2654ffc75aa34e9b8c30..33a831f89dcf7bf31d93684ead66f464e22d67ef 100644 (file)
@@ -3007,6 +3007,18 @@ darwin_override_options (void)
       flag_reorder_blocks = 1;
     }
 
+    /* FIXME: flag_objc_sjlj_exceptions is no longer needed since there is only
+       one valid choice of exception scheme for each runtime.  */
+    if (!global_options_set.x_flag_objc_sjlj_exceptions)
+      global_options.x_flag_objc_sjlj_exceptions = 
+                               flag_next_runtime && !TARGET_64BIT;
+
+    /* FIXME: and this could be eliminated then too.  */
+    if (!global_options_set.x_flag_exceptions
+       && flag_objc_exceptions
+       && TARGET_64BIT)
+      flag_exceptions = 1;
+
   if (flag_mkernel || flag_apple_kext)
     {
       /* -mkernel implies -fapple-kext for C++ */
index d2f47f8cbb414fef3fb2c0dd3e3fbaa449776a18..ca3e0eb3aab7b115c47fa41c01345371892e42f5 100644 (file)
@@ -140,9 +140,6 @@ extern GTY(()) int darwin_ms_struct;
   } while (0)
 
 #define SUBTARGET_C_COMMON_OVERRIDE_OPTIONS do {                        \
-    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)                               \
       {                                                                        \
        if (flag_use_cxa_atexit == 2)                                   \