diff options
author | Iain Sandoe <iains@gcc.gnu.org> | 2011-11-30 10:42:58 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2011-11-30 10:42:58 +0000 |
commit | fea3ca9130aa2ba28ea5176b647c80f2ebc7670a (patch) | |
tree | b653e1b6a2f0c5f5fadb055efeb46c96ad475c0e /gcc/config/darwin.c | |
parent | 0f14d442fcb906786e4db5b4ce010ff25fb462e7 (diff) | |
download | gcc-fea3ca9130aa2ba28ea5176b647c80f2ebc7670a.zip gcc-fea3ca9130aa2ba28ea5176b647c80f2ebc7670a.tar.gz gcc-fea3ca9130aa2ba28ea5176b647c80f2ebc7670a.tar.bz2 |
shift flag_next/gnu_runtime to modern opts system.
gcc:
* doc/tm.texi.in (NEXT_OBJC_RUNTIME): Update macro description.
* doc/tm.texi: Regenerate.
* flags.h (flag_next_runtime): Remove references.
* toplev.c: Likewise.
* defaults.h (NEXT_OBJC_RUNTIME): Provide default.
* gccspec.c (lang_specific_driver): Adjust use of NEXT_OBJC_RUNTIME.
* config/darwin.c (darwin_override_options): Provide default
Objective-C abi settings and target conflict checks.
* config/darwin.h (SUBTARGET_C_COMMON_OVERRIDE_OPTIONS): Remove unused
code. Adjust indenting.
gcc/c-family:
* c.opt (fgnu-runtime): Provide full description.
(fnext-runtime): Likewise.
* c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
From-SVN: r181837
Diffstat (limited to 'gcc/config/darwin.c')
-rw-r--r-- | gcc/config/darwin.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index b1038f4..ba253dd 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -2942,6 +2942,33 @@ darwin_override_options (void) /* Earlier versions are not specifically accounted, until required. */ } + /* In principle, this should be c-family only. However, we really need to + set sensible defaults for LTO as well, since the section selection stuff + should check for correctness re. the ABI. TODO: check and provide the + flags (runtime & ABI) from the lto wrapper). */ + + /* 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) + ? 0 + : (TARGET_64BIT ? 2 + : (generating_for_darwin_version >= 9) ? 1 + : 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 must be" + " used for %<-m64%> targets with" + " %<-fnext-runtime%>"); + if (!TARGET_64BIT && global_options.x_flag_objc_abi >= 2) + error_at (UNKNOWN_LOCATION, "%<-fobjc-abi-version%> >= 2 is not" + " supported on %<-m32%> targets with" + " %<-fnext-runtime%>"); + } + /* Don't emit DWARF3/4 unless specifically selected. This is a workaround for tool bugs. */ if (!global_options_set.x_dwarf_strict) |