comp.lang.ada
 help / color / mirror / Atom feed
* GNAT on NT anybody
@ 1993-08-26 15:49 Barry Schiff
  0 siblings, 0 replies; 10+ messages in thread
From: Barry Schiff @ 1993-08-26 15:49 UTC (permalink / raw)


Has anybody tried to use GNAT on NT or anything else yet? If so hows it going?

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

* Re: GNAT on NT anybody
@ 1993-08-27  2:38 Michael Feldman
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Feldman @ 1993-08-27  2:38 UTC (permalink / raw)


In article <1993Aug26.154913.25742@enterprise.rdd.lmsc.lockheed.com> bschiff@st
c.lockheed.com writes:
>Has anybody tried to use GNAT on NT or anything else yet? If so hows it going?
>
NYU has not yet produced a GNAT/NT. What they have is Sun SPARC and OS/2.
I've gotten past the demos on both, and run a few programs. Not all of
Ada is supported yet (except in syntax analysis), but they are adding stuff
as we write. Look for a pretty complete system by Tri-Ada, a month
(less, actually) from now. And it will all be done by December.

This is going to be a VERY good Ada system, well-integrated into gcc
to boot. 

Gonna be fun, folks.

Mike Feldman
------------------------------------------------------------------------
Michael B. Feldman -  co-chair, SIGAda Education Committee
Professor, Dept. of Electrical Engineering and Computer Science
The George Washington University -  Washington, DC 20052 USA
202-994-5253 (voice) - 202-994-0227 (fax) - mfeldman@seas.gwu.edu (Internet)
"We just changed our CONFIG.SYS, then pressed CTRL-ALT-DEL. It was easy."
-- Alexandre Giglavyi, director Lyceum of Information Technologies, Moscow.
------------------------------------------------------------------------

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

* Re: GNAT on NT anybody
@ 1993-08-27  2:48 Michael Feldman
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Feldman @ 1993-08-27  2:48 UTC (permalink / raw)


In article <1993Aug26.154913.25742@enterprise.rdd.lmsc.lockheed.com> bschiff@st
c.lockheed.com writes:
>Has anybody tried to use GNAT on NT or anything else yet? If so hows it going?
>
This question makes me wonder if anyone has yet tried to _port_ GNAT.
It's an interesting process, because GNAT is written in Ada, not C.
One could bootstrap it by using a commercial Ada compiler - NYU first
compiled GNAT with Alsys. This process was documented in an NYU post
a while ago. 

But that's no fun - it requires a commercial compiler. An all-GNU
approach is to use the gcc cross-compilation facilities. If a GNU
SPARC-to-Sun3 cross exists (just to take one example), then one compiles
GNAT on the SPARC, takes the assembly language output to the Sun-3
and re-assembles. It is alleged to be fairly easy if you're an
experienced gcc hand.

Once GNAT is ported, new versions can be built from the new sources, because
GNAT can compile itself. 

Indeed, I believe NYU is using only GNAT to compile new versions, 
using Alsys only for "occasional sanity checks" as I think one of the 
NYU guys put it. If there are any gcc cross-compilatiuon gurus out there
with a little time to tinker, I think it would be fun to start some
porting, so when the final version pops out, it will instantly be
available on a bunch of platforms. NYU is committed only to Sun
SPARC and OS/2.

Any takers?

Mike Feldman

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

* Re: GNAT on NT anybody
@ 1993-08-27 10:07 Richard Kenner
  0 siblings, 0 replies; 10+ messages in thread
From: Richard Kenner @ 1993-08-27 10:07 UTC (permalink / raw)


In article <1993Aug27.024824.21373@seas.gwu.edu> mfeldman@seas.gwu.edu (Michael
 Feldman) writes:
>This question makes me wonder if anyone has yet tried to _port_ GNAT.
>It's an interesting process, because GNAT is written in Ada, not C.
>One could bootstrap it by using a commercial Ada compiler - NYU first
>compiled GNAT with Alsys. This process was documented in an NYU post
>a while ago. 

In fact, you can't do this for any of the versions we've distributed,
only the very early systems we had.  Now the `gnat1' executable is
mixed-language, containing the C code of the GCC backend and the Ada
code for the Ada front-end.  In fact, just recently we changed things
so the backend (in C) calls Ada code for some tree-processing
functions rather than providing duplicate C functions.

Since no commercial compiler provides such a seamless integration
between languages, GNAT can only be compiled with itself at this point.

>But that's no fun - it requires a commercial compiler. An all-GNU
>approach is to use the gcc cross-compilation facilities. If a GNU
>SPARC-to-Sun3 cross exists (just to take one example), then one compiles
>GNAT on the SPARC, takes the assembly language output to the Sun-3
>and re-assembles. It is alleged to be fairly easy if you're an
>experienced gcc hand.

That's right.  In fact there are two approaches.  You can build a full
cross-system, including GNAT (and GCC) along with a cross-assembler
and linker (e.g., GAS and GLD).  Brett Porter, one of the folks on the
GNAT project, recently did this to be able to run Ada code an
evaluation board containing some variant of the 68k (actually, he was
originally interested, I believe, in C code, but built a cross-GNAT to
see if it would work and it did).

This approach is quite straightforward and almost automatic.

If you don't want to bother with a cross-assembler and linker, you can
do as Mike suggests and just produce the assembler files with a
cross-GCC, then take them to the target and assemble them there.  It's
straightforward, but involves some manual steps.  I did this for the
RS/6000 a few weeks ago and will shortly need to do it for DEC's
MIPS-based workstations, since that's what will be at Tri-Ada.

>Indeed, I believe NYU is using only GNAT to compile new versions, 
>using Alsys only for "occasional sanity checks" as I think one of the 
>NYU guys put it.

That's very close to correct.  I don't believe that the folks here who
use Sparcs use Alsys anymore.  Robert Dewar, though, uses a PC and
still does most of his work with Alsys since the OS/2 version of GNAT
has been lagging a bit.

>If there are any gcc cross-compilatiuon gurus out there
>with a little time to tinker, I think it would be fun to start some
>porting, so when the final version pops out, it will instantly be
>available on a bunch of platforms. 

I don't think there's much point in doing this work.  For one thing,
it's fairly straightforward to do it on each target individually.  But
the major issue is that doing it now for a target won't mean that it
won't have to be redone later.  If you make a binary for some target
right now, that does NOT mean that that binary will necessarily be
useful later.  It is not at all uncommon for some code we've written
in GNAT to hit a bug or unsupported feature in a previous GNAT
version.  When that happens, the binaries will be useless for
compiling later versions and the cross-work will need to be redone.

It it our plan to not require a binary to build GNAT, merely a C
compiler.  Most of the Ada code is at a fairly low level and fairly
regular.  We intend to provide an Ada-to-C translator for the subset
of Ada used in most of GNAT.  For some of the other Ada modules, such
as error handling, we'll provide C code that will link, but not do
much (i.e., abort when asked to print an error, since there won't be
any compiling GNAT).  This will allow a bootstrap path.

Collecting executables for all systems on which GNAT will work is not
practical.  I just counted and found that GCC (and hence GNAT) has
configuration files for 188 different systems, most of which are not
binary-compatible with each other.  It's true that many of these
systems don't exist anymore or are only of extremely narrow interest,
but there are still probably dozens of distinct configurations that
are current.  Having so many binaries doesn't seem practical.

Unfortunately, what started this discussion was Windows NT.  There are
no ports of GCC to any Windows NT configuration.  It was not clear
which one was of interest to the original poster.  I will be doing a
GCC port to the DEC Alpha version of NT as soon as DEC can get such a
machine to me.  A port to NT on a PowerPC should also not be very far
away, since we're starting to do the modifications to the RS/6000
configuration files to support the various Motorola chips that are
implementations of the PowerPC architecture.

As far as I know, no one is working on a GCC port to Windows NT on an
x86.  The x86 work lately seems to be concentrating on the various
dialects of OSF/1 (Rose and Elf).  I don't recall seeing any requests
for a x86 NT port of GCC on the GCC mailing lists; most requests
lately seem to be for the various embedded processors.

If someone wants to do a GCC port to the x86 Windows NT, it would be
appreciated and GNAT would fall out for free.  Unlike porting to a new
architecture, which requires a lot of knowlege about GCC, porting to a
new system on a supported architecture merely requires (intimate)
knowlege of the target operating system and is usually just a matter
of setting appropriate configuration macros.  The only time that it
can get tricky is if none of the standard object file formats (a.out,
COFF and it's variants, Rose, or ELF) are used and there is also a
problem with using the system's assembler.  I do not know if NT has
these problems, but we've been running into them on OS/2.

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

* Re: GNAT on NT anybody
@ 1993-08-27 12:08 cis.ohio-state.edu!math.ohio-state.edu!darwin.sura.net!dtix.dt.navy.mil!r
  0 siblings, 0 replies; 10+ messages in thread
From: cis.ohio-state.edu!math.ohio-state.edu!darwin.sura.net!dtix.dt.navy.mil!r @ 1993-08-27 12:08 UTC (permalink / raw)


In article <1993Aug26.154913.25742@enterprise.rdd.lmsc.lockheed.com> bschiff@st
c.lockheed.com writes:
>Has anybody tried to use GNAT on NT or anything else yet? If so hows it going?
>
>
>



     I tried it on Os2.  I couldn't get "Hello World" to compile and 
run.  I'm too busy to mess with it now.



=====================================================================
                       WALTER E. DENCE, JR.
                   Data Acquisition Specialist
                 Influence Mechanisms Branch, G95

Commander, Dahlgren Division                        
Naval Surface Warfare Center     Office:          (301) 394-1707/1960
Dahlgren Division Detachment     Fax:             (301) 394-4510/4727
White Oak, G95 (W. Dence)        DSN (AutoVoN):         290-1707/1960
10901 New Hampshire Ave.         MilNet: wdence@nswc-wo.nswc.navy.mil
Silver Spring, MD 20903-5000     Home:                 (301) 229-7394

         (This is personal opinion, not official opinion.)
=====================================================================

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

* Re: GNAT on NT anybody
@ 1993-08-27 15:22 Richard Kenner
  0 siblings, 0 replies; 10+ messages in thread
From: Richard Kenner @ 1993-08-27 15:22 UTC (permalink / raw)


In article <25kmdn$16u@cmcl2.NYU.EDU> I wrote:
>It it our plan to not require a binary to build GNAT, merely a C
>compiler.  Most of the Ada code is at a fairly low level and fairly
>regular.  We intend to provide an Ada-to-C translator for the subset
>of Ada used in most of GNAT.  For some of the other Ada modules, such
>as error handling, we'll provide C code that will link, but not do
>much (i.e., abort when asked to print an error, since there won't be
>any compiling GNAT).  This will allow a bootstrap path.

It was pointed out to me that this can easily be misinterpreted, so I
want to be very explicit: we have no plans on doing anything that
could in any way be construed as a general "Ada to C translator".  The
program I described above would be a very specialized bootstrap tool
that would read some of the Ada files in GNAT and produce C code that
would be equivalent.  We expect this to be possible due to the
stylized way in which these part of GNAT were written.  The output of
the program would only be able to be compiled by GNU C because, for 
example, we might add features to GNU C for that purpose.

If this program were given some code other than these parts of GNAT,
it would not produce valid GNU C.

I should also point out that other ways exist to allow a bootstrap: we
could distribute a binary representation of the Ada tree or we could
even manually translate a sufficient subset of GNAT into C for the
purposes of bootstrap.  There may also be others we haven't thought of.

Nothing I said should be taken as anything more than our current
views as to how we would provide a bootstrap path should we have the
time and resources to do so.

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

* Re: GNAT on NT anybody
@ 1993-08-27 18:16 cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!torn!nott!n
  0 siblings, 0 replies; 10+ messages in thread
From: cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!torn!nott!n @ 1993-08-27 18:16 UTC (permalink / raw)


In <1993Aug27.024824.21373@seas.gwu.edu> mfeldman@seas.gwu.edu writes:

> In article <1993Aug26.154913.25742@enterprise.rdd.lmsc.lockheed.com> bschiff@
stc.lockheed.com writes:
> >Has anybody tried to use GNAT on NT or anything else yet? If so hows it goin
g?
> >
> This question makes me wonder if anyone has yet tried to _port_ GNAT.
> It's an interesting process, because GNAT is written in Ada, not C.
> One could bootstrap it by using a commercial Ada compiler - NYU first
> compiled GNAT with Alsys. This process was documented in an NYU post
> a while ago. 
> 
> But that's no fun - it requires a commercial compiler. An all-GNU
> approach is to use the gcc cross-compilation facilities. If a GNU
> SPARC-to-Sun3 cross exists (just to take one example), then one compiles
> GNAT on the SPARC, takes the assembly language output to the Sun-3
> and re-assembles. It is alleged to be fairly easy if you're an
> experienced gcc hand.
> 
> Once GNAT is ported, new versions can be built from the new sources, because
> GNAT can compile itself. 
> 
> Mike Feldman
> 

What about the Run-Time System? Not all UNIXs are the same. Will this 
not requite custom fiddling on a system by system bases? Sure if 
you've done one SYSTEM V or BSD the others might be easy, but it will
require some wizardry. Now image the problems of going to VMS or MVS.


Don Berryman
Defence Research Establishment Pacific
Canadian Forces Base Esquimalt
Victoria, BC, CANADA, V0S-1B0
604-363-2731    604-363-2856fax
berryman@orca.drep.dnd.ca

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

* Re: GNAT on NT anybody
@ 1993-08-28 10:43 Per Andersson
  0 siblings, 0 replies; 10+ messages in thread
From: Per Andersson @ 1993-08-28 10:43 UTC (permalink / raw)


In article <1993Aug27.024824.21373@seas.gwu.edu> mfeldman@seas.gwu.edu (Michael
 Feldman) writes:
>
>But that's no fun - it requires a commercial compiler. An all-GNU
>approach is to use the gcc cross-compilation facilities. If a GNU
>SPARC-to-Sun3 cross exists (just to take one example), then one compiles
>GNAT on the SPARC, takes the assembly language output to the Sun-3
>and re-assembles. It is alleged to be fairly easy if you're an
>experienced gcc hand.

I tried this with a Sparc->sun3. First I built gnat and gcc for the sparc,
then I built cross compiler versions of both targeted at sun3, adding stuff
as sun3 libraries and GNU LD and GAS to make the cross development system
complete. Then I compiled GNAT with it, and moved it to a real sun3 system.
Almost works... It compiles small programs OK, like the ones in 'examples'
in the distribution, but when trying to compile gnat again on the sun3 an
exeption is rasied somewhere, in gnat1 I think, and it doesn't produce any
real assembly code. Dont remember what module, but it is a big one, and I
think it is the first module that is compiled anyway. Straight gcc cross-
compiling works OK, as is to be expected. We'll see with later versions of
gnat...

/Per
( Oh, yes, I'm not enough of a programmer to find out why it doesn't work,
  and I won't bother the gnat people with it)
-- 
-----------------------------------------------------------------------------
Per Andersson - ppan@celsiustech.se (perand@stacken.kth.se on free time)
Managing networks ( and occasionally SUNs) at, but not speaking for:
CelsiusTech AB, J{rf{lla, Sweden

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

* Re: GNAT on NT anybody
@ 1993-08-28 15:50 Rolf EBERT
  0 siblings, 0 replies; 10+ messages in thread
From: Rolf EBERT @ 1993-08-28 15:50 UTC (permalink / raw)


In article <1993Aug26.154913.25742@enterprise.rdd.lmsc.lockheed.com> bschiff@st
c.lockheed.com (Barry Schiff) writes:

> Has anybody tried to use GNAT on NT or anything else yet? If so hows it going
?
                                         ^^^^^^^^^^^^^ 


I don't know what you call "anything else", but it was quite easy to
"port" GNAT to Linux. Linux is a freeware UNIX system for 386/486 PCs,
mostly POSIX compliant.  You copy the GNAT Sparc distribution onto the
official GCC distribution, reconfigure and make like:

% ./configure --host=sun-sparc-sunos4.1.3 --target=i386-unknown-linux
% make gnat1

and you get a Linux executable gnat1. (you have to set up a cross
assembler and a crosslinker beforehand, of course) I tested it by
recompiling gnat1 again on the Linux PC. Seems to work OK. For more
information on crosscompiling read the info files about GCC. I doubt
that there already is a port of GCC to Windows-NT. So you will be on
your own.


	Rolf
--
-----------------------------------------------------------------------------
Rolf Ebert     Groupe Informatique et Systemes Energetiques     GISE EMP-ENPC
Tel: +33 1 43044098 app 3475 FAX: +33 1 43046364            La Courtine Cedex
Internet: ebert@enpc.fr                                F-93167 Noisy le Grand
-----------------------------------------------------------------------------

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

* Re: GNAT on NT anybody
@ 1993-08-30 16:51 Barry Schiff
  0 siblings, 0 replies; 10+ messages in thread
From: Barry Schiff @ 1993-08-30 16:51 UTC (permalink / raw)


The port I am interested in is GNAT on a x86 using NT. Couple of questions:

1. Who/What is the best source for me to contact if I am interested in porting
GCC to x86/NT or finding out if anybody is already doing this etc.

2. Since NT's API's are supposed to be the same on all platforms, would the
port of GCC to the DEC Alpha that Kenner mentions in his post be of help? If
so would I and others be able to obtain them?

Like it or not NT is going to be major player in the OS market. Previously, hav
ing only
DOS/WINDOWS was a good reason to ignore this major market segment for complex
system, but with NT
this changes. NT is a real OS and should be considered very seriously by any
individual or organization attempting to reach/serve a wide audience. 

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

end of thread, other threads:[~1993-08-30 16:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-08-27 15:22 GNAT on NT anybody Richard Kenner
  -- strict thread matches above, loose matches on Subject: below --
1993-08-30 16:51 Barry Schiff
1993-08-28 15:50 Rolf EBERT
1993-08-28 10:43 Per Andersson
1993-08-27 18:16 cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!torn!nott!n
1993-08-27 12:08 cis.ohio-state.edu!math.ohio-state.edu!darwin.sura.net!dtix.dt.navy.mil!r
1993-08-27 10:07 Richard Kenner
1993-08-27  2:48 Michael Feldman
1993-08-27  2:38 Michael Feldman
1993-08-26 15:49 Barry Schiff

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