This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/55946] Wrong GNAT tools used on build of gnattools [native-cross]
- From: "chris.gccbugzilla at breisch dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 27 Jan 2013 19:49:05 +0000
- Subject: [Bug ada/55946] Wrong GNAT tools used on build of gnattools [native-cross]
- Auto-submitted: auto-generated
- References: <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.