Programming General
#11
RE: Programming General
So it turns out I have a couple of versions of GNAT on my O350, GNAT 3.4.6 and this one:

Code:
janjaap@chimera:~$ /usr/local/gcc/4.3.2/bin/gnat
GNAT 4.3.2
Copyright 1996-2007, Free Software Foundation, Inc.

List of available commands

gnat bind              gnatbind
gnat chop              gnatchop
gnat clean              gnatclean
gnat compile            gnatmake -f -u -c
gnat check              gnatcheck
gnat elim              gnatelim
gnat find              gnatfind
gnat krunch            gnatkr
gnat link              gnatlink
gnat list              gnatls
gnat make              gnatmake
gnat metric            gnatmetric
gnat name              gnatname
gnat preprocess        gnatprep
gnat pretty            gnatpp
gnat stack              gnatstack
gnat stub              gnatstub
gnat xref              gnatxref

Commands find, list, metric, pretty, stack, stub and xref accept project file switches -vPx, -Pprj and -Xnam=val

On the plus side, it's a complete toolchain with c, ada, c++, fortran, java, objc, obj-c++ langiuages, on the minus side, it seems to depend on bits and pieces of an in-house package distribution I used to maintain (CoolMix):

Code:
janjaap@chimera:~$ /usr/local/gcc/4.3.2/bin/gcc -v
Using built-in specs.
Target: mips-sgi-irix6.5
Configured with: ../configure -v --enable-languages=c,ada,c++,fortran,java,objc,obj-c++ --prefix=/usr/local/gcc/4.3.2 --enable-multilib --enable-shared --enable-threads=posix --enable-libgcj --enable-java-awt=xlib --disable-nls --program-suffix=-4.3 --with-gnu-as --with-as=/usr/CoolMix/mips-sgi-irix6.5/bin/as --without-gnu-ld --with-ld=/usr/bin/ld --with-mpfr=/usr/people/janjaap/src/gnu/gcc/support --with-pkgversion=CoolMix --enable-checking=release
Thread model: posix
gcc version 4.3.2 (CoolMix)

I'm pretty sure it must have passed the GCC regression test suite without a catastrophic number of failures or I wouldn't have installed it. Should at least be good enough to bootstrap something newer.

After that I think I stopped building my own toolchains and switched to pkgsrc. I don't think they build Ada, though.
jan-jaap
SGI Collector

Trade Count: (0)
Posts: 1,048
Threads: 37
Joined: Jun 2018
Location: Netherlands
Website Find Reply
04-03-2020, 04:00 PM
#12
RE: Programming General
Pkgsrc is a shitshow on IRIX.

I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast. 

https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently. 

https://codeberg.org/SolusRaion -- Code repos I control

Technical problems should be sent my way.
Raion
Chief IRIX Officer

Trade Count: (9)
Posts: 4,240
Threads: 533
Joined: Nov 2017
Location: Eastern Virginia
Website Find Reply
04-03-2020, 04:56 PM
#13
RE: Programming General
Yeah,
I've never really had a good time trying to build compilers or even understanding the internals well enough to affect any kind of change.

if you guys manage any success in the area of Ada, I'll see about digging up some funds to a least say thank you.

I'm currently dealing with GCC 9 revisions in my project, I had pretty good luck with the GCC 5 series...I had poor luck with anything under that. For Ada, the real nice revision to support would be 2005 because it had basic container support and Unicode support, 2012 only added aspects and conditional expressions (and loosened some rules not really thought of for edge cases in 2005).

Basically what I'm saying is without Ada 200 support, no one will you Ada on the platform for anything serious, only thing it will be great for is bit fiddling (so like hacking binaries through patching it would great at!). But having to make your own containers (or use someone's old library...no thank you).

I seriously doubt you'll ever get any revisions higher than 2005 based on the GCC situation, but that would make it useable. What I'm unsure of is whether gnat code is written in Ada95 on purpose for bootstrapping reasons, or whether they write in whatever revision they want. Obviously if the GCC 5 code for Gnat is written in Ada95 then maybe a Gnat 1.3 for irix compiler could actually be used as the bootstrap since it would supports that same revision, unlikely, but it's place to check I guess.

I'll leave it to the Pros. Also I did email Adacore and ask if they would donate their last Gnat Pro compiler for Irix to me (they said they found my request amusing enough to think about, and MIGHT get back to me). This was last year. I'd still prefer to just get them to give me the compiler binaries since they aren't using it anymore and then we'd have the last one ever made!

Maybe I'll email them again in a year or two to follow-up.
weblacky
I play an SGI Doctor, on daytime TV.

Trade Count: (10)
Posts: 1,716
Threads: 88
Joined: Jan 2019
Location: Seattle, WA
Find Reply
04-04-2020, 02:53 AM
#14
RE: Programming General
If the GCC specific code to GNAT is written in Ada itself, then I won't be able to compile it. I have no functional Ada compiler.

I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast. 

https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently. 

https://codeberg.org/SolusRaion -- Code repos I control

Technical problems should be sent my way.
Raion
Chief IRIX Officer

Trade Count: (9)
Posts: 4,240
Threads: 533
Joined: Nov 2017
Location: Eastern Virginia
Website Find Reply
04-04-2020, 03:31 AM
#15
RE: Programming General
It's been a while, but IIRC part of the GNAT frontend (what translates Ada code into intermediate syntax tree representation) is written in Ada itself.

Also you needed a pretty new GNAT to build GNAT, i.e. you cannot just grab any old Ada compiler and bootstrap the latest and greatest. During the bootstrap process it builds some aux programs which do something and produce some data used to build your compiler. These are Ada programs as well. So bootstrapping using a cross compiler takes a good bit of cheating and manual work.

This is at least 10 years ago so I may not be 100% correct, but I think I solved this puzzle starting from IRIX 5.3 and the old GNAT binaries on the CD, building GCC 2.7 or similar and working my way up to newer compilers one or two subversion at a time, building only C and Ada. This will give you a native IRIX 5.3 GCC 3.4.x or even 4.x with C and Ada. This can be used on IRIX 6.5 to bootstrap a native C, Ada IRIX 6.5 compiler. This is what you use to bootstrap a GCC with all languages enabled. Like I said, a pain in the a$$.

NB: while I use 'buildhost for older IRIXes' as an excuse to keep a 12x R4400 deskside Challenge around, the best IRIX 5.3 buildhost is a chroot on a fast IRIX 6.5 system. IRIX wasn't really made for that so you have to massage some utilities to e.g. report the correct uname.

I'm kind of motivated to have a fresh look at all of this after all these years, but I'm working from home these days and I can't handle the noise of the Origin while working.
jan-jaap
SGI Collector

Trade Count: (0)
Posts: 1,048
Threads: 37
Joined: Jun 2018
Location: Netherlands
Website Find Reply
04-04-2020, 08:51 AM


Forum Jump:


Users browsing this thread: 1 Guest(s)