<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Hello,</span><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
it is last report for project "Provide alternative to libstdc++ with libc++", mentored by Sylvestre Ledru.</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">I've found bug in clang header <stdin.h>, that failed building compiler-rt, and succesfully fixed it. Now clang package in Debian experimental provides compiler-rt too (but currently Debian GNU/Linux i386 & amd64 only).</div>

<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
I've installed Debian/Hurd (i386), Debian/kfreebsd (i386/amd64) in qemu-kvm, and tried building my package. Unfortunaly, my package failed to build: </div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">

on Hurd clang is completely unusable. Looks like assembler(compiler) command isn't defined for this platform, so it fails when compiling any program with message:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

error: unable to execute command: posix_spawn failed: No such file or directory<br>error: clang frontend command failed due to signal (use -v to see invocation)<br>note: diagnostic msg: Please submit a bug report to <a href="http://llvm.org/bugs/" style="color:rgb(17,85,204)" target="_blank">http://llvm.org/bugs/</a> and include command line arguments and all diagnostic information.<br>

error: unable to execute command: posix_spawn failed: No such file or directory <br>note: diagnostic msg: Error generating preprocessed source(s). </blockquote><div><br></div><div>on kFreeBSD clang has multiple bugs:</div>

<div>a) clang try use gcc as assembler(compiler) instead of internal clang/LLVM compiler.</div><div>b) <span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"> </span><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">when specifying '-std=c++0x' flag for clang++, it breaks using advanced C standard, and looks like will be using: some functions </span></div>

<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">requires C99, C95 standards and checks it with defined macroses like __USE_ISOC99, __USE_C95. So, when flag '-std=c++0x' specified for clang++, it breaks defining these macroses; without this flag all fine. </div>

<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">c) in Debian clang headers located in  /usr/include/clang/3.1/include, and that path is append (normally) to default include search path by patch  21-searchPathHeaders.diff, Looks like on kFreeBSD-i386 clang compiled  without this patch, so it's finding headers (and stddef.h) in /usr/lib/clang/3.1/include instead of /usr/include/clang/3.1/include.</div>

<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div><div><font color="#222222" face="arial, sans-serif">We've fixed most of these bugs.</font></div><div><font color="#222222" face="arial, sans-serif"><br>
</font></div><div><font color="#222222" face="arial, sans-serif">I've sent direct mail to libunwind maintainer, but have not received reply. Also bugs opened on BTS don't have progress.</font></div><div><font color="#222222" face="arial, sans-serif"><br>
</font></div><div><font color="#222222" face="arial, sans-serif">Now I'm writing documentation, that accumulates all information collected about  C++ stack on Linux, as default and available libraries, compiler support, and so on.</font></div>
</div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
----Conclusion---- </div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
I've created Debian package of libc++. Now it is placed in experimental repository. Package can be builded manually with svn-buildpackage; package follows Debian multiarch recommendations. Great libc++ test suite (4300+) tests packaged in libc++-src. libc++abi that packaged too allows build applications with libc++ without dependency of libstdc++. So in future (very far future :) libc++ can replace libstdc++.</div>

<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
Also I tried replace another parts of standard C++ stack (and a bit of C too). I've written patches for libunwind; with these patches it can be used as stack unwinding library of C++ stack. Also I've created patch for compiler-rt, and it'll be provided now in clang package. </div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">libc++-dev package provides scripts (clang++-libc++, g++-libc++) that allows easy compilation with libc++. These scripts also installed as default compiler (/usr/bin/c++) using update-alternatives.</div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">I've tested building package on Debian GNU/Hurd, Debian GNU/kFreeBSD. Not all was good during bugs in clang on these platforms, but now it'll be well. </div>