Don't explicit disable tests. Merge two upstream patches for fixing
build and runtime errors in the test suite on NetBSD.
This commit is contained in:
parent
cb9631de46
commit
7d8d4501c4
5 changed files with 61 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.19 2017/05/03 08:38:43 jperkin Exp $
|
||||
# $NetBSD: Makefile,v 1.20 2017/05/05 18:12:24 joerg Exp $
|
||||
#
|
||||
# when updating this, please also update:
|
||||
# devel/include-what-you-use
|
||||
|
@ -34,7 +34,6 @@ CMAKE_ARGS+= -DCMAKE_C_COMPILER=gcc
|
|||
CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=g++
|
||||
CMAKE_ARGS+= -DCMAKE_CXX_LINK_FLAGS=${LDFLAGS:Q}
|
||||
CMAKE_ARGS+= -DLLVM_BUILD_LLVM_DYLIB=ON
|
||||
CMAKE_ARGS+= -DLLVM_INCLUDE_TESTS=OFF
|
||||
CMAKE_ARGS+= -DLLVM_INSTALL_UTILS=ON
|
||||
CMAKE_ARGS+= -DLLVM_LINK_LLVM_DYLIB=ON
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.7 2017/03/19 19:01:48 adam Exp $
|
||||
$NetBSD: distinfo,v 1.8 2017/05/05 18:12:24 joerg Exp $
|
||||
|
||||
SHA1 (llvm-4.0.0.src.tar.xz) = aee4524e2407f9fe5afc6f70c753180b907011d0
|
||||
RMD160 (llvm-4.0.0.src.tar.xz) = 468ae2502ba523b35c5e8340724ddaa50b31ccb5
|
||||
|
@ -7,4 +7,7 @@ Size (llvm-4.0.0.src.tar.xz) = 21016340 bytes
|
|||
SHA1 (patch-cmake_modules_AddLLVM.cmake) = 4bfb98c5d99797155d0fb13a43352d31f6cfe783
|
||||
SHA1 (patch-cmake_modules_HandleLLVMOptions.cmake) = 271e6f5a8cebf8162c4e3b758e96f451b434269b
|
||||
SHA1 (patch-include_llvm_Support_Host.h) = a4e19a72714084b211b0182c04ccc51bd606e150
|
||||
SHA1 (patch-lib_Support_Unix_Path.inc) = 08db2e5a098e6450652ca4b239c677716ba9f69f
|
||||
SHA1 (patch-tools_llvm-shlib_CMakeLists.txt) = 18e6ec7b8895e55ecdf93c9d4781e92052a6fcb1
|
||||
SHA1 (patch-utils_unittest_googletest_include_gtest_internal_gtest-port-arch.h) = 973941b2180dde3b0c6362bba3a472951b7a5a49
|
||||
SHA1 (patch-utils_unittest_googletest_include_gtest_internal_gtest-port.h) = 8a39fa48a44cb1f7e6bd555670089a44b4bee9a1
|
||||
|
|
26
lang/llvm/patches/patch-lib_Support_Unix_Path.inc
Normal file
26
lang/llvm/patches/patch-lib_Support_Unix_Path.inc
Normal file
|
@ -0,0 +1,26 @@
|
|||
$NetBSD: patch-lib_Support_Unix_Path.inc,v 1.1 2017/05/05 18:12:24 joerg Exp $
|
||||
|
||||
SVN r302263
|
||||
|
||||
--- lib/Support/Unix/Path.inc.orig 2017-05-04 16:08:02.765430627 +0000
|
||||
+++ lib/Support/Unix/Path.inc
|
||||
@@ -342,14 +342,15 @@ std::error_code resize_file(int FD, uint
|
||||
#if defined(HAVE_POSIX_FALLOCATE)
|
||||
// If we have posix_fallocate use it. Unlike ftruncate it always allocates
|
||||
// space, so we get an error if the disk is full.
|
||||
- if (int Err = ::posix_fallocate(FD, 0, Size))
|
||||
- return std::error_code(Err, std::generic_category());
|
||||
-#else
|
||||
+ if (int Err = ::posix_fallocate(FD, 0, Size)) {
|
||||
+ if (Err != EOPNOTSUPP)
|
||||
+ return std::error_code(Err, std::generic_category());
|
||||
+ }
|
||||
+#endif
|
||||
// Use ftruncate as a fallback. It may or may not allocate space. At least on
|
||||
// OS X with HFS+ it does.
|
||||
if (::ftruncate(FD, Size) == -1)
|
||||
return std::error_code(errno, std::generic_category());
|
||||
-#endif
|
||||
|
||||
return std::error_code();
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
$NetBSD: patch-utils_unittest_googletest_include_gtest_internal_gtest-port-arch.h,v 1.1 2017/05/05 18:12:24 joerg Exp $
|
||||
|
||||
SVN r302264
|
||||
|
||||
--- utils/unittest/googletest/include/gtest/internal/gtest-port-arch.h.orig 2017-05-04 15:28:58.046689762 +0000
|
||||
+++ utils/unittest/googletest/include/gtest/internal/gtest-port-arch.h
|
||||
@@ -84,6 +84,8 @@
|
||||
# define GTEST_OS_HPUX 1
|
||||
#elif defined __native_client__
|
||||
# define GTEST_OS_NACL 1
|
||||
+#elif defined __NetBSD__
|
||||
+# define GTEST_OS_NETBSD 1
|
||||
#elif defined __OpenBSD__
|
||||
# define GTEST_OS_OPENBSD 1
|
||||
#elif defined __QNX__
|
|
@ -0,0 +1,15 @@
|
|||
$NetBSD: patch-utils_unittest_googletest_include_gtest_internal_gtest-port.h,v 1.1 2017/05/05 18:12:24 joerg Exp $
|
||||
|
||||
SVN r302264
|
||||
|
||||
--- utils/unittest/googletest/include/gtest/internal/gtest-port.h.orig 2017-05-04 15:26:03.505703113 +0000
|
||||
+++ utils/unittest/googletest/include/gtest/internal/gtest-port.h
|
||||
@@ -793,7 +793,7 @@ using ::std::tuple_size;
|
||||
(GTEST_OS_MAC && !GTEST_OS_IOS) || \
|
||||
(GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \
|
||||
GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \
|
||||
- GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD)
|
||||
+ GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD || GTEST_OS_NETBSD)
|
||||
# define GTEST_HAS_DEATH_TEST 1
|
||||
#endif
|
||||
|
Loading…
Reference in a new issue