This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug bootstrap/46037] --enable-stage1-languages=c,lto --enable-languages=c,lto --with-build-config=bootstrap-lto fails on darwin
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: "howarth at nitro dot med.uc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 11 Jan 2011 17:56:17 +0100
- Subject: Re: [Bug bootstrap/46037] --enable-stage1-languages=c,lto --enable-languages=c,lto --with-build-config=bootstrap-lto fails on darwin
- References: <bug-46037-4@http.gcc.gnu.org/bugzilla/> <bug-46037-4-3s2wfUY8cC@http.gcc.gnu.org/bugzilla/>
> Why not retain the original code behavior unless generating lto? The patch
Because the original code bahviour is wrong. It assumes that debug_hooks is initialized
while it is not at the point.
Honza
> below works with both a standard and lto-bootstrap on x86_64-apple-darwin10.
>
> Index: gcc/config/darwin.c
> ===================================================================
> --- gcc/config/darwin.c (revision 168662)
> +++ gcc/config/darwin.c (working copy)
> @@ -2618,7 +2618,8 @@
> if (flag_var_tracking
> && (generating_for_darwin_version >= 9)
> && debug_info_level >= DINFO_LEVEL_NORMAL
> - && debug_hooks->var_location != do_nothing_debug_hooks.var_location)
> + && (flag_generate_lto ? (write_symbols == DWARF2_DEBUG)
> + : (debug_hooks->var_location != do_nothing_debug_hooks.var_location)))
> flag_var_tracking_uninit = 1;
>
> if (MACHO_DYNAMIC_NO_PIC_P)