On Mon, 2009-08-17 at 12:00 +0200, Mikael Pettersson wrote: > On Wed, 12 Aug 2009 23:08:00 +0200, Matthias Klose <d...@debian.org> wrote: > >On 12.08.2009 23:07, Martin Guy wrote: > >> On 8/12/09, Joel Sherrill<joel.sherr...@oarcorp.com> wrote: > >>> So any ACATS results from any other ARM target would be > >>> appreciated. > >> > >> I looked into gnat-arm for the new Debian port and the conclusion was > >> that it has never been bootstrapped onto ARM. The closest I have seen > >> is Adacore's GNATPro x86->xscale cross-compiler hosted on Windows and > >> targetting Nucleus OS (gak!) > >> > >> The community feeling was that it would "just go" given a prodigal > >> burst of cross-compiling, but I never got achieved sufficiently high > >> blood pressure to try it... > > > >is there any arm-linx-gnueabi gnat binary that could be used to bootstrap an > >initial gnat-4.4 package for debian? > > > > Matthias > > Yes, see <http://user.it.uu.se/~mikpe/linux/arm-eabi-ada/>.
Nice work! Looks like Ada exception propagation (setjmp/longjmp based) is broken at least in some cases (see below), that might explain the high number of ACATS failure. My understanding is that EH_MECHANISM=-gcc is not correct for sjlj exceptions so I removed this line from the patch and I'm currently testing with trunk. Laurent gue...@gcc50:~/tmp$ ./hello2 hello Ada raised PROGRAM_ERROR : hello2.adb:5 explicit raise gue...@gcc50:~/tmp$ cat hello2.adb with Ada.Text_IO; use Ada.Text_IO; procedure Hello2 is begin Put_Line ("hello Ada"); raise Program_Error; Put_Line ("error"); exception when others => Put_Line ("OK"); end Hello2; gue...@gcc50:~/tmp$ objdump -S hello2.o objdump -S hello2.o hello2.o: file format elf32-littlearm Disassembly of section .text: 00000000 <_ada_hello2>: with Ada.Text_IO; use Ada.Text_IO; procedure Hello2 is 0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 4: e28db020 add fp, sp, #32 ; 0x20 8: e24dd034 sub sp, sp, #52 ; 0x34 begin Put_Line ("hello Ada"); c: ebfffffe bl 0 <system__soft_links__get_jmpbuf_address_soft> 10: e1a03000 mov r3, r0 14: e50b302c str r3, [fp, #-44] 18: e24b3044 sub r3, fp, #68 ; 0x44 1c: e24b2024 sub r2, fp, #36 ; 0x24 20: e5832000 str r2, [r3] 24: e59f20bc ldr r2, [pc, #188] ; e8 <_ada_hello2+0xe8> 28: e5832004 str r2, [r3, #4] 2c: e583d008 str sp, [r3, #8] 30: e3a03000 mov r3, #0 ; 0x0 34: ea000001 b 40 <_ada_hello2+0x40> 38: e28bb024 add fp, fp, #36 ; 0x24 3c: e3a03001 mov r3, #1 ; 0x1 40: e20330ff and r3, r3, #255 ; 0xff 44: e3530000 cmp r3, #0 ; 0x0 48: 0a000018 beq b0 <_ada_hello2+0xb0> 4c: e51b002c ldr r0, [fp, #-44] 50: ebfffffe bl 0 <system__soft_links__set_jmpbuf_address_soft> 54: ebfffffe bl 0 <system__soft_links__get_gnat_exception> 58: e1a03000 mov r3, r0 5c: e50b3028 str r3, [fp, #-40] raise Program_Error; Put_Line ("error"); exception when others => 60: e51b3028 ldr r3, [fp, #-40] 64: e5d33000 ldrb r3, [r3] 68: e2233001 eor r3, r3, #1 ; 0x1 6c: e20330ff and r3, r3, #255 ; 0xff 70: e3530000 cmp r3, #0 ; 0x0 74: 0a00000b beq a8 <_ada_hello2+0xa8> with Ada.Text_IO; use Ada.Text_IO; procedure Hello2 is begin Put_Line ("hello Ada"); 78: e59f306c ldr r3, [pc, #108] ; ec <_ada_hello2+0xec> 7c: e5933000 ldr r3, [r3] 80: e12fff33 blx r3 raise Program_Error; Put_Line ("error"); exception when others => Put_Line ("OK"); 84: e59f3064 ldr r3, [pc, #100] ; f0 <_ada_hello2+0xf0> 88: e50b3054 str r3, [fp, #-84] 8c: e59f3060 ldr r3, [pc, #96] ; f4 <_ada_hello2+0xf4> 90: e50b3050 str r3, [fp, #-80] 94: e14b05d4 ldrd r0, [fp, #-84] 98: ebfffffe bl 0 <ada__text_io__put_line__2> end Hello2; 9c: e51b002c ldr r0, [fp, #-44] a0: ebfffffe bl 0 <system__soft_links__set_jmpbuf_address_soft> a4: ea00000d b e0 <_ada_hello2+0xe0> with Ada.Text_IO; use Ada.Text_IO; procedure Hello2 is begin Put_Line ("hello Ada"); a8: e51b0028 ldr r0, [fp, #-40] ac: ebfffffe bl 0 <__gnat_raise_nodefer_with_msg> b0: e24b3044 sub r3, fp, #68 ; 0x44 b4: e1a00003 mov r0, r3 b8: ebfffffe bl 0 <system__soft_links__set_jmpbuf_address_soft> bc: e59f3034 ldr r3, [pc, #52] ; f8 <_ada_hello2+0xf8> c0: e50b304c str r3, [fp, #-76] c4: e59f2030 ldr r2, [pc, #48] ; fc <_ada_hello2+0xfc> c8: e50b2048 str r2, [fp, #-72] cc: e14b04dc ldrd r0, [fp, #-76] d0: ebfffffe bl 0 <ada__text_io__put_line__2> raise Program_Error; d4: e59f0024 ldr r0, [pc, #36] ; 100 <_ada_hello2+0x100> d8: e3a01005 mov r1, #5 ; 0x5 dc: ebfffffe bl 0 <__gnat_rcheck_19> Put_Line ("error"); exception when others => Put_Line ("OK"); end Hello2; e0: e24bd020 sub sp, fp, #32 ; 0x20 e4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} e8: 00000038 .word 0x00000038 ... f4: 00000024 .word 0x00000024 f8: 00000008 .word 0x00000008 fc: 0000002c .word 0x0000002c 100: 00000018 .word 0x00000018