home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aix
- Path: sparky!uunet!iWarp.intel.com|ichips!tmcconne
- From: tmcconne@sedona.intel.com (Tom McConnell)
- Subject: Re: K&R C on the RS/6000(?)
- Message-ID: <1992Sep8.162546.11480@ichips.intel.com>
- Originator: tmcconne@sedona
- Keywords: C
- Sender: tmcconne@sedona (Tom McConnell)
- Organization: Intel Corporation
- References: <79344@ut-emx.uucp>
- Date: Tue, 8 Sep 1992 16:25:46 GMT
- Lines: 60
-
-
- In article <79344@ut-emx.uucp>, olo@ccwf.cc.utexas.edu (Lee Thomas) writes:
- >
- > Hello,
- >
- > I was woundering if there was a way to tell cc or xlc to use strick
- > K&R C rather than ANSI C. I am trying to compile GRASS on our 320H and
- > we have been having a bunch of problems. The authors of the software
- > suggested that we compile with the K&R flag. I know there is one in the
- > GNU C, but I could not find one in the C documentation from IBM (Info).
- >
- > Any ideas?
- >
- > Thanks!
- >
- > -Lee Thomas
-
- Well, I don't know of a K&R compiler, but you can build a BSDish compiler out
- of xlc (the native RS/6000 compiler). This information is in
- /usr/lpp/bos/bsdport.
-
- Here is a piece:
-
- 4.3. Setting up a 4.3 BSD Compilation Environment
-
- To get the compiler to behave as friendly as
- possible by default with code that has been
- written on a 4.3 BSD system, you can create your
- own stanza in the /etc/xlc.cfg file. Here's a
- bsdcc stanza that works quite well:
-
- bsdcc: use = DEFLT
- crt = /lib/crt0.o
- mcrt = /lib/mcrt0.o
- gcrt = /lib/gcrt0.o
- libraries = -lbsd, -lc
- proflibs = -L/lib/profiled,-L/usr/lib/profiled
- options = -H512,-T512, -qlanglvl=extended, -qnoro,
- -D_BSD, -D_NONSTD_TYPES, -D_NO_PROTO,
- -D_BSD_INCLUDES, -bnodelcsect, -U__STR__,
- -U__MATH__
-
- Note: The options line must be a single line. It is split up
- above only for easier reading.
-
- To use the compiler as bsdcc, link /bin/xlc to
- /bin/bsdcc.
-
- I tend to like bsdcc for porting things to the RS/6000. I do not know if it
- will work for your application. Most things that "gcc -traditional" will work
- on, bsdcc will work on also.
-
- Cheers,
-
- Tom McConnell
- --
- Tom McConnell | Internet: tmcconne@sedona.intel.com
- Intel, Corp. C3-91 | Phone: (602)-554-8229
- 5000 W. Chandler Blvd. | The opinions expressed are my own. No one in
- Chandler, AZ 85226 | their right mind would claim them.
-