[comp.unix.questions] fpcc's name is not cc!!

pjh@mccc.UUCP (Peter J. Holsberg) (02/15/88)

I have the floating point C compiler, fpcc, on my 3B2 (SVr3.0) but do
not have cc.  I tried linking fpcc to ccso I can avoid editing every
makefile that comes down the pike, but the system says (when I invoke
cc) "name must end in fpcc".  Is there Aa way around this?  Thanks.

-- 
Peter Holsberg                  UUCP: {rutgers!}princeton!mccc!pjh
Technology Division             CompuServe: 70240,334
Mercer College                  GEnie: PJHOLSBERG
Trenton, NJ 08690               Voice: 1-609-586-4800

friedl@vsi.UUCP (Stephen J. Friedl) (02/15/88)

In article <214@mccc.UUCP>, pjh@mccc.UUCP (Peter J. Holsberg) writes:
> 
> I have the floating point C compiler, fpcc, on my 3B2 (SVr3.0) but do
> not have cc.  I tried linking fpcc to ccso I can avoid editing every
> makefile that comes down the pike, but the system says (when I invoke
> cc) "name must end in fpcc".  Is there Aa way around this?  Thanks.

I posted a more detailed reply to Peter, but a summary is probably
relevant here.  In makefiles, it is a really good idea to use $(CC),
$(AS), $(LD) etc. everywhere instead of cc, as, ld, etc.  If you do
the former, you can put:

	CC=fpcc ; export CC

in your /etc/profile and everything will work and stay portable at
the same time.  These are all defined by make anyway so if you don't
define them they go to reasonable defaults (do "make -d" to see what
works on your machine).

     For you Microport fans, you may find that doing:

	CC='cc -Ml' ; export CC
	AS='as -Ml' ; export AS
	LD='ld -Ml' export LD
	LINT='lint -Ml' ; export LINT

may make live easier as well. This, of course, presumes that you
do most of your work in the large model: we do because our Informix
database library modules are large.  Does anybody have other
experience on this topic?
-- 
Stephen J. Friedl, KA8CMY   uucp:  {uunet, attmail}!vsi!friedl
V-Systems, Inc.             CSnet: friedl%vsi.uucp@kent.edu
39 Brookhollow Drive        voice: (714) 545-6442
Santa Ana, CA  92705-5440   "A Watched EPROM never burns".

avr@mtgzz.UUCP (XMRP50000[jcm]-a.v.reed) (02/16/88)

In article <214@mccc.UUCP>, pjh@mccc.UUCP (Peter J. Holsberg) writes:
> 
> I have the floating point C compiler, fpcc, on my 3B2 (SVr3.0) but do
> not have cc.  I tried linking fpcc to ccso I can avoid editing every
> makefile that comes down the pike, but the system says (when I invoke
> cc) "name must end in fpcc".  Is there Aa way around this?  Thanks.

# Yes, but only if your make recognizes $SH or $SHELL, and you have ksh:
# Put the following in your $ENV file -
SH=`whence ksh`;SHELL=$SH;export SH SHELL;alias -x cc=`whence fpcc`

					Adam Reed (mtgzz!avr)

devine@cookie.dec.com (Bob Devine) (02/17/88)

 
In article <214@mccc.UUCP>, pjh@mccc.UUCP (Peter J. Holsberg) writes:
> I have the floating point C compiler, fpcc, on my 3B2 (SVr3.0) but do
> not have cc.  I tried linking fpcc to ccso I can avoid editing every
> makefile that comes down the pike, but the system says (when I invoke
> cc) "name must end in fpcc".  Is there Aa way around this?  Thanks.

  The best way is to make the compiler call a symbol so that other
compilers can be used.  If you want to have portable makefiles, do this!

  Since you don't want to correct everyone's mistakes, you can just
use a script file called 'cc' that calls 'fpcc'.  Argument passing
may be tricky but it's your choice of evils.

  An old dictum: Any problem can be solved with another layer of indirection....

jmsellens@watdragon.waterloo.edu (John M. Sellens) (02/17/88)

>In article <214@mccc.UUCP>, pjh@mccc.UUCP (Peter J. Holsberg) writes:
> [C compiler is called fpcc, wants to avoid modifying all sorts of Makefiles]

With many Makefiles, you could just invoke make and define CC on the command
line as in
   make CC=fpcc ... other args ...
which of course you could build into an alias, or a shell script, or ...

bobc@killer.UUCP (Bob Calbridge) (02/17/88)

In article <214@mccc.UUCP>, pjh@mccc.UUCP (Peter J. Holsberg) writes:
> 
> I have the floating point C compiler, fpcc, on my 3B2 (SVr3.0) but do
> not have cc.  I tried linking fpcc to ccso I can avoid editing every
> makefile that comes down the pike, but the system says (when I invoke
> cc) "name must end in fpcc".  Is there Aa way around this?  Thanks.

I have the same problem.  Not only with make but also with lint.  This
is in an educational environment and the instructors would like to 
relieve the students of the need to be familiar with all the options
required to compile the programs.  They just want a simple form of

make filename

The lint utility is needed for all the instructors though.  We tried to
get an answer from the AT&T hotline but they acted as if we should have
had the source to lint and could change it from there.  The C+FP
manual casually mentions using make and lint as if there should be a ver-
sion on the install disk.  I don't find any.  I too would like an
answer.
Best,
Bob

bamford@ihlpg.ATT.COM (Harold E. Bamford) (02/17/88)

In article <214@mccc.UUCP> pjh@mccc.UUCP (Peter J. Holsberg) writes:
>I have the floating point C compiler, fpcc, on my 3B2 (SVr3.0) but do
>not have cc.  I tried linking fpcc to ccso I can avoid editing every
>makefile that comes down the pike, but the system says (when I invoke
>cc) "name must end in fpcc".  Is there Aa way around this?  Thanks.

Try telling make to use fpcc instead of cc:  

	make CC=fpcc 

This should work for anything that uses the macro CC.
-- 
				Harold Bamford, AT&T Bell Labs
				IHP 2F-524 (312) 416-7397
				ihnp4!ihlpg!bamford

pjh@mccc.UUCP (Peter J. Holsberg) (02/18/88)

Call the following shell script "/bin/cc":

exec /bin/fpcc "$@"
echo /bin/fpcc not there! 1>&2
exit 1

That's all there is to it!
-- 
Peter Holsberg                  UUCP: {rutgers!}princeton!mccc!pjh
Technology Division             CompuServe: 70240,334
Mercer College                  GEnie: PJHOLSBERG
Trenton, NJ 08690               Voice: 1-609-586-4800

dlm@cuuxb.ATT.COM (Dennis L. Mumaugh) (02/20/88)

In article <3338@killer.UUCP     bobc@killer.UUCP (Bob Calbridge) writes:
#  In article <214@mccc.UUCP    , pjh@mccc.UUCP (Peter J. Holsberg) writes:
# }  
# }  I have the floating point C compiler, fpcc,  on  my  3B2
# }  (SVr3.0) but do not have cc.  I tried linking fpcc to cc
# }  so I can avoid editing every makefile  that  comes  down
# }  the  pike,  but the system says (when I invoke cc) "name
# }  must  end  in  fpcc".  Is  there  Aa  way  around  this?
# }  Thanks.

#  I have the same  problem. Not only with  make  but  also
#  with  lint.  This  is  in  an educational environment and the
#  instructors would like to relieve the students of the need to
#  be  familiar  with  all  the  options required to compile the
#  programs.  They just want a simple form of

#   make

#  The lint utility is needed for  all  the  instructors
#  though.  We  tried to get an answer from the AT&T hotline but
#  they acted as if we should have had the source  to  lint  and
#  could  change  it  from  there.   The  C+FP  manual  casually
#  mentions using make and lint as if there should be a version
#  on  the install disk.  I don't find any.  I too would like an
#  answer.

There is a utility on the latest C floppies  called  gencc.  This
will  allow  you  to  generate  a  cc command that does the right
thing.

On C Issue 4.2 (soon to be generally available) fpcc and  cc  are
merged and fpcc is nothing but
	cc -K mau $@

Really you ought to be able to make a cc that says the reverse.
-- 
=Dennis L. Mumaugh
 Lisle, IL       ...!{attunix,ihnp4,cbosgd,lll-crg}!cuuxb!dlm