This is the mail archive of the gcc@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]

Re: cpp discrepancies [patch]


On Tue, 27 Apr 1999 23:53:36 -0600, Jeffrey A Law wrote:
>
>  In message <19990427162105.A32347@liafa1.liafa.jussieu.fr>you write:
>  > Well, I've been trying --enable-cpp, and using the resulting cpp.
>  > 
>  > It would be great if this beastie could be *documented*, as there are
>  > several minor divergences from the usual cpp (neither cpp.1 nor cpp.texi
>  > document it)
>I wouldn't worry too much about documenting it yet.  We don't actually want
>folks to start using it until it's really ready for prime time (or at least
>*real* close).

I think it is ready for prime time and should be enabled by default.
The discrepancies noted by Marc are easy to fix - patch is appended.

The only issue requiring consideration is -lang-FOO.  The patch makes
gcc treat this like -xFOO, not as a library name.  I personally think
no one will notice, but if this is deemed to be too invasive, then it
can be made to only happen for the `cpp' driver.

zw

1999-04-28 08:57 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>

	* gcc.c (process_command): Treat -lang- like -x.
	* cppspec.c: Insert -no-gcc unless -gcc is given.  Translate
	`cpp INFILE OUTFILE' to `cpp INFILE -o OUTFILE'.  Three
	non-switch arguments is an error.

	* gcc.c (default_compilers): Pass -$ to the preprocessor.  If
	-no-gcc is given on the command line, do not pass -D__GNUC__
	or -D__GNUC_MINOR__ to the preprocesor.  Fix brace grouping bug.
	* ch/lang-specs.h: Likewise.
	* cp/lang-specs.h: Likewise.
	* f/lang-specs.h: Likewise.
	* objc/lang-specs.h: Likewise, and fix minor bug in .mi-file spec.

===================================================================
Index: gcc.c
--- gcc.c	1999/04/16 19:52:17	1.99
+++ gcc.c	1999/04/28 12:56:45
@@ -595,10 +595,10 @@
    {
 #if USE_CPPLIB
      "%{E|M|MM:cpp -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\
-	%{C} %{v} %{A*} %{I*} %{P} %I\
+	%{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__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
+        %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
 	%{ansi|std=*:%{!std=gnu*:-trigraphs -D__STRICT_ANSI__}}\
 	%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
         %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
@@ -612,7 +612,7 @@
                   %{std*} %{nostdinc*} %{A*} %{I*} %I\
                   %{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\
                   %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-                  -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
+                  %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
 		  %{ansi|std=*:%{!std=gnu*:-trigraphs -D__STRICT_ANSI__}}\
 		  %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
                   %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
@@ -629,13 +629,12 @@
                   %{!S:as %a %Y\
 		     %{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*}\
-	%{C} %{v} %{A*} %{I*} %{P} %I\
+	%{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__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
+        %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
 	%{ansi|std=*:%{!std=gnu*:-trigraphs -D__STRICT_ANSI__}}\
 	%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
         %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
@@ -656,14 +655,14 @@
               %{!S:as %a %Y\
 		      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
                       %{!pipe:%g.s} %A\n }}}}"
-  }},
 #endif /* ! USE_CPPLIB */
+  }},
   {"-",
    {"%{E:cpp -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\
-	%{C} %{v} %{A*} %{I*} %{P} %I\
+	%{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__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
+        %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
 	%{ansi|std=*:%{!std=gnu*:-trigraphs -D__STRICT_ANSI__}}\
 	%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
         %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
@@ -677,10 +676,10 @@
   {".h", {"@c-header"}},
   {"@c-header",
    {"%{!E:%eCompilation of header file requested} \
-    cpp %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
+    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}\
-        -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
+        %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
 	%{std=*:%{!std=gnu*:-trigraphs -D__STRICT_ANSI__}}\
 	%{!undef:%{!std=*:%p}%{std=gnu*:%p} %P} %{trigraphs}\
         %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
@@ -708,7 +707,7 @@
 			    %i %A\n }}}}"}},
   {".S", {"@assembler-with-cpp"}},
   {"@assembler-with-cpp",
-   {"cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
+   {"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__ \
@@ -2831,7 +2830,8 @@
 	  n_infiles++;
 	  i++;
 	}
-      else if (strncmp (argv[i], "-l", 2) == 0)
+      else if (strncmp (argv[i], "-l", 2) == 0
+	       && strncmp (argv[i], "-lang-", 6) != 0)
 	n_infiles++;
       else if (strcmp (argv[i], "-save-temps") == 0)
 	{
@@ -3201,8 +3201,26 @@
 	}
       else if (strncmp (argv[i], "-l", 2) == 0)
 	{
-	  infiles[n_infiles].language = "*";
-	  infiles[n_infiles++].name = argv[i];
+	  if (strncmp (argv[i], "-lang-", 6) == 0)
+	    {
+	      register char *p = &argv[i][6];
+	      if (p[0] == 0)
+		fatal ("argument to `-lang' is missing");
+	      else
+		spec_lang = p;
+	      if (! strcmp (spec_lang, "none"))
+		/* Suppress the warning if -xnone comes after the last input
+		   file, because alternate command interfaces like g++ might
+		   find it useful to place -xnone after each input file.  */
+		spec_lang = 0;
+	      else
+		last_language_n_infiles = n_infiles;
+	    }
+	  else
+	    {
+	      infiles[n_infiles].language = "*";
+	      infiles[n_infiles++].name = argv[i];
+	    }
 	}
       else if (strcmp (argv[i], "-specs") == 0)
 	i++;
===================================================================
Index: cppspec.c
--- cppspec.c	1999/04/06 10:04:10	1.2
+++ cppspec.c	1999/04/28 12:56:45
@@ -79,34 +79,32 @@
   char **argv = *in_argv;
   
   /* Do we need to read stdin? */
-  int read_stdin;
+  int read_stdin = 1;
 
   /* Do we need to insert -E? */
-  int need_E;
+  int need_E = 1;
 
-  /* Do we need to fixup files with unrecognized suffixes? */
-  int need_fixups;
+  /* Do we need to insert -no-gcc? */
+  int need_no_gcc = 1;
 
-  /* Table of input files with unrecognized suffixes. */
-  char *urs_tab;
-  int urs_count;
-  int urs_block;
-
+  /* Have we seen an input file? */
+  int seen_input = 0;
+  
+  /* Positions to insert -xc and -o, if necessary.
+     0 means unnecessary. */
+  int lang_c_here = 0;
+  int o_here = 0;
+
+  /* Do we need to fix up an input file with an unrecognized suffix? */
+  int need_fixups = 1;
+  
   int i, j, quote;
   char **new_argv;
   int new_argc;
 
   /* First pass.  If we see an -S or -c, barf.  If we see an input file,
-     turn off read_stdin, and if it has an unrecognizable suffix, mark
-     it for fixup. */
-  urs_tab = xmalloc (argc);
-  memset (urs_tab, 0, argc);
-  urs_count = 0;
-  urs_block = 0;
-  quote = 0;
-  read_stdin = 1;
-  need_E = 1;
-  need_fixups = 1;
+     turn off read_stdin.  If we see a second input file, it is actually
+     the output file.  If we see a third input file, barf.  */
   for (i = 1; i < argc; i++)
     {
       if (quote == 1)
@@ -127,7 +125,7 @@
 		{
 		  (*errfn) ("`%s' is not a legal option to the preprocessor",
 			    argv[i]);
-		  goto done;
+		  return;
 		}
 	      else if (argv[i][1] == 'x')
 		{
@@ -139,81 +137,86 @@
 	    }
 	  else if (argv[i][1] == 'x')
 	    need_fixups = 0;
+	  else if (argv[i][1] == 'l' && !strncmp (&argv[i][2], "ang-", 4))
+	    need_fixups = 0;
+	  else if (argv[i][1] == 'g' && !strcmp (&argv[i][2], "cc"))
+	    need_no_gcc = 0;
 	  else if (WORD_SWITCH_TAKES_ARG (&argv[i][1]))
 	    quote = 1;
 	}
       else /* not an option */
 	{
-	  int l = strlen (argv[i]);
-	  int known = 0;
-	  const char *const *suff;
-	  
-	  read_stdin = 0;
-	  for (suff = known_suffixes; *suff; suff++)
-	    if (!strcmp (*suff, &argv[i][l - strlen(*suff)]))
-	      {
-		known = 1;
-		break;
-	      }
-
-	  if (known)
+	  seen_input++;
+	  if (seen_input == 3)
 	    {
-	      if (urs_block)
-		{
-		  urs_block = 0;
-		  urs_tab[i] = 2;
-		  urs_count++;
-		}
+	      (*errfn) ("too many input files");
+	      return;
+	    }
+	  else if (seen_input == 2)
+	    {
+	      o_here = i;
 	    }
 	  else
 	    {
-	      if (!urs_block)
+	      read_stdin = 0;
+	      if (need_fixups)
 		{
-		  urs_block = 1;
-		  urs_tab[i] = 1;
-		  urs_count++;
+		  int l = strlen (argv[i]);
+		  int known = 0;
+		  const char *const *suff;
+
+		  for (suff = known_suffixes; *suff; suff++)
+		    if (!strcmp (*suff, &argv[i][l - strlen(*suff)]))
+		      {
+			known = 1;
+			break;
+		      }
+
+		  if (! known)
+		    lang_c_here = i;
 		}
 	    }
 	}
     }
 
-  /* If we were given an -E option and an input file, and no input
-     files have unrecognized suffixes, we can bail early.  */
-  if (!need_E && !read_stdin && (!need_fixups || urs_count == 0))
-    goto done;
+  /* If we don't need to edit the command line, we can bail early.  */
+  if (!need_E && !need_no_gcc && !read_stdin && !o_here && !lang_c_here)
+    return;
 
-  new_argc = argc + need_E + read_stdin + (need_fixups ? urs_count : 0);
+  new_argc = argc + need_E + need_no_gcc + read_stdin
+    + !!o_here + !!lang_c_here; 
   new_argv = xmalloc (new_argc * sizeof(char *));
 
   new_argv[0] = argv[0];
+  j = 1;
+
   if (need_E)
-    {
-      new_argv[1] = "-E";
-      j = 2;
-    }
-  else
-    j = 1;
+    new_argv[j++] = "-E";
+  if (need_no_gcc)
+    new_argv[j++] = "-no-gcc";
 
-  if (need_fixups)
+  if (o_here || lang_c_here)
     for (i = 1; i < argc; i++, j++)
       {
-	if (urs_tab[i])
-	  new_argv[j++] = (urs_tab[i] == 1) ? "-xc" : "-xnone";
+	if (i == lang_c_here)
+	  new_argv[j++] = "-xc";
+	else if (i == o_here)
+	  new_argv[j++] = "-o";
 
 	new_argv[j] = argv[i];
       }
   else
-    memcpy (&new_argv[j], &argv[1], (argc - 1)*sizeof (char *));
+    {
+      memcpy (&new_argv[j], &argv[1], (argc - 1)*sizeof (char *));
+      j += argc - 1;
+    }
 
   if (read_stdin)
     new_argv[j] = "-";
 
   *in_argc = new_argc;
   *in_argv = new_argv;
-
-done:
-  free (urs_tab);
-}
+} 
 
 /* Called before linking.  Returns 0 on success and -1 on failure. */
 int lang_specific_pre_link ()
===================================================================
Index: ch/lang-specs.h
--- ch/lang-specs.h	1999/04/06 09:54:25	1.7
+++ ch/lang-specs.h	1999/04/28 12:56:45
@@ -24,9 +24,9 @@
   {".ch",  {"@chill"}},
   {".chi", {"@chill"}},
   {"@chill",
-     {"cpp -lang-chill %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
+     {"cpp -lang-chill %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
 	%{C:%{!E:%eGNU CHILL does not support -C without using -E}}\
-        -D__GNUCHILL__=%v1 -D__GNUC_MINOR__=%v2\
+        %{!no-gcc:-D__GNUCHILL__=%v1 -D__GNUC_MINOR__=%v2}\
         %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
         %{traditional-cpp:-traditional} %{!undef:%{!ansi:%p} %P} %{trigraphs}\
 	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
===================================================================
Index: cp/lang-specs.h
--- cp/lang-specs.h	1999/04/06 09:54:26	1.14
+++ cp/lang-specs.h	1999/04/28 12:56:45
@@ -30,10 +30,10 @@
   {"@c++",
 #if USE_CPPLIB
    {
-     "%{E|M|MM:cpp -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
+     "%{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}\
-	-D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus -D__GNUC_MINOR__=%v2\
+	%{!no-gcc:-D__GNUC__=%v1 -D__GNUG__=%v1 -D__GNUC_MINOR__=%v2} -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}\
@@ -41,10 +41,10 @@
 	%{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\
+                            -lang-c++ %{nostdinc*} %{C} %{A*} %{I*} %{P} %{$} %I\
                             %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-                            -D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus\
-                            -D__GNUC_MINOR__=%v2\
+                            %{!no-gcc:-D__GNUC__=%v1 -D__GNUG__=%v1\
+                            -D__GNUC_MINOR__=%v2} -D__cplusplus\
                             %{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
                             %{!fno-exceptions:-D__EXCEPTIONS}\
                             %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
@@ -61,10 +61,10 @@
 		      %{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\
+   {"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}\
-	-D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus -D__GNUC_MINOR__=%v2\
+	%{!no-gcc:-D__GNUC__=%v1 -D__GNUG__=%v1 -D__GNUC_MINOR__=%v2} -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}\
===================================================================
Index: f/lang-specs.h
--- f/lang-specs.h	1999/04/06 09:54:28	1.13
+++ f/lang-specs.h	1999/04/28 12:56:45
@@ -35,10 +35,10 @@
 	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\
+   {"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}\
-	-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
+	%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
 	%{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
 	%{!undef:%P} -D_LANGUAGE_FORTRAN %{trigraphs} \
 	%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} -traditional\
@@ -85,10 +85,10 @@
 		      %{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 \
+   {"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} \
-      -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 \
+      %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2} \
       %{ansi:-trigraphs -$ -D__STRICT_ANSI__} \
       %{!undef:%P} -D_LANGUAGE_FORTRAN %{trigraphs} \
       %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} -traditional \
===================================================================
Index: objc/lang-specs.h
--- objc/lang-specs.h	1999/04/06 09:54:30	1.6
+++ objc/lang-specs.h	1999/04/28 12:56:45
@@ -24,10 +24,10 @@
   {".m", {"@objective-c"}},
   {"@objective-c",
 #if USE_CPPLIB
-   {"%{E|M|MM:cpp -lang-objc %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
+   {"%{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__ -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
+        -D__OBJC__ %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
 	%{ansi:-trigraphs -D__STRICT_ANSI__}\
 	%{!undef:%{!ansi:%p} %P} %{trigraphs}\
         %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
@@ -55,10 +55,10 @@
 	%{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\
+   {"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__ -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
+        -D__OBJC__ %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
 	 %{ansi:-trigraphs -D__STRICT_ANSI__}\
 	%{!undef:%{!ansi:%p} %P} %{trigraphs}\
         %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
@@ -83,7 +83,7 @@
   },
   {".mi", {"@objc-cpp-output"}},
   {"@objc-cpp-output",
-   {"%{!M:%{!MM:%{!E:cc1obj %{!pipe:%g.i} %1 \
+   {"%{!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*} \


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