Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jun 2019 18:16:59 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r348936 - in vendor/compiler-rt/dist-release_80: cmake lib/sanitizer_common lib/xray/tests test/builtins/Unit
Message-ID:  <201906111816.x5BIGxc2037478@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Tue Jun 11 18:16:59 2019
New Revision: 348936
URL: https://svnweb.freebsd.org/changeset/base/348936

Log:
  Vendor import of compiler-rt release_80 branch r363030:
  https://llvm.org/svn/llvm-project/compiler-rt/branches/release_80@363030

Modified:
  vendor/compiler-rt/dist-release_80/cmake/base-config-ix.cmake
  vendor/compiler-rt/dist-release_80/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
  vendor/compiler-rt/dist-release_80/lib/xray/tests/CMakeLists.txt
  vendor/compiler-rt/dist-release_80/test/builtins/Unit/compiler_rt_logb_test.c

Modified: vendor/compiler-rt/dist-release_80/cmake/base-config-ix.cmake
==============================================================================
--- vendor/compiler-rt/dist-release_80/cmake/base-config-ix.cmake	Tue Jun 11 18:16:55 2019	(r348935)
+++ vendor/compiler-rt/dist-release_80/cmake/base-config-ix.cmake	Tue Jun 11 18:16:59 2019	(r348936)
@@ -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)

Modified: vendor/compiler-rt/dist-release_80/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
==============================================================================
--- vendor/compiler-rt/dist-release_80/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc	Tue Jun 11 18:16:55 2019	(r348935)
+++ vendor/compiler-rt/dist-release_80/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc	Tue Jun 11 18:16:59 2019	(r348936)
@@ -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>

Modified: vendor/compiler-rt/dist-release_80/lib/xray/tests/CMakeLists.txt
==============================================================================
--- vendor/compiler-rt/dist-release_80/lib/xray/tests/CMakeLists.txt	Tue Jun 11 18:16:55 2019	(r348935)
+++ vendor/compiler-rt/dist-release_80/lib/xray/tests/CMakeLists.txt	Tue Jun 11 18:16:59 2019	(r348936)
@@ -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.
@@ -80,6 +79,8 @@ if (NOT APPLE)
   append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread XRAY_UNITTEST_LINK_FLAGS)
   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})

Modified: vendor/compiler-rt/dist-release_80/test/builtins/Unit/compiler_rt_logb_test.c
==============================================================================
--- vendor/compiler-rt/dist-release_80/test/builtins/Unit/compiler_rt_logb_test.c	Tue Jun 11 18:16:55 2019	(r348935)
+++ vendor/compiler-rt/dist-release_80/test/builtins/Unit/compiler_rt_logb_test.c	Tue Jun 11 18:16:59 2019	(r348936)
@@ -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;
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906111816.x5BIGxc2037478>