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