File: README.source

package info (click to toggle)
gprbuild 2011-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 10,396 kB
  • sloc: ada: 94,726; sh: 2,818; xml: 2,225; makefile: 471; ansic: 240; cpp: 89; fortran: 62; asm: 27
file content (71 lines) | stat: -rw-r--r-- 2,980 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
The upstream repository is https://libre.adacore.com/libre/download/.
The Libre website calls this version "GPL 2011", as does
src/gpr_version.ads. It appears to correspond to AdaCore GnatPro
gprbuild version 1.6. gprbuild is not in the Gnu ftp mirrors.

gprbuild contains part of the GNAT compiler sources in the gnat
directory. The code in gnat duplicates the code in the Debian
libraries libgnatprj and libgnatvsn. However, the versions are
different enough that we cannot make gprbuild work with the Debian
libraries, so we use the included source.

We have to rename the root directory in the tarball to meet the dpkg
naming convention. To prepare a new build directory:

    cd /home/Projects/gprbuild
    tar zxf ~/Downloads/gprbuild-gpl-2011-src.tgz
    mv gprbuild-2011w-src gprbuild-2011
    mkdir gprbuild-2011-current
    tar zcf gprbuild-2011-current/gprbuild_2011.orig.tar.gz gprbuild-2011
    cd gprbuild-2011-current
    mtn --db ~/monotone-dbs/ada-france.db checkout --branch org.debian.gprbuild gprbuild-2011
    tar zxf gprbuild_2011.orig.tar.gz

There are regular expressions in share/gprconfig/compilers.xml that
must match the version string output by 'gcc'; we patch (via quilt;
see /usr/share/doc/quilt/README.source) these to allow "Debian" in the
string. We also patch it to rely explicitly on 'gcc-4.4', 'g++-4.4',
etc; Debian allows multiple versions of compilers to be installed at
once, and 'gcc' etc may point to the 'wrong' version. Note that the
driver for GNAT is specified in share/gprconfig/gnat.xml, and for
Fortran in fortran.xml.

When the gcc compiler changes version, the following files must be edited:

changelog             mention the change
control               version dependencies
rules                 version in comments at the top
test_installed.sh     install the new version

../share/gprconfig/asm.xml        Driver
../share/gprconfig/c.xml          Driver
../share/gprconfig/cpp.xml        Driver
../share/gprconfig/compilers.xml  all
../share/gprconfig/fortran.xml    Driver
../share/gprconfig/gnat.xml       Driver

In addition, we patch the gprbuild version string to include the
Debian upload number:

../gnat/gnatvsn.ads
../src/gpr_version.ads

All of the above changes are in a quilt patch; be sure to refresh the
correct ones.

The upstream Makefile installs subsidiary executables gprlib, gprbind
in /usr/libexec/gprbuild; we change that to /usr/lib. This requires
patching share/gprconfig/linker.xml and gnat.xml.

There are no tests, but the examples work, except for the following:

ada_cpp fails with Ada compiler errors. This appears to be a bug in
the upstream source for the example; reported to AdaCore (upstream
maintainer).

matrix fails to link; ld reports 'cannot find -llapack', even though
liblapack3gf is installed. Giving up on this one.

ppc-elf fails on any arch other than ppc if no cross compiler is installed.

 -- Stephen Leake <stephen_leake@stephe-leake.org>, Wed, 20 Jul 2011 05:42:46 -0400