From: tocarip Date: Wed, 19 Nov 2014 11:48:48 +0000 (+0000) Subject: gcc/ X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bb7acc769ae43436698e5a22e1a6c778377d578a;p=thirdparty%2Fgcc.git gcc/ 2014-11-19 Ilya Tocar * collect2.c (main): Don't call fatal_error before diagnostic_initialize. * lto-wrapper.c (main): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217765 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9169e354e8e2..a4953e9b63b6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-11-19 Ilya Tocar + + * collect2.c (main): Don't call fatal_error before + diagnostic_initialize. + * lto-wrapper.c (main): Likewise. + 2014-11-19 Tom de Vries PR tree-optimization/62167 diff --git a/gcc/collect2.c b/gcc/collect2.c index 7c067ffcafbb..9c3a1c557276 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -955,9 +955,6 @@ main (int argc, char **argv) signal (SIGCHLD, SIG_DFL); #endif - if (atexit (collect_atexit) != 0) - fatal_error ("atexit failed"); - /* Unlock the stdio streams. */ unlock_std_streams (); @@ -965,6 +962,9 @@ main (int argc, char **argv) diagnostic_initialize (global_dc, 0); + if (atexit (collect_atexit) != 0) + fatal_error ("atexit failed"); + /* Do not invoke xcalloc before this point, since locale needs to be set first, in case a diagnostic is issued. */ diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index 951a2ddc7878..6b417821295d 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -1314,13 +1314,13 @@ main (int argc, char *argv[]) xmalloc_set_program_name (progname); - if (atexit (lto_wrapper_cleanup) != 0) - fatal_error ("atexit failed"); - gcc_init_libintl (); diagnostic_initialize (global_dc, 0); + if (atexit (lto_wrapper_cleanup) != 0) + fatal_error ("atexit failed"); + if (signal (SIGINT, SIG_IGN) != SIG_IGN) signal (SIGINT, fatal_signal); #ifdef SIGHUP