diff options
author | Joseph Myers <joseph@codesourcery.com> | 2011-05-20 16:19:05 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2011-05-20 16:19:05 +0100 |
commit | 2691e6d7331f85344153a387be33b055c269fbca (patch) | |
tree | fa5aead1f29326d9b2bb2587e177b39ecc6739c3 /gcc/gcov.c | |
parent | 252b3e8c7814cc47e68248d556cad390a137b955 (diff) | |
download | gcc-2691e6d7331f85344153a387be33b055c269fbca.zip gcc-2691e6d7331f85344153a387be33b055c269fbca.tar.gz gcc-2691e6d7331f85344153a387be33b055c269fbca.tar.bz2 |
Makefile.in (LIBDEPS): Add libcommon.a.
* 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.
From-SVN: r173958
Diffstat (limited to 'gcc/gcov.c')
-rw-r--r-- | gcc/gcov.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -37,6 +37,7 @@ along with Gcov; see the file COPYING3. If not see #include "coretypes.h" #include "tm.h" #include "intl.h" +#include "diagnostic.h" #include "version.h" #include <getopt.h> @@ -342,7 +343,6 @@ static int flag_preserve_paths = 0; static int flag_counts = 0; /* Forward declarations. */ -static void fnotice (FILE *, const char *, ...) ATTRIBUTE_PRINTF_2; static int process_args (int, char **); static void print_usage (int) ATTRIBUTE_NORETURN; static void print_version (void) ATTRIBUTE_NORETURN; @@ -369,12 +369,22 @@ main (int argc, char **argv) { int argno; int first_arg; + 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); /* Unlock the stdio streams. */ unlock_std_streams (); gcc_init_libintl (); + diagnostic_initialize (global_dc, 0); + /* Handle response files. */ expandargv (&argc, &argv); @@ -401,16 +411,6 @@ main (int argc, char **argv) return 0; } - -static void -fnotice (FILE *file, const char *cmsgid, ...) -{ - va_list ap; - - va_start (ap, cmsgid); - vfprintf (file, _(cmsgid), ap); - va_end (ap); -} /* Print a usage message and exit. If ERROR_P is nonzero, this is an error, otherwise the output of --help. */ |