This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch (2/2) for cpplib and Fortran
- To: gcc-patches at gcc dot gnu dot org
- Subject: patch (2/2) for cpplib and Fortran
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Tue, 11 Jan 2000 16:38:26 -0800
This is the second part of the patch for cpplib's troubles with Fortran.
zw
* cccp.c: Accept and ignore -lang-fortran.
* f/lang-specs.h: Pass -lang-fortran to preprocessor.
===================================================================
Index: cccp.c
--- cccp.c 2000/01/07 00:16:50 1.91
+++ cccp.c 2000/01/12 00:36:41
@@ -1123,6 +1123,7 @@ print_help ()
printf (" -lang-objc Assume that the input sources are in ObjectiveC\n");
printf (" -lang-objc++ Assume that the input sources are in ObjectiveC++\n");
printf (" -lang-asm Assume that the input sources are in assembler\n");
+ printf (" -lang-fortran Assume that the input sources are in Fortran\n");
printf (" -lang-chill Assume that the input sources are in Chill\n");
printf (" -std=<std name> Specify the conformance standard; one of:\n");
printf (" gnu89, gnu9x, c89, c9x, iso9899:1990,\n");
@@ -1457,6 +1458,8 @@ main (argc, argv)
cplusplus = 1, cplusplus_comments = 1, c89 = 0, c9x = 0, objc = 1;
else if (! strcmp (argv[i], "-lang-asm"))
lang_asm = 1;
+ else if (! strcmp (argv[i], "-lang-fortran"))
+ /* Doesn't actually do anything. */ ;
else if (! strcmp (argv[i], "-lint"))
for_lint = 1;
break;
===================================================================
Index: f/lang-specs.h
--- f/lang-specs.h 1999/08/25 07:22:42 1.16
+++ f/lang-specs.h 2000/01/12 00:36:41
@@ -35,7 +35,7 @@ the Free Software Foundation, 59 Temple
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-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}\
@@ -85,7 +85,7 @@ the Free Software Foundation, 59 Temple
%{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-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} \