Building GNU Pascal together with GNU Fortran.

Sun, 26 Jan 1997 20:55:02 +0100 (MET)


Hi,
Here is a small patch, which makes it possible to build GPC 2.0 using a GCC 
2.7.2.1, that has been build with Fortran support (tested with G77 0.5.19).
This could be useful for people, who (like me) needs to have both 
languages at hand.

It changes the GCC version to 2.7.2.1.f.1 and adds the changes made for 
G77 to toplev.c:


diff -rcp2N gpc-2.0/Makefile.in gpc-2.0.f.1/Makefile.in
*** gpc-2.0/Makefile.in	Mon Nov 18 03:31:33 1996
--- gpc-2.0.f.1/Makefile.in	Sun Jan 26 17:32:05 1997
***************
*** 40,44 ****
  # GPCVERSION = `date +%y%m%d`
  GPCVERSION = 2.0
! GCCVERSION = 2.7.2.1
  
  CROSS = @cross@
--- 40,44 ----
  # GPCVERSION = `date +%y%m%d`
  GPCVERSION = 2.0
! GCCVERSION = 2.7.2.1.f.1
  
  CROSS = @cross@
diff -rcp2N gpc-2.0/toplev.c gpc-2.0.f.1/toplev.c
*** gpc-2.0/toplev.c	Sat Sep 21 17:50:52 1996
--- gpc-2.0.f.1/toplev.c	Sun Jan 26 17:30:28 1997
*************** int flag_unroll_loops;
*** 392,395 ****
--- 392,409 ----
  int flag_unroll_all_loops;
  
+ /* Nonzero forces all invariant computations in loops to be moved
+    outside the loop. */
+ 
+ int flag_move_all_movables = 0;
+ 
+ /* Nonzero forces all general induction variables in loops to be
+    strength reduced. */
+ 
+ int flag_reduce_all_givs = 0;
+ 
+ /* Nonzero gets another run of loop_optimize performed. */
+ 
+ int flag_rerun_loop_opt = 0;
+ 
  /* Nonzero for -fwritable-strings:
     store string constants in data segment and don't uniquize them.  */
*************** struct { char *string; int *variable; in
*** 553,556 ****
--- 567,573 ----
    {"unroll·loops", &flag_unroll_loops, 1},
    {"unroll-all·loops", &flag_unroll_all_loops, 1},
+   {"move-all-movables", &flag_move_all_movables, 1},
+   {"reduce-all-givs", &flag_reduce_all_givs, 1},
+   {"rerun-loop-opt", &flag_rerun_loop_opt, 1},
    {"writable-strings", &flag_writable_strings, 1},
    {"peephole", &flag_no_peephole, 0},
*************** rest_of_compilation (decl)
*** 2965,2968 ****
--- 2982,2987 ----
  	       {
  		 loop_optimize (insns, loop_dump_file);
+ 		 if (flag_rerun_loop_opt)
+ 		 	loop_optimize (insns, loop_dump_file);
  	       });
      }


--------------------------------------------------------
Niels Kristian Bech Jensen                 nkbj@image.dk

"Chemists never die --- they just run out of reactants!"




Niels Kristian Bech Jensen (nkbj@image.dk)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es