Commit 2691e6d7 by Joseph Myers Committed by Joseph Myers

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
parent 252b3e8c
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> 2011-05-20 Michael Matz <matz@suse.de>
* Makefile.in (OBJS-common, OBJS-md, OBJS-archive): Merge into OBJS. * Makefile.in (OBJS-common, OBJS-md, OBJS-archive): Merge into OBJS.
......
...@@ -1047,7 +1047,8 @@ LIBIBERTY = ../libiberty/libiberty.a ...@@ -1047,7 +1047,8 @@ LIBIBERTY = ../libiberty/libiberty.a
BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/libiberty.a BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/libiberty.a
# Dependencies on the intl and portability libraries. # 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 # Likewise, for use in the tools that must run on this machine
# even if we are cross-building GCC. # even if we are cross-building GCC.
...@@ -1055,8 +1056,8 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) ...@@ -1055,8 +1056,8 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
# How to link with both our special library facilities # How to link with both our special library facilities
# and the system's installed libraries. # and the system's installed libraries.
LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER) \ LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) \
$(HOST_LIBS) $(LIBDECNUMBER) $(HOST_LIBS)
BACKENDLIBS = $(CLOOGLIBS) $(PPLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ BACKENDLIBS = $(CLOOGLIBS) $(PPLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
$(ZLIB) $(ZLIB)
# Any system libraries needed just for GNAT. # Any system libraries needed just for GNAT.
...@@ -1167,8 +1168,7 @@ CXX_TARGET_OBJS=@cxx_target_objs@ ...@@ -1167,8 +1168,7 @@ CXX_TARGET_OBJS=@cxx_target_objs@
FORTRAN_TARGET_OBJS=@fortran_target_objs@ FORTRAN_TARGET_OBJS=@fortran_target_objs@
# Object files for gcc driver. # Object files for gcc driver.
GCC_OBJS = gcc.o opts-common.o gcc-options.o diagnostic.o pretty-print.o \ GCC_OBJS = gcc.o opts-common.o gcc-options.o vec.o ggc-none.o
input.o vec.o ggc-none.o
# Language-specific object files shared by all C-family front ends. # 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 \ C_COMMON_OBJS = c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o \
...@@ -1244,7 +1244,6 @@ OBJS = \ ...@@ -1244,7 +1244,6 @@ OBJS = \
df-problems.o \ df-problems.o \
df-scan.o \ df-scan.o \
dfp.o \ dfp.o \
diagnostic.o \
dojump.o \ dojump.o \
dominance.o \ dominance.o \
domwalk.o \ domwalk.o \
...@@ -1294,10 +1293,8 @@ OBJS = \ ...@@ -1294,10 +1293,8 @@ OBJS = \
implicit-zee.o \ implicit-zee.o \
incpath.o \ incpath.o \
init-regs.o \ init-regs.o \
input.o \
integrate.o \ integrate.o \
internal-fn.o \ internal-fn.o \
intl.o \
ipa-cp.o \ ipa-cp.o \
ipa-split.o \ ipa-split.o \
ipa-inline.o \ ipa-inline.o \
...@@ -1355,7 +1352,6 @@ OBJS = \ ...@@ -1355,7 +1352,6 @@ OBJS = \
postreload.o \ postreload.o \
predict.o \ predict.o \
prefix.o \ prefix.o \
pretty-print.o \
print-rtl.o \ print-rtl.o \
print-tree.o \ print-tree.o \
profile.o \ profile.o \
...@@ -1486,7 +1482,6 @@ OBJS = \ ...@@ -1486,7 +1482,6 @@ OBJS = \
varasm.o \ varasm.o \
varpool.o \ varpool.o \
vec.o \ vec.o \
version.o \
vmsdbgout.o \ vmsdbgout.o \
web.o \ web.o \
xcoffout.o \ xcoffout.o \
...@@ -1494,12 +1489,16 @@ OBJS = \ ...@@ -1494,12 +1489,16 @@ OBJS = \
$(EXTRA_OBJS) \ $(EXTRA_OBJS) \
$(host_hook_obj) $(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. # This lists all host objects for the front ends.
ALL_HOST_FRONTEND_OBJS = $(C_OBJS) \ ALL_HOST_FRONTEND_OBJS = $(C_OBJS) \
$(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS)) $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS))
ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) \ ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \
@TREEBROWSER@ main.o gccspec.o version.o intl.o prefix.o cppspec.o \ @TREEBROWSER@ main.o gccspec.o prefix.o cppspec.o \
$(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) mips-tfile.o mips-tdump.o \ $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) mips-tfile.o mips-tdump.o \
$(GCOV_OBJS) $(GCOV_DUMP_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS)
...@@ -1507,7 +1506,8 @@ ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) \ ...@@ -1507,7 +1506,8 @@ ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) \
# compilation or not. # compilation or not.
ALL_HOST_OBJS = $(ALL_HOST_FRONTEND_OBJS) $(ALL_HOST_BACKEND_OBJS) 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 \ 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 \ 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 \ ...@@ -1519,7 +1519,7 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
$(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \ $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
$(SPECS) collect2$(exeext) lto-wrapper$(exeext) \ $(SPECS) collect2$(exeext) lto-wrapper$(exeext) \
gcov-iov$(build_exeext) gcov$(exeext) gcov-dump$(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. # Defined in libgcc2.c, included only in the static library.
LIB2FUNCS_ST = _eprintf __gcc_bcmp LIB2FUNCS_ST = _eprintf __gcc_bcmp
...@@ -1831,21 +1831,24 @@ libbackend.a: $(OBJS) ...@@ -1831,21 +1831,24 @@ libbackend.a: $(OBJS)
$(AR) $(AR_FLAGS) libbackend.a $(OBJS) $(AR) $(AR_FLAGS) libbackend.a $(OBJS)
-$(RANLIB) $(RANLIB_FLAGS) libbackend.a -$(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' # We call this executable `xgcc' rather than `gcc'
# to avoid confusion if the current directory is in the path # to avoid confusion if the current directory is in the path
# and CC is `gcc'. It is renamed to `gcc' when it is installed. # 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 \ xgcc$(exeext): $(GCC_OBJS) gccspec.o prefix.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
version.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(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. # cpp is to cpp0 as gcc is to cc1.
# The only difference from xgcc is that it's linked with cppspec.o # The only difference from xgcc is that it's linked with cppspec.o
# instead of gccspec.o. # instead of gccspec.o.
cpp$(exeext): $(GCC_OBJS) cppspec.o version.o intl.o prefix.o \ cpp$(exeext): $(GCC_OBJS) cppspec.o prefix.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
version.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(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. # Dump a specs file to make -B./ read these specs over installed ones.
$(SPECS): xgcc$(exeext) $(SPECS): xgcc$(exeext)
...@@ -2082,8 +2085,7 @@ sbitmap.o: sbitmap.c sbitmap.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(BASIC_BLOCK ...@@ -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) ebitmap.o: ebitmap.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(EBITMAP_H)
sparseset.o: sparseset.c $(SYSTEM_H) sparseset.h $(CONFIG_H) sparseset.o: sparseset.c $(SYSTEM_H) sparseset.h $(CONFIG_H)
COLLECT2_OBJS = collect2.o collect2-aix.o tlink.o intl.o version.o \ COLLECT2_OBJS = collect2.o collect2-aix.o tlink.o
diagnostic.o pretty-print.o input.o
COLLECT2_LIBS = @COLLECT2_LIBS@ COLLECT2_LIBS = @COLLECT2_LIBS@
collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS) collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS)
# Don't try modifying collect2 (aka ld) in place--it might be linking this. # 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) \ ...@@ -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) \ 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) $(OBSTACK_H) collect2.h intl.h $(DIAGNOSTIC_CORE_H)
lto-wrapper$(exeext): lto-wrapper.o intl.o $(LIBDEPS) lto-wrapper$(exeext): lto-wrapper.o $(LIBDEPS)
+$(COMPILER) $(ALL_COMPILERFLAGS) $(LDFLAGS) -o T$@ lto-wrapper.o intl.o $(LIBS) +$(COMPILER) $(ALL_COMPILERFLAGS) $(LDFLAGS) -o T$@ lto-wrapper.o $(LIBS)
mv -f T$@ $@ mv -f T$@ $@
lto-wrapper.o: lto-wrapper.c $(CONFIG_H) $(SYSTEM_H) coretypes.h intl.h \ 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. # Files used by all variants of C.
c-family/c-common.o : c-family/c-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ 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) \ ...@@ -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) 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) 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) 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) \ dbgcnt.o: dbgcnt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) $(DBGCNT_H) \
$(TM_H) $(RTL_H) output.h $(TM_H) $(RTL_H) output.h
lower-subreg.o : lower-subreg.c $(CONFIG_H) $(SYSTEM_H) coretypes.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) \ ...@@ -3520,16 +3521,16 @@ $(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \
$(out_file) $(OUTPUT_OPTION) $(out_file) $(OUTPUT_OPTION)
# Build auxiliary files that support ecoff format. # 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 $@ \ $(LINKER) $(LINKERFLAGS) $(LDFLAGS) -o $@ \
mips-tfile.o version.o $(LIBS) mips-tfile.o $(LIBS)
mips-tfile.o : mips-tfile.c $(CONFIG_H) $(SYSTEM_H) \ mips-tfile.o : mips-tfile.c $(CONFIG_H) $(SYSTEM_H) \
version.h $(srcdir)/../include/getopt.h $(GSTAB_H) intl.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 $@ \ $(LINKER) $(LINKERFLAGS) $(LDFLAGS) -o $@ \
mips-tdump.o version.o $(LIBS) mips-tdump.o $(LIBS)
mips-tdump.o : mips-tdump.c $(CONFIG_H) $(SYSTEM_H) \ mips-tdump.o : mips-tdump.c $(CONFIG_H) $(SYSTEM_H) \
version.h $(srcdir)/../include/getopt.h stab.def version.h $(srcdir)/../include/getopt.h stab.def
...@@ -4053,14 +4054,14 @@ s-iov: build/gcov-iov$(build_exeext) $(BASEVER) $(DEVPHASE) ...@@ -4053,14 +4054,14 @@ s-iov: build/gcov-iov$(build_exeext) $(BASEVER) $(DEVPHASE)
$(STAMP) s-iov $(STAMP) s-iov
gcov.o: gcov.c gcov-io.c $(GCOV_IO_H) intl.h $(SYSTEM_H) coretypes.h $(TM_H) \ 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 \ 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) gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS)
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GCOV_OBJS) $(LIBS) -o $@ +$(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) gcov-dump$(exeext): $(GCOV_DUMP_OBJS) $(LIBDEPS)
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GCOV_DUMP_OBJS) \ +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GCOV_DUMP_OBJS) \
$(LIBS) -o $@ $(LIBS) -o $@
......
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> 2011-05-18 Kai Tietz <ktietz@redhat.com>
* gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
......
...@@ -469,7 +469,7 @@ GNATBIND_OBJS = \ ...@@ -469,7 +469,7 @@ GNATBIND_OBJS = \
# List of extra object files linked in with various programs. # List of extra object files linked in with various programs.
EXTRA_GNAT1_OBJS = prefix.o EXTRA_GNAT1_OBJS = prefix.o
EXTRA_GNATBIND_OBJS = prefix.o version.o EXTRA_GNATBIND_OBJS = prefix.o
# Language-independent object files. # Language-independent object files.
ADA_BACKEND = $(BACKEND) attribs.o ADA_BACKEND = $(BACKEND) attribs.o
......
...@@ -180,7 +180,7 @@ LIBINTL_DEP = @LIBINTL_DEP@ ...@@ -180,7 +180,7 @@ LIBINTL_DEP = @LIBINTL_DEP@
SYSLIBS = @GNAT_LIBEXC@ SYSLIBS = @GNAT_LIBEXC@
# List of extra object files linked in with various programs. # 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 # List extra gnattools
EXTRA_GNATTOOLS = EXTRA_GNATTOOLS =
......
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> 2011-05-19 Jakub Jelinek <jakub@redhat.com>
PR c++/49043 PR c++/49043
......
...@@ -60,7 +60,7 @@ g++spec.o: $(srcdir)/cp/g++spec.c $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H) \ ...@@ -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) $(INCLUDES) $(srcdir)/cp/g++spec.c)
# Create the compiler driver for g++. # 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) g++$(exeext): $(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS)
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBS) $(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBS)
......
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> 2011-05-20 Janne Blomqvist <jb@gcc.gnu.org>
* gfortran.texi (set_fpe): Update documentation. * gfortran.texi (set_fpe): Update documentation.
......
# -*- makefile -*- # -*- makefile -*-
# Top level makefile fragment for GNU gfortran, the GNU Fortran 95 compiler. # 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. # Free Software Foundation, Inc.
# Contributed by Paul Brook <paul@nowt.org # Contributed by Paul Brook <paul@nowt.org
# and Steven Bosscher <s.bosscher@student.tudelft.nl> # and Steven Bosscher <s.bosscher@student.tudelft.nl>
...@@ -84,7 +84,7 @@ gfortranspec.o: $(srcdir)/fortran/gfortranspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) \ ...@@ -84,7 +84,7 @@ gfortranspec.o: $(srcdir)/fortran/gfortranspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) \
$(INCLUDES) $(srcdir)/fortran/gfortranspec.c) $(INCLUDES) $(srcdir)/fortran/gfortranspec.c)
# Create the compiler driver gfortran. # 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) gfortran$(exeext): $(GFORTRAN_D_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS)
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(GFORTRAN_D_OBJS) $(EXTRA_GCC_OBJS) $(LIBS) $(GFORTRAN_D_OBJS) $(EXTRA_GCC_OBJS) $(LIBS)
......
...@@ -22,6 +22,8 @@ along with Gcov; see the file COPYING3. If not see ...@@ -22,6 +22,8 @@ along with Gcov; see the file COPYING3. If not see
#include "coretypes.h" #include "coretypes.h"
#include "tm.h" #include "tm.h"
#include "version.h" #include "version.h"
#include "intl.h"
#include "diagnostic.h"
#include <getopt.h> #include <getopt.h>
#define IN_GCOV (-1) #define IN_GCOV (-1)
#include "gcov-io.h" #include "gcov-io.h"
...@@ -76,10 +78,22 @@ int ...@@ -76,10 +78,22 @@ int
main (int argc ATTRIBUTE_UNUSED, char **argv) main (int argc ATTRIBUTE_UNUSED, char **argv)
{ {
int opt; 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 the stdio streams. */
unlock_std_streams (); unlock_std_streams ();
gcc_init_libintl ();
diagnostic_initialize (global_dc, 0);
while ((opt = getopt_long (argc, argv, "hlpv", options, NULL)) != -1) while ((opt = getopt_long (argc, argv, "hlpv", options, NULL)) != -1)
{ {
switch (opt) switch (opt)
......
...@@ -37,6 +37,7 @@ along with Gcov; see the file COPYING3. If not see ...@@ -37,6 +37,7 @@ along with Gcov; see the file COPYING3. If not see
#include "coretypes.h" #include "coretypes.h"
#include "tm.h" #include "tm.h"
#include "intl.h" #include "intl.h"
#include "diagnostic.h"
#include "version.h" #include "version.h"
#include <getopt.h> #include <getopt.h>
...@@ -342,7 +343,6 @@ static int flag_preserve_paths = 0; ...@@ -342,7 +343,6 @@ static int flag_preserve_paths = 0;
static int flag_counts = 0; static int flag_counts = 0;
/* Forward declarations. */ /* Forward declarations. */
static void fnotice (FILE *, const char *, ...) ATTRIBUTE_PRINTF_2;
static int process_args (int, char **); static int process_args (int, char **);
static void print_usage (int) ATTRIBUTE_NORETURN; static void print_usage (int) ATTRIBUTE_NORETURN;
static void print_version (void) ATTRIBUTE_NORETURN; static void print_version (void) ATTRIBUTE_NORETURN;
...@@ -369,12 +369,22 @@ main (int argc, char **argv) ...@@ -369,12 +369,22 @@ main (int argc, char **argv)
{ {
int argno; int argno;
int first_arg; 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 the stdio streams. */
unlock_std_streams (); unlock_std_streams ();
gcc_init_libintl (); gcc_init_libintl ();
diagnostic_initialize (global_dc, 0);
/* Handle response files. */ /* Handle response files. */
expandargv (&argc, &argv); expandargv (&argc, &argv);
...@@ -401,16 +411,6 @@ main (int argc, char **argv) ...@@ -401,16 +411,6 @@ main (int argc, char **argv)
return 0; 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, /* Print a usage message and exit. If ERROR_P is nonzero, this is an error,
otherwise the output of --help. */ otherwise the output of --help. */
......
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> 2011-05-13 Ian Lance Taylor <iant@google.com>
* go-gcc.cc (Gcc_backend::function_type): When building a struct * go-gcc.cc (Gcc_backend::function_type): When building a struct
......
...@@ -36,7 +36,7 @@ gospec.o: $(srcdir)/go/gospec.c $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H) \ ...@@ -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) \ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
$(INCLUDES) $(srcdir)/go/gospec.c) $(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) gccgo$(exeext): $(GCCGO_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS)
$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ $(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(GCCGO_OBJS) $(EXTRA_GCC_OBJS) $(LIBS) $(GCCGO_OBJS) $(EXTRA_GCC_OBJS) $(LIBS)
......
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> 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
* java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL. * java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.
......
# Top level -*- makefile -*- fragment for the GNU compiler for the Java(TM) # Top level -*- makefile -*- fragment for the GNU compiler for the Java(TM)
# language. # language.
# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 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. #This file is part of GCC.
...@@ -63,11 +63,10 @@ jvspec.o: $(srcdir)/java/jvspec.c $(SYSTEM_H) coretypes.h $(TM_H) \ ...@@ -63,11 +63,10 @@ jvspec.o: $(srcdir)/java/jvspec.c $(SYSTEM_H) coretypes.h $(TM_H) \
$(INCLUDES) $(srcdir)/java/jvspec.c $(OUTPUT_OPTION)) $(INCLUDES) $(srcdir)/java/jvspec.c $(OUTPUT_OPTION))
# Create the compiler driver for $(XGCJ). # Create the compiler driver for $(XGCJ).
$(XGCJ)$(exeext): $(GCC_OBJS) jvspec.o java/jcf-path.o version.o \ $(XGCJ)$(exeext): $(GCC_OBJS) jvspec.o java/jcf-path.o \
prefix.o intl.o $(LIBDEPS) $(EXTRA_GCC_OBJS) prefix.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) \ +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) \
jvspec.o java/jcf-path.o prefix.o intl.o \ jvspec.o java/jcf-path.o prefix.o $(EXTRA_GCC_OBJS) $(LIBS)
version.o $(EXTRA_GCC_OBJS) $(LIBS)
# Create a version of the $(XGCJ) driver which calls the cross-compiler. # Create a version of the $(XGCJ) driver which calls the cross-compiler.
$(XGCJ)-cross$(exeext): $(XGCJ)$(exeext) $(XGCJ)-cross$(exeext): $(XGCJ)$(exeext)
...@@ -86,9 +85,9 @@ JAVA_OBJS = java/class.o java/decl.o java/expr.o \ ...@@ -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 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 \ 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 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 ...@@ -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.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 \ 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) \ java/boehm.o: java/boehm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(JAVA_TREE_H) java/parse.h $(TREE_H) $(JAVA_TREE_H) java/parse.h
java/builtins.o: java/builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_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) \ ...@@ -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/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/jcf-reader.c java/zipfile.h java/jcf.h $(BITMAP_H)
java/jvgenmain.o: java/jvgenmain.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_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 \ java/lang.o: java/lang.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h input.h \
$(SYSTEM_H) coretypes.h $(TM_H) $(DIAGNOSTIC_H) \ $(SYSTEM_H) coretypes.h $(TM_H) $(DIAGNOSTIC_H) \
langhooks.h $(LANGHOOKS_DEF_H) gt-java-lang.h $(OPTS_H) $(OPTIONS_H) \ langhooks.h $(LANGHOOKS_DEF_H) gt-java-lang.h $(OPTS_H) $(OPTIONS_H) \
......
...@@ -52,6 +52,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ ...@@ -52,6 +52,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "system.h" #include "system.h"
#include "coretypes.h" #include "coretypes.h"
#include "intl.h" #include "intl.h"
#include "diagnostic.h"
#include "jcf.h" #include "jcf.h"
#include "tree.h" #include "tree.h"
...@@ -1172,12 +1173,22 @@ main (int argc, char** argv) ...@@ -1172,12 +1173,22 @@ main (int argc, char** argv)
{ {
JCF jcf[1]; JCF jcf[1];
int argi, opt; 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 the stdio streams. */
unlock_std_streams (); unlock_std_streams ();
gcc_init_libintl (); gcc_init_libintl ();
diagnostic_initialize (global_dc, 0);
if (argc <= 1) if (argc <= 1)
{ {
fprintf (stderr, _("jcf-dump: no classes specified\n")); fprintf (stderr, _("jcf-dump: no classes specified\n"));
......
/* Program to generate "main" a Java(TM) class containing a main method. /* Program to generate "main" a Java(TM) class containing a main method.
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 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. This file is part of GCC.
...@@ -32,6 +32,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ ...@@ -32,6 +32,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "tree.h" #include "tree.h"
#include "java-tree.h" #include "java-tree.h"
#include "intl.h" #include "intl.h"
#include "diagnostic.h"
#include "tm.h" /* FIXME: For gcc_obstack_init from defaults.h. */ #include "tm.h" /* FIXME: For gcc_obstack_init from defaults.h. */
static char * do_mangle_classname (const char *string); static char * do_mangle_classname (const char *string);
...@@ -59,11 +60,20 @@ main (int argc, char **argv) ...@@ -59,11 +60,20 @@ main (int argc, char **argv)
int indirect = 0; int indirect = 0;
char *prog_name = argv[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 the stdio streams. */
unlock_std_streams (); unlock_std_streams ();
gcc_init_libintl (); gcc_init_libintl ();
diagnostic_initialize (global_dc, 0);
if (argc > 1 && ! strcmp (argv[1], "-findirect-dispatch")) if (argc > 1 && ! strcmp (argv[1], "-findirect-dispatch"))
{ {
indirect = 1; indirect = 1;
......
...@@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h" #include "system.h"
#include "coretypes.h" #include "coretypes.h"
#include "intl.h" #include "intl.h"
#include "diagnostic.h"
#include "obstack.h" #include "obstack.h"
int debug; /* true if -save-temps. */ int debug; /* true if -save-temps. */
...@@ -627,8 +628,19 @@ cont: ...@@ -627,8 +628,19 @@ cont:
int int
main (int argc, char *argv[]) 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 (); gcc_init_libintl ();
diagnostic_initialize (global_dc, 0);
if (signal (SIGINT, SIG_IGN) != SIG_IGN) if (signal (SIGINT, SIG_IGN) != SIG_IGN)
signal (SIGINT, fatal_signal); signal (SIGINT, fatal_signal);
#ifdef SIGHUP #ifdef SIGHUP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment