public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fxcoudert at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ada/79724] GNAT tools do not respect --program-suffix and --program-prefix
Date: Thu, 23 Dec 2021 09:56:07 +0000	[thread overview]
Message-ID: <bug-79724-4-HlufWIrMIG@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-79724-4@http.gcc.gnu.org/bugzilla/>

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

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |charlet at adacore dot com,
                   |                            |derodat at adacore dot com,
                   |                            |fxcoudert at gcc dot gnu.org
            Summary|please respect calling gnat |GNAT tools do not respect
                   |tools configured with       |--program-suffix and
                   |--program-suffix and        |--program-prefix
                   |--program-prefix            |
   Last reconfirmed|                            |2021-12-23
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Confirmed. This is blocking Ada integration into Homebrew:
https://github.com/Homebrew/homebrew-core/pull/77641

We configure GCC with:
configure --prefix=/tmp/irun --enable-languages=all --program-suffix=-11

This leads to the installation of suffixed gnat tools:

meau /tmp/irun $ ls bin/gnat*
bin/gnat-11      bin/gnatchop-11  bin/gnatkr-11    bin/gnatls-11   
bin/gnatname-11
bin/gnatbind-11  bin/gnatclean-11 bin/gnatlink-11  bin/gnatmake-11 
bin/gnatprep-11

But they're not usable:

meau /tmp/irun $ gnatmake-11 hello.adb
gcc -c hello.adb
clang: error: unknown argument: '-gnatea'
clang: error: unknown argument: '-gnatez'
gnatmake-11: "hello.adb" compilation error

because gnatmake-11 is calling the unsuffixed `gcc`, which does not support
Ada.
(On macOS, this system compiler is a wrapper to clang.)

Even if I try to add some options to gnatmake, it will still somehow fail,
because the relevant options are not passed down to gnatlink:

meau /tmp/irun $ gnatmake-11 hello.adb --GCC=gcc-11 --GNATBIND=gnatbind-11
--GNATLINK=gnatlink-11
gcc-11 -c hello.adb
gnatbind-11 -x hello.ali
gnatlink-11 hello.ali
clang: error: unknown argument: '-gnatA'
clang: error: unknown argument: '-gnatWb'
clang: error: unknown argument: '-gnatiw'
clang: error: unknown argument: '-gnatws'
gnatmake-11: *** link failed.

       reply	other threads:[~2021-12-23  9:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-79724-4@http.gcc.gnu.org/bugzilla/>
2021-12-23  9:56 ` fxcoudert at gcc dot gnu.org [this message]
2021-12-23 10:18 ` fxcoudert at gcc dot gnu.org
2021-12-23 13:28 ` egallager at gcc dot gnu.org
2021-12-23 13:52 ` fxcoudert at gcc dot gnu.org
2022-01-03 10:49 ` charlet at gcc dot gnu.org
2022-01-04 14:24 ` fxcoudert at gcc dot gnu.org
2022-01-04 15:25 ` charlet at gcc dot gnu.org
2022-01-11 13:27 ` cvs-commit at gcc dot gnu.org
2022-01-11 13:30 ` charlet at gcc dot gnu.org
2022-04-06 15:24 ` nicolas at debian dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-79724-4-HlufWIrMIG@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).