Fwd: Go patch committed: enable -fkeep-gc-roots-live for Go

Ian Lance Taylor iant@golang.org
Wed Jan 27 18:41:00 GMT 2016


Java maintainers: you may want to implement a similar patch for the
Java frontend.
See the discussion about the new option at
https://gcc.gnu.org/ml/gcc/2016-01/msg00023.html
https://gcc.gnu.org/ml/gcc-patches/2016-01/msg01483.html
Ian
---------- Forwarded message ----------
From: Ian Lance Taylor <iant@golang.org>
Date: Wed, Jan 27, 2016 at 10:37 AM
Subject: Go patch committed: enable -fkeep-gc-roots-live for Go
To: gcc-patches <gcc-patches@gcc.gnu.org>,
"gofrontend-dev@googlegroups.com" <gofrontend-dev@googlegroups.com>
This patch enables the new -fkeep-gc-roots-live option for Go. This
fixes https://golang.org/issue/13662 . Bootstrapped and ran Go
testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
2016年01月27日 Ian Lance Taylor <iant@google.com>
* go-lang.c (go_langhook_init_options_struct): Default to
-fkeep-gc-roots-live.
-------------- next part --------------
Index: gcc/go/go-lang.c
===================================================================
--- gcc/go/go-lang.c	(revision 232888)
+++ gcc/go/go-lang.c	(working copy)
@@ -150,6 +150,9 @@
 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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /