https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79724

            Bug ID: 79724
           Summary: please respect calling gnat tools configured with
                    --program-suffix and --program-prefix
           Product: gcc
           Version: 6.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

currently --program-suffix and --program-prefix are not respected by the
various ada tools.  They might be installed correctly with the configured
prefix and suffix, but internally tools are called without prefix and suffix
(e.g. gnatmake still calls <prefix>/bin/gcc, which might point to another
version of gcc not having ada installed).

Debian/Ubuntu had a patch to resolve this, and to call the tools with the
suffix name, however for some occasions it would append the suffix twice (any
hint what is wrong with the patch would be appreciated).

The current patch:
https://anonscm.debian.org/viewvc/gcccvs/branches/sid/gcc-7/debian/patches/ada-gcc-name.diff?revision=9242&view=markup

Problems caused with this patch: https://bugs.debian.org/814978

"""
Due to the Debian patch ada-gcc-name.diff the name of gcc becomes gcc-5-5
instead of gcc-5. This is easily shown with:
/usr/bin/gnatchop -v fc51b00.a
where fcb51b.a is located at src/gcc/testsuite/ada/acats/support/
(same when run as a shell command)

GNATCHOP 5.3.1
Copyright (C) 1998-2015, Free Software Foundation, Inc.
gcc-5-5: installation problem, executable not found
no source files written

However, issuing the command directly via path works:
gnatchop -v fc51b00.a
GNATCHOP 5.3.1
Copyright (C) 1998-2015, Free Software Foundation, Inc.
/usr/bin/gcc-5 -c -x ada -gnats -gnatu fc51b00.a
splitting fc51b00.a into:
   fc51b00.ads
with:
which gnatchop
/usr/bin/gnatchop
"""

So two issues: what causes the duplication of the suffix, and how to generalize
the tool names to include the prefix and the suffix?

Reply via email to