xlocale patch
David Chisnall
theraven at theravensnest.org
Wed Sep 21 19:29:08 UTC 2011
And here's an updated version of the patch. I've fixed some other bugs, including where wcstod() and wcstodl() in trunk return the wrong value for any input string starting with spaces, wchar.h's violation of POSIX by not declaring FILE, and a few C++ incompatibilities in other headers (e.g. putchar being a macro, which breaks things like std::putchar(foo)). All of my libcxxrt and libc++ changes have now been pushed upstream, so this should now be repeatable.
The libunwind port still has an irritating bug in the header, where the extern "C" {} block ends with a semicolon, which causes it to be rejected in any C++ program, but with that fixed you can compile libcxxrt (I used cmake .. -DCMAKE_CXX_FLAGS="-I/usr/local/include -nostdlib -g" - hopefully I'll work out how to make CMake add these flags automatically soon...). Libc++ should build out of the box with cmake.
The results are now:
****************************************************
Results for /root/libcxx/test:
using clang version 3.0 (trunk 140248)
Target: x86_64-unknown-freebsd9.0
Thread model: posix
with -std=c++0x -stdlib=libc++ -pthread -I/root/libcxx/include -L/root/libcxx/build/lib
----------------------------------------------------
sections without tests : 1
sections with failures : 16
sections without failures: 1047
+ ----
total number of sections : 1064
----------------------------------------------------
number of tests failed : 53
number of tests passed : 4271
+ ----
total number of tests : 4324
****************************************************
For comparison, the results on OS X are:
****************************************************
Results for /test:
using Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin11.1.0
Thread model: posix
with -std=c++0x -stdlib=libc++
----------------------------------------------------
sections without tests : 1
sections with failures : 17
sections without failures: 1046
+ ----
total number of sections : 1064
----------------------------------------------------
number of tests failed : 71
number of tests passed : 4253
+ ----
total number of tests : 4324
****************************************************
The remaining failures on FreeBSD are:
- 27 caused by clang not fully supporting the atomic operations yet
- 3 caused by clang not fully supporting the C++11 type-trait intrinsics
- 20 that I don't think are real failures - they're caused by the VM where I'm running the tests not having sufficiently fine-grained time reporting for the thread operation timeout tests to work properly
- 1 is caused by FreeBSD lacking the C1x quick_exit() APIs.
- 2 caused by FreeBSD lacking the uchar.h header
The first 30 of these should be fixed in clang soon. The next 20 are probably not real bugs at all. The remaining 3 are fairly minor.
David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xlocale.diff
Type: application/octet-stream
Size: 327527 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20110921/ef9d8701/xlocale-0001.obj
More information about the freebsd-hackers
mailing list