From: Zack Weinberg Date: Mon, 18 Dec 2000 14:18:19 +0000 (+0000) Subject: Backport a fix to the 2.95 branch X-Git-Tag: prereleases/gcc-2.95.3-test1~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3eb680d8eb0cf3f628b414be5e418ff5c9ada089;p=thirdparty%2Fgcc.git Backport a fix to the 2.95 branch From-SVN: r38346 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8b9769359896..bf3fcd98bc4c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2000-12-18 Zack Weinberg : + + * Makefile.in: Rename cpp to cpp0, tradcpp to tradcpp0, and + xcpp to cpp throughout. + (native): Remove unnecessary dependency on cpp. + * gcc.c (C specs): Call cpp0 to do preprocessing, not cpp. + * ch/lang-specs.h, cp/lang-specs.h, f/lang-specs.h, + objc/lang-specs.h: Call cpp0 to do preprocessing, not cpp. + 2000-12-18 Christian Groessler * toplev.c (check_lang_option): Use NUM_ELEM only on arrays, not on diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 0240f72417f7..0c367950dbdb 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -441,7 +441,7 @@ COMPILERS = cc1$(exeext) @all_compilers@ # List of things which should already be built whenever we try to use xgcc # to compile anything (without linking). -GCC_PASSES=xgcc$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES) +GCC_PASSES=xgcc$(exeext) cc1$(exeext) cpp0$(exeext) $(EXTRA_PASSES) # List of things which should already be built whenever we try to use xgcc # to link anything. @@ -704,7 +704,7 @@ STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \ genconfig$(build_exeext) genpeep$(build_exeext) genattrtab$(build_exeext) \ genattr$(build_exeext) genopinit$(build_exeext) gengenrtl$(build_exeext) \ gencheck$(build_exeext) \ - xgcc$(exeext) xcpp$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES) \ + xgcc$(exeext) cpp$(exeext) cc1$(exeext) cpp0$(exeext) $(EXTRA_PASSES) \ $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \ $(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \ protoize$(exeext) unprotoize$(exeext) \ @@ -840,15 +840,15 @@ all.internal: start.encap rest.encap doc all.cross: native gcc-cross specs stmp-headers $(STMP_FIXPROTO) $(LIBGCC) \ $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross doc # This is what to compile if making gcc with a cross-compiler. -all.build: native xgcc$(exeext) xcpp$(exeext) $(EXTRA_PARTS) lang.all.build +all.build: native xgcc$(exeext) cpp$(exeext) $(EXTRA_PARTS) lang.all.build # This is what must be made before installing GCC and converting libraries. -start.encap: native xgcc$(exeext) xcpp$(exeext) specs $(LIBGCC1) \ +start.encap: native xgcc$(exeext) cpp$(exeext) specs $(LIBGCC1) \ xlimits.h lang.start.encap # These can't be made until after GCC can run. rest.encap: stmp-headers $(STMP_FIXPROTO) $(LIBGCC) $(EXTRA_PARTS) lang.rest.encap # This is what is made with the host's compiler # whether making a cross compiler or not. -native: config.status auto-host.h cpp$(exeext) intl.all $(LANGUAGES) \ +native: config.status auto-host.h intl.all $(LANGUAGES) \ $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) # Define the names for selecting languages in LANGUAGES. @@ -893,7 +893,7 @@ xgcc$(exeext): gcc.o gccspec.o version.o intl.o prefix.o \ # when it is installed. # The only difference from xgcc is that it's linked with cppspec.o # instead of gccspec.o. -xcpp$(exeext): gcc.o cppspec.o version.o intl.o prefix.o \ +cpp$(exeext): gcc.o cppspec.o version.o intl.o prefix.o \ version.o $(LIBDEPS) $(EXTRA_GCC_OBJS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o cppspec.o intl.o \ prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS) @@ -1953,9 +1953,9 @@ intl.distdir-fixup: # Remake cpp and protoize. # Making the preprocessor -cpp$(exeext): $(CCCP)$(exeext) - -rm -f cpp$(exeext) - $(LN) $(CCCP)$(exeext) cpp$(exeext) +cpp0$(exeext): $(CCCP)$(exeext) + -rm -f cpp0$(exeext) + $(LN) $(CCCP)$(exeext) cpp0$(exeext) CCCP_OBJS = cccp.o cexp.o intl.o prefix.o version.o @extra_cpp_objs@ mbchar.o cccp$(exeext): $(CCCP_OBJS) $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(CCCP_OBJS) $(LIBS) @@ -2448,12 +2448,12 @@ install-build: force install-cross-rest: install-float-h-cross # Handle cpp installation. -install-cpp: xcpp$(exeext) +install-cpp: cpp$(exeext) -rm -f $(bindir)/$(CPP_INSTALL_NAME)$(exeext) - $(INSTALL_PROGRAM) -m 755 xcpp$(exeext) $(bindir)/$(CPP_INSTALL_NAME)$(exeext) + $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(bindir)/$(CPP_INSTALL_NAME)$(exeext) if [ x$(cpp_install_dir) != x ]; then \ rm -f $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ - $(INSTALL_PROGRAM) -m 755 xcpp$(exeext) $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ + $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ else true; fi uninstall-cpp: @@ -2544,8 +2544,8 @@ install-common: native installdirs $(EXTRA_PARTS) lang.install-common $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \ chmod a-x $(libsubdir)/SYSCALLS.c.X; \ fi - -rm -f $(libsubdir)/cpp$(exeext) - $(INSTALL_PROGRAM) cpp$(exeext) $(libsubdir)/cpp$(exeext) + -rm -f $(libsubdir)/cpp0$(exeext) + $(INSTALL_PROGRAM) cpp0$(exeext) $(libsubdir)/cpp0$(exeext) # Install gcov if it was compiled. -if [ -f gcov$(exeext) ]; \ then \ diff --git a/gcc/ch/lang-specs.h b/gcc/ch/lang-specs.h index ba946d3b55d7..d2ea5889a323 100644 --- a/gcc/ch/lang-specs.h +++ b/gcc/ch/lang-specs.h @@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */ {".ch", {"@chill"}}, {".chi", {"@chill"}}, {"@chill", - {"cpp -lang-chill %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ + {"cpp0 -lang-chill %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ %{C:%{!E:%eGNU CHILL does not support -C without using -E}}\ %{!no-gcc:-D__GNUCHILL__=%v1 -D__GNUC_MINOR__=%v2}\ %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\ diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h index 648bc1f09536..baa2fcd8f4b2 100644 --- a/gcc/cp/lang-specs.h +++ b/gcc/cp/lang-specs.h @@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */ {"@c++", #if USE_CPPLIB { - "%{E|M|MM:cpp -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ + "%{E|M|MM:cpp0 -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ %{C:%{!E:%eGNU C++ does not support -C without using -E}}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ %{!no-gcc:-D__GNUC__=%v1 -D__GNUG__=%v1 -D__GNUC_MINOR__=%v2}\ @@ -62,7 +62,7 @@ Boston, MA 02111-1307, USA. */ %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\ %{!pipe:%g.s} %A\n }}}}"}}, #else /* ! USE_CPPLIB */ - {"cpp -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ + {"cpp0 -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ %{C:%{!E:%eGNU C++ does not support -C without using -E}}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ %{!no-gcc:-D__GNUC__=%v1 -D__GNUG__=%v1 -D__GNUC_MINOR__=%v2}\ diff --git a/gcc/f/lang-specs.h b/gcc/f/lang-specs.h index b4492a6327d2..39afae0c6dba 100644 --- a/gcc/f/lang-specs.h +++ b/gcc/f/lang-specs.h @@ -35,7 +35,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA Sun f77, at least) so you test `__unix' rather than `unix'. -D_LANGUAGE_FORTRAN is used by some compilers like SGI and might as well be in there. */ - {"cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ + {"cpp0 -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ %{C:%{!E:%eGNU C does not support -C without using -E}}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\ @@ -85,7 +85,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\ %{!pipe:%g.s} %A\n }}}}"}}, {"@f77-version", - {"cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I \ + {"cpp0 -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I \ %{C:%{!E:%eGNU C does not support -C without using -E}} \ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG} \ %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2} \ diff --git a/gcc/gcc.c b/gcc/gcc.c index e570d4ba1dcd..1023cfa0b240 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -594,7 +594,7 @@ static struct compiler default_compilers[] = {"@c", { #if USE_CPPLIB - "%{E|M|MM:cpp -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\ + "%{E|M|MM:cpp0 -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\ %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ %{C:%{!E:%eGNU C does not support -C without using -E}}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ @@ -630,7 +630,7 @@ static struct compiler default_compilers[] = %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\ %{!pipe:%g.s} %A\n }}}}" #else /* ! USE_CPPLIB */ - "cpp -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\ + "cpp0 -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\ %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ %{C:%{!E:%eGNU C does not support -C without using -E}}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ @@ -658,7 +658,7 @@ static struct compiler default_compilers[] = #endif /* ! USE_CPPLIB */ }}, {"-", - {"%{E:cpp -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\ + {"%{E:cpp0 -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\ %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ %{C:%{!E:%eGNU C does not support -C without using -E}}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ @@ -676,7 +676,7 @@ static struct compiler default_compilers[] = {".h", {"@c-header"}}, {"@c-header", {"%{!E:%eCompilation of header file requested} \ - cpp %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ + cpp0 %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ %{C:%{!E:%eGNU C does not support -C without using -E}}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\ @@ -707,7 +707,7 @@ static struct compiler default_compilers[] = %i %A\n }}}}"}}, {".S", {"@assembler-with-cpp"}}, {"@assembler-with-cpp", - {"cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ + {"cpp0 -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ %{C:%{!E:%eGNU C does not support -C without using -E}}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG} %{trigraphs}\ -$ %{!undef:%p %P} -D__ASSEMBLER__ \ diff --git a/gcc/objc/lang-specs.h b/gcc/objc/lang-specs.h index 41dc097b5023..b0d873144c39 100644 --- a/gcc/objc/lang-specs.h +++ b/gcc/objc/lang-specs.h @@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */ {".m", {"@objective-c"}}, {"@objective-c", #if USE_CPPLIB - {"%{E|M|MM:cpp -lang-objc %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ + {"%{E|M|MM:cpp0 -lang-objc %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ %{C:%{!E:%eGNU C does not support -C without using -E}}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ -D__OBJC__ %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\ @@ -55,7 +55,7 @@ Boston, MA 02111-1307, USA. */ %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\ %{!pipe:%g.s} %A\n }}}}"} #else /* ! USE_CPPLIB */ - {"cpp -lang-objc %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ + {"cpp0 -lang-objc %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\ %{C:%{!E:%eGNU C does not support -C without using -E}}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ -D__OBJC__ %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\