Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site uwvax.ARPA
Path: utzoo!linus!vaxine!wjh12!genrad!decvax!harpo!seismo!uwvax!dave
From: dave@uwvax.ARPA
Newsgroups: net.bugs.2bsd,net.unix-wizards
Subject: 2.9bsd cc ignores '-i' (fix)
Message-ID: <306@uwvax.ARPA>
Date: Sun, 17-Jun-84 13:52:33 EDT
Article-I.D.: uwvax.306
Posted: Sun Jun 17 13:52:33 1984
Date-Received: Wed, 20-Jun-84 00:32:15 EDT
Organization: U of Wisconsin CS Dept
Lines: 44

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@wisc-rsch.arpa