Xref: utzoo comp.sys.apollo:4826 gnu.gcc:1484 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!uunet!mcsun!ukc!mucs!cns!ran From: ran@cns.umist.ac.uk (Bob Nutter) Newsgroups: comp.sys.apollo,gnu.gcc Subject: Re: Gcc on apollo Summary: How I did it... Keywords: gcc, apollo Message-ID: <1990Mar26.155315.29823@cns.umist.ac.uk> Date: 26 Mar 90 15:53:15 GMT References: <18645@boulder.Colorado.EDU> Sender: bob nutter, b.nutter@umist.ac.uk Organization: UMIST, Manchester, England. Lines: 129 Hi! (I'm new to this news game and news.announce.newusers isn't available, so bear with me if I mess up or beak some golden rule of etty-kitty...) In article <18645@boulder.Colorado.EDU> tomf@boulder.Colorado.EDU (FREDERICKS TH OMAS M) writes: > ... > What is the problem? Has anyone gotten this to compile on > a 3500? I am running sr10.2 and 6.7 of the apollo C version > if that helps. Installing gcc on apollos: ========== === == ======== This is how I went about installing gcc1.37 on our Apollo network (several 3000's and 4000's running sr10.1, and cc version 6.6). The stages below refer to the README file that come with John Vasta's (vasta@apollo.com) changes (see stage 1) I hope somebody may find it of use, other site's setups/software may mean you'll need to work it out for yourself. This is just what I had to do at ours. Stage 1 (obtain the software): -------- This is available from labrea.stanford.edu as /pub/gnu/APOLLO.README and apollo-gcc-1.37.tar.Z (as mentioned by Rainer Toebbicke in article <1662@cernvax.UUCP> rtb@cernvax.UUCP) You'll also need the gcc1.37 distribution, the gas1.34 distribution and bison. Stage 2 (adding changes): works ok ------- Stage 3 (building gas): ------- When you try to `make' gas you'll get an error in coff_convert.c, as it can't find the include file . This is because the include file is in /usr/include. I put a link in to keep things neat from /usr/include/apollo/mir.h to /usr/include/mir.h: ie: ln -s /usr/include/apollo/mir.h /usr/include/mir.h Once this is done, gas will install correctly. Then link `as' to the exectutable. Stage 4 (building bison): works ok ------- Stage 5 (building gcc): ------- This goes ok until you get to compiling `hard-params.c'. It is due to finding `volatile' at line 638 (etc). This *should* be ok, as we're compiling with `-A nansi' which *should* undef __STDC__ and thus define volatile as `static' like this: #ifndef __STDC__ #define volatile static #endif However, this doesn't seem to work (we've had loadsa problems with this, is /bin/cc brain-damaged anyone?) so do a quick hack and delete the ifdef/endif (or define volatile as static elsewhere). Once this is done, hard-params.c will compile. Stage 6 (testing): ------- The `make bootstrap CFLAGS=""' command (which tests gcc by getting it to compile itself) fails due to Domain/OS extensions to stdio.h. Basically, gcc doesn't like the `#attribute...' it finds early on. This one is an easy hack: edit stdio.h and use the fact that gcc defines CC to be `gcc' to conditionally select whether to use the #attribute extension. The start of stdio.h should then look something like this: . . . #if (CC == gcc) extern struct _iobuf { unsigned char *_ptr; short _cnt; unsigned char *_base; short _flag; short _file; } _iob[]; #else /*not gcc, this is what was there before*/ extern struct _iobuf { unsigned char *_ptr #attribute[aligned(1)]; short _cnt; unsigned char *_base #attribute[aligned(1)]; short _flag; short _file; } _iob[]; #endif . . . Once you've done this, the make bootstrap command runs to completion (plenty of warnings, but no errors). Remember to cahnge the stdio.h on every node that will run gcc. Once this has all been done you *should* have a working gcc. We haven't tried using it on anything major as yet, but at least it installed and things definitely compile and run. Good luck! bob --------------------------------------------------------------- bob nutter, computer officer Notice: The witty message dept. of computation UMIST is on holiday PO Box 88 Manchester M60 1QD UK tel: +44/0 61 200 3312 email: b.nutter@umist.ac.uk (pref) rn@ap.co.umist.ac.uk ran@cns.umist.ac.uk #include