aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2019-11-01 20:47:48 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-11-01 20:47:48 +0000
commit87b14bf0d2f961862858a2e3966c45a503957434 (patch)
tree8c4547696d137f23a011fa17003a1f8e7c51d0c0
parent1830e27db910cb79110b6fc09521586af3482594 (diff)
downloadgcc-87b14bf0d2f961862858a2e3966c45a503957434.zip
gcc-87b14bf0d2f961862858a2e3966c45a503957434.tar.gz
gcc-87b14bf0d2f961862858a2e3966c45a503957434.tar.bz2
[Darwin] Fix Objective-C NeXT ABI version check diagnostics.
This fixes build errors when used with newer GCC and corrects a mistake in the checking of ABI versions. 276768 We were missing a check for the case that user's ABI was > 2 and the codegen was for 64 bit. 276635 Fix some format-related build warnings. This fixes two error messages to avoid punctuation and contracted negations. gcc/ 2019-11-01 Iain Sandoe <iain@sandoe.co.uk> Backport from mainline 2019-10-09 Iain Sandoe <iain@sandoe.co.uk> * config/darwin.c (darwin_override_options): Make the check for Objective-C ABI version more specific for 64bit code. Backport from mainline 2019-10-06 Iain Sandoe <iain@sandoe.co.uk> * config/darwin.c (darwin_override_options): Adjust objective-c ABI version error messages to avoid punctuation and contracted negations. From-SVN: r277726
-rw-r--r--gcc/ChangeLog15
-rw-r--r--gcc/config/darwin.c20
2 files changed, 26 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cc3a2ab..83c25e0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,6 +1,21 @@
2019-11-01 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
+ 2019-10-09 Iain Sandoe <iain@sandoe.co.uk>
+
+ * config/darwin.c (darwin_override_options): Make the check for
+ Objective-C ABI version more specific for 64bit code.
+
+ Backport from mainline
+ 2019-10-06 Iain Sandoe <iain@sandoe.co.uk>
+
+ * config/darwin.c (darwin_override_options): Adjust objective-c
+ ABI version error messages to avoid punctuation and contracted
+ negations.
+
+2019-11-01 Iain Sandoe <iain@sandoe.co.uk>
+
+ Backport from mainline
2019-07-03 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.h (REAL_LIBGCC_SPEC): Adjust for earlier Darwin.
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 90f12cb..f924592 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -3199,17 +3199,19 @@ darwin_override_options (void)
: (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%>");
+ if (TARGET_64BIT && global_options.x_flag_objc_abi != 2)
+ /* The Objective-C family ABI 2 is the only valid version NeXT/m64. */
+ error_at (UNKNOWN_LOCATION,
+ "%<-fobjc-abi-version%> 2 must be used for 64 bit targets"
+ " with %<-fnext-runtime%>");
+ else if (!TARGET_64BIT && global_options.x_flag_objc_abi >= 2)
+ /* ABI versions 0 and 1 are the only valid versions NeXT/m32. */
+ error_at (UNKNOWN_LOCATION,
+ "%<-fobjc-abi-version%> %d is not supported for 32 bit"
+ " targets with %<-fnext-runtime%>",
+ global_options.x_flag_objc_abi);
}
/* Don't emit DWARF3/4 unless specifically selected. This is a