2.9bsd cc ignores '-i' (fix)

dave at uwvax.ARPA dave at uwvax.ARPA
Mon Jun 18 03:52:33 AEST 1984


Index: 	/usr/cmd/cc.c 2.9bsd

Description:
	cc doesn't pass the '-i' flag along to ld.
Repeat-By:
	Take any source file. (foo.c):
		cc -i foo.c
		file a.out
	file will not say 'separate'.
Fix:
	Because cc interprets the '-i' itself to send the right
	floating-point simulation (if there isn't fp on the system)
	it doesn't just pass the argument along.  It must check
	for the 'iflag' and put the '-i' in the arguments explicitly.

*** cc.c.orig	Fri Jun  8 12:25:10 1984
--- cc.c	Mon Jun 11 02:08:09 1984
***************
*** 357,364
  		i = 0;
  		av[0] = "ld";
  		av[1] = "-X";
! 		av[2] = pref;
! 		j = 3;
  		if (noflflag) {
  			if (iflag)
  				av[j++] = "-lfpsim_sep";

--- 357,366 -----
  		i = 0;
  		av[0] = "ld";
  		av[1] = "-X";
! 		j = 2;
! 		if(iflag)
! 			av[j++] = "-i";
! 		av[j++] = pref;
  		if (noflflag) {
  			if (iflag)
  				av[j++] = "-lfpsim_sep";

-- 
Dave Cohrs @ wisconsin
...!{allegra,heurikon,ihnp4,seismo,sfwin,ucbvax,uwm-evax}!uwvax!dave
dave at wisc-rsch.arpa



More information about the Comp.unix.wizards mailing list