[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GNAT on armhf

On Mon, 14 May 2012 16:10:03 +0000 (UTC)
Ludovic Brenta <ludovic@ludovic-brenta.org> wrote:

> Tero Koskinen wrote:
> >> I managed to create some preliminary GNAT binary, which runs on Debian
> >> armhf and generates Debian armhf binaries from Ada source code.
> > 
> > Actual .deb packages are available at
> > http://iki.fi/tero.koskinen/debian/armhf/deb-packages/
> > 
> > The are build with following commands:
> > apt-get source gcc-4-6
> > cd gcc-...
> > vi debian/rules.defs # disable everything except c and ada
> > LANG=C TMPDIR=$HOME/tmp dpkg-buildpackage -us -uc -d
> So you build natively on armhf, don't you? What bootstrap compiler do you
> use (i.e. /usr/bin/gnatgcc)?

I had one gnat located at $HOME/programs/gcc-463, but now when I have
those .deb packages available, I can use /usr/bin/(gnat)gcc. The compiler
at $HOME/programs/gcc-463 is build using the compiler, which I told
in my previous message:

So, in total I build gnat 4 times:
1) gnat cross compiler for Debian armhf,
     build&running on Fedora x86_64
2) gnat compiler for Debian armhf,
     build on Fedora x86_64 (using compiler 1),
     running on Debian armhf
3) gnat compiler for Debian armhf,
     build on Debian armhf (using compiler 2),
     running on Debian armhf,
     on real ARM hardware (Gumstix Overo, 256MB memory)
4) gnat compiler for Debian armhf,
     using dpkg-buildpackage and Debian build scripts
     on real ARM hardware (Gumstix Overo, 256MB memory)

> The bootstrapping would consist in:
> 1 automating your changes ("vi debian/rules.defs # disable everything except c 
>   and ada") by merging them into the official debian/rules.def, with suitable
>   if's

I think only one change is actually relevant:
@@ -399,12 +392,14 @@
 # Ada --------------------
 ada_no_cpus    := m32r m68k sh3 sh3eb sh4 sh4eb
 ada_no_systems := 
-ada_no_cross   := yes
+ada_no_cross   := no
 ada_no_snap    := no
-ifneq (,$(filter $(DEB_TARGET_ARCH),armhf m68k powerpcspe sh4 sparc64))
+ifneq (,$(filter $(DEB_TARGET_ARCH),m68k powerpcspe sh4 sparc64))
   ada_no_snap := yes

I also disabled 'make check' phase since my ARM device didn't have
enough memory (256MB RAM + 200MB swap was not enough) for the tests.

> Since steps 2..4 require a Debian Developer, I'm willing to do those.  Could
> you please send me a patch for step 1?

Full patch attached. I think there might be quite many unnecessary parts.

> Thanks for all the hard work!

No problem. I had the armhf hardware and I needed GNAT, so this was
quite useful for myself also.

Tero Koskinen

Attachment: rules.diff
Description: Binary data

Reply to: