From d7993d8d848f2cf92aecfa0ff586bb7b222e204a Mon Sep 17 00:00:00 2001 From: ian Date: Wed, 27 Jan 2016 18:37:14 +0000 Subject: [PATCH] * go-lang.c (go_langhook_init_options_struct): Default to -fkeep-gc-roots-live. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232890 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/go/ChangeLog | 5 +++++ gcc/go/go-lang.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog index d985328b181e8..c0a6ddac23c6c 100644 --- a/gcc/go/ChangeLog +++ b/gcc/go/ChangeLog @@ -1,3 +1,8 @@ +2016-01-27 Ian Lance Taylor + + * go-lang.c (go_langhook_init_options_struct): Default to + -fkeep-gc-roots-live. + 2016-01-04 Jakub Jelinek Update copyright years. diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c index 1606524100889..9f21424af6dfd 100644 --- a/gcc/go/go-lang.c +++ b/gcc/go/go-lang.c @@ -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