[compiler-rt] r209804 - Fix building 32-bit common sanitizer tests on FreeBSD 9.2

Viktor Kutuzov vkutuzov at accesssoftek.com
Thu May 29 04:35:06 PDT 2014


Author: vkutuzov
Date: Thu May 29 06:35:05 2014
New Revision: 209804

URL: http://llvm.org/viewvc/llvm-project?rev=209804&view=rev
Log:
Fix building 32-bit common sanitizer tests on FreeBSD 9.2

Modified:
    compiler-rt/trunk/lib/sanitizer_common/tests/CMakeLists.txt

Modified: compiler-rt/trunk/lib/sanitizer_common/tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/CMakeLists.txt?rev=209804&r1=209803&r2=209804&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/CMakeLists.txt Thu May 29 06:35:05 2014
@@ -71,9 +71,10 @@ endif()
 
 append_if(COMPILER_RT_HAS_LIBDL -ldl SANITIZER_TEST_LINK_FLAGS_COMMON)
 append_if(COMPILER_RT_HAS_LIBPTHREAD -lpthread SANITIZER_TEST_LINK_FLAGS_COMMON)
-# x86_64 FreeBSD 9.2 additionally requires libc++ to build the tests.
+# x86_64 FreeBSD 9.2 additionally requires libc++ to build the tests. Also,
+# 'libm' shall be specified explicitly to build i386 tests.
 if(CMAKE_SYSTEM MATCHES "FreeBSD-9.2-RELEASE")
-  list(APPEND SANITIZER_TEST_LINK_FLAGS_COMMON "-lc++")
+  list(APPEND SANITIZER_TEST_LINK_FLAGS_COMMON "-lc++ -lm")
 endif()
 
 include_directories(..)





More information about the llvm-commits mailing list