From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E94B83858418; Thu, 23 Dec 2021 10:18:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E94B83858418 From: "fxcoudert at gcc dot 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 10:18:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Version: 6.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fxcoudert at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Dec 2021 10:18:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D79724 --- Comment #2 from Francois-Xavier Coudert = --- It's puzzling, because although I've never read any Ada code, I can see the= re is some logic in place that should deal with it. In make.adb there is: Gcc : String_Access :=3D Program_Name ("gcc", "gnatmake"); Gnatbind : String_Access :=3D Program_Name ("gnatbind", "gnatmake"); Gnatlink : String_Access :=3D Program_Name ("gnatlink", "gnatmake"); and in osint.adb the function Program_Name has some logic to find prefix and suffix: -- Find the target prefix if any, for the cross compilation case. -- For instance in "powerpc-elf-gcc" the target prefix is -- "powerpc-elf-" -- Ditto for suffix, e.g. in "gcc-4.1", the suffix is "-4.1" and it uses them to return the program that is going to be used: -- Create the new program name return new String' (Name_Buffer (Start_Of_Prefix .. End_Of_Prefix) & Nam & Name_Buffer (Start_Of_Suffix .. Name_Len)); I tried to debug this by sticking some Ada.Text_IO.Put_Line calls, but eith= er I'm doing it wrong, or it's never actually called.=