This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cpp found limits.h in FIXED_INCLUDE_DIR, but not in STANDARD_INCLUDE_DIR
- From: Zhang Le <r0bertz at gentoo dot org>
- To: Jay <jay dot krell at cornell dot edu>
- Cc: gcc at gcc dot gnu dot org, iant at google dot com
- Date: Wed, 8 Oct 2008 09:59:43 +0800
- Subject: Re: cpp found limits.h in FIXED_INCLUDE_DIR, but not in STANDARD_INCLUDE_DIR
- References: <1221542711.12932.ezmlm@gcc.gnu.org> <COL101-W44D12B513798EC92C7C8AE64D0@phx.gbl>
Hi, all,
I think I've found the reason.
It all comes from this gentoo patch:
http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/gcc/files/4.1.0/gcc-4.1.0-cross-compile.patch?rev=1.1&view=markup
Specifically:
-elif test "x$TARGET_SYSTEM_ROOT" != x; then
+elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
SYSTEM_HEADER_DIR=$build_system_header_dir
fi
BTW, I haven't got time to learn more about that debate, but I will do it.
Since my build != host, so SYSTEM_HEADER_DIR=$build_system_header_dir, which is
in turn CROSS_SYSTEM_HEADER_DIR.
So this test will fail
LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
And then:
if $(LIMITS_H_TEST) ; then \
cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \
else \
cat $(srcdir)/glimits.h > tmp-xlimits.h; \
fi; \
And the solution is easy, just turn on 'vanilla' USE flag in Gentoo.
Sorry for the noise.
Zhang Le