aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/darwin.h
diff options
context:
space:
mode:
authorIain Sandoe <iains@gcc.gnu.org>2011-02-18 00:07:38 +0000
committerNicola Pero <nicola@gcc.gnu.org>2011-02-18 00:07:38 +0000
commitd764a8e6bdae09aecb7a8378def9d900f84ce53e (patch)
treec0b6f091c931f0a65e3fb59fbd9fff3f5ba9bde9 /gcc/config/darwin.h
parent0a8134cacea8b18b0e241cc492546cbb69ae598a (diff)
downloadgcc-d764a8e6bdae09aecb7a8378def9d900f84ce53e.zip
gcc-d764a8e6bdae09aecb7a8378def9d900f84ce53e.tar.gz
gcc-d764a8e6bdae09aecb7a8378def9d900f84ce53e.tar.bz2
Added support for the 64-bit Apple Objective-C runtime
From-SVN: r170260
Diffstat (limited to 'gcc/config/darwin.h')
-rw-r--r--gcc/config/darwin.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 778ff1e..0526d85 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -140,6 +140,16 @@ extern GTY(()) int darwin_ms_struct;
} while (0)
#define SUBTARGET_C_COMMON_OVERRIDE_OPTIONS do { \
+ /* Unless set, force ABI=2 for NeXT and m64, 0 otherwise. */ \
+ if (!global_options_set.x_flag_objc_abi) \
+ global_options.x_flag_objc_abi \
+ = (flag_next_runtime && TARGET_64BIT) ? 2 : 0; \
+ /* Objective-C family ABI 2 is only valid for next/m64 at present. */ \
+ if (global_options_set.x_flag_objc_abi && flag_next_runtime) \
+ if (TARGET_64BIT && global_options.x_flag_objc_abi < 2) \
+ error_at (UNKNOWN_LOCATION, "%<-fobjc-abi-version%> >= 2 is only" \
+ " supported on %<-m64%> targets for" \
+ " %<-fnext-runtime%>"); \
/* 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) \
@@ -599,7 +609,7 @@ int darwin_label_is_anonymous_local_objc_name (const char *name);
} \
else if (xname[0] == '+' || xname[0] == '-') \
fprintf (FILE, "\"%s\"", xname); \
- else if (darwin_label_is_anonymous_local_objc_name (xname)) \
+ else if (darwin_label_is_anonymous_local_objc_name (xname)) \
fprintf (FILE, "L%s", xname); \
else if (!strncmp (xname, ".objc_class_name_", 17)) \
fprintf (FILE, "%s", xname); \