comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP>
Subject: Re: Ada and C++ in the same binary, was: Re: Current status of Ada development for an Android target ?
Date: Sun, 19 Jun 2016 17:52:43 -0000 (UTC)
Date: 2016-06-19T17:52:43+00:00	[thread overview]
Message-ID: <nk6m5b$f9v$1@dont-email.me> (raw)
In-Reply-To: 421848116.488042939.962509.laguest-archeia.com@nntp.aioe.org

On 2016-06-19, Luke A  Guest <laguest@archeia.com> wrote:
> Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
>
>>>> The problem is that I don't have any experience combining C++ and Ada
>>>> code in the same binary; in the past, I've only ever called plain C code
>>>> from Ada.
>>> 
>>> What about writing it all in Ada and providing an export interface to C++?
>> 
>> The C++ idea is for the low level code which could be used elsewhere.
>> If I write that low level code in Ada then how do I port it to a target
>> which may not have an Ada compiler available for it ?
>
> Obviously, if GCC has a backend target done, getting Ada on it is generally
> trivial bless it's got weird exception handling, I don't know when they did
> it but they finally added arm specific eh.
>
> In this specific case it would help to know which specific targets you
> need. 
>

I suppose in some ways that's at the core of the problem; I don't fully
know and I don't know what's going to be along in a couple of years
(both architecture and operating system wise) that I might want to use
some of this code with. My new project is initially Linux desktop based
but some of the lower level stuff is probably going to find it's way
into some embedded and portable applications.

Right now on my desk, I've got stuff with MIPS, AVR and ARM cores (both
Cortex M0/M4 class and A8 class as well as traditional ARM cores). I've
got stuff that's running a mixture of bare metal code, RTEMS and a bit
of Linux. (Because of various reasons, including the historical embedded
compiler situation, most of the above is running C code; Ada is more of
a desktop environment language for me at the moment). I've also got
Android devices that I am wanting to get more into as well.

The requirement to port parts of my new project to unknown future
targets is what originally drove me (reluctantly) initially down the
pure C path before I abandoned that idea as not viable. The next logical
step up is C++ (because it's probably going to be available on most of
the new targets C is) but I do prefer Ada.

However, having said all that, the immediate new target of interest
is Android which I've got a couple of future ideas for. One concern
however is with the potential closing of Android by moving away from
the AOSP (and potential internals changes) along with, as you pointed
out, the move to LLVM. As such I do wonder if gcc is going to be left
out in the cold on new Android versions.

BTW, thanks for asking that question. :-) Writing the above in a form
suitable for someone else to read has helped sort out some ideas in
my head. :-)

Simon.

-- 
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world


  reply	other threads:[~2016-06-19 17:52 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-11 15:51 Current status of Ada development for an Android target ? Simon Clubley
2016-06-12  7:28 ` Luke A. Guest
2016-06-12  8:25 ` Luke A. Guest
2016-06-12  8:27 ` Luke A. Guest
2016-06-12 23:36   ` Simon Clubley
2016-06-13  4:24     ` Shark8
2016-06-13 13:49     ` Lucretia
2016-06-13 14:34       ` Lucretia
2016-06-14 13:22 ` jrmarino
2016-06-14 18:39   ` Simon Clubley
2016-06-15  9:41     ` jrmarino
2016-06-15 13:11       ` Simon Clubley
2016-06-15 12:12     ` Luke A. Guest
2016-06-15 13:02       ` Simon Clubley
2016-06-15 13:13         ` Lucretia
2016-06-16 19:20 ` Lucretia
2016-06-16 19:29   ` Simon Clubley
2016-06-16 19:49     ` Luke A. Guest
2016-06-18 15:44       ` Ada and C++ in the same binary, was: " Simon Clubley
2016-06-18 16:38         ` Simon Clubley
2016-06-18 18:21         ` Luke A. Guest
2016-06-19 14:50           ` Simon Clubley
2016-06-18 18:24         ` Shark8
2016-06-19 15:00           ` Simon Clubley
2016-06-19 15:32             ` Luke A. Guest
2016-06-19 17:52               ` Simon Clubley [this message]
2016-06-19 18:40                 ` Luke A. Guest
2016-06-19 19:16                   ` Simon Clubley
2016-06-19 20:32                     ` Luke A. Guest
2016-06-20 12:11             ` Jacob Sparre Andersen
2016-06-20 14:28               ` Luke A. Guest
replies disabled

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