Open bib1963 opened 2 years ago
Sounds reasonable, we will look into this. However, may I ask you to file this issue also in https://github.com/AdaCore/gpr ? We will probably in any case start by doing it there, and then may or may not backport it here.
And done...
gcc on distros tend to be built with suffix's denoting the major version, which is then symlinked to a filename without it, ie gcc-11 -> gcc, which are added to all the executables within the install bin directory.
When running gprconfig, it checks the db. It can extract the PREFIX, but not the SUFFIX. The line...
<executable prefix="1">(.*-qnx.*|.*-rtems.*)?gnatls</executable>
suggests that PREFIX is set via here and is used in...<external>${PREFIX}gcc -v</external>
The executable tag needs to be extended to extract the SUFFIX as well, ie...
<executable prefix="1" suffix="2">(.*-qnx.*|.*-rtems.*)?gnatls(-\d+)?</executable>
which means it can then be used thus...<external>${PREFIX}gcc${SUFFIX} -v</external>
This would then allow multiple distro supplied gcc versions to be installed and usable.
Although I consider this to be a "bug", I guess it could also be regarded as a feature request.
The documentation only seems to talk about the suffix's but give no indication as to whether they can be extracted