From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bbc4ab2e16e686c2 X-Google-Attributes: gid103376,public From: jcreem@mailgw.sanders.lockheed.com (Jeff Creem) Subject: Re: Building a GNAT cross compiler Date: 1997/01/02 Message-ID: #1/1 X-Deja-AN: 208078752 references: <32C94EB6.41C67EA6@innocon.com> organization: Jeff Creem newsgroups: comp.lang.ada Date: 1997-01-02T00:00:00+00:00 List-Id: In article <32C94EB6.41C67EA6@innocon.com>, Jeff Carter wrote: >I find myself in the position of needing to build a GNAT cross compiler. >While I have a great deal of software engineering and Ada experience, I >have no experience with gcc (except running GNAT) or with compiler >building. > >We are targeting a MIPS system under VxWorks, which comes with a gcc C >cross compiler hosted on a Sun Sparc Solaris 2.4 system. VxWorks >includes POSIX interfaces, so that part of the port should not be a >problem. We also have a Solaris self-targeted gcc including GNAT 3.07. >Finally, I have the GNAT 3.07 sources. > >End of search list. > /usr/vw/gnu/lib/gcc-lib/sdebig/2.5.7/cc1 /var/tmp/cca000Vu.i -quiet >-dumpbase numbers.c -version -o /var/tmp/cca000Vu.s >GNU C version 2.5.7 [AL 1.1, MM 40] Algorithmics SDE-MIPS (big-endian) >compiled by GNU C version 2.5.8. > /usr/vw/gnu/lib/gcc-lib/sdebig/2.5.7/as -EB -v -o numbers.o >/var/tmp/cca000Vu.s >Algorithmics MIPS Assembler (version 1.4) > >from which I conclude that the cross compiler is gcc 2.7.2. > Hmm.. As far as I know the algorithmics compiler is not 2.7.2 its older. (Maybe 2.5.7 by looking at the above). If you were hosted on a SGI or something I think you'd be all set since you could just get the latest gcc source code (or 2.7.2) and compile a gcc cross to vxWorks but I think there is currently a problem getting gcc to go cross to MIPS targets from a non MIPS architecture (something about the file mips-tfile.c or something..I can't remember the actual problem). I played around with this for a little while myself (except I was doing it from home on a linux box) and never really got anywhere (I could not successfully built a new gcc cross from source which is basically your first step). There is something in the gcc docs that mentions that cross to MIPS is not fully supported (which is where Algorithmics comes into play. I think they add some of their own code to build the cross for MIPS). If you get it working I'd be very interested... (P.S. -- For your real target this may not be a problem. I think that on PowerPC this would work).