summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorViktor Kutuzov <vkutuzov@accesssoftek.com>2014-05-29 11:35:05 +0000
committerViktor Kutuzov <vkutuzov@accesssoftek.com>2014-05-29 11:35:05 +0000
commit286f446d9cf948d10d140bd4012cd7771b36ab43 (patch)
tree3caf7fb7d0bbe83e8843badbbf80c1b1d4b81b2c /lib/sanitizer_common/tests/CMakeLists.txt
parent9b1bb454ce587598bcac0924018cad853b6e54a1 (diff)
downloadcompiler-rt-286f446d9cf948d10d140bd4012cd7771b36ab43.tar.gz
Fix building 32-bit common sanitizer tests on FreeBSD 9.2
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209804 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/tests/CMakeLists.txt')
-rw-r--r--lib/sanitizer_common/tests/CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sanitizer_common/tests/CMakeLists.txt b/lib/sanitizer_common/tests/CMakeLists.txt
index a374adbe7..3e868f5e7 100644
--- a/lib/sanitizer_common/tests/CMakeLists.txt
+++ b/lib/sanitizer_common/tests/CMakeLists.txt
@@ -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(..)