This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Factoring common text out of the specs


Most of the text in lang-specs and the C specs in gcc.c is
duplicated.  Some of it /should/ be duplicated but has gotten out of
sync.

This patch factors out the common options into three named specs:
cpp_options, cc1_options, and asm_options, for the preprocessor,
compiler, and assembler respectively.  Note that cc1_options is
applied to all the front ends, not just C.

In order to make this work neatly, some things that were being done in
the specs got moved to cppinit.c, and I added a %B escape that works
like %b but doesn't delete the suffix, which is used by -dumpbase.  

We could do somewhat better if cpp wasn't rather dense about the
interaction of -std=<whatever> with -lang-<whatever>; I will be fixing
this shortly.  We could do loads better if specs were selected based
on the target as well as the source (like suffix rules in Make); I'm
not going to do this anytime soon.

This bootstraps and doesn't get any regressions on i686-linux, but I
may have broken something subtle.  A pleasant side effect is that the
default_compilers strings are now short enough that we don't need to
split them in four pieces, so a bunch of code disappears.

I note there's no way to prevent Chill from being run through the
C preprocessor.  Why is that?  The Chill standard doesn't expect
preprocessing.

Also, does anyone remember what the point of the @g77-version spec is?

zw

	* cppinit.c (handle_option): Factor out CPP_OPTION (pfile, pending).
	Define __cplusplus, __OBJC__, _LANGUAGE_FORTRAN here if
	appropriate.  Force -traditional on if -lang-fortran.
	* gcc.c (LINK_COMMAND_SPEC): Move up with the other
	target-overriden specs.
	(cpp_options, cc1_options, asm_options): New named specs.
	(C specs): Use them.
	(struct compiler): Get rid of array of four spec strings.
	(main, lookup_compiler, read_specs, validate_all_switches):
	No need to deal with array of four spec strings.
	(do_spec_1): Handle %B.
	(set_input): Set up for %B.
	(suffixed_basename_length): New global.

	* ch/lang-specs.h, cp/lang-specs.h, f/lang-specs.h,
	java/lang-specs.h, objc/lang-specs.h: Use new named specs to
	reduce duplicate code.

===================================================================
Index: cppinit.c
--- cppinit.c	2000/05/18 11:09:26	1.81
+++ cppinit.c	2000/05/24 03:50:50
@@ -1252,6 +1252,7 @@ handle_option (pfile, argc, argv)
      char **argv;
 {
   int i = 0;
+  struct cpp_pending *pend = CPP_OPTION (pfile, pending);
 
   if (argv[i][0] != '-')
     {
@@ -1354,7 +1355,7 @@ handle_option (pfile, argc, argv)
 	  CPP_OPTION (pfile, print_include_names) = 1;
 	  break;
 	case OPT_D:
-	  new_pending_directive (CPP_OPTION (pfile, pending), arg, cpp_define);
+	  new_pending_directive (pend, arg, cpp_define);
 	  break;
 	case OPT_pedantic_errors:
 	  CPP_OPTION (pfile, pedantic_errors) = 1;
@@ -1396,8 +1397,7 @@ handle_option (pfile, argc, argv)
 	  CPP_OPTION (pfile, c99) = 0;
 	  CPP_OPTION (pfile, objc) = 0;
 	  CPP_OPTION (pfile, trigraphs) = 1;
-	  new_pending_directive (CPP_OPTION (pfile, pending),
-				 "__STRICT_ANSI__", cpp_define);
+	  new_pending_directive (pend, "__STRICT_ANSI__", cpp_define);
 	  break;
 	case OPT_lang_cplusplus:
 	  CPP_OPTION (pfile, cplusplus) = 1;
@@ -1405,21 +1405,29 @@ handle_option (pfile, argc, argv)
 	  CPP_OPTION (pfile, c89) = 0;
 	  CPP_OPTION (pfile, c99) = 0;
 	  CPP_OPTION (pfile, objc) = 0;
+	  new_pending_directive (pend, "__cplusplus", cpp_define);
 	  break;
-	case OPT_lang_objc:
 	case OPT_lang_objcplusplus:
-	  CPP_OPTION (pfile, cplusplus) = opt_code == OPT_lang_objcplusplus;
+	  CPP_OPTION (pfile, cplusplus) = 1;
+	  new_pending_directive (pend, "__cplusplus", cpp_define);
+	  /* fall through */
+	case OPT_lang_objc:
 	  CPP_OPTION (pfile, cplusplus_comments) = 1;
 	  CPP_OPTION (pfile, c89) = 0;
 	  CPP_OPTION (pfile, c99) = 0;
 	  CPP_OPTION (pfile, objc) = 1;
+	  new_pending_directive (pend, "__OBJC__", cpp_define);
 	  break;
 	case OPT_lang_asm:
  	  CPP_OPTION (pfile, lang_asm) = 1;
+	  CPP_OPTION (pfile, dollars_in_ident) = 0;
+	  new_pending_directive (pend, "__ASSEMBLER__", cpp_define);
 	  break;
 	case OPT_lang_fortran:
  	  CPP_OPTION (pfile, lang_fortran) = 1;
+	  CPP_OPTION (pfile, traditional) = 1;
 	  CPP_OPTION (pfile, cplusplus_comments) = 0;
+	  new_pending_directive (pend, "_LANGUAGE_FORTRAN", cpp_define);
 	  break;
 	case OPT_lang_chill:
 	  CPP_OPTION (pfile, objc) = 0;
===================================================================
Index: gcc.c
--- gcc.c	2000/05/23 17:42:18	1.145
+++ gcc.c	2000/05/24 03:50:51
@@ -267,6 +267,7 @@ or with constant text in a single argume
  %b     substitute the basename of the input file being processed.
 	This is the substring up to (and not including) the last period
 	and not including the directory.
+ %B	same as %b, but include the file suffix (text after the last period).
  %gSUFFIX
 	substitute a file name that has suffix SUFFIX and is chosen
 	once per compilation, and mark the argument a la %d.  To reduce
@@ -496,6 +497,34 @@ proper position among the other output f
 #define LINKER_NAME "collect2"
 #endif
 
+/* Here is the spec for running the linker, after compiling all files.  */
+
+/* -u* was put back because both BSD and SysV seem to support it.  */
+/* %{static:} simply prevents an error message if the target machine
+   doesn't handle -static.  */
+/* We want %{T*} after %{L*} and %D so that it can be used to specify linker
+   scripts which exist in user specified directories, or in standard
+   directories.  */
+#ifndef LINK_COMMAND_SPEC
+#ifdef LINK_LIBGCC_SPECIAL
+/* Don't generate -L options.  */
+#define LINK_COMMAND_SPEC "\
+%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
+    %(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t}\
+    %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
+    %{static:} %{L*} %o %{!nostdlib:%{!nodefaultlibs:%G %L %G}}\
+    %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}"
+#else
+/* Use -L.  */
+#define LINK_COMMAND_SPEC "\
+%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
+    %(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t}\
+    %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
+    %{static:} %{L*} %D %o %{!nostdlib:%{!nodefaultlibs:%G %L %G}}\
+    %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}"
+#endif
+#endif
+
 static const char *cpp_spec = CPP_SPEC;
 static const char *cpp_predefines = CPP_PREDEFINES;
 static const char *cc1_spec = CC1_SPEC;
@@ -510,6 +539,38 @@ static const char *endfile_spec = ENDFIL
 static const char *startfile_spec = STARTFILE_SPEC;
 static const char *switches_need_spaces = SWITCHES_NEED_SPACES;
 static const char *linker_name_spec = LINKER_NAME;
+static const char *link_command_spec = LINK_COMMAND_SPEC;
+
+/* Standard options to cpp, cc1, and as, to reduce duplication in specs.
+   There should be no need to override these.  */
+
+static const char *cpp_options =
+"%{C:%{!E:%eGNU C does not support -C without using -E}}\
+ %{std*} %{nostdinc*}\
+ %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
+ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
+ %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
+ %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
+ %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
+ %{ffast-math:-D__FAST_MATH__}\
+ %{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
+ %{traditional} %{ftraditional:-traditional}\
+ %{traditional-cpp:-traditional}\
+ %{fshow-column} %{fno-show-column}\
+ %{fleading-underscore} %{fno-leading-underscore}\
+ %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z %i\
+ %{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}}";
+
+static const char *cc1_options =
+"%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
+ %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*}\
+ %{g*} %{O*} %{W*} %{w} %{pedantic*} %{std*} %{ansi}\
+ %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
+ %{aux-info*} %{Qn:-fno-ident} %{--help:--help}\
+ %{S:%W{o*}%{!o*:-o %b.s}}";
+
+static const char *asm_options =
+"%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}";
 
 /* Some compilers have limits on line lengths, and the multilib_select
    and/or multilib_matches strings can be very long, so we build them at
@@ -583,8 +644,7 @@ struct compiler
   const char *suffix;		/* Use this compiler for input files
 				   whose names end in this suffix.  */
 
-  const char *spec[4];		/* To use this compiler, concatenate these
-				   specs and pass to do_spec.  */
+  const char *spec;		/* To use this compiler, run this spec.  */
 };
 
 /* Pointer to a vector of `struct compiler' that gives the spec for
@@ -610,156 +670,52 @@ static struct compiler default_compilers
      were not present when we built the driver, we will hit these copies
      and be given a more meaningful error than "file not used since
      linking is not done".  */
-  {".m", {"#Objective-C"}},
-  {".cc", {"#C++"}}, {".cxx", {"#C++"}}, {".cpp", {"#C++"}},
-  {".c++", {"#C++"}}, {".C", {"#C++"}},
-  {".ads", {"#Ada"}}, {".adb", {"#Ada"}}, {".ada", {"#Ada"}},
-  {".f", {"#Fortran"}}, {".for", {"#Fortran"}}, {".F", {"#Fortran"}},
-  {".fpp", {"#Fortran"}},
-  {".p", {"#Pascal"}}, {".pas", {"#Pascal"}},
+  {".m",  "#Objective-C"},
+  {".cc", "#C++"}, {".cxx", "#C++"}, {".cpp", "#C++"},
+  {".c++", "#C++"}, {".C", "#C++"},
+  {".ads", "#Ada"}, {".adb", "#Ada"}, {".ada", "#Ada"},
+  {".f", "#Fortran"}, {".for", "#Fortran"}, {".F", "#Fortran"},
+  {".fpp", "#Fortran"}, {".r", "#Ratfor"},
+  {".p", "#Pascal"}, {".pas", "#Pascal"},
+  {".ch", "#Chill"}, {".chi", "#Chill"},
+  {".java", "#Java"}, {".class", "#Java"},
+  {".zip", "#Java"}, {".jar", "#Java"},
   /* Next come the entries for C.  */
-  {".c", {"@c"}},
+  {".c", "@c"},
   {"@c",
-   {
 #if USE_CPPLIB
-     "%{E|M|MM:cpp -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}\
-        %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
-	%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
-        %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
-	%{ffast-math:-D__FAST_MATH__}\
-	%{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
-        %{traditional} %{ftraditional:-traditional}\
-        %{traditional-cpp:-traditional}\
-	%{fleading-underscore} %{fno-leading-underscore}\
-	%{fshow-column} %{fno-show-column}\
-	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
-        %i %{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}}\n}\
-      %{!E:%{!M:%{!MM:cc1 %i %1 \
-                  %{std*} %{nostdinc*} %{A*} %{I*} %I\
-                  %{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\
-                  %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-                  %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
-		  %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
-                  %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
-		  %{ffast-math:-D__FAST_MATH__}\
-		  %{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
-		  %{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
-                  %{H} %C %{D*} %{U*} %{i*} %Z\
-                  %{ftraditional:-traditional}\
-                  %{traditional-cpp:-traditional}\
-		  %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
-		  %{aux-info*} %{Qn:-fno-ident}\
-		  %{--help:--help}\
-		  %{g*} %{O*} %{W*} %{w} %{pedantic*}\
-		  %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
-		  %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
-                  %{!S:as %a %Y\
-		     %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
-                     %{!pipe:%g.s} %A\n }}}}"
+     "%{E|M|MM:cpp -lang-c %{ansi:-std=c89} %(cpp_options)}\
+      %{!E:%{!M:%{!MM:cc1 -lang-c %{ansi:-std=c89} %(cpp_options)\
+			  %(cc1_options) %{!S:-o %{|!pipe:%g.s} |\n\
+      as %(asm_options) %{!pipe:%g.s} %A }}}}"
 #else /* ! USE_CPPLIB */
-    "cpp -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}\
-        %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
-	%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
-        %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
-	%{ffast-math:-D__FAST_MATH__}\
-	%{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
-        %{traditional} %{ftraditional:-traditional}\
-        %{traditional-cpp:-traditional}\
-	%{fshow-column} %{fno-show-column}\
-	%{fleading-underscore} %{fno-leading-underscore}\
-	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
-        %i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
-   "%{!M:%{!MM:%{!E:cc1 %{!pipe:%g.i} %1 \
-		   %{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\
-		   %{g*} %{O*} %{W*} %{w} %{pedantic*} %{std*}\
-		   %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
-		   %{aux-info*} %{Qn:-fno-ident}\
-		   %{--help:--help} \
-		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
-		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
-              %{!S:as %a %Y\
-		      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
-                      %{!pipe:%g.s} %A\n }}}}"
+     "cpp -lang-c %{ansi:-std=c89} %(cpp_options)\
+      %{!M:%{!MM:%{!E:%{!pipe:%g.i} |\n cc1 %{!pipe:%g.i} %(cc1_options)\
+      %{!S:-o %{|!pipe:%g.s} |\n as %(asm_options) %{!pipe:%g.s} %A }}}}\n"
 #endif /* ! USE_CPPLIB */
-  }},
+  },
   {"-",
-   {"%{E:cpp -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}\
-        %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
-	%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
-        %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
-	%{ffast-math:-D__FAST_MATH__}\
-	%{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
-        %{traditional} %{ftraditional:-traditional}\
-        %{traditional-cpp:-traditional}\
-	%{fshow-column} %{fno-show-column}\
-	%{fleading-underscore} %{fno-leading-underscore}\
-	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
-        %i %W{o*}}\
-    %{!E:%e-E required when input is from standard input}"}},
-  {".h", {"@c-header"}},
+   "%{!E:%e-E required when input is from standard input}\
+    cpp -lang-c %{ansi:-std=c89} %(cpp_options)"},
+     
+  {".h", "@c-header"},
   {"@c-header",
-   {"%{!E:%eCompilation of header file requested} \
-    cpp %{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 -D__GNUC_PATCHLEVEL__=%v3}\
-	%{!undef:%{!std=*:%p}%{std=gnu*:%p} %P} %{trigraphs}\
-        %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
-	%{ffast-math:-D__FAST_MATH__}\
-	%{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
-	%{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
-        %{traditional} %{ftraditional:-traditional}\
-        %{traditional-cpp:-traditional}\
-	%{fshow-column} %{fno-show-column}\
-	%{fleading-underscore} %{fno-leading-underscore}\
-	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
-        %i %W{o*}"}},
-  {".i", {"@cpp-output"}},
+   "%{!E:%eCompilation of header file requested} \
+    cpp -lang-c %{ansi:-std=c89} %(cpp-options)"},
+  {".i", "@cpp-output"},
   {"@cpp-output",
-   {"%{!M:%{!MM:%{!E:cc1 %i %1 %{!Q:-quiet} %{d*} %{m*} %{a*}\
-			%{g*} %{O*} %{W*} %{w} %{pedantic*} %{std*}\
-			%{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
-			%{aux-info*} %{Qn:-fno-ident} -fpreprocessed\
-			%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
-			%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
-		     %{!S:as %a %Y\
-			     %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
-			     %{!pipe:%g.s} %A\n }}}}"}},
-  {".s", {"@assembler"}},
+   "%{!M:%{!MM:%{!E:cc1 %i %(cc1_options)\
+                     %{!S:|\n as %(asm_options) %{!pipe:%g.s} %A }}}}"},
+  {".s", "@assembler"},
   {"@assembler",
-   {"%{!M:%{!MM:%{!E:%{!S:as %a %Y\
-		            %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
-			    %i %A\n }}}}"}},
-  {".S", {"@assembler-with-cpp"}},
+   "%{!M:%{!MM:%{!E:%{!S:as %(asm_options) %i %A }}}}"},
+  {".S", "@assembler-with-cpp"},
   {"@assembler-with-cpp",
-   {"cpp -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__ \
-        %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
-	%{ffast-math:-D__FAST_MATH__}\
-	%{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
-        %{traditional} %{ftraditional:-traditional}\
-        %{traditional-cpp:-traditional}\
-	%{fshow-column} %{fno-show-column}\
-	%{fleading-underscore} %{fno-leading-underscore}\
-	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
-        %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
-    "%{!M:%{!MM:%{!E:%{!S:as %a %Y\
-                    %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
-		    %{!pipe:%g.s} %A\n }}}}"}},
+   "cpp -lang-asm %(cpp_options) %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}\
+     %{!M:%{!MM:%{!E:%{!S:|\n as %(asm_options) %{!pipe:%g.s} %A }}}}"},
 #include "specs.h"
   /* Mark end of table */
-  {0, {0}}
+  {0, 0}
 };
 
 /* Number of elements in default_compilers, not counting the terminator.  */
@@ -767,47 +723,6 @@ static struct compiler default_compilers
 static int n_default_compilers
   = (sizeof default_compilers / sizeof (struct compiler)) - 1;
 
-/* Here is the spec for running the linker, after compiling all files.  */
-
-/* -u* was put back because both BSD and SysV seem to support it.  */
-/* %{static:} simply prevents an error message if the target machine
-   doesn't handle -static.  */
-/* We want %{T*} after %{L*} and %D so that it can be used to specify linker
-   scripts which exist in user specified directories, or in standard
-   directories.  */
-#ifdef LINK_COMMAND_SPEC
-/* Provide option to override link_command_spec from machine specific
-   configuration files.  */
-static const char *link_command_spec = 
-	LINK_COMMAND_SPEC;
-#else
-#ifdef LINK_LIBGCC_SPECIAL
-/* Don't generate -L options.  */
-static const char *link_command_spec = "\
-%{!fsyntax-only: \
- %{!c:%{!M:%{!MM:%{!E:%{!S:%(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \
-			%{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\
-			%{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
-			%{static:} %{L*} %o\
-			%{!nostdlib:%{!nodefaultlibs:%G %L %G}}\
-			%{!A:%{!nostdlib:%{!nostartfiles:%E}}}\
-			%{T*}\
-			\n }}}}}}";
-#else
-/* Use -L.  */
-static const char *link_command_spec = "\
-%{!fsyntax-only: \
- %{!c:%{!M:%{!MM:%{!E:%{!S:%(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \
-			%{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\
-			%{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
-			%{static:} %{L*} %D %o\
-			%{!nostdlib:%{!nodefaultlibs:%G %L %G}}\
-			%{!A:%{!nostdlib:%{!nostartfiles:%E}}}\
-			%{T*}\
-			\n }}}}}}";
-#endif
-#endif
-
 /* A vector of options to give to the linker.
    These options are accumulated by %x,
    and substituted into the linker command with %X.  */
@@ -1141,8 +1056,11 @@ static struct spec_list static_specs[] =
 {
   INIT_STATIC_SPEC ("asm",			&asm_spec),
   INIT_STATIC_SPEC ("asm_final",		&asm_final_spec),
+  INIT_STATIC_SPEC ("asm_options",		&asm_options),
   INIT_STATIC_SPEC ("cpp",			&cpp_spec),
+  INIT_STATIC_SPEC ("cpp_options",		&cpp_options),
   INIT_STATIC_SPEC ("cc1",			&cc1_spec),
+  INIT_STATIC_SPEC ("cc1_options",		&cc1_options),
   INIT_STATIC_SPEC ("cc1plus",			&cc1plus_spec),
   INIT_STATIC_SPEC ("endfile",			&endfile_spec),
   INIT_STATIC_SPEC ("link",			&link_spec),
@@ -1736,9 +1654,7 @@ read_specs (filename, main_p)
 			 (n_compilers + 2) * sizeof (struct compiler)));
 
 	  compilers[n_compilers].suffix = suffix;
-	  memset (compilers[n_compilers].spec, 0,
-		  sizeof compilers[n_compilers].spec);
-	  compilers[n_compilers].spec[0] = spec;
+	  compilers[n_compilers].spec = spec;
 	  n_compilers++;
 	  memset (&compilers[n_compilers], 0, sizeof compilers[n_compilers]);
 	}
@@ -3703,6 +3619,7 @@ const char *input_filename;
 static int input_file_number;
 size_t input_filename_length;
 static int basename_length;
+static int suffixed_basename_length;
 static const char *input_basename;
 static const char *input_suffix;
 
@@ -3887,6 +3804,11 @@ do_spec_1 (spec, inswitch, soft_matched_
 	    arg_going = 1;
 	    break;
 
+	  case 'B':
+	    obstack_grow (&obstack, input_basename, suffixed_basename_length);
+	    arg_going = 1;
+	    break;
+
 	  case 'd':
 	    delete_this_arg = 2;
 	    break;
@@ -5105,6 +5027,7 @@ set_input (filename)
   /* Find a suffix starting with the last period,
      and set basename_length to exclude that suffix.  */
   basename_length = strlen (input_basename);
+  suffixed_basename_length = basename_length;
   p = input_basename + basename_length;
   while (p != input_basename && *p != '.') --p;
   if (*p == '.' && p != input_basename)
@@ -5137,8 +5060,7 @@ main (argc, argv)
      int argc;
      const char **argv;
 {
-  register size_t i;
-  size_t j;
+  size_t i;
   int value;
   int linker_was_run = 0;
   char *explicit_link_files;
@@ -5537,32 +5459,11 @@ main (argc, argv)
       if (cp)
 	{
 	  /* Ok, we found an applicable compiler.  Run its spec.  */
-	  /* First say how much of input_filename to substitute for %b  */
-	  int len;
 
-	  if (cp->spec[0][0] == '#')
+	  if (cp->spec[0] == '#')
 	    error ("%s: %s compiler not installed on this system",
-		   input_filename, &cp->spec[0][1]);
-
-	  len = 0;
-	  for (j = 0; j < sizeof cp->spec / sizeof cp->spec[0]; j++)
-	    if (cp->spec[j])
-	      len += strlen (cp->spec[j]);
-
-	  {
-	    char *p1 = (char *) xmalloc (len + 1);
-	    
-	    len = 0;
-	    for (j = 0; j < sizeof cp->spec / sizeof cp->spec[0]; j++)
-	      if (cp->spec[j])
-		{
-		  strcpy (p1 + len, cp->spec[j]);
-		  len += strlen (cp->spec[j]);
-		}
-	    
-	    value = do_spec (p1);
-	    free (p1);
-	  }
+		   input_filename, &cp->spec[1]);
+	  value = do_spec (cp->spec);
 	  if (value < 0)
 	    this_file_error = 1;
 	}
@@ -5713,30 +5614,17 @@ lookup_compiler (name, length, language)
       }
 #endif
 
-
   if (cp >= compilers)
     {
-      if (cp->spec[0][0] == '@')
-	{
-	  struct compiler *new;
-
-	  /* An alias entry maps a suffix to a language.
-	     Search for the language; pass 0 for NAME and LENGTH
-	     to avoid infinite recursion if language not found.
-	     Construct the new compiler spec.  */
-	  language = cp->spec[0] + 1;
-	  new = (struct compiler *) xmalloc (sizeof (struct compiler));
-	  new->suffix = cp->suffix;
-	  memcpy (new->spec,
-		  lookup_compiler (NULL_PTR, 0, language)->spec,
-		  sizeof new->spec);
-	  return new;
-	}
-
-      /* A non-alias entry: return it.  */
-      return cp;
+      if (cp->spec[0] != '@')
+	/* A non-alias entry: return it.  */
+	return cp;
+      
+      /* An alias entry maps a suffix to a language.
+	 Search for the language; pass 0 for NAME and LENGTH
+	 to avoid infinite recursion if language not found.  */
+      return lookup_compiler (NULL_PTR, 0, cp->spec + 1);
     }
-
   return 0;
 }
 
@@ -5868,17 +5756,13 @@ validate_all_switches ()
   register char c;
   struct spec_list *spec;
 
-  for (comp = compilers; comp->spec[0]; comp++)
+  for (comp = compilers; comp->spec; comp++)
     {
-      size_t i;
-      for (i = 0; i < sizeof comp->spec / sizeof comp->spec[0] && comp->spec[i]; i++)
-	{
-	  p = comp->spec[i];
-	  while ((c = *p++))
-	    if (c == '%' && *p == '{')
-	      /* We have a switch spec.  */
-	      validate_switches (p + 1);
-	}
+      p = comp->spec;
+      while ((c = *p++))
+	if (c == '%' && *p == '{')
+	  /* We have a switch spec.  */
+	  validate_switches (p + 1);
     }
 
   /* Look through the linked list of specs read from the specs file.  */
===================================================================
Index: ch/lang-specs.h
--- ch/lang-specs.h	2000/04/03 23:03:15	1.11
+++ ch/lang-specs.h	2000/05/24 03:50:52
@@ -21,24 +21,10 @@ Boston, MA 02111-1307, USA.  */
 /* This is the contribution to the `default_compilers' array in gcc.c for
    CHILL.  */
 
-  {".ch",  {"@chill"}},
-  {".chi", {"@chill"}},
+  {".ch",  "@chill"},
+  {".chi", "@chill"},
   {"@chill",
-     {"cpp -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 -D__GNUC_PATCHLEVEL__=%v3}\
-        %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
-        %{traditional-cpp:-traditional} %{!undef:%{!ansi:%p} %P} %{trigraphs}\
-	%{fshow-column} %{fno-show-column}\
-	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
-        %i %{!E:%g.i}%{E:%W{o*}} \n",
-   "%{!E:cc1chill %g.i %1 \
-		   %{!Q:-quiet} -dumpbase %b.ch %{d*} %{m*} %{a}\
-		   %{g*} %{O*} %{W*} %{w} %{pedantic*} %{itu} \
-		   %{v:-version} %{pg:-p} %{p} %{f*} %{I*} \
-		   %{aux-info*} %{Qn:-fno-ident} %X \
-		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
-		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
-              %{!S:as %a %Y \
-		      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
-                      %{!pipe:%g.s} %A\n }}"}},
+     "cpp -lang-chill %{!no-gcc:-D__GNUCHILL__=%v1} %(cpp_options)\
+      %{!M:%{!MM:%{!E:%{!pipe:%g.i} |\n cc1chill %{!pipe:%g.i} %(cc1_options)\
+      %{!S:-o %{|!pipe:%g.s} |\n as %(asm_options) %{!pipe:%g.s} %A }}}}\n"},
+
===================================================================
Index: cp/lang-specs.h
--- cp/lang-specs.h	2000/04/03 23:03:17	1.24
+++ cp/lang-specs.h	2000/05/24 03:50:54
@@ -22,84 +22,34 @@ Boston, MA 02111-1307, USA.  */
 /* This is the contribution to the `default_compilers' array in gcc.c for
    g++.  */
 
-  {".cc", {"@c++"}},
-  {".cp", {"@c++"}},
-  {".cxx", {"@c++"}},
-  {".cpp", {"@c++"}},
-  {".c++", {"@c++"}},
-  {".C", {"@c++"}},
+  {".cc",  "@c++"},
+  {".cp",  "@c++"},
+  {".cxx", "@c++"},
+  {".cpp", "@c++"},
+  {".c++", "@c++"},
+  {".C",   "@c++"},
   {"@c++",
 #if USE_CPPLIB
-   {
-     "%{E|M|MM:cpp -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\
-	-D__GNUC_PATCHLEVEL__=%v3} -D__cplusplus\
-	%{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
-	%{!fno-exceptions:-D__EXCEPTIONS}\
-        %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} %{trigraphs}\
-	%{ffast-math:-D__FAST_MATH__}\
-	%{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
-	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
-        %i %{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}}\n}\
-      %{!E:%{!M:%{!MM:cc1plus %i %1 %2\
-                            -lang-c++ %{nostdinc*} %{C} %{A*} %{I*} %{P} %{$} %I\
-                            %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-                            %{!no-gcc:-D__GNUC__=%v1 -D__GNUG__=%v1\
-                            -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
-                            -D__cplusplus\
-                            %{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
-                            %{!fno-exceptions:-D__EXCEPTIONS}\
-			    %{fnew-abi:-D__GXX_ABI_VERSION=100}\
-                            %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
-			    %{ffast-math:-D__FAST_MATH__}\
-			    %{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
-                            %{trigraphs}\
-			    %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\
-			    %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
-                            %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
-			    %{v:-version} %{pg:-p} %{p}\
-			    %{f*} %{+e*} %{aux-info*} %{Qn:-fno-ident}\
-			    %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
-			    %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}}|\n\
-              %{!S:%{!fsyntax-only:as %a %Y\
-		      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
-                      %{!pipe:%g.s} %A\n }}}}}"}},
+    "%{E|M|MM:cpp -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\
+       %{fnew-abi:-D__GXX_ABI_VERSION=100}\
+       %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %(cpp_options)}\
+     %{!E:%{!M:%{!MM:cc1plus -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\
+       %{fnew-abi:-D__GXX_ABI_VERSION=100}\
+       %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
+       %(cpp_options) %(cc1_options) %{+e*}\
+       %{!S:-o %{|!pipe:%g.s} |\n\
+     as %(asm_options) %{!pipe:%g.s} %A }}}}"
 #else /* ! USE_CPPLIB */
-   {"cpp -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\
-	-D__GNUC_PATCHLEVEL__=%v3} -D__cplusplus\
-	%{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
-	%{!fno-exceptions:-D__EXCEPTIONS}\
-	%{fnew-abi:-D__GXX_ABI_VERSION=100}\
-        %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} %{trigraphs}\
-	%{ffast-math:-D__FAST_MATH__}\
-	%{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
-	%{fshow-column} %{fno-show-column}\
-	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
-        %i %{!M:%{!MM:%{!E:%{!pipe:%g.ii}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
-    "%{!M:%{!MM:%{!E:cc1plus %{!pipe:%g.ii} %1 %2\
-			    %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\
-			    %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
-			    %{v:-version} %{pg:-p} %{p}\
-			    %{f*} %{+e*} %{aux-info*} %{Qn:-fno-ident}\
-			    %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
-			    %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}}|\n\
-              %{!S:%{!fsyntax-only:as %a %Y\
-		      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
-                      %{!pipe:%g.s} %A\n }}}}}"}},
+    "cpp -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\
+       %{fnew-abi:-D__GXX_ABI_VERSION=100}\
+       %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %(cpp_options)\
+       %{!M:%{!MM:%{!E:%{!pipe:%g.ii} |\n\
+     cc1plus %{!pipe:%g.ii} %(cc1_options) %{+e*} %{!S:-o %{|!pipe:%g.s} |\n\
+     as %(asm_options) %{!pipe:%g.s} %A }}}}\n"
 #endif /* ! USE_CPPLIB */
-  {".ii", {"@c++-cpp-output"}},
+  },
+  {".ii", "@c++-cpp-output"},
   {"@c++-cpp-output",
-   {"%{!M:%{!MM:%{!E:cc1plus %i %1 %2 %{!Q:-quiet} %{d*} %{m*} %{a}\
-			    %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
-			    %{v:-version} %{pg:-p} %{p} -fpreprocessed\
-			    %{f*} %{+e*} %{aux-info*} %{Qn:-fno-ident}\
-			    %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
-			    %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
-	            %{!S:as %a %Y\
-			    %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
-			    %{!pipe:%g.s} %A\n }}}}"}},
+   "%{!M:%{!MM:%{!E:\
+    cc1plus -fpreprocessed %{!pipe:%g.ii} %(cc1_options) %{+e*}\
+    %{!S:-o %{|!pipe:%g.s} |\n as %(asm_options) %{!pipe:%g.s} %A }}}}"},
===================================================================
Index: f/lang-specs.h
--- f/lang-specs.h	2000/04/03 23:03:17	1.20
+++ f/lang-specs.h	2000/05/24 03:50:54
@@ -24,69 +24,28 @@ the Free Software Foundation, 59 Temple 
 /* This is the contribution to the `default_compilers' array in gcc.c for
    g77.  */
 
-  {".F", {"@f77-cpp-input"}},
-  {".fpp", {"@f77-cpp-input"}},
-  {".FPP", {"@f77-cpp-input"}},
+  {".F",   "@f77-cpp-input"},
+  {".fpp", "@f77-cpp-input"},
+  {".FPP", "@f77-cpp-input"},
   {"@f77-cpp-input",
-     /* For f77 we want -traditional to avoid errors with, for
-	instance, mismatched '.  Also, we avoid unpleasant surprises
-	with substitution of names not prefixed by `_' by using %P
-	rather than %p (although this isn't consistent with SGI and
-	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-fortran %{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 -D__GNUC_PATCHLEVEL__=%v3}\
-	%{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
-	%{!undef:%P} -D_LANGUAGE_FORTRAN %{trigraphs} \
-	%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} -traditional\
-	%{ffast-math:-D__FAST_MATH__}\
-	%{fshow-column} %{fno-show-column}\
-	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
-	%i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
-    "%{!M:%{!MM:%{!E:f771 %{!pipe:%g.i} %1 %(f771) \
-		   %{!Q:-quiet} -dumpbase %b.F %{d*} %{m*} %{a*}\
-		   %{g*} %{O*} %{W*} %{w} %{pedantic*} \
-		   %{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
-		   %{aux-info*} %{Qn:-fno-ident}\
-		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
-		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
-	      %{!S:as %a %Y\
-		      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
-		      %{!pipe:%g.s} %A\n }}}}"}},
-  {".r", {"@ratfor"}},
+   "cpp -lang-fortran %(cpp_options) %{!M:%{!MM:%{!E:%{!pipe:%g.f |\n\
+    f771 %{!pipe:%g.f} %(f771) %(cc1_options) %{!S:-o %{|!pipe:%g.s} |\n\
+    as %(asm_options) %{!pipe:%g.s} %A }}}}}\n"},
+  {".r", "@ratfor"},
   {"@ratfor",
-   {"ratfor %{C} %{v}\
-           %{C:%{!E:%eGNU C does not support -C without using -E}}\
-           %{!E:%{!pipe:-o %g.f}}%{E:%W{o*}} %i |\n",
-    "%{!E:f771 %{!pipe:%g.f} %1 %(f771) \
-	   %{!Q:-quiet} -dumpbase %b.r %{d*} %{m*} %{a*}\
-	   %{g*} %{O*} %{W*} %{w} %{pedantic*} \
-	   %{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
-	   %{aux-info*} %{Qn:-fno-ident}\
-	   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
-	   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
-	   %{!S:as %a %Y\
-	   %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
-           %{!pipe:%g.s} %A\n }}"}},
-  {".f", {"@f77"}},
-  {".for", {"@f77"}},
-  {".FOR", {"@f77"}},
+   "%{C:%{!E:%eGNU C does not support -C without using -E}}\
+    ratfor %{C} %{v} %i %{E:%W{o*}} %{!E: %{!pipe:-o %g.f} |\n\
+    f771 %{!pipe:%g.f} %(f771) %(cc1_options) %{!S:-o %{|!pipe:%g.s} |\n\
+    as %(asm_options) %{!pipe:%g.s} %A }}\n"},
+  {".f",   "@f77"},
+  {".for", "@f77"},
+  {".FOR", "@f77"},
   {"@f77",
-   {"%{!M:%{!MM:%{!E:f771 %i %1 %(f771) \
-		   %{!Q:-quiet} -dumpbase %b.f %{d*} %{m*} %{a*}\
-		   %{g*} %{O*} %{W*} %{w} %{pedantic*}\
-		   %{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
-		   %{aux-info*} %{Qn:-fno-ident}\
-		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
-		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
-	      %{!S:as %a %Y\
-		      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
-		      %{!pipe:%g.s} %A\n }}}}"}},
+   "%{!M:%{!MM:%{!E:f771 %i %(f771) %(cc1_options) %{!S:-o %{|!pipe:%g.s} |\n\
+     as %(asm_options) %{!pipe:%g.s} %A }}}}\n"},
+  /* XXX This is perverse and should not be necessary.  */
   {"@f77-version",
-   {"cpp -lang-fortran %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I \
+   "cpp -lang-fortran %{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 -D__GNUC_PATCHLEVEL__=%v3} \
@@ -96,7 +55,7 @@ the Free Software Foundation, 59 Temple 
       %{ffast-math:-D__FAST_MATH__}\
       %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z \
       /dev/null /dev/null \n\
-     f771 -fnull-version %1 %(f771) \
+    f771 -fnull-version %1 %(f771) \
       %{!Q:-quiet} -dumpbase g77-version.f %{d*} %{m*} %{a*} \
       %{g*} %{O*} %{W*} %{w} %{pedantic*} \
       -version -fversion %{f*} %{I*} -o %g.s /dev/null \n\
@@ -108,4 +67,4 @@ the Free Software Foundation, 59 Temple 
       %{!nostdlib:%{!nodefaultlibs:%G %L %G}} \
       %{!A:%{!nostdlib:%{!nostartfiles:%E}}} \
       %{T*} \n\
-     %g \n"}},
+     %g \n"},
===================================================================
Index: java/lang-specs.h
--- java/lang-specs.h	2000/05/02 20:32:30	1.11
+++ java/lang-specs.h	2000/05/24 03:50:54
@@ -25,20 +25,11 @@ The Free Software Foundation is independ
 /* This is the contribution to the `default_compilers' array in gcc.c for
    Java.  */
 
-  {".java",   {"@java"} },
-  {".class",  {"@java"} },
-  {".zip",    {"@java"} },
-  {".jar",    {"@java"} },
+  {".java",   "@java" },
+  {".class",  "@java" },
+  {".zip",    "@java" },
+  {".jar",    "@java" },
   {"@java",
-   {"%{!E:jc1 %i %1 %(jc1) %{!Q:-quiet} %{d*} %{m*} %{a}\
-		    %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
-		    %{traditional} %{v:-version} %{pg:-p} %{p}\
-		    %{f*} %{+e*} %{aux-info*} %{Qn:-fno-ident}\
-                    %{I*}\
-		    %{MD} %{MMD} %{M} %{MM}\
-                    %{fjni:%{femit-class-file:%e-fjni and -femit-class-file are incompatible}}\
-		    %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
-		    %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
-            %{!S:as %a %Y\
-		    %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
-		    %{!pipe:%g.s} %A\n }}"}},
+   "%{fjni:%{femit-class-file:%e-fjni and -femit-class-file are incompatible}}\
+    %{!E:jc1 %i %(jc1) %(cc1_options) %{+e*} %{MD} %{MMD} %{M} %{MM}\
+    %{!S:-o %{|!pipe:%g.s} |\n as %(asm_options) %{!pipe:%g.s} %A }}"},
===================================================================
Index: objc/lang-specs.h
--- objc/lang-specs.h	2000/04/03 23:03:18	1.11
+++ objc/lang-specs.h	2000/05/24 03:50:54
@@ -21,80 +21,23 @@ Boston, MA 02111-1307, USA.  */
 /* This is the contribution to the `default_compilers' array in gcc.c for
    objc.  */
 
-  {".m", {"@objective-c"}},
+  {".m", "@objective-c"},
   {"@objective-c",
 #if USE_CPPLIB
-   {"%{E|M|MM:cpp -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\
-	-D__GNUC_PATCHLEVEL__=%v3} %{ansi:-trigraphs -D__STRICT_ANSI__}\
-	%{!undef:%{!ansi:%p} %P} %{trigraphs}\
-        %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
-	%{ffast-math:-D__FAST_MATH__}\
-        %{traditional} %{ftraditional:-traditional}\
-        %{traditional-cpp:-traditional}\
-	%{fleading-underscore} %{fno-leading-underscore}\
-	%{fshow-column} %{fno-show-column}\
-	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
-        %i %{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}}\n}",
-    "%{!M:%{!MM:%{!E:cc1obj %i %1 \
-		   %{nostdinc*} %{A*} %{I*} %{P} %I\
-                   %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-		   -D__OBJC__ %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
-		   -D__GNUC_PATCHLEVEL__=%v3}\
-		   %{!undef:%{!ansi:%p} %P} %{trigraphs}\
-		   %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
-		   %{ffast-math:-D__FAST_MATH__}\
-		   %{!Q:-quiet} -dumpbase %b.m %{d*} %{m*} %{a*}\
-		   %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} \
-		   %{traditional} %{v:-version} %{pg:-p} %{p} %{f*} \
-    		   -lang-objc %{gen-decls} \
-		   %{aux-info*} %{Qn:-fno-ident}\
-		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
-		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
-     %{!S:as %a %Y\
-	%{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
-        %{!pipe:%g.s} %A\n }}}}"}
+   "%{E|M|MM:cpp -lang-objc\
+             %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %(cpp_options)}\
+    %{!E:%{!M:%{!MM:cc1obj -lang-objc\
+                    %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %(cpp_options)\
+                    %(cc1_options) %{gen-decls} %{!S:-o %{|!pipe:%g.s} |\n\
+                    as %(asm_options) %{!pipe:%g.s} %A }}}}"
 #else /* ! USE_CPPLIB */
-   {"cpp -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\
-        -D__GNUC_PATCHLEVEL__=%v3}\
-	 %{ansi:-trigraphs -D__STRICT_ANSI__}\
-	%{!undef:%{!ansi:%p} %P} %{trigraphs}\
-        %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
-	%{ffast-math:-D__FAST_MATH__}\
-        %{traditional} %{ftraditional:-traditional}\
-        %{traditional-cpp:-traditional}\
-	%{fleading-underscore} %{fno-leading-underscore}\
-	%{fshow-column} %{fno-show-column}\
-	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
-        %i %{!M:%{!MM:%{!E:%{!pipe:%g.mi}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
-    "%{!M:%{!MM:%{!E:cc1obj %{!pipe:%g.mi} %1 \
-		   %{!Q:-quiet} -dumpbase %b.m %{d*} %{m*} %{a*}\
-		   %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} \
-		   %{traditional} %{v:-version} %{pg:-p} %{p} %{f*} \
-    		   -lang-objc %{gen-decls} \
-		   %{aux-info*} %{Qn:-fno-ident}\
-		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
-		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
-              %{!S:as %a %Y\
-		      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
-                      %{!pipe:%g.s} %A\n }}}}"}
+     "cpp -lang-objc %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
+          %(cpp_options) %{!M:%{!MM:%{!E:%{!pipe:%g.mi} |\n\
+      cc1obj -lang-objc %{!pipe:%g.mi} %(cc1_options) %{gen-decls}\
+      %{!S:-o %{|!pipe:%g.s} |\n as %(asm_options) %{!pipe:%g.s} %A }}}}\n"
 #endif /* ! USE_CPPLIB */
-  },
-  {".mi", {"@objc-cpp-output"}},
+    },
+  {".mi", "@objc-cpp-output"},
   {"@objc-cpp-output",
-   {"%{!M:%{!MM:%{!E:cc1obj %i %1 \
-		   %{!Q:-quiet} -dumpbase %b.m %{d*} %{m*} %{a*}\
-		   %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} \
-		   %{traditional} %{v:-version} %{pg:-p} %{p} %{f*} \
-    		   -lang-objc %{gen-decls} \
-		   %{aux-info*} %{Qn:-fno-ident}\
-		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
-		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n",
-    "%{!S:as %a %Y\
-	%{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
-        %{!pipe:%g.s} %A\n }}}}"}},
+   "%{!M:%{!MM:%{!E:cc1obj -lang-objc %i %(cc1_options) %{gen-decls}\
+    %{!S:-o %{|!pipe:%g.s} |\n as %(asm_options) %{!pipe:%g.s} %A }}}}"},

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]