From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3884 invoked by alias); 27 Jan 2013 19:49:29 -0000 Received: (qmail 3836 invoked by uid 48); 27 Jan 2013 19:49:07 -0000 From: "chris.gccbugzilla at breisch dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/55946] Wrong GNAT tools used on build of gnattools [native-cross] Date: Sun, 27 Jan 2013 19:49:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: chris.gccbugzilla at breisch dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg02512.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55946 Chris J. Breisch changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris.gccbugzilla at | |breisch dot org --- Comment #1 from Chris J. Breisch 2013-01-27 19:49:05 UTC --- I can verify this issue. It occurs when building the native gcc/gnat using the cross-compiler. However, the patch doesn't quite work for me. The patch to gnattools/Makefile appears wrong: +host = @host_cpu@-@host_os@ Shouldn't this just be +host = @host@ ? That's what I needed. However, I think this is masking the real problem. >>From later in the patch...(comments are from the original Makefile) # put the host RTS dir first in the PATH to hide the default runtime # files that are among the sources # FIXME: This should be done in configure. -RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib ))) +RTS_DIR:=$(strip $(subst \,/,$(shell $(host)-gnatls -v | grep adalib ))) The original bug report is correct. We should absolutely not be running the regular gnatls on the host here, but the one from the cross compiler. Hence the patch. For me the name of the cross compiler gnatls uses the complete host triple. Obviously not for the original poster. I suspect that there's no simple solution here that will work for everyone and the original comment in the Makefile is correct. FIXME: This should be done in configure. I think until this is properly handled in configure, problems will still occur.