I commented some code in memset implementation to avoid infinite recursion and now pure clang/lld Haiku build is working fine:
extern "C" void*
memset(void* ptr, int chr, size_t length)
{
auto value = static_cast<unsigned char>(chr);
auto destination = static_cast<uint8_t*>(ptr);
/*
if (length < 32) {
memset_small(destination, value, length);
return ptr;
}
if (length < 2048) {
memset_sse(destination, value, length);
return ptr;
}
*/
memset_repstos(destination, value, length);
return ptr;
}
Trac ticket: #15827.