X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fconfig%2Fdarwin.h;h=e3f69601d9b8e4af2c194f89b3e33a374a2deb7e;hb=05caec57fee5b8aa249b286d35b4775f764ab7d6;hp=086e428f2d4977f6174d60ea3543edf9a1b1645f;hpb=3e0e49f2b9126e8b092ded10aa65b7ed63dffbba;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index 086e428f2d4..e3f69601d9b 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -1,6 +1,6 @@ /* Target definitions for Darwin (Mac OS X) systems. Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010 + 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Apple Computer Inc. @@ -140,6 +140,21 @@ 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) \ + global_options.x_flag_objc_sjlj_exceptions = \ + flag_next_runtime && !TARGET_64BIT; \ if (flag_mkernel || flag_apple_kext) \ { \ if (flag_use_cxa_atexit == 2) \ @@ -160,10 +175,9 @@ extern GTY(()) int darwin_ms_struct; " %{pthread:-D_REENTRANT}" /* This is mostly a clone of the standard LINK_COMMAND_SPEC, plus - precomp, libtool, and fat build additions. Also we - don't specify a second %G after %L because libSystem is - self-contained and doesn't need to link against libgcc.a. */ -/* In general, random Darwin linker flags should go into LINK_SPEC + precomp, libtool, and fat build additions. + + In general, random Darwin linker flags should go into LINK_SPEC instead of LINK_COMMAND_SPEC. The command spec is better for specifying the handling of options understood by generic Unix linkers, and for positional arguments like libraries. */ @@ -173,25 +187,37 @@ extern GTY(()) int darwin_ms_struct; %(linker) \ %{flto*:%