public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "chris.gccbugzilla at breisch dot org" <gcc-bugzilla@gcc.gnu.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	[thread overview]
Message-ID: <bug-55946-4-fhUDDQqron@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55946-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55946

Chris J. Breisch <chris.gccbugzilla at breisch dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chris.gccbugzilla at
                   |                            |breisch dot org

--- Comment #1 from Chris J. Breisch <chris.gccbugzilla at breisch dot org> 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.


  reply	other threads:[~2013-01-27 19:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-11 20:02 [Bug ada/55946] New: " gregnietsky at gmail dot com
2013-01-27 19:49 ` chris.gccbugzilla at breisch dot org [this message]
2013-11-06 18:17 ` [Bug ada/55946] wrong tools used for " ebotcazou at gcc dot gnu.org
2013-12-11 13:24 ` ebotcazou at gcc dot gnu.org
2013-12-12 22:50 ` ebotcazou at gcc dot gnu.org
2013-12-12 22:53 ` ebotcazou at gcc dot gnu.org
2013-12-12 22:57 ` ebotcazou at gcc dot gnu.org
2014-01-14 10:35 ` ebotcazou at gcc dot gnu.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-55946-4-fhUDDQqron@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).