[PATCH] A couple minor changes to support sanitizers on FreeBSD 9.2
Viktor Kutuzov
vkutuzov at accesssoftek.com
Tue Mar 11 06:26:05 PDT 2014
asan_linux.cc changes moved to a separate diff:
http://llvm-reviews.chandlerc.com/D3039
Hi kcc, samsonov,
http://llvm-reviews.chandlerc.com/D3031
CHANGE SINCE LAST DIFF
http://llvm-reviews.chandlerc.com/D3031?vs=7708&id=7736#toc
Files:
lib/asan/tests/CMakeLists.txt
Index: lib/asan/tests/CMakeLists.txt
===================================================================
--- lib/asan/tests/CMakeLists.txt
+++ lib/asan/tests/CMakeLists.txt
@@ -34,6 +34,13 @@
-O2)
append_if(ASAN_UNITTEST_COMMON_CFLAGS COMPILER_RT_HAS_WNO_VARIADIC_MACROS_FLAG -Wno-variadic-macros)
+# System headers incorrectly define 'size_t' as 'unsigned long' on
+# x64 FreeBSD 9.2 whereas 'unsigned int' is expected.
+if(CMAKE_SYSTEM MATCHES "FreeBSD-9.2-RELEASE" AND
+ CMAKE_SIZEOF_VOID_P MATCHES "8")
+ list(APPEND ASAN_UNITTEST_COMMON_CFLAGS -D_SIZE_T_DECLARED)
+endif()
+
# Use -D instead of definitions to please custom compile command.
list(APPEND ASAN_UNITTEST_COMMON_CFLAGS
-DASAN_HAS_BLACKLIST=1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3031.2.patch
Type: text/x-patch
Size: 724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140311/d877bd19/attachment.bin>
More information about the llvm-commits
mailing list