This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/12745] New: config.if fails when building a "crossback" compiler.
- From: "falemagn at studenti dot unina dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Oct 2003 16:35:16 -0000
- Subject: [Bug bootstrap/12745] New: config.if fails when building a "crossback" compiler.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12745
Summary: config.if fails when building a "crossback" compiler.
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: falemagn at studenti dot unina dot it
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gn
GCC host triplet: i386-pc-aros
GCC target triplet: i686-pc-linux-gnu
In an attempt to port gcc to the AROS platform, and having the source tree
already build a crosscompiler for the i386-pc-aros target, I tried to build a
crosscompiler from i386-pc-aros to i686-pc-linux-gnu, so to test the host
support for AROS.
However, by the time the config.if file is included in configure, the CC
variable is set to i386-pc-aros, and since the the build system is the same as
the target system, these particular lines are executed in config.if:
if [ ${target_alias} = ${build_alias} ]
then
[...]
(*) ${CC-cc} $dummy.c -o $dummy 2>/dev/null
[...]
fi
As said, since CC is set to i386-pc-aros, and since AROS knows nothing about
glibc, the compilation fails and config.if bails out with "Cannot find the GNU C
library minor version number.".
I don't know whether CC should really be set to i386-pc-aros there, however if
the (*) line is substituted with
(**) ${CC_FOR_BUILD-cc} $dummy.c -o $dummy 2>/dev/null
Then config.if works as it should: after all, why use the host compiler if we
are interested in the _build_ one?