This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/12746] configure fails to find out whether a system has ANSI C header files
- 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: 12 Nov 2003 16:09:42 -0000
- Subject: [Bug bootstrap/12746] configure fails to find out whether a system has ANSI C header files
- References: <20031023164944.12746.falemagn@studenti.unina.it>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From falemagn at studenti dot unina dot it 2003-11-12 16:09 -------
(In reply to comment #1)
> I don't quite understand the problem here. GCC doesn't try and run conftest,
> it only tries to build (compile and like) it.
I must disagree here. Looking at the configure file, I see this:
[...]
if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && t
est -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_header_stdc=no
fi
[...]
And as you see, it does (./conftest; exit).
However, the above code *shouldn't* be run if the compiler used is a cross
compiler, because of this:
[...]
if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
[...]
It should take the "then" branch in my case, but it does not. In fact, running
the configure script shows that it tries to detect whether ANSI C header files
are present *before* it detects whether the compiler used is a crosscompiler:
[...]
checking for ANSI C header files... no
checking for uintptr_t... yes
checking for pid_t... yes
checking whether the C compiler (i386-aros-gcc -nix -g -O2 ) works... yes
checking whether the C compiler (i386-aros-gcc -nix -g -O2 ) is a
cross-compiler... yes
[...]
So the problem really is that the last check should be done first.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12746