diff options
-rw-r--r-- | gcc/ChangeLog | 33 | ||||
-rw-r--r-- | gcc/Makefile.in | 69 | ||||
-rw-r--r-- | gcc/ada/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/Make-lang.in | 2 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/Makefile.in | 2 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/Make-lang.in | 2 | ||||
-rw-r--r-- | gcc/fortran/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/fortran/Make-lang.in | 4 | ||||
-rw-r--r-- | gcc/gcov-dump.c | 14 | ||||
-rw-r--r-- | gcc/gcov.c | 22 | ||||
-rw-r--r-- | gcc/go/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/go/Make-lang.in | 2 | ||||
-rw-r--r-- | gcc/java/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/java/Make-lang.in | 17 | ||||
-rw-r--r-- | gcc/java/jcf-dump.c | 11 | ||||
-rw-r--r-- | gcc/java/jvgenmain.c | 12 | ||||
-rw-r--r-- | gcc/lto-wrapper.c | 12 |
18 files changed, 172 insertions, 61 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8adc625..7f8c21a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,36 @@ +2011-05-20 Joseph Myers <joseph@codesourcery.com> + + * 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. + 2011-05-20 Michael Matz <matz@suse.de> * Makefile.in (OBJS-common, OBJS-md, OBJS-archive): Merge into OBJS. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index fd3a676..ccb72da 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1047,7 +1047,8 @@ LIBIBERTY = ../libiberty/libiberty.a BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/libiberty.a # Dependencies on the intl and portability libraries. -LIBDEPS= $(CPPLIB) $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP) $(LIBDECNUMBER) +LIBDEPS= libcommon.a $(CPPLIB) $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP) \ + $(LIBDECNUMBER) # Likewise, for use in the tools that must run on this machine # even if we are cross-building GCC. @@ -1055,8 +1056,8 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) # How to link with both our special library facilities # and the system's installed libraries. -LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER) \ - $(HOST_LIBS) +LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) \ + $(LIBDECNUMBER) $(HOST_LIBS) BACKENDLIBS = $(CLOOGLIBS) $(PPLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ $(ZLIB) # Any system libraries needed just for GNAT. @@ -1167,8 +1168,7 @@ CXX_TARGET_OBJS=@cxx_target_objs@ FORTRAN_TARGET_OBJS=@fortran_target_objs@ # Object files for gcc driver. -GCC_OBJS = gcc.o opts-common.o gcc-options.o diagnostic.o pretty-print.o \ - input.o vec.o ggc-none.o +GCC_OBJS = gcc.o opts-common.o gcc-options.o vec.o ggc-none.o # Language-specific object files shared by all C-family front ends. C_COMMON_OBJS = c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o \ @@ -1244,7 +1244,6 @@ OBJS = \ df-problems.o \ df-scan.o \ dfp.o \ - diagnostic.o \ dojump.o \ dominance.o \ domwalk.o \ @@ -1294,10 +1293,8 @@ OBJS = \ implicit-zee.o \ incpath.o \ init-regs.o \ - input.o \ integrate.o \ internal-fn.o \ - intl.o \ ipa-cp.o \ ipa-split.o \ ipa-inline.o \ @@ -1355,7 +1352,6 @@ OBJS = \ postreload.o \ predict.o \ prefix.o \ - pretty-print.o \ print-rtl.o \ print-tree.o \ profile.o \ @@ -1486,7 +1482,6 @@ OBJS = \ varasm.o \ varpool.o \ vec.o \ - version.o \ vmsdbgout.o \ web.o \ xcoffout.o \ @@ -1494,12 +1489,16 @@ OBJS = \ $(EXTRA_OBJS) \ $(host_hook_obj) +# Objects in libcommon.a, potentially used by all host binaries and with +# no target dependencies. +OBJS-libcommon = diagnostic.o pretty-print.o intl.o input.o version.o + # This lists all host objects for the front ends. ALL_HOST_FRONTEND_OBJS = $(C_OBJS) \ $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS)) -ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) \ - @TREEBROWSER@ main.o gccspec.o version.o intl.o prefix.o cppspec.o \ +ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \ + @TREEBROWSER@ main.o gccspec.o prefix.o cppspec.o \ $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) mips-tfile.o mips-tdump.o \ $(GCOV_OBJS) $(GCOV_DUMP_OBJS) @@ -1507,7 +1506,8 @@ ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) \ # compilation or not. ALL_HOST_OBJS = $(ALL_HOST_FRONTEND_OBJS) $(ALL_HOST_BACKEND_OBJS) -BACKEND = main.o @TREEBROWSER@ libbackend.a $(CPPLIB) $(LIBDECNUMBER) +BACKEND = main.o @TREEBROWSER@ libbackend.a libcommon.a $(CPPLIB) \ + $(LIBDECNUMBER) MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \ insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \ @@ -1519,7 +1519,7 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \ $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \ $(SPECS) collect2$(exeext) lto-wrapper$(exeext) \ gcov-iov$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \ - *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a libgcc.mk + *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a libcommon.a libgcc.mk # Defined in libgcc2.c, included only in the static library. LIB2FUNCS_ST = _eprintf __gcc_bcmp @@ -1831,21 +1831,24 @@ libbackend.a: $(OBJS) $(AR) $(AR_FLAGS) libbackend.a $(OBJS) -$(RANLIB) $(RANLIB_FLAGS) libbackend.a +libcommon.a: $(OBJS-libcommon) + -rm -rf libcommon.a + $(AR) $(AR_FLAGS) libcommon.a $(OBJS-libcommon) + -$(RANLIB) $(RANLIB_FLAGS) libcommon.a + # We call this executable `xgcc' rather than `gcc' # to avoid confusion if the current directory is in the path # and CC is `gcc'. It is renamed to `gcc' when it is installed. -xgcc$(exeext): $(GCC_OBJS) gccspec.o version.o intl.o prefix.o \ - version.o $(LIBDEPS) $(EXTRA_GCC_OBJS) +xgcc$(exeext): $(GCC_OBJS) gccspec.o prefix.o $(LIBDEPS) $(EXTRA_GCC_OBJS) +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) \ - gccspec.o intl.o prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS) + gccspec.o prefix.o $(EXTRA_GCC_OBJS) $(LIBS) # cpp is to cpp0 as gcc is to cc1. # The only difference from xgcc is that it's linked with cppspec.o # instead of gccspec.o. -cpp$(exeext): $(GCC_OBJS) cppspec.o version.o intl.o prefix.o \ - version.o $(LIBDEPS) $(EXTRA_GCC_OBJS) +cpp$(exeext): $(GCC_OBJS) cppspec.o prefix.o $(LIBDEPS) $(EXTRA_GCC_OBJS) +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) \ - cppspec.o intl.o prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS) + cppspec.o prefix.o $(EXTRA_GCC_OBJS) $(LIBS) # Dump a specs file to make -B./ read these specs over installed ones. $(SPECS): xgcc$(exeext) @@ -2082,8 +2085,7 @@ sbitmap.o: sbitmap.c sbitmap.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(BASIC_BLOCK ebitmap.o: ebitmap.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(EBITMAP_H) sparseset.o: sparseset.c $(SYSTEM_H) sparseset.h $(CONFIG_H) -COLLECT2_OBJS = collect2.o collect2-aix.o tlink.o intl.o version.o \ - diagnostic.o pretty-print.o input.o +COLLECT2_OBJS = collect2.o collect2-aix.o tlink.o COLLECT2_LIBS = @COLLECT2_LIBS@ collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS) # Don't try modifying collect2 (aka ld) in place--it might be linking this. @@ -2104,12 +2106,12 @@ collect2-aix.o : collect2-aix.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ tlink.o: tlink.c $(DEMANGLE_H) $(HASHTAB_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(OBSTACK_H) collect2.h intl.h $(DIAGNOSTIC_CORE_H) -lto-wrapper$(exeext): lto-wrapper.o intl.o $(LIBDEPS) - +$(COMPILER) $(ALL_COMPILERFLAGS) $(LDFLAGS) -o T$@ lto-wrapper.o intl.o $(LIBS) +lto-wrapper$(exeext): lto-wrapper.o $(LIBDEPS) + +$(COMPILER) $(ALL_COMPILERFLAGS) $(LDFLAGS) -o T$@ lto-wrapper.o $(LIBS) mv -f T$@ $@ lto-wrapper.o: lto-wrapper.c $(CONFIG_H) $(SYSTEM_H) coretypes.h intl.h \ - $(OBSTACK_H) + $(OBSTACK_H) $(DIAGNOSTIC_H) # Files used by all variants of C. c-family/c-common.o : c-family/c-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ @@ -3498,7 +3500,6 @@ params.o : params.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(PARAMS_H) \ pointer-set.o: pointer-set.c pointer-set.h $(CONFIG_H) $(SYSTEM_H) hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(HOOKS_H) pretty-print.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h intl.h $(PRETTY_PRINT_H) -errors.o : errors.c $(CONFIG_H) $(SYSTEM_H) errors.h $(BCONFIG_H) dbgcnt.o: dbgcnt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) $(DBGCNT_H) \ $(TM_H) $(RTL_H) output.h lower-subreg.o : lower-subreg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ @@ -3520,16 +3521,16 @@ $(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \ $(out_file) $(OUTPUT_OPTION) # Build auxiliary files that support ecoff format. -mips-tfile: mips-tfile.o version.o $(LIBDEPS) +mips-tfile: mips-tfile.o $(LIBDEPS) $(LINKER) $(LINKERFLAGS) $(LDFLAGS) -o $@ \ - mips-tfile.o version.o $(LIBS) + mips-tfile.o $(LIBS) mips-tfile.o : mips-tfile.c $(CONFIG_H) $(SYSTEM_H) \ version.h $(srcdir)/../include/getopt.h $(GSTAB_H) intl.h -mips-tdump: mips-tdump.o version.o $(LIBDEPS) +mips-tdump: mips-tdump.o $(LIBDEPS) $(LINKER) $(LINKERFLAGS) $(LDFLAGS) -o $@ \ - mips-tdump.o version.o $(LIBS) + mips-tdump.o $(LIBS) mips-tdump.o : mips-tdump.c $(CONFIG_H) $(SYSTEM_H) \ version.h $(srcdir)/../include/getopt.h stab.def @@ -4053,14 +4054,14 @@ s-iov: build/gcov-iov$(build_exeext) $(BASEVER) $(DEVPHASE) $(STAMP) s-iov gcov.o: gcov.c gcov-io.c $(GCOV_IO_H) intl.h $(SYSTEM_H) coretypes.h $(TM_H) \ - $(CONFIG_H) version.h + $(CONFIG_H) version.h $(DIAGNOSTIC_H) gcov-dump.o: gcov-dump.c gcov-io.c $(GCOV_IO_H) $(SYSTEM_H) coretypes.h \ - $(TM_H) $(CONFIG_H) version.h + $(TM_H) $(CONFIG_H) version.h intl.h $(DIAGNOSTIC_H) -GCOV_OBJS = gcov.o intl.o version.o errors.o +GCOV_OBJS = gcov.o gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS) +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GCOV_OBJS) $(LIBS) -o $@ -GCOV_DUMP_OBJS = gcov-dump.o version.o errors.o +GCOV_DUMP_OBJS = gcov-dump.o gcov-dump$(exeext): $(GCOV_DUMP_OBJS) $(LIBDEPS) +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GCOV_DUMP_OBJS) \ $(LIBS) -o $@ diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b9325bc..8c297de 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2011-05-20 Joseph Myers <joseph@codesourcery.com> + + * 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. + 2011-05-18 Kai Tietz <ktietz@redhat.com> * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in index bfa859c..14c9409 100644 --- a/gcc/ada/gcc-interface/Make-lang.in +++ b/gcc/ada/gcc-interface/Make-lang.in @@ -469,7 +469,7 @@ GNATBIND_OBJS = \ # List of extra object files linked in with various programs. EXTRA_GNAT1_OBJS = prefix.o -EXTRA_GNATBIND_OBJS = prefix.o version.o +EXTRA_GNATBIND_OBJS = prefix.o # Language-independent object files. ADA_BACKEND = $(BACKEND) attribs.o diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index 94e98d6..fbcff81 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -180,7 +180,7 @@ LIBINTL_DEP = @LIBINTL_DEP@ SYSLIBS = @GNAT_LIBEXC@ # List of extra object files linked in with various programs. -EXTRA_GNATTOOLS_OBJS = ../../prefix.o ../../version.o +EXTRA_GNATTOOLS_OBJS = ../../prefix.o ../../libcommon.a # List extra gnattools EXTRA_GNATTOOLS = diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7e59b6b..118022e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2011-05-20 Joseph Myers <joseph@codesourcery.com> + + * Make-lang.in (GXX_OBJS): Remove intl.o and version.o. + 2011-05-19 Jakub Jelinek <jakub@redhat.com> PR c++/49043 diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index a93edc2..e343c3f 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -60,7 +60,7 @@ g++spec.o: $(srcdir)/cp/g++spec.c $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H) \ $(INCLUDES) $(srcdir)/cp/g++spec.c) # Create the compiler driver for g++. -GXX_OBJS = $(GCC_OBJS) g++spec.o intl.o prefix.o version.o +GXX_OBJS = $(GCC_OBJS) g++spec.o prefix.o g++$(exeext): $(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS) +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ $(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBS) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 5677c4c..6108401 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2011-05-20 Joseph Myers <joseph@codesourcery.com> + + * Make-lang.in (GFORTRAN_D_OBJS): Remove version.o and intl.o. + 2011-05-20 Janne Blomqvist <jb@gcc.gnu.org> * gfortran.texi (set_fpe): Update documentation. diff --git a/gcc/fortran/Make-lang.in b/gcc/fortran/Make-lang.in index 753221d..174a144 100644 --- a/gcc/fortran/Make-lang.in +++ b/gcc/fortran/Make-lang.in @@ -1,6 +1,6 @@ # -*- makefile -*- # Top level makefile fragment for GNU gfortran, the GNU Fortran 95 compiler. -# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Free Software Foundation, Inc. # Contributed by Paul Brook <paul@nowt.org # and Steven Bosscher <s.bosscher@student.tudelft.nl> @@ -84,7 +84,7 @@ gfortranspec.o: $(srcdir)/fortran/gfortranspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) \ $(INCLUDES) $(srcdir)/fortran/gfortranspec.c) # Create the compiler driver gfortran. -GFORTRAN_D_OBJS = $(GCC_OBJS) gfortranspec.o version.o prefix.o intl.o +GFORTRAN_D_OBJS = $(GCC_OBJS) gfortranspec.o prefix.o gfortran$(exeext): $(GFORTRAN_D_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS) +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ $(GFORTRAN_D_OBJS) $(EXTRA_GCC_OBJS) $(LIBS) diff --git a/gcc/gcov-dump.c b/gcc/gcov-dump.c index e9c3843..2009170 100644 --- a/gcc/gcov-dump.c +++ b/gcc/gcov-dump.c @@ -22,6 +22,8 @@ along with Gcov; see the file COPYING3. If not see #include "coretypes.h" #include "tm.h" #include "version.h" +#include "intl.h" +#include "diagnostic.h" #include <getopt.h> #define IN_GCOV (-1) #include "gcov-io.h" @@ -76,10 +78,22 @@ int main (int argc ATTRIBUTE_UNUSED, char **argv) { int opt; + 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); + while ((opt = getopt_long (argc, argv, "hlpv", options, NULL)) != -1) { switch (opt) @@ -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. */ diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog index 79e68be..5a0d30a 100644 --- a/gcc/go/ChangeLog +++ b/gcc/go/ChangeLog @@ -1,3 +1,7 @@ +2011-05-20 Joseph Myers <joseph@codesourcery.com> + + * Make-lang.in (GCCGO_OBJS): Remove intl.o and version.o. + 2011-05-13 Ian Lance Taylor <iant@google.com> * go-gcc.cc (Gcc_backend::function_type): When building a struct diff --git a/gcc/go/Make-lang.in b/gcc/go/Make-lang.in index 8b52cf2..0342b32 100644 --- a/gcc/go/Make-lang.in +++ b/gcc/go/Make-lang.in @@ -36,7 +36,7 @@ gospec.o: $(srcdir)/go/gospec.c $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H) \ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \ $(INCLUDES) $(srcdir)/go/gospec.c) -GCCGO_OBJS = $(GCC_OBJS) gospec.o intl.o prefix.o version.o +GCCGO_OBJS = $(GCC_OBJS) gospec.o prefix.o gccgo$(exeext): $(GCCGO_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS) $(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ $(GCCGO_OBJS) $(EXTRA_GCC_OBJS) $(LIBS) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index b96bf14..e0d97bf 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,15 @@ +2011-05-20 Joseph Myers <joseph@codesourcery.com> + + * 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. + 2011-05-11 Nathan Froyd <froydnj@codesourcery.com> * java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL. diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in index f5852b4..21bf93d 100644 --- a/gcc/java/Make-lang.in +++ b/gcc/java/Make-lang.in @@ -1,7 +1,7 @@ # Top level -*- makefile -*- fragment for the GNU compiler for the Java(TM) # language. # Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. #This file is part of GCC. @@ -63,11 +63,10 @@ jvspec.o: $(srcdir)/java/jvspec.c $(SYSTEM_H) coretypes.h $(TM_H) \ $(INCLUDES) $(srcdir)/java/jvspec.c $(OUTPUT_OPTION)) # Create the compiler driver for $(XGCJ). -$(XGCJ)$(exeext): $(GCC_OBJS) jvspec.o java/jcf-path.o version.o \ - prefix.o intl.o $(LIBDEPS) $(EXTRA_GCC_OBJS) +$(XGCJ)$(exeext): $(GCC_OBJS) jvspec.o java/jcf-path.o \ + prefix.o $(LIBDEPS) $(EXTRA_GCC_OBJS) +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) \ - jvspec.o java/jcf-path.o prefix.o intl.o \ - version.o $(EXTRA_GCC_OBJS) $(LIBS) + jvspec.o java/jcf-path.o prefix.o $(EXTRA_GCC_OBJS) $(LIBS) # Create a version of the $(XGCJ) driver which calls the cross-compiler. $(XGCJ)-cross$(exeext): $(XGCJ)$(exeext) @@ -86,9 +85,9 @@ JAVA_OBJS = java/class.o java/decl.o java/expr.o \ java/jcf-path.o java/boehm.o java/java-gimplify.o JCFDUMP_OBJS = java/jcf-dump.o java/jcf-io.o java/jcf-depend.o java/jcf-path.o \ - java/win32-host.o java/zextract.o errors.o version.o ggc-none.o intl.o + java/win32-host.o java/zextract.o ggc-none.o -JVGENMAIN_OBJS = java/jvgenmain.o java/mangle_name.o errors.o intl.o +JVGENMAIN_OBJS = java/jvgenmain.o java/mangle_name.o java_OBJS = $(sort $(JAVA_OBJS) $(JCFDUMP_OBJS) $(JVGENMAIN_OBJS)) jvspec.o @@ -269,7 +268,7 @@ JAVA_TREE_H = $(TREE_H) $(HASHTAB_H) java/java-tree.h java/jcf-dump.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(JAVA_TREE_H) \ java/jcf-dump.c java/jcf-reader.c java/jcf.h java/javaop.h java/javaop.def \ - version.h $(GGC_H) intl.h java/zipfile.h + version.h $(GGC_H) intl.h java/zipfile.h $(DIAGNOSTIC_H) java/boehm.o: java/boehm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) $(JAVA_TREE_H) java/parse.h java/builtins.o: java/builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ @@ -299,7 +298,7 @@ java/jcf-parse.o: java/jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) $(FLAGS_H) \ java/parse.h $(GGC_H) debug.h $(REAL_H) gt-java-jcf-parse.h \ java/jcf-reader.c java/zipfile.h java/jcf.h $(BITMAP_H) java/jvgenmain.o: java/jvgenmain.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_H) \ - coretypes.h $(TM_H) intl.h + coretypes.h $(TM_H) intl.h $(DIAGNOSTIC_H) java/lang.o: java/lang.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h input.h \ $(SYSTEM_H) coretypes.h $(TM_H) $(DIAGNOSTIC_H) \ langhooks.h $(LANGHOOKS_DEF_H) gt-java-lang.h $(OPTS_H) $(OPTIONS_H) \ diff --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c index 719105f..6a2714c 100644 --- a/gcc/java/jcf-dump.c +++ b/gcc/java/jcf-dump.c @@ -52,6 +52,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "system.h" #include "coretypes.h" #include "intl.h" +#include "diagnostic.h" #include "jcf.h" #include "tree.h" @@ -1172,12 +1173,22 @@ main (int argc, char** argv) { JCF jcf[1]; int argi, opt; + 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); + if (argc <= 1) { fprintf (stderr, _("jcf-dump: no classes specified\n")); diff --git a/gcc/java/jvgenmain.c b/gcc/java/jvgenmain.c index 128c8ec..db9b059 100644 --- a/gcc/java/jvgenmain.c +++ b/gcc/java/jvgenmain.c @@ -1,6 +1,6 @@ /* Program to generate "main" a Java(TM) class containing a main method. Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2010 Free Software Foundation, Inc. + 2007, 2008, 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -32,6 +32,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "tree.h" #include "java-tree.h" #include "intl.h" +#include "diagnostic.h" #include "tm.h" /* FIXME: For gcc_obstack_init from defaults.h. */ static char * do_mangle_classname (const char *string); @@ -59,11 +60,20 @@ main (int argc, char **argv) int indirect = 0; char *prog_name = argv[0]; + 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); + if (argc > 1 && ! strcmp (argv[1], "-findirect-dispatch")) { indirect = 1; diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index 613c7b0..f26b3ac 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 |