aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-wrapper.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2011-05-20 15:19:05 +0000
committerJoseph Myers <joseph@codesourcery.com>2011-05-20 15:19:05 +0000
commitd42c7d382afa089b1ec41fc69f43542ca1fb71ee (patch)
treefa5aead1f29326d9b2bb2587e177b39ecc6739c3 /gcc/lto-wrapper.c
parent1e813aa7211ea58808d0f68caf9996b479c74688 (diff)
* Makefile.in (LIBDEPS): Add libcommon.a.
(LIBS): Likewise. (GCC_OBJS): Remove diagnostic.o, pretty-print.o and input.o. (OBJS-common): Remove diagnostic.o, input.o, intl.o, pretty-print.o and version.o. (OBJS-libcommon): New. (ALL_HOST_BACKEND_OBJS): Add $(OBJS-libcommon). (BACKEND): Add libcommon.a. (MOSTLYCLEANFILES): Likewise. (libcommon.a): New. (xgcc$(exeext)): Don't explicitly use version.o and intl.o. (cpp$(exeext)): Likewise. (COLLECT2_OBJS): Remove intl.o, version.o, diagnostic.o, pretty-print.o and input.o. (lto-wrapper$(exeext)): Don't explicitly use intl.o. (lto-wrapper.o): Depend on $(DIAGNOSTIC_H). (errors.o): Remove. (mips-tfile): Don't explicitly use version.o. (mips-tdump): Likewise. (gcov.o): Depend on $(DIAGNOSTIC_H). (gcov-dump.o): Depend on intl.h and $(DIAGNOSTIC_H). (GCOV_OBJS): Remove intl.o, version.o and errors.o. (GCOV_DUMP_OBJS): Remove version.o and errors.o. * gcov-dump.c: Include intl.h and diagnostic.h. (main): Initialize diagnostics. * gcov.c: Include diagnostic.h. (fnotice): Remove. (main): Initialize diagnostics. * lto-wrapper.c: Include diagnostic.h. (main): Initialize diagnostics. ada: * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o. * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a instead of version.o. cp: * Make-lang.in (GXX_OBJS): Remove intl.o and version.o. fortran: * Make-lang.in (GFORTRAN_D_OBJS): Remove version.o and intl.o. go: * Make-lang.in (GCCGO_OBJS): Remove intl.o and version.o. java: * Make-lang.in ($(XGCJ)$(exeext)): Don't explicitly use intl.o and version.o. (JCFDUMP_OBJS): Remove errors.o, version.o and intl.o. (JVGENMAIN_OBJS): Remove errors.o and intl.o. (java/jcf-dump.o, java/jvgenmain.o): Depend in $(DIAGNOSTIC_H). * jcf-dump.c: Include diagnostic.h. (main): Initialize diagnostics. * jvgenmain.c: Include diagnostic.h. (main): Initialize diagnostics. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@173958 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-wrapper.c')
-rw-r--r--gcc/lto-wrapper.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 613c7b054df..f26b3aca510 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "intl.h"
+#include "diagnostic.h"
#include "obstack.h"
int debug; /* true if -save-temps. */
@@ -627,8 +628,19 @@ cont:
int
main (int argc, char *argv[])
{
+ const char *p;
+
+ p = argv[0] + strlen (argv[0]);
+ while (p != argv[0] && !IS_DIR_SEPARATOR (p[-1]))
+ --p;
+ progname = p;
+
+ xmalloc_set_program_name (progname);
+
gcc_init_libintl ();
+ diagnostic_initialize (global_dc, 0);
+
if (signal (SIGINT, SIG_IGN) != SIG_IGN)
signal (SIGINT, fatal_signal);
#ifdef SIGHUP