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

[Patch] #9: libgnatprj



I'm sending this patch a couple of days earlier than anticipated.

The new file, ada-libgnatprj.dpatch, continues the trend started in
ada-link-lib.dpatch and ada-libgnatvsn.dpatch.  It introduces a new
shared libary, named libgnatprj wirh soname libgnatprj.so.4.1.
libgnatprj contains the GNAT Project Manager, i.e. the parts of the
GNAT tools that parse and process GNAT project files (*.gpr).  This
new library relies on libgnatvsn, and is linked against it.  The new
.dpatch file then links the GNAT tools dynamically against all three
libraries (libgnat-4.1, libgnatvsn and libgnatprj).  Finally, it
creates two new binary packages, libgnatprj-dev and libgnatprj4.1.

Here are some numbers I collected over the past couple of weeks; these
are the sizes of the GNAT tools, in bytes, on i386, after stripping.

tool          static      libgnat   libgnatvsn   libgnatprj
-----------------------------------------------------------
gnat          922.544     773.104      732.264      162.724
gnatbind      767.384     658.820      357.500      156.244
gnatbl         18.144      18.148        9.784        6.964
gnatchop      269.264     113.928       57.972       58.332
gnatclean     891.216     771.760      729.384       95.208
gnatfind      430.864     255.280      201.240      119.904
gnatkr         86.128      76.536       10.284       10.620
gnatlink      313.960     288.840      225.468       73.684
gnatls        826.032     774.432      252.648       48.216
gnatmake    1.535.016   1.416.416    1.048.136      370.936
gnatname      755.120     577.584      497.864       78.524
gnatprep      530.064     351.352      221.724       91.124
gnatxref      430.864     255.120      200.344      118.528
gprmake       983.824     767.472      716.200      142.044

TOTAL       8.760.424   7.098.792    5.260.812    1.533.052
Change                 -1.661.632   -1.837.980   -3.727.760
Change%                      -19%         -26%         -71%
Cumulated change%                         -40%         -83%

Shared library size:    2.415.060      905.044    1.012.296

The GNAT tools alone benefit greatly from dynamic linking.  Moreover,
I have crafted libgnatvsn and libgnatprj in such a way that I can now
reuse them in ASIS, GLADE and GPS (ASIS only needs libgnatvsn; GPS
needs both libgnatvsn and libgnatprj).

libgnatvsn contains code licensed under the GNAT-Modified GPL; if you
link a program against it, you can distribute the resulting binary
under whatever licencing terms you please.  In contrast, libgnatprj is
licensed under the pure GPL, so if you link a program to it, you must
distribute the resulting binaries under the GPL, or in source-form
only, or keep them to yourself.

With this patch, I have now ported all my changes from gnat 3.15p.
Before I make gcc-4.1 the new default Ada compiler for Debian, there
are still a couple of issues that I'll work on in the near future:

* avoid patching configure, call autoconf instead (per request from
  Matthias Klose).  This applies to ada-link-lib.dpatch,
  ada-libgnatvsn.dpatch and ada-libgnatprj.dpatch.  (We will continue
  to patch Makefile.in instead of running autogen).

* Patch the test suite (src/gcc/testsuite/ada/acats/run_acats) to find
  the GNAT tools in their new home (build/gnattools instead of
  build/gcc), and to find the needed shared libraries.

* Support biarch.  I'll need much help, and new hardware for this.
  Biarch is one of the three main benefits of the move to gcc-4.1 (the
  other two are uniarch support for more architectures, and Ada 2005
  features).

I will appreciate any and all feedback.

-- 
Ludovic Brenta.

Attachment: gcc-4.1.0-1-patch-9.patch.gz
Description: patch #9: libgnatprj


Reply to: