2008/4/28 John Tytgat <[EMAIL PROTECTED]>:
> In message <[EMAIL PROTECTED]>
> "Nick Burrett" <[EMAIL PROTECTED]> wrote:
>
> > 2008/4/27 John Tytgat <[EMAIL PROTECTED]>:
> >
> > > In message <[EMAIL PROTECTED]>
> > > Stefan Bellon <[EMAIL PROTECTED]> wrote:
> > >
> > > > Peter Naulls wrote:
> > > >
> > > > > I think now might also be a good time for another version of GCC
> 4.
> > > >
> > > > Regarding that topic ... what about including Ada language support
> in
> > > > the GCC 4 builds? I know that you are concerned about the quality of
> > > > the GNAT and who could take over maintaining it. But what about just
> > > > including it and clearly flagging it as experimental (assuming it
> > > > builds without major problems).
> > > >
> > > > I think there are quite a few people interested in Ada (myself
> > > > included). And if time permits I could even imagine looking at the
> one
> > > > or other problem, but I cannot guarantee or give a promise.
> > >
> > > Nick reported that Ada compiler generated broken ARM assembler code at
> > > the time he did the initial GCC 4.1 port work. I never tried building
> > > Ada (nor Fortran) myself. I'll give it a shot and see if that's still
> > > the case.
> > >
> >
> > I think this was supposed to be fixed in version 4.2, or perhaps 4.3. I
> > seem to recall a bit of work being done to clean up target
> > incompatibilities.
> >
> > You can build a stage1 Ada compiler, but the stage2 code it generates is
> > broken.
> >
> > This was the bug I reported at the time:
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20797
>
> Some news: I got fairly quickly the Ada cross-compiler running based on
> the work you did Nick. I didn't see the reported assembler problem so
> this
> might have been fixed in the meanwhile (even in the 4.1.1 version).
>
That's good news. The assembler output for 4.2.3 and 4.3.0 is not to
dissimilar to the code I posted about in that bug report:
-------- 4.3.0 -----------
nlists__first:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
cmp r0, #0
bxeq lr
ldr r3, .L62
mov r1, r0, asl #4
ldr r2, [r3, #0]
sub r1, r1, r0, asl #2
add r2, r2, r1
add r2, r2, #1191182336
add r2, r2, #8781824
add r2, r2, #35840
ldr r0, [r2, #0]
bx lr
.L62:
.word nlists__lists__tableX
-------- 4.3.0 -----------
>
> However I'm unable to run the Ada testqueue, not sure what I'm doing wrong
> but it looks like this does not support testing a built cross-compiler
> running on the build machine itself.
>
I had difficulty here too. IIRC you can fool the system by re-configuring
GCC to use the ARM binaries under QEMU e.g.
CC=/path/to/arm-elf-riscos-gcc ./configure --target=arm-elf-riscos
I certainly remember getting this to work, but be prepared to take a short
holiday whilst you wait for it to complete :-)
>
> With more difficulty I got the native Ada compiler built but it can't find
> its run-time code and my limited Ada knowledge or GNAT experience
> holds me a bit from seeing what's missing.
>
The run-time code for Ada is in gcc/ada. The majority of source in that
directory accounts for the library. A smaller portion of it accounts for
the compiler. It's confusing that it's still in the same directory; there
was a project to move it into a libada directory, but that never happened.
I don't think I ever got around to writing the Makefile code to copy the
run-time library stuff for installation, as the stage2 compiler never
worked.
>
> --8<--
> *gcc -v -c hello.adb
> Using built-in specs.
> Target: arm-unknown-riscos
> Configured with:
> /home/joty/projects/gccsdk/gccsdk_svn/gcc4/srcdir/configure riscos
> Thread model: posix
> gcc version 4.1.1 (GCCSDK GCC 4.1.1 pre-release 2)
>
> /ADFS::Zion.$/GCCSDK-Ada/!GCC/bin/../libexec/gcc/arm-unknown-riscos/4.1.1/gnat1
> -quiet -dumpbase hello.adb hello.adb -o /tmp/cc7gyCIa.s
> fatal error, run-time library not installed correctly
> cannot locate file system.ads
>
> raised TYPES.UNRECOVERABLE_ERROR : gnat1drv.adb:141
> --8<--
>
> I won't have time to continue this for the next week, I'll check in what
> I have done so far, maybe someone else wants to have a go. I'm more or
> less sure it is fairly trivial to fix this but the Ada world is very
> unknown to me...
>
> John.
> --
> John Tytgat, in his comfy chair at home
> BASS
> [EMAIL PROTECTED] ARM powered, RISC OS
> driven
>
> _______________________________________________
> GCCSDK mailing list [email protected]
> Bugzilla: http://www.riscos.info/bugzilla/index.cgi
> List Info: http://www.riscos.info/mailman/listinfo/gcc
> Main Page: http://www.riscos.info/index.php/GCCSDK
>
_______________________________________________
GCCSDK mailing list [email protected]
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK