diff options
author | Zack Weinberg <zack@rabi.columbia.edu> | 1999-03-25 23:36:47 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-03-25 16:36:47 -0700 |
commit | 08dc830e4f7a946edb34a7ab6582425c1c900194 (patch) | |
tree | 82a107672c18cff842e14926be68dcfac406ad19 | |
parent | 96e57dac2fe7817096da16ef21b8b86756484705 (diff) | |
download | gcc-08dc830e4f7a946edb34a7ab6582425c1c900194.zip gcc-08dc830e4f7a946edb34a7ab6582425c1c900194.tar.gz gcc-08dc830e4f7a946edb34a7ab6582425c1c900194.tar.bz2 |
gcc.c: Compile unconditionally all code formerly dependent on #ifdef LANG_SPECIFIC_DRIVER.
* gcc.c: Compile unconditionally all code formerly dependent
on #ifdef LANG_SPECIFIC_DRIVER.
* gccspec.c: New file with stub lang_specific_driver,
lang_specific_pre_link.
* Makefile.in: Link gccspec.o into xgcc. Add rule to compile
gccspec.c.
* cp/Make-lang.in: Remove all references to g++.o/g++.c.
Link g++ from gcc.o.
* f/Make-lang.in: Remove all references to g77.o/g77.c.
Link g77 from gcc.o.
* java/Make-lang.in: Remove all references to gcj.o/gcj.c.
Link gcj from gcc.o.
From-SVN: r25989
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/Makefile.in | 8 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/Make-lang.in | 18 | ||||
-rw-r--r-- | gcc/f/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/f/Make-lang.in | 32 | ||||
-rw-r--r-- | gcc/gcc.c | 16 | ||||
-rw-r--r-- | gcc/gccspec.c | 43 | ||||
-rw-r--r-- | gcc/java/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/java/Make-lang.in | 19 |
10 files changed, 82 insertions, 77 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7753d2f..514f0d7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +999-03-25 Zack Weinberg <zack@rabi.columbia.edu> + + * gcc.c: Compile unconditionally all code formerly dependent + on #ifdef LANG_SPECIFIC_DRIVER. + * gccspec.c: New file with stub lang_specific_driver, + lang_specific_pre_link. + * Makefile.in: Link gccspec.o into xgcc. Add rule to compile + Thu Mar 25 21:08:02 1999 Jason Merrill <jason@yorick.cygnus.com> * gcc.texi (Temporaries): Update. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 478163b..50128b9 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -878,10 +878,10 @@ stamp-objlist: $(OBJS) # 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.o version.o intl.o prefix.o \ +xgcc$(exeext): gcc.o gccspec.o version.o intl.o prefix.o \ version.o $(LIBDEPS) $(EXTRA_GCC_OBJS) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o intl.o prefix.o version.o \ - $(EXTRA_GCC_OBJS) $(LIBS) + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o gccspec.o intl.o \ + prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS) # Dump a specs file to make -B./ read these specs over installed ones. specs: xgcc$(exeext) @@ -1397,6 +1397,8 @@ gcc.o: gcc.c $(CONFIG_H) system.h intl.h multilib.h \ $(DRIVER_DEFINES) \ -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'` +gccspec.o: gccspec.c $(CONFIG_H) system.h + tree-check.h: s-check ; @true s-check : gencheck $(srcdir)/move-if-change ./gencheck > tmp-check.h diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 187378e..cd15852 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1999-03-25 Zack Weinberg <zack@rabi.columbia.edu> + + * Make-lang.in: Remove all references to g++.o/g++.c. + Link g++ from gcc.o. + 1999-03-25 Jason Merrill <jason@yorick.cygnus.com> * decl2.c (comdat_linkage): Treat vtables like functions. diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index b98246a..c877417 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -75,10 +75,6 @@ C++ c++: cc1plus$(exeext) # Tell GNU make to ignore these if they exist. .PHONY: C++ c++ -g++.c: $(srcdir)/gcc.c - -rm -f $@ - $(LN_S) $(srcdir)/gcc.c $@ - g++spec.o: $(srcdir)/cp/g++spec.c $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/cp/g++spec.c @@ -90,19 +86,8 @@ $(srcdir)/cp/parse.c: $(srcdir)/cp/parse.y $(MAKE) $(SUBDIR_FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) \ $$cp_srcdir/parse.c -# N.B.: This is a copy of the gcc.o rule, with -DLANG_SPECIFIC_DRIVER added. -# It'd be nice if we could find an easier way to do this---rather than have -# to track changes to the toplevel gcc Makefile as well. -# We depend on g++.c last, to make it obvious where it came from. -g++.o: $(CONFIG_H) intl.h multilib.h config.status system.h \ - Makefile $(lang_specs_files) g++.c prefix.h - $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ - $(DRIVER_DEFINES) \ - -DLANG_SPECIFIC_DRIVER \ - -c g++.c - # Create the compiler driver for g++. -GXX_OBJS = g++.o g++spec.o intl.o prefix.o version.o +GXX_OBJS = gcc.o g++spec.o intl.o prefix.o version.o g++$(exeext): $(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ $(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBS) @@ -290,7 +275,6 @@ c++.clean: c++.distclean: -rm -f cp/config.status cp/Makefile -rm -f cp/parse.output - -rm -f g++.c c++.extraclean: c++.maintainer-clean: -rm -f cp/parse.c cp/parse.h diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 4332c8b..0137b91 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,8 @@ +1999-03-25 Zack Weinberg <zack@rabi.columbia.edu> + + * Make-lang.in: Remove all references to g77.o/g77.c. + Link g77 from gcc.o. + 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (g77$(exeext)): Depend on intl.o. Link in intl.o. diff --git a/gcc/f/Make-lang.in b/gcc/f/Make-lang.in index 75b6a45..c1a2814 100644 --- a/gcc/f/Make-lang.in +++ b/gcc/f/Make-lang.in @@ -59,16 +59,6 @@ F77 f77: f771$(exeext) f77.extraclean f77.maintainer-clean f77.distdir f77.rebuilt \ f77.stage1 f77.stage2 f77.stage3 f77.stage4 -g77.c: $(srcdir)/gcc.c - case "$(LANGUAGES)" in \ - *[fF]77*) touch lang-f77;; \ - *) rm -f lang-f77;; \ - esac - if [ -f lang-f77 ]; then \ - rm -f g77.c; \ - $(LN_S) $(srcdir)/gcc.c g77.c; \ - else true; fi - g77spec.o: $(srcdir)/f/g77spec.c $(srcdir)/f/version.h case "$(LANGUAGES)" in \ *[fF]77*) touch lang-f77;; \ @@ -88,25 +78,11 @@ g77version.o: $(srcdir)/f/version.c $(srcdir)/f/version.c; \ else true; fi -# N.B.: This is a copy of the gcc.o rule, with -DLANG_SPECIFIC_DRIVER added. -# It'd be nice if we could find an easier way to do this---rather than have -# to track changes to the toplevel gcc Makefile as well. -# We depend on g77.c last, to make it obvious where it came from. -g77.o: $(CONFIG_H) multilib.h config.status $(lang_specs_files) g77.c prefix.h - case "$(LANGUAGES)" in \ - *[fF]77*) touch lang-f77;; \ - *) rm -f lang-f77;; \ - esac - if [ -f lang-f77 ]; then \ - $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(DRIVER_DEFINES) \ - -DLANG_SPECIFIC_DRIVER -c g77.c; \ - else true; fi - # Create the compiler driver for g77. -g77$(exeext): g77.o g77spec.o g77version.o version.o prefix.o intl.o \ +g77$(exeext): gcc.o g77spec.o g77version.o version.o prefix.o intl.o \ $(LIBDEPS) $(EXTRA_GCC_OBJS) if [ -f lang-f77 ]; then \ - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ g77.o g77spec.o g77version.o \ + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o g77spec.o g77version.o \ version.o prefix.o intl.o $(EXTRA_GCC_OBJS) $(LIBS); \ else true; fi @@ -428,7 +404,7 @@ f77.mostlyclean: -rm -f g77.aux g77.cps g77.ky g77.toc g77.vr g77.fn g77.kys \ g77.pg g77.tp g77.vrs g77.cp g77.fns g77.log g77.pgs g77.tps f77.clean: - -rm -f g77.c g77.o g77spec.o g77version.o + -rm -f g77spec.o g77version.o f77.distclean: -rm -f lang-f77 f/Makefile f77.extraclean: @@ -439,7 +415,7 @@ f77.maintainer-clean: # The main makefile has already created stage?/f. G77STAGESTUFF = f/*$(objext) f/fini f/stamp-str f/str-*.h f/str-*.j \ - lang-f77 g77.c g77.o g77spec.o g77version.o + lang-f77 g77spec.o g77version.o f77.stage1: stage1-start -if [ -f lang-f77 ]; then \ @@ -214,16 +214,15 @@ static void fatal_error PROTO ((int)); void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN; -#ifdef LANG_SPECIFIC_DRIVER /* Called before processing to change/add/remove arguments. */ -extern void lang_specific_driver PROTO ((void (*) PVPROTO((const char *, ...)), int *, char ***, int *)); +extern void lang_specific_driver PROTO ((void (*) PVPROTO((const char *, ...)), + int *, char ***, int *)); /* Called before linking. Returns 0 on success and -1 on failure. */ extern int lang_specific_pre_link (); /* Number of extra output files that lang_specific_pre_link may generate. */ extern int lang_specific_extra_outfiles; -#endif /* Specs are strings containing lines, each of which (if not blank) is made up of a program name, and arguments separated by spaces. @@ -2379,7 +2378,7 @@ static struct infile *infiles; static int n_infiles; -/* This counts the number of libraries added by LANG_SPECIFIC_DRIVER, so that +/* This counts the number of libraries added by lang_specific_driver, so that we can tell if there were any user supplied any files or libraries. */ static int added_libraries; @@ -2719,10 +2718,8 @@ process_command (argc, argv) /* Convert new-style -- options to old-style. */ translate_options (&argc, &argv); -#ifdef LANG_SPECIFIC_DRIVER /* Do language-specific adjustment/addition of flags. */ lang_specific_driver (fatal, &argc, &argv, &added_libraries); -#endif /* Scan argv twice. Here, the first time, just count how many switches there will be in their vector, and how many input files in theirs. @@ -3747,9 +3744,8 @@ do_spec_1 (spec, inswitch, soft_matched_part) case 'o': { int max = n_infiles; -#ifdef LANG_SPECIFIC_DRIVER max += lang_specific_extra_outfiles; -#endif + for (i = 0; i < max; i++) if (outfiles[i]) store_arg (outfiles[i], 0, 0); @@ -5008,9 +5004,7 @@ main (argc, argv) that correspond to the input files. */ i = n_infiles; -#ifdef LANG_SPECIFIC_DRIVER i += lang_specific_extra_outfiles; -#endif outfiles = (const char **) xmalloc (i * sizeof (char *)); bzero ((char *) outfiles, i * sizeof (char *)); @@ -5109,7 +5103,6 @@ main (argc, argv) clear_failure_queue (); } -#ifdef LANG_SPECIFIC_DRIVER if (error_count == 0) { /* Make sure INPUT_FILE_NUMBER points to first available open @@ -5118,7 +5111,6 @@ main (argc, argv) if (lang_specific_pre_link ()) error_count++; } -#endif /* Run ld to link all the compiler output files. */ diff --git a/gcc/gccspec.c b/gcc/gccspec.c new file mode 100644 index 0000000..78c67d2 --- /dev/null +++ b/gcc/gccspec.c @@ -0,0 +1,43 @@ +/* Specific flags and argument handling of the C front-end. + Copyright (C) 1999 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include "config.h" +#include "system.h" + +/* Filter argc and argv before processing by the gcc driver proper. */ +void +lang_specific_driver (fn, in_argc, in_argv, in_added_libraries) + void (*fn)() ATTRIBUTE_UNUSED; + int *in_argc ATTRIBUTE_UNUSED; + char ***in_argv ATTRIBUTE_UNUSED; + int *in_added_libraries ATTRIBUTE_UNUSED; +{ + return; /* Not used for C. */ +} + +/* Called before linking. Returns 0 on success and -1 on failure. */ +int +lang_specific_pre_link () +{ + return 0; /* Not used for C. */ +} + +/* Number of extra output files that lang_specific_pre_link may generate. */ +int lang_specific_extra_outfiles = 0; /* Not used for C. */ diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 917b403..d24206b3 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +1999-03-25 Zack Weinberg <zack@rabi.columbia.edu> + + * java/Make-lang.in: Remove all references to gcj.o/gcj.c. + Link gcj from gcc.o. + Tue Mar 23 10:48:24 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (find_applicable_accessible_methods_list): When dealing diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in index 8e06958..787319e 100644 --- a/gcc/java/Make-lang.in +++ b/gcc/java/Make-lang.in @@ -79,30 +79,15 @@ JAVA_SRCS = $(srcdir)/java/parse.y $(srcdir)/java/class.c \ jc1$(exeext): $(P) $(JAVA_SRCS) $(LIBDEPS) stamp-objlist cd java; $(MAKE) $(FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../jc1$(exeext) -$(GCJ).c: $(srcdir)/gcc.c - -rm -f $@ - $(LN_S) $(srcdir)/gcc.c $@ - jvspec.o: $(srcdir)/java/jvspec.c $(CC) -c -DWITH_THREAD_$(GCC_THREAD_FILE) -DWITH_GC_$(JAVAGC) \ $(ALL_CFLAGS) $(ALL_CPPFLAGS) \ $(INCLUDES) $(srcdir)/java/jvspec.c -# N.B.: This is a copy of the gcc.o rule, with -DLANG_SPECIFIC_DRIVER added. -# It'd be nice if we could find an easier way to do this---rather than have -# to track changes to the toplevel gcc Makefile as well. -# We depend on $(GCJ).c last, to make it obvious where it came from. -$(GCJ).o: $(CONFIG_H) multilib.h config.status $(lang_specs_files) $(GCJ).c \ - system.h prefix.h - $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ - $(DRIVER_DEFINES) \ - -DLANG_SPECIFIC_DRIVER \ - -c $(GCJ).c - # Create the compiler driver for $(GCJ). -$(GCJ)$(exeext): $(GCJ).o jvspec.o version.o \ +$(GCJ)$(exeext): gcc.o jvspec.o version.o \ prefix.o intl.o $(LIBDEPS) $(EXTRA_GCC_OBJS) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GCJ).o jvspec.o prefix.o intl.o \ + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o jvspec.o prefix.o intl.o \ version.o $(EXTRA_GCC_OBJS) $(LIBS) # Create a version of the $(GCJ) driver which calls the cross-compiler. |