comp.lang.ada
 help / color / mirror / Atom feed
* Building a GNAT cross compiler
@ 1996-12-31  0:00 Jeff Carter
  1997-01-02  0:00 ` Jeff Creem
  1997-01-07  0:00 ` David L Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Jeff Carter @ 1996-12-31  0:00 UTC (permalink / raw)



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.

When I compile something using the cross compiler with "-v", I get the
following:

/users/carter/mips_test>- gcc -c -v numbers.c
Reading specs from /usr/vw/gnu/lib/gcc-lib/sdebig/2.5.7/specs
gcc version 2.7.2
 /usr/vw/gnu/lib/gcc-lib/sdebig/2.5.7/cpp -lang-c -v -iprefix
/usr/vw/gnu/lib/gcc-lib/sdebig/2.5.7/sparc-sun-solaris2.4/2.7.2/ -undef
-D__GNUC__=2 -D__GNUC_MINOR__=7 -DMIPSEB -D_MIPSEB -D__MIPSEB__
-D_MIPSEB -D__MIPSEB -Asystem(sde) -Acpu(mips) -Acpu(mipseb)
-Aendian(big) numbers.c /var/tmp/cca000Vu.i
GNU CPP version 2.5.7 [AL 1.1, MM 40] Algorithmics SDE-MIPS (big-endian)
#include "..." search starts here:
#include <...> search starts here:
 /usr/vw/gnu/lib/gcc-lib/sdebig/2.5.7/sparc-sun-solaris2.4/2.7.2/include
 /usr/vw/gnu/lib/gcc-lib/sdebig/2.5.7/sparc-sun-solaris2.4/2.7.2/sys-include
 /folk/will/algor/sde/lib/gcc-lib/sdebig/2.5.7/include
 /folk/will/algor/sde/lib/gcc-lib/sdebig/2.5.7/sys-include
 /folk/will/algor/sde/sdebig/include
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.

What I'd like to do is add GNAT capability to the existing cross
compiler. The documentation with the GNAT sources talks about building
GNAT to update an existing version of GNAT, and doesn't seem to apply to
what I'm doing.

We're doing this primarily for compiler evaluation, since we have the
MIPS platform. Our intended target will be a PowerPC under VxWorks, but
it will be a while before we get one in. I assume the port to the
PowerPC will be quite similar to the port to MIPS, since VxWorks will
include the gcc cross compiler.

If anyone has any experience to share with me, or can point me to any
better documentation, I would appreciate it.

Thank you.
-- 
Jeff Carter
Innovative Concepts, Inc.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Building a GNAT cross compiler
  1996-12-31  0:00 Building a GNAT cross compiler Jeff Carter
@ 1997-01-02  0:00 ` Jeff Creem
       [not found]   ` <os20by4mze.fsf@ted.vigra.com>
  1997-01-07  0:00 ` David L Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Jeff Creem @ 1997-01-02  0:00 UTC (permalink / raw)



In article <32C94EB6.41C67EA6@innocon.com>, Jeff Carter
<carter@innocon.com> 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).




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Building a GNAT cross compiler
  1996-12-31  0:00 Building a GNAT cross compiler Jeff Carter
  1997-01-02  0:00 ` Jeff Creem
@ 1997-01-07  0:00 ` David L Brown
  1 sibling, 0 replies; 4+ messages in thread
From: David L Brown @ 1997-01-07  0:00 UTC (permalink / raw)



David L Brown <dbrown@ted.vigra.com> writes:

> If someone wants, I can send them patches and even instructions to do
> what I did.

Due to requests, I'm going to put together some documentation on how I
ported gcc and gnat to our embedded platform.  I hope to be able to
put this documentation online on the web.  I will post after I have
time to put something together.

Dave Brown
dbrown@vigra.com




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Building a GNAT cross compiler
       [not found]   ` <os20by4mze.fsf@ted.vigra.com>
@ 1997-01-08  0:00     ` Jeff Creem
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Creem @ 1997-01-08  0:00 UTC (permalink / raw)



In article <os20by4mze.fsf@ted.vigra.com>, David L Brown
<dbrown@ted.vigra.com> wrote:

>jcreem@mailgw.sanders.lockheed.com (Jeff Creem) writes:
>
>> In article <32C94EB6.41C67EA6@innocon.com>, Jeff Carter
>> <carter@innocon.com> wrote:
>> 
>> >I find myself in the position of needing to build a GNAT cross compiler.
>
>> >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
>
>> 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
>
>Hmm, we have been running code crossed to MIPS for over two years, all
>built from sources unpacked directly from GNU.  The target
>mips-ecoff-netbsd should allow you to generate standalone MIPS code.  I
>hacked this up a bit because we have an OS on the machine as well
>(custom).  You do have to use the gnu binutils and tell configure for
>gcc.  Build the binutils with mips-ecoff-idt (I think).
>
>Also, I have built and am running gnat 3.07 on a Linux machine cross
>compiling to and embedded Linux box.
>
>If someone wants, I can send them patches and even instructions to do
>what I did.
>
>Dave Brown
>dbrown@vigra.com


That would be cool. What was the host machine that you built the cross 
compiler on.

Jeff




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-01-08  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-12-31  0:00 Building a GNAT cross compiler Jeff Carter
1997-01-02  0:00 ` Jeff Creem
     [not found]   ` <os20by4mze.fsf@ted.vigra.com>
1997-01-08  0:00     ` Jeff Creem
1997-01-07  0:00 ` David L Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox