comp.lang.ada
 help / color / mirror / Atom feed
* Ada cross-compiler (Windows) to Android
@ 2011-07-07 15:58 Rego, P.
  2011-07-07 21:57 ` Brian Drummond
  0 siblings, 1 reply; 12+ messages in thread
From: Rego, P. @ 2011-07-07 15:58 UTC (permalink / raw)


A friend of mine said me he was testing some apps in Android and I said him that I rememembered some one talking (here) about Ada cross-compiler for Android. So, is there any Ada cross-compiler for Android, available as opensource? And more, libs, tutorials?





^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ada cross-compiler (Windows) to Android
  2011-07-07 15:58 Ada cross-compiler (Windows) to Android Rego, P.
@ 2011-07-07 21:57 ` Brian Drummond
  2011-07-08 21:18   ` Rego, P.
                     ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Brian Drummond @ 2011-07-07 21:57 UTC (permalink / raw)


On Thu, 07 Jul 2011 08:58:01 -0700, Rego, P. wrote:

> A friend of mine said me he was testing some apps in Android and I said
> him that I rememembered some one talking (here) about Ada cross-compiler
> for Android. So, is there any Ada cross-compiler for Android, available
> as opensource? And more, libs, tutorials?

I think the answer is ... not yet.
But keep an eye on this page...

http://www.dragonlace.net/

I have also been trying to build GCC with Ada support for Android, by 
combining the instructions for building GCC for Android, and anything I 
can find about building GCC with Gnat, but without luck so far. If that 
changes I will announce it here.

- Brian



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ada cross-compiler (Windows) to Android
  2011-07-07 21:57 ` Brian Drummond
@ 2011-07-08 21:18   ` Rego, P.
  2011-07-10  7:57   ` Martin Krischik
  2011-07-14 15:08   ` jrmarino
  2 siblings, 0 replies; 12+ messages in thread
From: Rego, P. @ 2011-07-08 21:18 UTC (permalink / raw)


Ok, we wait so. A good point to have an Android compiler.
Regards.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ada cross-compiler (Windows) to Android
  2011-07-07 21:57 ` Brian Drummond
  2011-07-08 21:18   ` Rego, P.
@ 2011-07-10  7:57   ` Martin Krischik
  2011-07-10 11:37     ` Brian Drummond
  2011-07-14 15:08   ` jrmarino
  2 siblings, 1 reply; 12+ messages in thread
From: Martin Krischik @ 2011-07-10  7:57 UTC (permalink / raw)


Am 07.07.2011, 23:57 Uhr, schrieb Brian Drummond  
<brian@shapes.demon.co.uk>:

> On Thu, 07 Jul 2011 08:58:01 -0700, Rego, P. wrote:
>
>> A friend of mine said me he was testing some apps in Android and I said
>> him that I rememembered some one talking (here) about Ada cross-compiler
>> for Android. So, is there any Ada cross-compiler for Android, available
>> as opensource? And more, libs, tutorials?
>
> I think the answer is ... not yet.
> But keep an eye on this page...
>
> http://www.dragonlace.net/
>
> I have also been trying to build GCC with Ada support for Android, by
> combining the instructions for building GCC for Android, and anything I
> can find about building GCC with Gnat, but without luck so far. If that
> changes I will announce it here.

I wonder if JGNAT would not be the better starting point. Unless you are  
in high performance Gaming the main development platform for Android is  
Java.

Martin
-- 
Martin Krischik
mailto://krischik@users.sourceforge.net
https://sourceforge.net/users/krischik



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ada cross-compiler (Windows) to Android
  2011-07-10  7:57   ` Martin Krischik
@ 2011-07-10 11:37     ` Brian Drummond
  2011-07-11 15:39       ` Shark8
  0 siblings, 1 reply; 12+ messages in thread
From: Brian Drummond @ 2011-07-10 11:37 UTC (permalink / raw)


On Sun, 10 Jul 2011 09:57:56 +0200, Martin Krischik wrote:

> Am 07.07.2011, 23:57 Uhr, schrieb Brian Drummond
> <brian@shapes.demon.co.uk>:
> 
>> On Thu, 07 Jul 2011 08:58:01 -0700, Rego, P. wrote:
>>
>>> So, is there any Ada cross-compiler for
>>> Android, available as opensource? And more, libs, tutorials?
>>
>> I think the answer is ... not yet.

> I wonder if JGNAT would not be the better starting point. Unless you are
> in high performance Gaming the main development platform for Android is
> Java.

Very good point. I wondered that myself but haven't (yet) made time to 
look into it. As you say it will give up some performance, but it should 
be much easier to interface to the GUI.

- Brian



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ada cross-compiler (Windows) to Android
  2011-07-10 11:37     ` Brian Drummond
@ 2011-07-11 15:39       ` Shark8
  0 siblings, 0 replies; 12+ messages in thread
From: Shark8 @ 2011-07-11 15:39 UTC (permalink / raw)


On Jul 10, 6:37 am, Brian Drummond <br...@shapes.demon.co.uk> wrote:
> On Sun, 10 Jul 2011 09:57:56 +0200, Martin Krischik wrote:
> > Am 07.07.2011, 23:57 Uhr, schrieb Brian Drummond
> > <br...@shapes.demon.co.uk>:
>
> >> On Thu, 07 Jul 2011 08:58:01 -0700, Rego, P. wrote:
>
> >>> So, is there any Ada cross-compiler for
> >>> Android, available as opensource? And more, libs, tutorials?
>
> >> I think the answer is ... not yet.
> > I wonder if JGNAT would not be the better starting point. Unless you are
> > in high performance Gaming the main development platform for Android is
> > Java.
>
> Very good point. I wondered that myself but haven't (yet) made time to
> look into it. As you say it will give up some performance, but it should
> be much easier to interface to the GUI.
>
> - Brian

If you go that route you should be particularly careful when
specifying the export; the JVM *is* case sensitive and, as such, may
present some irritation.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ada cross-compiler (Windows) to Android
  2011-07-07 21:57 ` Brian Drummond
  2011-07-08 21:18   ` Rego, P.
  2011-07-10  7:57   ` Martin Krischik
@ 2011-07-14 15:08   ` jrmarino
  2011-07-14 23:52     ` Brian Drummond
  2 siblings, 1 reply; 12+ messages in thread
From: jrmarino @ 2011-07-14 15:08 UTC (permalink / raw)


On Jul 7, 11:57 pm, Brian Drummond <br...@shapes.demon.co.uk> wrote:
> On Thu, 07 Jul 2011 08:58:01 -0700, Rego, P. wrote:
> > A friend of mine said me he was testing some apps in Android and I said
> > him that I rememembered some one talking (here) about Ada cross-compiler
> > for Android. So, is there any Ada cross-compiler for Android, available
> > as opensource? And more, libs, tutorials?
>
> I think the answer is ... not yet.
> But keep an eye on this page...
>
> http://www.dragonlace.net/
>
> I have also been trying to build GCC with Ada support for Android, by
> combining the instructions for building GCC for Android, and anything I
> can find about building GCC with Gnat, but without luck so far. If that
> changes I will announce it here.
>
> - Brian

Brian,
I maintain the DragonLace site and I built an Android cross-compiler
as you noted.  You can not do this with stock gcc sources.  GNAT-AUX
is a separate repository to gcc (maintained in parallel) and I added
code that allows gnat to work on Android.

This effort is not dead.  I was basically waiting to buy an Android
table when I fly back to the States in a couple of weeks.  Once that
happens, I can run the full ACATS and gnat.dg suite on the device to
characterize how good the cross-compiler is.

The first compiler I produced was NetBSD->Android, but I could easily
use FreeBSD, DragonFlyBSD, OpenBSD, or OpenSolaris as the host OS.  I
don't see producing a windows version of GNAT-AUX though.

John



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ada cross-compiler (Windows) to Android
  2011-07-14 15:08   ` jrmarino
@ 2011-07-14 23:52     ` Brian Drummond
  2011-07-15  6:38       ` jrmarino
  0 siblings, 1 reply; 12+ messages in thread
From: Brian Drummond @ 2011-07-14 23:52 UTC (permalink / raw)


On Thu, 14 Jul 2011 08:08:21 -0700, jrmarino wrote:

> On Jul 7, 11:57 pm, Brian Drummond <br...@shapes.demon.co.uk> wrote:
>> On Thu, 07 Jul 2011 08:58:01 -0700, Rego, P. wrote:
>> > So, is there any Ada cross-compiler for
>> > Android, 

>> keep an eye on this page...
>>
>> http://www.dragonlace.net/
>>
> Brian,
> I maintain the DragonLace site and I built an Android cross-compiler as
> you noted.  You can not do this with stock gcc sources.  GNAT-AUX is a
> separate repository to gcc (maintained in parallel) and I added code
> that allows gnat to work on Android.

In short (if possible!) what is missing from stock GCC sources to prevent 
this? 
Could the code you added be available in e.g. the form of patches to 
apply to stock GCC?

I see that GCC4.7 is supposed to add Android as a target (but I don't 
know if that just means C/C++ rather than Gnat)

> This effort is not dead.  I was basically waiting to buy an Android
> table when I fly back to the States in a couple of weeks.  

Glad to hear it! Is there anything a complete outsider (running Linux not 
*bsd) can do to help?

> The first compiler I produced was NetBSD->Android, but I could easily
> use FreeBSD, DragonFlyBSD, OpenBSD, or OpenSolaris as the host OS.  I
> don't see producing a windows version of GNAT-AUX though.

hopefully Linux will be on the list...

Thanks,
- Brian




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ada cross-compiler (Windows) to Android
  2011-07-14 23:52     ` Brian Drummond
@ 2011-07-15  6:38       ` jrmarino
  2011-07-15 10:06         ` Ludovic Brenta
  0 siblings, 1 reply; 12+ messages in thread
From: jrmarino @ 2011-07-15  6:38 UTC (permalink / raw)


On Jul 15, 1:52 am, Brian Drummond <br...@shapes.demon.co.uk> wrote:
>
> In short (if possible!) what is missing from stock GCC sources to prevent
> this?

Way too much to list.  There's a reason why a separate repository
exists.

> Could the code you added be available in e.g. the form of patches to
> apply to stock GCC?

This question indicates that you are unfamiliar with the process to
submit patches to gcc.  To call it a nightmare would be an euphemism.
Nevertheless, I have taken the first step of assigning my copyright
over to gnu, but have hit a stumbling block on the sheer amount of BS
it takes to get a patch first reviewed and then committed, and I have
a least 50 patches.  There are patches I really want to get into the
codebase, so you can tell how much I'm dreading this if I haven't even
submitted the first one.  As an aside, it's just amazing that after 20
years, the gcc group has a whole don't recognize this to be a big
enough problem to fix (although some prominent developers due).

More specific answer: The patches I have that gcc wants mostly deal
with *BSD support and gnat improvements.  I don't think they want the
android stuff (yet) anyway.  Even the gcc/android doesn't mean gnat/
android.


> I see that GCC4.7 is supposed to add Android as a target (but I don't
> know if that just means C/C++ rather than Gnat)

Likely just c/c++

> Glad to hear it! Is there anything a complete outsider (running Linux not
> *bsd) can do to help?
>

Nothing at the moment.  Maybe somebody could produce some templates to
allow native Ada programs to interface with the android API.  I think
one can make android apps without using java at all, but it requires
binding to the c-interface and all that needs to be developed.

> hopefully Linux will be on the list...

People have build GNAT-AUX on Linux, although personally I was unable
to do it on ubuntu using the gnat from synaptic as the bootstrap.
Linux isn't a focus of GNAT-AUX because Adacore makes sure it works on
Linux.  GNAT-AUX is meant to service the *BSDs and Solaris.
Theoretically it builds on everything that stock GCC builds on, I just
don't test it to verify.



John



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ada cross-compiler (Windows) to Android
  2011-07-15  6:38       ` jrmarino
@ 2011-07-15 10:06         ` Ludovic Brenta
  2011-07-15 16:51           ` jrmarino
  0 siblings, 1 reply; 12+ messages in thread
From: Ludovic Brenta @ 2011-07-15 10:06 UTC (permalink / raw)


jrmarino wrote on comp.lang.ada:
>> In short (if possible!) what is missing from stock GCC sources to prevent
>> this?
>
> Way too much to list.  There's a reason why a separate repository
> exists.
>
>> Could the code you added be available in e.g. the form of patches to
>> apply to stock GCC?
>
> This question indicates that you are unfamiliar with the process to
> submit patches to gcc.

Could you explain how your repository is organized?  I would think
you'd cloned the upstream git repository[1] and created a branch of
your own where you maintain a stack of patches using quilt[2] or
StGit[3]?  This technique allows you to make your patches available to
anyone who wants them, even before you submit them to the FSF.  (The
Debian patches are similarly maintained in a monotone repository,
using quilt.)

[1] http://gcc.gnu.org/git/
[2] http://savannah.nongnu.org/projects/quilt
[3] http://git.or.cz/course/stgit.html

--
Ludovic Brenta.
The enabler generates a wide-spectrum, agile, bottom line, while
siloed tactics enable the enablers.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ada cross-compiler (Windows) to Android
  2011-07-15 10:06         ` Ludovic Brenta
@ 2011-07-15 16:51           ` jrmarino
  2011-07-15 20:14             ` Ludovic Brenta
  0 siblings, 1 reply; 12+ messages in thread
From: jrmarino @ 2011-07-15 16:51 UTC (permalink / raw)


On Jul 15, 12:06 pm, Ludovic Brenta <ludo...@ludovic-brenta.org>
wrote:
>
> Could you explain how your repository is organized?  I would think
> you'd cloned the upstream git repository[1] and created a branch of
> your own where you maintain a stack of patches using quilt[2] or
> StGit[3]?  This technique allows you to make your patches available to
> anyone who wants them, even before you submit them to the FSF.  (The
> Debian patches are similarly maintained in a monotone repository,
> using quilt.)
>
> [1]http://gcc.gnu.org/git/
> [2]http://savannah.nongnu.org/projects/quilt
> [3]http://git.or.cz/course/stgit.html
>
> --
> Ludovic Brenta.
> The enabler generates a wide-spectrum, agile, bottom line, while
> siloed tactics enable the enablers.

Sure, Ludovic.
I need to first make a distinction between gcc 4.6 series and 4.7
series.
For the 4.6 series, I basically dumped gcc/ada (and subdirs) and the
two Ada testsuites along with some key files (e.g. config.gcc),
maintaining the same hierarchy.  When it's time to build a tarball, I
overlay these files on top of a stock gcc.  (for c++ testsuite and a
few key files, I also apply a set of patches).

That technique basically forced me to use "meld" a lot and manually
maintain a list of files that differs.  It is painful to do.

So solve that, and to prepare proper patches for import into gcc, I
created a new branch for gcc 4.7 that only contains patches.  To
produce 4.7 tarball, I just apply the patches to a copy of the stock
gcc.  That way I can just send the patch to gcc and remove it from the
repository after it gets accepted.  That was the plan anyway, and the
idea is that over time the number of patches would decrease to a very
low number.

I took a quick glance at that quilt site which I had never heard of
before, but it wasn't immediately obvious to me how it is supposed to
work.







^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ada cross-compiler (Windows) to Android
  2011-07-15 16:51           ` jrmarino
@ 2011-07-15 20:14             ` Ludovic Brenta
  0 siblings, 0 replies; 12+ messages in thread
From: Ludovic Brenta @ 2011-07-15 20:14 UTC (permalink / raw)


jrmarino writes on comp.lang.ada:
> On Jul 15, 12:06 pm, Ludovic Brenta <ludo...@ludovic-brenta.org>
> wrote:
>>
>> Could you explain how your repository is organized?  I would think
>> you'd cloned the upstream git repository[1] and created a branch of
>> your own where you maintain a stack of patches using quilt[2] or
>> StGit[3]?  This technique allows you to make your patches available to
>> anyone who wants them, even before you submit them to the FSF.  (The
>> Debian patches are similarly maintained in a monotone repository,
>> using quilt.)
>>
>> [1]http://gcc.gnu.org/git/
>> [2]http://savannah.nongnu.org/projects/quilt
>> [3]http://git.or.cz/course/stgit.html
>>
>> --
>> Ludovic Brenta.
>> The enabler generates a wide-spectrum, agile, bottom line, while
>> siloed tactics enable the enablers.
>
> Sure, Ludovic.
> I need to first make a distinction between gcc 4.6 series and 4.7
> series.
> For the 4.6 series, I basically dumped gcc/ada (and subdirs) and the
> two Ada testsuites along with some key files (e.g. config.gcc),
> maintaining the same hierarchy.  When it's time to build a tarball, I
> overlay these files on top of a stock gcc.  (for c++ testsuite and a
> few key files, I also apply a set of patches).
> 
> That technique basically forced me to use "meld" a lot and manually
> maintain a list of files that differs.  It is painful to do.
>
> So solve that, and to prepare proper patches for import into gcc, I
> created a new branch for gcc 4.7 that only contains patches.  To
> produce 4.7 tarball, I just apply the patches to a copy of the stock
> gcc.  That way I can just send the patch to gcc and remove it from the
> repository after it gets accepted.  That was the plan anyway, and the
> idea is that over time the number of patches would decrease to a very
> low number.
>
> I took a quick glance at that quilt site which I had never heard of
> before, but it wasn't immediately obvious to me how it is supposed to
> work.

Maybe the man page[4] is more explicit.  Basically, quilt is a tool to
help with what you're doing, i.e. maintain a stack of patches on top of
a GCC pristine release.  You can "push" a patch (i.e. apply it), "pop" a
patch (un-apply it), "refresh" a patch (i.e. recompute the diff), and
reorder patches.  Quilt keeps track of the name and order of your
patches, and of which patch is currently the topmost applied to the
pristine sources.

[4] http://linux.die.net/man/1/quilt

When a new version of GCC is released, you use quilt to re-apply all
your patches to it, in order.  When things break, you redo your changes
manually then refresh your patches.

StGit is a similar tool specifically designed for use with git
(i.e. where the pristine sources are in git).

I suggest you consider using either tool to manage your patches and
place only your patches in your repository.

-- 
Ludovic Brenta.
The steering committee empowers our organic contents. 



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-07-15 20:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-07 15:58 Ada cross-compiler (Windows) to Android Rego, P.
2011-07-07 21:57 ` Brian Drummond
2011-07-08 21:18   ` Rego, P.
2011-07-10  7:57   ` Martin Krischik
2011-07-10 11:37     ` Brian Drummond
2011-07-11 15:39       ` Shark8
2011-07-14 15:08   ` jrmarino
2011-07-14 23:52     ` Brian Drummond
2011-07-15  6:38       ` jrmarino
2011-07-15 10:06         ` Ludovic Brenta
2011-07-15 16:51           ` jrmarino
2011-07-15 20:14             ` Ludovic Brenta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox