[Bug bootstrap/12746] New: configure fails to find out whether a system has ANSI C header files
falemagn at studenti dot unina dot it
gcc-bugzilla@gcc.gnu.org
Thu Oct 23 17:28:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12746
Summary: configure fails to find out whether a system has ANSI C
header files
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-gnu
GCC host triplet: i386-pc-aros
GCC target triplet: i686-pc-linux-gnu
I tested this only with AROS as host system, however it looks like it should
happen with any other host system, given that the host system is different than
the build one.
Basically, configure tries to find out whether the system has ANSI C header
files by compiling a piece of code and then running it. However, when the host
and the build system are different this approach miserably fails. This is an
excerpt from the config.log file:
configure:1513: checking for ANSI C header files
configure:1526: i386-aros-gcc -E conftest.c >/dev/null 2>conftest.out
configure:1593: i386-aros-gcc -o conftest -g -O2 conftest.c 1>&5
configure: failed program was:
#line 1582 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
Of course it would fail, as it's trying to run on the build system an executable
for a foreign platform!
More information about the Gcc-bugs
mailing list