[comp.os.minix] fix for 1.3 cc.c using 1.1 compiler

bob@dhw68k.cts.com (Bob Best) (10/31/88)

Applying the following patch to the official 1.3 cc.c provides support
for the 1.1 Minix compiler binaries.  Remember to define one of
MEM640K, MEM512K, or RAMDISK at the top of the patched cc.c.
This version of cc.c provides a clean interface to /usr/bin/ast for
symbol table support (see the -s option.)

Bob
----------------------patch to 1.3 cc.c for Minix 1.1 compiler---
Index: cc.c
*** cc13.c	Sun Oct 30 08:16:30 1988
--- cc13fix.c	Sun Oct 30 10:28:56 1988
***************
*** 73,78 ****
--- 73,81 ----
  char *LIBDIR = "/lib";
  #endif
  
+ /* object sizes */
+ char *V_FLAG = "-Vs2.2w2.2i2.2l4.2f4.2d8.2p2.2";
+ 
  #ifdef RAMDISK
  struct arglist LD_HEAD =    {1, { "/lib/crtso.s" } };
  struct arglist M_LD_HEAD =  {1, { "/lib/mrtso.s" } };
***************
*** 83,90 ****
  struct arglist LD_TAIL =    {2, { "/usr/lib/libc.a", "/usr/lib/end.s" } };
  #endif
  
- 
- 
  char *o_FILE = "a.out"; /* default name for executable file */
  
  #define AST_FLAGS	"-X"
--- 86,91 ----
***************
*** 232,238 ****
  	}
  	mktempname(tmpname);
  
! 	append(&CEM_FLAGS, "-L"); /* disable profiling */
  	count = SRCFILES.al_argc;
  	argvec = &(SRCFILES.al_argv[0]);
  
--- 233,239 ----
  	}
  	mktempname(tmpname);
  
! /*	append(&CEM_FLAGS, "-L"); /* disable profiling */
  	count = SRCFILES.al_argc;
  	argvec = &(SRCFILES.al_argv[0]);
  
***************
*** 267,272 ****
--- 268,274 ----
  				init(call1);
  				append(call1, CEM);
  				concat(call1, &DEBUG_FLAGS);
+ 				append(call1, V_FLAG);
  				concat(call1, &CEM_FLAGS);
  				append(call1, "-"); /* use stdin */
  				f = mkstr(kfile, tmpdir, tmpname, ".k", 0);
***************
*** 286,291 ****
--- 288,294 ----
  			init(call);
  			append(call, CEM);
  			concat(call, &DEBUG_FLAGS);
+ 			append(call, V_FLAG);
  			concat(call, &CEM_FLAGS);
  			append(call, file);
  			f = mkstr(kfile, tmpdir, tmpname, ".k", 0);
-- 
Bob Best
uucp: ...{trwrb,hplabs}!felix!dhw68k!bob	InterNet: bob@dhw68k.cts.com