I see a couple of errors when building for arm-linux-gnueabi (host is x86_64 Ubuntu 12.04 LTS, host compiler is gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)):
- In file included from /home/max/workspace/downloads/gcc/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:164:0:
/home/max/workspace/downloads/gcc/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:253:72: error: size of array 'assertion_failed__1128' is negative
typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
^
/home/max/workspace/downloads/gcc/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:247:30: note: in expansion of macro 'IMPL_COMPILER_ASSERT'
#define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, LINE)
^
/home/max/workspace/downloads/gcc/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1249:3: note: in expansion of macro 'COMPILER_CHECK'
COMPILER_CHECK(sizeof(__sanitizer_##TYPE) == sizeof(TYPE)) ^
/home/max/workspace/downloads/gcc/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1128:1: note: in expansion of macro 'CHECK_TYPE_SIZE'
CHECK_TYPE_SIZE(XDR::xdr_ops);
^
make[4]: *** [sanitizer_platform_limits_posix.lo] Error 1
- /home/max/workspace/downloads/gcc/libsanitizer/sanitizer_common/sanitizer_atomic_clang_other.h:54:77: error: cast from type 'const volatile Type* {aka const volatile unsigned char*}' to type 'volatile Type* {aka volatile unsigned char*}' casts away qualifiers [-Werror=cast-qual] v = __sync_fetch_and_add((typename T::Type volatile*)&a->val_dont_use, 0);
Attached patch seems to help.
-Maxim
<= 80 chars