Commit 08dc830e by Zack Weinberg Committed by Jeff Law

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
parent 96e57dac
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> Thu Mar 25 21:08:02 1999 Jason Merrill <jason@yorick.cygnus.com>
* gcc.texi (Temporaries): Update. * gcc.texi (Temporaries): Update.
......
...@@ -878,10 +878,10 @@ stamp-objlist: $(OBJS) ...@@ -878,10 +878,10 @@ stamp-objlist: $(OBJS)
# 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.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) version.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o intl.o prefix.o version.o \ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o gccspec.o intl.o \
$(EXTRA_GCC_OBJS) $(LIBS) prefix.o version.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)
...@@ -1397,6 +1397,8 @@ gcc.o: gcc.c $(CONFIG_H) system.h intl.h multilib.h \ ...@@ -1397,6 +1397,8 @@ gcc.o: gcc.c $(CONFIG_H) system.h intl.h multilib.h \
$(DRIVER_DEFINES) \ $(DRIVER_DEFINES) \
-c `echo $(srcdir)/gcc.c | sed 's,^\./,,'` -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
gccspec.o: gccspec.c $(CONFIG_H) system.h
tree-check.h: s-check ; @true tree-check.h: s-check ; @true
s-check : gencheck $(srcdir)/move-if-change s-check : gencheck $(srcdir)/move-if-change
./gencheck > tmp-check.h ./gencheck > tmp-check.h
......
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> 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (comdat_linkage): Treat vtables like functions. * decl2.c (comdat_linkage): Treat vtables like functions.
......
...@@ -75,10 +75,6 @@ C++ c++: cc1plus$(exeext) ...@@ -75,10 +75,6 @@ C++ c++: cc1plus$(exeext)
# Tell GNU make to ignore these if they exist. # Tell GNU make to ignore these if they exist.
.PHONY: C++ c++ .PHONY: C++ c++
g++.c: $(srcdir)/gcc.c
-rm -f $@
$(LN_S) $(srcdir)/gcc.c $@
g++spec.o: $(srcdir)/cp/g++spec.c g++spec.o: $(srcdir)/cp/g++spec.c
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(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 ...@@ -90,19 +86,8 @@ $(srcdir)/cp/parse.c: $(srcdir)/cp/parse.y
$(MAKE) $(SUBDIR_FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) \ $(MAKE) $(SUBDIR_FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) \
$$cp_srcdir/parse.c $$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++. # 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) g++$(exeext): $(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
$(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBS) $(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBS)
...@@ -290,7 +275,6 @@ c++.clean: ...@@ -290,7 +275,6 @@ c++.clean:
c++.distclean: c++.distclean:
-rm -f cp/config.status cp/Makefile -rm -f cp/config.status cp/Makefile
-rm -f cp/parse.output -rm -f cp/parse.output
-rm -f g++.c
c++.extraclean: c++.extraclean:
c++.maintainer-clean: c++.maintainer-clean:
-rm -f cp/parse.c cp/parse.h -rm -f cp/parse.c cp/parse.h
......
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> 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in (g77$(exeext)): Depend on intl.o. Link in intl.o. * Makefile.in (g77$(exeext)): Depend on intl.o. Link in intl.o.
......
...@@ -59,16 +59,6 @@ F77 f77: f771$(exeext) ...@@ -59,16 +59,6 @@ F77 f77: f771$(exeext)
f77.extraclean f77.maintainer-clean f77.distdir f77.rebuilt \ f77.extraclean f77.maintainer-clean f77.distdir f77.rebuilt \
f77.stage1 f77.stage2 f77.stage3 f77.stage4 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 g77spec.o: $(srcdir)/f/g77spec.c $(srcdir)/f/version.h
case "$(LANGUAGES)" in \ case "$(LANGUAGES)" in \
*[fF]77*) touch lang-f77;; \ *[fF]77*) touch lang-f77;; \
...@@ -88,25 +78,11 @@ g77version.o: $(srcdir)/f/version.c ...@@ -88,25 +78,11 @@ g77version.o: $(srcdir)/f/version.c
$(srcdir)/f/version.c; \ $(srcdir)/f/version.c; \
else true; fi 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. # 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) $(LIBDEPS) $(EXTRA_GCC_OBJS)
if [ -f lang-f77 ]; then \ 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); \ version.o prefix.o intl.o $(EXTRA_GCC_OBJS) $(LIBS); \
else true; fi else true; fi
...@@ -428,7 +404,7 @@ f77.mostlyclean: ...@@ -428,7 +404,7 @@ f77.mostlyclean:
-rm -f g77.aux g77.cps g77.ky g77.toc g77.vr g77.fn g77.kys \ -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 g77.pg g77.tp g77.vrs g77.cp g77.fns g77.log g77.pgs g77.tps
f77.clean: f77.clean:
-rm -f g77.c g77.o g77spec.o g77version.o -rm -f g77spec.o g77version.o
f77.distclean: f77.distclean:
-rm -f lang-f77 f/Makefile -rm -f lang-f77 f/Makefile
f77.extraclean: f77.extraclean:
...@@ -439,7 +415,7 @@ f77.maintainer-clean: ...@@ -439,7 +415,7 @@ f77.maintainer-clean:
# The main makefile has already created stage?/f. # The main makefile has already created stage?/f.
G77STAGESTUFF = f/*$(objext) f/fini f/stamp-str f/str-*.h f/str-*.j \ 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 f77.stage1: stage1-start
-if [ -f lang-f77 ]; then \ -if [ -f lang-f77 ]; then \
......
...@@ -214,16 +214,15 @@ static void fatal_error PROTO ((int)); ...@@ -214,16 +214,15 @@ static void fatal_error PROTO ((int));
void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN; void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
#ifdef LANG_SPECIFIC_DRIVER
/* Called before processing to change/add/remove arguments. */ /* 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. */ /* Called before linking. Returns 0 on success and -1 on failure. */
extern int lang_specific_pre_link (); extern int lang_specific_pre_link ();
/* Number of extra output files that lang_specific_pre_link may generate. */ /* Number of extra output files that lang_specific_pre_link may generate. */
extern int lang_specific_extra_outfiles; extern int lang_specific_extra_outfiles;
#endif
/* Specs are strings containing lines, each of which (if not blank) /* Specs are strings containing lines, each of which (if not blank)
is made up of a program name, and arguments separated by spaces. is made up of a program name, and arguments separated by spaces.
...@@ -2379,7 +2378,7 @@ static struct infile *infiles; ...@@ -2379,7 +2378,7 @@ static struct infile *infiles;
static int n_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. */ we can tell if there were any user supplied any files or libraries. */
static int added_libraries; static int added_libraries;
...@@ -2719,10 +2718,8 @@ process_command (argc, argv) ...@@ -2719,10 +2718,8 @@ process_command (argc, argv)
/* Convert new-style -- options to old-style. */ /* Convert new-style -- options to old-style. */
translate_options (&argc, &argv); translate_options (&argc, &argv);
#ifdef LANG_SPECIFIC_DRIVER
/* Do language-specific adjustment/addition of flags. */ /* Do language-specific adjustment/addition of flags. */
lang_specific_driver (fatal, &argc, &argv, &added_libraries); lang_specific_driver (fatal, &argc, &argv, &added_libraries);
#endif
/* Scan argv twice. Here, the first time, just count how many switches /* 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. 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) ...@@ -3747,9 +3744,8 @@ do_spec_1 (spec, inswitch, soft_matched_part)
case 'o': case 'o':
{ {
int max = n_infiles; int max = n_infiles;
#ifdef LANG_SPECIFIC_DRIVER
max += lang_specific_extra_outfiles; max += lang_specific_extra_outfiles;
#endif
for (i = 0; i < max; i++) for (i = 0; i < max; i++)
if (outfiles[i]) if (outfiles[i])
store_arg (outfiles[i], 0, 0); store_arg (outfiles[i], 0, 0);
...@@ -5008,9 +5004,7 @@ main (argc, argv) ...@@ -5008,9 +5004,7 @@ main (argc, argv)
that correspond to the input files. */ that correspond to the input files. */
i = n_infiles; i = n_infiles;
#ifdef LANG_SPECIFIC_DRIVER
i += lang_specific_extra_outfiles; i += lang_specific_extra_outfiles;
#endif
outfiles = (const char **) xmalloc (i * sizeof (char *)); outfiles = (const char **) xmalloc (i * sizeof (char *));
bzero ((char *) outfiles, i * sizeof (char *)); bzero ((char *) outfiles, i * sizeof (char *));
...@@ -5109,7 +5103,6 @@ main (argc, argv) ...@@ -5109,7 +5103,6 @@ main (argc, argv)
clear_failure_queue (); clear_failure_queue ();
} }
#ifdef LANG_SPECIFIC_DRIVER
if (error_count == 0) if (error_count == 0)
{ {
/* Make sure INPUT_FILE_NUMBER points to first available open /* Make sure INPUT_FILE_NUMBER points to first available open
...@@ -5118,7 +5111,6 @@ main (argc, argv) ...@@ -5118,7 +5111,6 @@ main (argc, argv)
if (lang_specific_pre_link ()) if (lang_specific_pre_link ())
error_count++; error_count++;
} }
#endif
/* Run ld to link all the compiler output files. */ /* Run ld to link all the compiler output files. */
......
/* 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. */
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> Tue Mar 23 10:48:24 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (find_applicable_accessible_methods_list): When dealing * parse.y (find_applicable_accessible_methods_list): When dealing
......
...@@ -79,30 +79,15 @@ JAVA_SRCS = $(srcdir)/java/parse.y $(srcdir)/java/class.c \ ...@@ -79,30 +79,15 @@ JAVA_SRCS = $(srcdir)/java/parse.y $(srcdir)/java/class.c \
jc1$(exeext): $(P) $(JAVA_SRCS) $(LIBDEPS) stamp-objlist jc1$(exeext): $(P) $(JAVA_SRCS) $(LIBDEPS) stamp-objlist
cd java; $(MAKE) $(FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../jc1$(exeext) 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 jvspec.o: $(srcdir)/java/jvspec.c
$(CC) -c -DWITH_THREAD_$(GCC_THREAD_FILE) -DWITH_GC_$(JAVAGC) \ $(CC) -c -DWITH_THREAD_$(GCC_THREAD_FILE) -DWITH_GC_$(JAVAGC) \
$(ALL_CFLAGS) $(ALL_CPPFLAGS) \ $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
$(INCLUDES) $(srcdir)/java/jvspec.c $(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). # 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) 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) version.o $(EXTRA_GCC_OBJS) $(LIBS)
# Create a version of the $(GCJ) driver which calls the cross-compiler. # Create a version of the $(GCJ) driver which calls the cross-compiler.
......
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