[LLVMdev] ASan unit test/libcxx build break

İsmail Dönmez ismail at donmez.ws
Mon May 13 02:03:40 PDT 2013


Hi,


On Mon, May 13, 2013 at 10:49 AM, Evgeniy Stepanov <
eugeni.stepanov at gmail.com> wrote:

> A recent change added defined(__linux__) condition to the code below.
> Now it says that on linux with --std=c++0x (or --std=c++11) the system
> stdlib.h header must define aligned_alloc(). Really?
>
> include/__config:
>
> #if ( defined(__FreeBSD__) || defined(__linux__) ) && (__ISO_C_VISIBLE
> >= 2011 || __cplusplus >= 201103L)
> #define _LIBCPP_HAS_QUICK_EXIT
> #define _LIBCPP_HAS_C11_FEATURES
> #endif
>
>
I added that line since libc on linux defines at_quick_exit.



>
> include/cstdlib:
>
> #include <__config>
> #include <stdlib.h>
> #ifdef _LIBCPP_HAS_C11_FEATURES
> using ::aligned_alloc;
> #endif


 And yes my stdlib.h has

/usr/include/stdlib.h:extern void *aligned_alloc (size_t __alignment,
size_t __size)

I am guessing you are running on this on an old system. My glibc version is
2.17

Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130513/dad2fbf7/attachment.html>


More information about the llvm-dev mailing list