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/>.

There you'll find a native --enable-languages=c,ada gcc-4.4.1 installation
for armv5tel-linux-gnueabi, and a patch file making the relatively minor
changes to gcc-4.4.1 needed for this. I'll also upload a big-endian
armv5teb-linux-gnueabi version once it's finished its final rebuild.

Notes:
- Built from vanilla gcc-4.4.1 sources with only the arm ada patch applied.
- Built with --with-arch=armv5te --prefix=/tmp/gcc-4.4.1-install, glibc-2.7,
  gmp-4.2.4, mpfr-2.4.1, and binutils-2.19.1.
- Bootstrap went as follows:
  (on i686-linux)
  1. I wrote an arm ada support patch for gcc-4.3.4.
  2. Built i686->arm cross 4.3.4.
  3. Used i686->arm cross to build a crossed native arm->arm on i686.
  (on armv5tel-linux-gnueabi)
  4. Used the crossed native arm->arm 4.3.4 to build a native on arm.
     This worked but generated tons of alignment faults the kernel had
     to trap and emulate.
  5. My gcc-4.3.4 is heavily updated with backported fixes. I used it to
     build a vanilla 4.3.4 with ada but that one failed to build itself.
  6. Quickly ported the 4.3.4 patch to 4.4.1, then used the heavily updated
     4.3.4 to build a vanilla 4.4.1 with ada.
  7. Used the 4.4.1 compiler to rebuild itself with a different --prefix.
     This step appears to not have suffered from emulated alignment faults.
     Not sure if that's due to 4.4 vs 4.3 or because the crossed native
     compiler was tainted by having been built on i686.
  8. The final 4.4.1 is what I uploaded.
- The patch includes a change to eliminate pointless use of exceptions
  in xsinfo.adb. That was needed for 4.3 and does no harm in 4.4, but I
  have not checked if 4.4 actually needs it.
- Test suite has not been run.

I did a similar bootstrap of ada for gcc-4.1.2 and ARM OABI several years ago,
so I had a rough idea on how to proceed. Especially step 3 is complicated
because the ada makefiles are utterly broken for the crossed native build case,
so lots of manual intervention is required there.

(The OABI ada compiler didn't really work however, and required invasive
hacks to avoid complex constructs that it would miscompile. I suspect the
ada compiler was incompatible with the OABI structure alignment rules.)

/Mikael

Reply via email to