aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-06-11 18:16:59 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-06-11 18:16:59 +0000
commit90579156da340660a42e22e794a3c03ac1b50112 (patch)
tree1483e6ba43e5be0f97505da31a50af0865ee16fe
parent70b4e3ee53373a02bcc9f6530a28537b6f2edeac (diff)
downloadsrc-vendor/compiler-rt-80.tar.gz
src-vendor/compiler-rt-80.zip
Notes
Notes: svn path=/vendor/compiler-rt/dist-release_80/; revision=348936 svn path=/vendor/compiler-rt/compiler-rt-release_801-r366581/; revision=350170; tag=vendor/compiler-rt/compiler-rt-release_801-r366581
-rw-r--r--cmake/base-config-ix.cmake4
-rw-r--r--lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc2
-rw-r--r--lib/xray/tests/CMakeLists.txt5
-rw-r--r--test/builtins/Unit/compiler_rt_logb_test.c7
4 files changed, 14 insertions, 4 deletions
diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
index 6684d7371d68..aeabf17653f5 100644
--- a/cmake/base-config-ix.cmake
+++ b/cmake/base-config-ix.cmake
@@ -195,10 +195,10 @@ macro(test_targets)
# clang's default CPU's. In the 64-bit case, we must also specify the ABI
# since the default ABI differs between gcc and clang.
# FIXME: Ideally, we would build the N32 library too.
- test_target_arch(mipsel "" "-mips32r2" "-mabi=32")
+ test_target_arch(mipsel "" "-mips32r2" "-mabi=32" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64")
test_target_arch(mips64el "" "-mips64r2" "-mabi=64")
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mips")
- test_target_arch(mips "" "-mips32r2" "-mabi=32")
+ test_target_arch(mips "" "-mips32r2" "-mabi=32" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64")
test_target_arch(mips64 "" "-mips64r2" "-mabi=64")
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "arm")
if(WIN32)
diff --git a/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc b/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
index c112e044b1d8..c32c80b3e48b 100644
--- a/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
+++ b/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
@@ -124,7 +124,9 @@
#include <dev/isa/isvio.h>
#include <dev/isa/wtreg.h>
#include <dev/iscsi/iscsi_ioctl.h>
+#if 0
#include <dev/nvmm/nvmm_ioctl.h>
+#endif
#include <dev/ofw/openfirmio.h>
#include <dev/pci/amrio.h>
#include <dev/pci/mlyreg.h>
diff --git a/lib/xray/tests/CMakeLists.txt b/lib/xray/tests/CMakeLists.txt
index deddc5101e76..145852904549 100644
--- a/lib/xray/tests/CMakeLists.txt
+++ b/lib/xray/tests/CMakeLists.txt
@@ -48,8 +48,7 @@ endfunction()
set(XRAY_TEST_ARCH ${XRAY_SUPPORTED_ARCH})
set(XRAY_UNITTEST_LINK_FLAGS
- ${CMAKE_THREAD_LIBS_INIT}
- -l${SANITIZER_CXX_ABI_LIBRARY})
+ ${CMAKE_THREAD_LIBS_INIT})
if (NOT APPLE)
# Needed by LLVMSupport.
@@ -81,6 +80,8 @@ if (NOT APPLE)
append_list_if(COMPILER_RT_HAS_LIBEXECINFO -lexecinfo XRAY_UNITTEST_LINK_FLAGS)
endif()
+list(APPEND XRAY_UNITTEST_LINK_FLAGS -l${SANITIZER_CXX_ABI_LIBRARY})
+
macro(add_xray_unittest testname)
cmake_parse_arguments(TEST "" "" "SOURCES;HEADERS" ${ARGN})
if(UNIX AND NOT APPLE)
diff --git a/test/builtins/Unit/compiler_rt_logb_test.c b/test/builtins/Unit/compiler_rt_logb_test.c
index 79676598089c..9625881316bb 100644
--- a/test/builtins/Unit/compiler_rt_logb_test.c
+++ b/test/builtins/Unit/compiler_rt_logb_test.c
@@ -37,6 +37,10 @@ double cases[] = {
};
int main() {
+ // Do not the run the compiler-rt logb test case if using GLIBC version
+ // < 2.23. Older versions might not compute to the same value as the
+ // compiler-rt value.
+#if !defined(__GLIBC__) || (defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 23))
const unsigned N = sizeof(cases) / sizeof(cases[0]);
unsigned i;
for (i = 0; i < N; ++i) {
@@ -58,6 +62,9 @@ int main() {
if (test__compiler_rt_logb(fromRep(signBit ^ x))) return 1;
x >>= 1;
}
+#else
+ printf("skipped\n");
+#endif
return 0;
}