Can't recompile clang using clang, fatal error: 'cmath' file not found

Hello!
I hope i choosed proper mailing list.
I'm using gentoo, i've got installed llvm and clang. Now i'd like to
recompile clang with CC=clang. I get error:"
In file included from APFloat.cpp:15:
In file included from
/var/tmp/portage/sys-devel/clang-9999/work/llvm/include/llvm/ADT/APFloat.h:104:
In file included from
/var/tmp/portage/sys-devel/clang-9999/work/llvm/include/llvm/ADT/APInt.h:18:
In file included from
/var/tmp/portage/sys-devel/clang-9999/work/llvm/include/llvm/Support/MathExtras.h:17:
In file included from
/var/tmp/portage/sys-devel/clang-9999/work/llvm/include/llvm/Support/SwapByteOrder.h:18:
/var/tmp/portage/sys-devel/clang-9999/work/llvm/include/llvm/Support/DataTypes.h:35:10:
fatal error: 'cmath' file not found
#include <cmath>
         ^
1 error generated.
                     "

Honestly, i don't know how to solve this problem. I tried with clang
compiled with and without USE flag "system-cxx-headers" still the same
error. Clang is in "live" version, taken from repo.

Thanks,
regards.

Compile with the -v flag. That will tell you which directories did
clang++ search for cmath.

Section 5 in http://clang.llvm.org/get_started.html might offer some help.

Csaba

W dniu 16.12.2010 13:36, Csaba Raduly pisze:

Compile with the -v flag. That will tell you which directories did
clang++ search for cmath.

Section 5 in http://clang.llvm.org/get_started.html might offer some help.

Thanks for advice. Now i know something more. Now i'm trying to compile
clang with USE flag "system-cxx-headers".
./configure is run with parameters:
./configure --prefix=/usr --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
--localstatedir=/var/lib --libdir=/usr/lib64 --enable-optimized
--disable-assertions --disable-expensive-checks --enable-pic
--with-llvmgccdir=/dev/null
--with-cxx-include-root=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/include/g++-v4
--with-cxx-include-arch=x86_64-pc-linux-gnu --with-cxx-include-32bit-dir=32

$ ls -l /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/include/g++-v4/cmath
-rw-r--r-- 1 root root 15743 11-22 11:41
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/include/g++-v4/cmath

In build log:
[snip]
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/x86_64-pc-linux-gnu/"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/backward"
[snip]

i can't find path used in option cxx-include-root. Is it possible that
mentioned path isn't used?
Regards!

P.S. I can see huge delays on mailinglist, is it something unusual?