]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
go-lang.c (go_langhook_init_options_struct): Default to -fkeep-gc-roots-live.
authorIan Lance Taylor <iant@google.com>
Wed, 27 Jan 2016 18:37:14 +0000 (18:37 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 27 Jan 2016 18:37:14 +0000 (18:37 +0000)
* go-lang.c (go_langhook_init_options_struct): Default to
-fkeep-gc-roots-live.

From-SVN: r232890

gcc/go/ChangeLog
gcc/go/go-lang.c

index d985328b181e81681733fa766957e4c5c7a67df9..c0a6ddac23c6cdb4b03709028620b1f1c891e6a0 100644 (file)
@@ -1,3 +1,8 @@
+2016-01-27  Ian Lance Taylor  <iant@google.com>
+
+       * go-lang.c (go_langhook_init_options_struct): Default to
+       -fkeep-gc-roots-live.
+
 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
 
        Update copyright years.
index 1606524100889a15dc8a9db962ad3537a48995b0..9f21424af6dfda55cf56c1176dee64fadd8a51c6 100644 (file)
@@ -150,6 +150,9 @@ go_langhook_init_options_struct (struct gcc_options *opts)
   opts->x_flag_exceptions = 1;
   opts->x_flag_non_call_exceptions = 1;
 
+  /* We need to keep pointers live for the garbage collector.  */
+  opts->x_flag_keep_gc_roots_live = 1;
+
   /* Go programs expect runtime.Callers to work, and that uses
      libbacktrace that uses debug info.  Set the debug info level to 1
      by default.  In post_options we will set the debug type if the