Xref: utzoo comp.sys.apollo:2321 gnu.gcc:385 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ulowell!apollo!vasta From: vasta@apollo.COM (John Vasta) Newsgroups: comp.sys.apollo,gnu.gcc Subject: Re: GCC & the Apollo Message-ID: <429309d1.1ad5a@apollo.COM> Date: 11 Apr 89 20:33:00 GMT References: <1989Apr6.221259.8848@mntgfx.mentor.com> Reply-To: vasta@apollo.COM (John Vasta) Followup-To: comp.sys.apollo,gnu.gcc Organization: Apollo Computer, Chelmsford, MA Lines: 45 I suspect my postings on this subject didn't make it to the outside world; we've had problems with the news system last week. In article <1989Apr6.221259.8848@mntgfx.mentor.com> dclemans.falcon@mntgfx.mentor.com (Dave Clemans) writes: >To get GCC running on an Apollo system (with a Motorola M68k cpu) >you have to worry about a bit more than just getting a coff >format file. Most of this comes from the shared library system >used by the Apollo. On an Apollo system, there is no libc.a in >the traditional sense; the routines from libc.a are just always >"there" in your address space. The program loader handles the >connections basically transparently, however a certain coding style >is required. There is also a difference in calling sequences >for functions that return floating point numbers. > >I now have GCC (using version 1.34) limping on the Apollo (Specifically >the compiler can compile itself, gcc, cccp and gas, but I have tested >it on very little else). The technique being used is an >"object file converter"; it takes the output of gas and generates >.o files suitable for the Apollo version of /bin/ld. It recognizes >the situations where the shared library is being used, or where >calling sequence changes are needed for floating point, and generates >appropriate patches. Normal Apollo system /usr/include files are used, >except where they need Apollo-specific C "extensions" to be removed. I also have GCC running on the Apollo, supporting shared libraries and all our calling conventions. I also wrote an a.out-to-COFF converter which is embedded in GAS, the GNU assembler. However, in order to support shared libraries, I just put the code in a data section instead of the ".text" section, so that it is writable and therefore relocatable by the loader. No patching is needed. This means that code isn't sharable, but it was the easiest way to use the GNU compiler. Also, I changed the compiler to accomodate our differences in floating point calling conventions. These changes may appear in a future release of GCC someday. I also changed the GCC parser to accept the syntax extensions in our header files. In order to use these changes, you have to be running an SR10.x version of the operating system, with a bsd4.3 environment to build the GNU stuff. You'll need the distribution copies of GCC 1.34, GAS 1.31, and Bison. Ask me to send you the changes if you're interested. -- John Vasta Apollo Computer, Inc. CHA-O1-LT ARPA: vasta@apollo.com 330 Billerica Road, Chelmsford, MA 01824 UUCP: {decwrl!decvax, mit-eddie, attunix}!apollo!vasta