home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / aix / 9446 < prev    next >
Encoding:
Text File  |  1992-09-08  |  2.6 KB  |  74 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!iWarp.intel.com|ichips!tmcconne
  3. From: tmcconne@sedona.intel.com (Tom McConnell)
  4. Subject: Re: K&R C on the RS/6000(?)
  5. Message-ID: <1992Sep8.162546.11480@ichips.intel.com>
  6. Originator: tmcconne@sedona
  7. Keywords: C
  8. Sender: tmcconne@sedona (Tom McConnell)
  9. Organization: Intel Corporation
  10. References:  <79344@ut-emx.uucp>
  11. Date: Tue, 8 Sep 1992 16:25:46 GMT
  12. Lines: 60
  13.  
  14.  
  15. In article <79344@ut-emx.uucp>, olo@ccwf.cc.utexas.edu (Lee Thomas) writes:
  16. > Hello,
  17. > I was woundering if there was a way to tell cc or xlc to use strick
  18. > K&R C rather than ANSI C.  I am trying to compile GRASS on our 320H and
  19. > we have been having a bunch of problems.  The authors of the software
  20. > suggested that we compile with the K&R flag.  I know there is one in the
  21. > GNU C, but I could not find one in the C documentation from IBM (Info).
  22. > Any ideas?
  23. > Thanks!
  24. > -Lee Thomas
  25.  
  26.   Well, I don't know of a K&R compiler, but you can build a BSDish compiler out
  27. of xlc (the native RS/6000 compiler). This information is in
  28. /usr/lpp/bos/bsdport.
  29.  
  30.   Here is a piece:
  31.  
  32.    4.3.  Setting up a 4.3 BSD Compilation Environment
  33.  
  34.       To get the  compiler  to  behave  as  friendly  as
  35.       possible  by  default  with  code  that  has  been
  36.       written on a 4.3 BSD system, you can  create  your
  37.       own  stanza  in  the  /etc/xlc.cfg file.  Here's a
  38.       bsdcc stanza that works quite well:
  39.  
  40.           bsdcc:  use             = DEFLT
  41.                   crt             = /lib/crt0.o
  42.                   mcrt            = /lib/mcrt0.o
  43.                   gcrt            = /lib/gcrt0.o
  44.                   libraries       = -lbsd, -lc
  45.                   proflibs        = -L/lib/profiled,-L/usr/lib/profiled
  46.                   options         = -H512,-T512, -qlanglvl=extended, -qnoro,
  47.                                     -D_BSD, -D_NONSTD_TYPES, -D_NO_PROTO,
  48.                                     -D_BSD_INCLUDES, -bnodelcsect, -U__STR__,
  49.                                     -U__MATH__
  50.  
  51.           Note: The options line must be a single line.  It is split up
  52.           above only for easier reading.
  53.  
  54.       To use the compiler as  bsdcc,  link  /bin/xlc  to
  55.       /bin/bsdcc.
  56.  
  57.   I tend to like bsdcc for porting things to the RS/6000. I do not know if it
  58. will work for your application. Most things that "gcc -traditional" will work
  59. on, bsdcc will work on also.
  60.  
  61.     Cheers,
  62.  
  63.     Tom McConnell
  64. -- 
  65.  Tom McConnell          |     Internet: tmcconne@sedona.intel.com
  66.  Intel, Corp. C3-91     |     Phone: (602)-554-8229
  67.  5000 W. Chandler Blvd. | The opinions expressed are my own. No one in 
  68.  Chandler, AZ  85226    | their right mind would claim them.
  69.