On Wed, 2010-02-24 at 16:10 +0100, Rainer Orth wrote:
> As the last of the shared GCC runtime libraries, libgnat.so and
> libgnarl.so lack symbol versioning support and a defined ABI.
> Currently, they use libgnat-4.5.so and libgnarl-4.5.so SONAMEs, what
> libtool calls release versioning.  If the libgnat/libgnarl ABI is really
> that fluent that it changes from release to release, there's obviously
> no point in defining one, but given the Ada Reference Manual, I cannot
> really believe this, but assume that this is just being cautious.

The Ada reference manual gives lots of freedom for compiler implementors
to perform optimizations (1). Inventing an ABI in addition to the work
it represents by itself will likely restrict the allowable optimizations
for all future compilers and generally increase the maintenance burden
of future compilers. 

Also the Ada reference manual provides the "Restrictions" pragma, each
one allowing more optimizations by disallowing use of certain language
feature. How do we handle the possible 2^N combinations of Restrictions
pragmas in an "ABI" document?

On the other side what do we gain then from setting in stone forever an
"Ada" (really GCC-specific) ABI compared to the current situation of
per-branch SONAME?

Note that the Ada language allows those who want to set in stone
their library ABI to do so via Import/Export pragmas, reusing 
C/C++/Fortran existing ABIs where possible.

Sincerely,

Laurent

(1) Example of such optimizations that would break an "Ada" ABI:

2005-06-14  Jose Ruiz  <r...@adacore.com>
            Arnaud Charlet  <char...@adacore.com>

        * a-sytaco.ads, a-sytaco.adb (Suspension_Object): These objects are no
        longer protected objects. They have been replaced by lower-level
        suspension objects made up by a mutex and a condition variable (or
        their equivalent given a particular OS) plus some internal data to
        reflect the state of the suspension object.
        (Initialize, Finalize): Add this initialization procedure for
        Suspension_Object, which is a controlled type.
        (Finalize): Add the finalization procedure for Suspension_Object,
        which is a controlled type.



Reply via email to