comp.lang.ada
 help / color / mirror / Atom feed
* Porting GNAT to Debian Hurd
@ 2001-06-15  1:46 B. Douglas Hilton
  2001-06-15 13:53 ` Ted Dennison
  0 siblings, 1 reply; 8+ messages in thread
From: B. Douglas Hilton @ 2001-06-15  1:46 UTC (permalink / raw)


Has anybody successfully ported GNAT to any strange platforms?

I would dearly like to port GNAT to the Hurd, and am considering
undertaking it as a project. Hurd already has gcc 2.9.5 and work is
underway to finalize gcc 3.0, but GNAT has not yet been ported.

How easily does GNAT build from source? Does it rely much on
OS specific calls? I understand that the Gnat.OS package may be
tricky, but what about in general?

Hurd, a somewhat "bleeding-edge" operating system could probably
benefit from having some particularly pesky apps rewritten in Ada,
although thick bindings to mach.h, and /include/hurd seems to be
a particularly formidable task.

I wish I could rewrite gnuMach in Ada. Oh well, $h!t in one hand and
wish in the other and see which fills up quicker. :-)

Regards,
- Doug





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

* Re: Porting GNAT to Debian Hurd
  2001-06-15  1:46 Porting GNAT to Debian Hurd B. Douglas Hilton
@ 2001-06-15 13:53 ` Ted Dennison
  2001-06-16  4:52   ` B. Douglas Hilton
  0 siblings, 1 reply; 8+ messages in thread
From: Ted Dennison @ 2001-06-15 13:53 UTC (permalink / raw)


In article <3B296913.1F13E65D@engineer.com>, B. Douglas Hilton says...
>
>Has anybody successfully ported GNAT to any strange platforms?

That depends on what you consider strange. :-)

>Hurd, a somewhat "bleeding-edge" operating system could probably
>benefit from having some particularly pesky apps rewritten in Ada,
>although thick bindings to mach.h, and /include/hurd seems to be
>a particularly formidable task.

One of my occasional daydreams involves an OS getting "taken over" by Ada as
more and more of its apps are written using it. That would lead to
device-drivers, which would eventually lead to Ada starting to seep into the
kernel sources. Finally the remainder of the kernel would just get rewritten in
Ada to make things more consistent (and maintainable).

Hurd's at a good place for such a takeover, but I don't think Ada is yet. We
just don't quite have the volunteer manpower.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



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

* Re: Porting GNAT to Debian Hurd
  2001-06-15 13:53 ` Ted Dennison
@ 2001-06-16  4:52   ` B. Douglas Hilton
  2001-06-21 15:22     ` Charles Hixson
  2001-06-22 20:48     ` Robert Dewar
  0 siblings, 2 replies; 8+ messages in thread
From: B. Douglas Hilton @ 2001-06-16  4:52 UTC (permalink / raw)


I don't know if Hurd is ripe for a takeover, but it would probably
not be excessively difficult to fork the development tree at this
stage.
    I was looking at the gnat sources, and it appears that you need
to already have an older gnat installed to build a newer one. This
might be tricky for Hurd, because I'd have to cross-compile gnat
from Linux, then use it to do a native build in Hurd.
    To do that, I need to compile gnat in a cross-compilation
configuration in Linux; it would be a minor feat, but is theoretically
possible.
    A good start for an Ada kernel would be to rewrite oskit in Ada,
possibly in a very stripped-down configuration. Now that would
be pretty cool.

- Doug


Ted Dennison wrote:

> One of my occasional daydreams involves an OS getting "taken over" by Ada as
> more and more of its apps are written using it. That would lead to
> device-drivers, which would eventually lead to Ada starting to seep into the
> kernel sources. Finally the remainder of the kernel would just get rewritten in
> Ada to make things more consistent (and maintainable).
>
> Hurd's at a good place for such a takeover, but I don't think Ada is yet. We
> just don't quite have the volunteer manpower.
>
> ---
> T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
>           home email - mailto:dennison@telepath.com




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

* Re: Porting GNAT to Debian Hurd
  2001-06-16  4:52   ` B. Douglas Hilton
@ 2001-06-21 15:22     ` Charles Hixson
  2001-06-21 15:57       ` Ted Dennison
  2001-06-22 12:37       ` Marc A. Criley
  2001-06-22 20:48     ` Robert Dewar
  1 sibling, 2 replies; 8+ messages in thread
From: Charles Hixson @ 2001-06-21 15:22 UTC (permalink / raw)


Exposing my ignorance:
"B. Douglas Hilton" <doug.hilton@engineer.com> wrote in
news:3B2AE5F4.59E4ABE8@engineer.com: 

> I don't know if Hurd is ripe for a takeover, but it would
> probably not be excessively difficult to fork the
> development tree at this stage.
>     I was looking at the gnat sources, and it appears that
>     you need 
> to already have an older gnat installed to build a newer
> one. This might be tricky for Hurd, because I'd have to
> cross-compile gnat from Linux, then use it to do a native
> ...
> 
> - Doug
> 
> 
> ... 


When I first encountered Algol, I discovered that the basic 
specs were an Algol compiler that was written in a simple form 
of Algol.  This seemed quite strange, but I was told that it was 
reasonably simple to write a compiler for this stripped down 
Algol in assembler, so that really made it quite portable.

This seems to be the root of the problem here.  The underlying 
compiler for the language that GNAT is written in isn't some 
small stripped down subset.  It's Ada.  So you need a complete 
compiler to build a compiler.  I suppose that cross-
compilation's a simpler problem to solve.  What would really 
make things easier, though, would be an Ada compiler with an 
option to emit, say, C code.  Or Forth.  Or any of the other 
portable assemblers.  This might not be optimized for the target 
system, but it would almost always work.  One could think of it 
as a cross-compilation into a abstract machine.  

Speaking of abstract machines, does JGnat code require more than 
the JVM?  Perhaps the bootstrapping could be done via JGnat.  
Does the Hurd have a JVM?  Can Gnat be compiled into JVM code?  
(I think that C code would be a better choice, but JGnat already 
exists.  If it can compile everything into Java class files, 
then maybe the problem of getting started is partially solved.)

-- 
Charles Hixson

Copy software legally, the GNU way!
Use GNU software, and legally make and share copies of software.
See http://www.gnu.org
    http://www.redhat.com
    http://www.linux-mandrake.com
    http://www.calderasystems.com/
    http://www.linuxapps.com/



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

* Re: Porting GNAT to Debian Hurd
  2001-06-21 15:22     ` Charles Hixson
@ 2001-06-21 15:57       ` Ted Dennison
  2001-06-21 21:59         ` Charles Hixson
  2001-06-22 12:37       ` Marc A. Criley
  1 sibling, 1 reply; 8+ messages in thread
From: Ted Dennison @ 2001-06-21 15:57 UTC (permalink / raw)


In article <Xns90C7553D53700charleshixsonearthli@207.217.77.23>, Charles Hixson
says...
>
>Exposing my ignorance:
>When I first encountered Algol, I discovered that the basic 
>specs were an Algol compiler that was written in a simple form 
>of Algol.  This seemed quite strange, but I was told that it was 
..
>This seems to be the root of the problem here.  The underlying 
>compiler for the language that GNAT is written in isn't some 
>small stripped down subset.  It's Ada.  So you need a complete 
>compiler to build a compiler.  I suppose that cross-

This isn't just some strange coincidence. Just about *every* compiler works that
way. GCC certianly does (you need a C compiler to compile it. My first run at it
I used the Sun C compiler, then bootstrapped using the resulting gcc compiler).

It may put your mind at rest a bit to know that:

o  There *is* an Ada compiler that outputs ANSI C (Intermetrics).
o  Gnat does *not* use every feature in the language in its own sources, so you
don't really need a full Ada 95 compiler. 
o  Anyone with the technical chops to port GNAT to a new platform shouldn't have
too much trouble figuring out how to build and use a GNAT cross-compiler.
o  The good folks at ACT are looking at providing bootstraping binaries for some
platforms already. (see http://gcc.gnu.org/ml/gcc/2001-06/msg01055.html )


---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



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

* Re: Porting GNAT to Debian Hurd
  2001-06-21 15:57       ` Ted Dennison
@ 2001-06-21 21:59         ` Charles Hixson
  0 siblings, 0 replies; 8+ messages in thread
From: Charles Hixson @ 2001-06-21 21:59 UTC (permalink / raw)


Ted Dennison<dennison@telepath.com> wrote in
news:yPoY6.3996$yp1.140358@www.newsranger.com: 

> In article
> <Xns90C7553D53700charleshixsonearthli@207.217.77.23>,
> Charles Hixson says...
>>
>>Exposing my ignorance:
>>... 
> This isn't just some strange coincidence. Just about *every*
> compiler works that way. GCC certianly does (you need a C

I was told that Algol was (one of?) the first to do that.  
Certainly the Fortrans that I had encountered previously had 
been written in FAP or MAP.

> ...
> o  There *is* an Ada compiler that outputs ANSI C
> (Intermetrics). 
Good.  That should make a port relatively straight-forwards.  
(Well, if you already have the code generation for a particular 
CPU, anyway.)

> o  ...
> o  Anyone with the technical chops to port
> GNAT to a new platform shouldn't have too much trouble
> figuring out how to build and use a GNAT cross-compiler. 
> ...
Well, that's not me.  Pity, in a way, but I've been trying to 
move further away from the hardware layer, not get closer to it.

> o  The good folks at ACT are looking at providing bootstraping
> binaries for some platforms already. (see
> http://gcc.gnu.org/ml/gcc/2001-06/msg01055.html ) 

Nice.  That's a good reference.  And if only gnat1 and gnatbind 
are needed for the bootstrap, then things should be somewhat 
manageable, though it's still about 3M of compiled code (on my 
system).
> 
> 
> ---
> T.E.D.    homepage   -
> http://www.telepath.com/dennison/Ted/TED.html 
>           home email - mailto:dennison@telepath.com



-- 
Charles Hixson

Copy software legally, the GNU way!
Use GNU software, and legally make and share copies of software.
See http://www.gnu.org
    http://www.redhat.com
    http://www.linux-mandrake.com
    http://www.calderasystems.com/
    http://www.linuxapps.com/



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

* Re: Porting GNAT to Debian Hurd
  2001-06-21 15:22     ` Charles Hixson
  2001-06-21 15:57       ` Ted Dennison
@ 2001-06-22 12:37       ` Marc A. Criley
  1 sibling, 0 replies; 8+ messages in thread
From: Marc A. Criley @ 2001-06-22 12:37 UTC (permalink / raw)


Charles Hixson wrote:
> 
> 
> Speaking of abstract machines, does JGnat code require more than
> the JVM?  Perhaps the bootstrapping could be done via JGnat.
> Does the Hurd have a JVM?  Can Gnat be compiled into JVM code?
> (I think that C code would be a better choice, but JGnat already
> exists.  If it can compile everything into Java class files,
> then maybe the problem of getting started is partially solved.)

Having been working regularly with JGNAT 1.1p over the last few
months...

JGNAT code requires only that the jgnat.jar library be in the
CLASSPATH.  No different than utilizing any other Java library.

JGNAT 1.1p has some limitations and bugs, so in my opinion it's not
quite ready for general production use.  Based on the problems I've
encountered I would doubt that it could compile the GNAT sources.  (This
is not to say that JGNAT is just a toy, I've used it in some serious
work, and it works just fine--you just gotta work around the quirks.)

Marc A. Criley
Senior Staff Engineer
Quadrus Corporation
www.quadruscorp.com



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

* Re: Porting GNAT to Debian Hurd
  2001-06-16  4:52   ` B. Douglas Hilton
  2001-06-21 15:22     ` Charles Hixson
@ 2001-06-22 20:48     ` Robert Dewar
  1 sibling, 0 replies; 8+ messages in thread
From: Robert Dewar @ 2001-06-22 20:48 UTC (permalink / raw)


"B. Douglas Hilton" <doug.hilton@engineer.com> wrote in message news:<3B2AE5F4.59E4ABE8@engineer.com>...

> To do that, I need to compile gnat in a cross-compilation
> configuration in Linux; it would be a minor feat, but is theoretically
> possible.

Building a cross-compiler is quite straightforward if you are
reasonably familiar with gcc. If you are not reasonbly familiar
with gcc, then porting GNAT is likely to be an out of range task
anyway, and you should first acquire this familiarity, e.g. by
first building GNU C from sources, then doing a cross compile of
GNU C, and then, and only then try the GNAT port.

This is not just theoretically possible, it is the standard way
of proceeding and, as above, is quite straightforward. The hard
part of a GNAT port is the tasking and the tools (particularly
the debugger).



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

end of thread, other threads:[~2001-06-22 20:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-15  1:46 Porting GNAT to Debian Hurd B. Douglas Hilton
2001-06-15 13:53 ` Ted Dennison
2001-06-16  4:52   ` B. Douglas Hilton
2001-06-21 15:22     ` Charles Hixson
2001-06-21 15:57       ` Ted Dennison
2001-06-21 21:59         ` Charles Hixson
2001-06-22 12:37       ` Marc A. Criley
2001-06-22 20:48     ` Robert Dewar

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