Index: gcc/objc/objc-act.c
===================================================================
--- gcc/objc/objc-act.c	(revision 160431)
+++ gcc/objc/objc-act.c	(working copy)
@@ -545,6 +545,13 @@ objc_init (void)
 	 structure-returning methods.  */
       default_constant_string_class_name = "NXConstantString";
       flag_typed_selectors = 1;
+      /* GNU runtime does not need the compiler to change code
+         in order to do GC. */
+      if (flag_objc_gc)
+	{
+	  warning_at (0, 0, "%<-fobjc-gc%> is ignored for %<-fgnu-runtime%>");
+	  flag_objc_gc=0;
+	}
     }
 
   init_objc ();
Index: gcc/testsuite/objc.dg/objc-gc-4.m
===================================================================
--- gcc/testsuite/objc.dg/objc-gc-4.m	(revision 160431)
+++ gcc/testsuite/objc.dg/objc-gc-4.m	(working copy)
@@ -2,8 +2,9 @@
    (where component references get rewritten).  */
 /* Contributed by Ziemowit Laski <zlaski@apple.com>  */
 
-/* { dg-do compile { target *-*-darwin* } } */
+/* { dg-do compile } */
 /* { dg-options "-fobjc-gc" } */
+/* { dg-prune-output "cc1obj: warning: '-fobjc-gc' is ignored for '-fgnu-runtime'" } */
 
 #include "../objc-obj-c++-shared/Object1.h"
 
Index: gcc/testsuite/obj-c++.dg/objc-gc-3.mm
===================================================================
--- gcc/testsuite/obj-c++.dg/objc-gc-3.mm	(revision 160431)
+++ gcc/testsuite/obj-c++.dg/objc-gc-3.mm	(working copy)
@@ -2,8 +2,9 @@
    (where component references get rewritten).  */
 /* Contributed by Ziemowit Laski <zlaski@apple.com>  */
 
-/* { dg-do compile { target *-*-darwin* } } */
+/* { dg-do compile } */
 /* { dg-options "-fobjc-gc" } */
+/* { dg-prune-output "cc1objplus: warning: '-fobjc-gc' is ignored for '-fgnu-runtime'" } */
 
 #include "../objc-obj-c++-shared/Object1.h"
 
