Don't explicit disable tests. Merge two upstream patches for fixing build and runtime errors in the test suite on NetBSD.diff -r1.19 -r1.20 pkgsrc/lang/llvm/Makefile
(joerg)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.19 2017/05/03 08:38:43 jperkin Exp $ | 1 | # $NetBSD: Makefile,v 1.20 2017/05/05 18:12:24 joerg Exp $ | |
2 | # | 2 | # | |
3 | # when updating this, please also update: | 3 | # when updating this, please also update: | |
4 | # devel/include-what-you-use | 4 | # devel/include-what-you-use | |
5 | # devel/lldb | 5 | # devel/lldb | |
6 | # devel/polly | 6 | # devel/polly | |
7 | # lang/clang | 7 | # lang/clang | |
8 | # lang/clang-static-analyzer | 8 | # lang/clang-static-analyzer | |
9 | # lang/libLLVM | 9 | # lang/libLLVM | |
10 | # lang/libunwind | 10 | # lang/libunwind | |
11 | 11 | |||
12 | DISTNAME= llvm-4.0.0.src | 12 | DISTNAME= llvm-4.0.0.src | |
13 | PKGNAME= ${DISTNAME:S/.src//} | 13 | PKGNAME= ${DISTNAME:S/.src//} | |
14 | PKGREVISION= 1 | 14 | PKGREVISION= 1 | |
@@ -24,27 +24,26 @@ LICENSE= modified-bsd | @@ -24,27 +24,26 @@ LICENSE= modified-bsd | |||
24 | USE_LANGUAGES= c c++11 | 24 | USE_LANGUAGES= c c++11 | |
25 | USE_CMAKE= yes | 25 | USE_CMAKE= yes | |
26 | GCC_REQD+= 4.8 | 26 | GCC_REQD+= 4.8 | |
27 | PYTHON_FOR_BUILD_ONLY= yes | 27 | PYTHON_FOR_BUILD_ONLY= yes | |
28 | 28 | |||
29 | CONFIGURE_DIRS= ${WRKDIR}/build | 29 | CONFIGURE_DIRS= ${WRKDIR}/build | |
30 | CMAKE_ARG_PATH= ${WRKSRC} | 30 | CMAKE_ARG_PATH= ${WRKSRC} | |
31 | 31 | |||
32 | CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release | 32 | CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release | |
33 | CMAKE_ARGS+= -DCMAKE_C_COMPILER=gcc | 33 | CMAKE_ARGS+= -DCMAKE_C_COMPILER=gcc | |
34 | CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=g++ | 34 | CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=g++ | |
35 | CMAKE_ARGS+= -DCMAKE_CXX_LINK_FLAGS=${LDFLAGS:Q} | 35 | CMAKE_ARGS+= -DCMAKE_CXX_LINK_FLAGS=${LDFLAGS:Q} | |
36 | CMAKE_ARGS+= -DLLVM_BUILD_LLVM_DYLIB=ON | 36 | CMAKE_ARGS+= -DLLVM_BUILD_LLVM_DYLIB=ON | |
37 | CMAKE_ARGS+= -DLLVM_INCLUDE_TESTS=OFF | |||
38 | CMAKE_ARGS+= -DLLVM_INSTALL_UTILS=ON | 37 | CMAKE_ARGS+= -DLLVM_INSTALL_UTILS=ON | |
39 | CMAKE_ARGS+= -DLLVM_LINK_LLVM_DYLIB=ON | 38 | CMAKE_ARGS+= -DLLVM_LINK_LLVM_DYLIB=ON | |
40 | 39 | |||
41 | CMAKE_ARGS.Darwin+= -DCMAKE_LIBTOOL=/usr/bin/libtool | 40 | CMAKE_ARGS.Darwin+= -DCMAKE_LIBTOOL=/usr/bin/libtool | |
42 | 41 | |||
43 | CHECK_PORTABILITY_SKIP= utils/buildit/build_llvm | 42 | CHECK_PORTABILITY_SKIP= utils/buildit/build_llvm | |
44 | 43 | |||
45 | # XXX perl is not added as a tool as it does not seem to be required | 44 | # XXX perl is not added as a tool as it does not seem to be required | |
46 | REPLACE_PERL+= utils/GenLibDeps.pl | 45 | REPLACE_PERL+= utils/GenLibDeps.pl | |
47 | REPLACE_PERL+= utils/UpdateCMakeLists.pl | 46 | REPLACE_PERL+= utils/UpdateCMakeLists.pl | |
48 | REPLACE_PERL+= utils/codegen-diff | 47 | REPLACE_PERL+= utils/codegen-diff | |
49 | REPLACE_PERL+= utils/findsym.pl | 48 | REPLACE_PERL+= utils/findsym.pl | |
50 | REPLACE_PERL+= utils/llvm-native-gxx | 49 | REPLACE_PERL+= utils/llvm-native-gxx |
@@ -1,10 +1,13 @@ | @@ -1,10 +1,13 @@ | |||
1 | $NetBSD: distinfo,v 1.7 2017/03/19 19:01:48 adam Exp $ | 1 | $NetBSD: distinfo,v 1.8 2017/05/05 18:12:24 joerg Exp $ | |
2 | 2 | |||
3 | SHA1 (llvm-4.0.0.src.tar.xz) = aee4524e2407f9fe5afc6f70c753180b907011d0 | 3 | SHA1 (llvm-4.0.0.src.tar.xz) = aee4524e2407f9fe5afc6f70c753180b907011d0 | |
4 | RMD160 (llvm-4.0.0.src.tar.xz) = 468ae2502ba523b35c5e8340724ddaa50b31ccb5 | 4 | RMD160 (llvm-4.0.0.src.tar.xz) = 468ae2502ba523b35c5e8340724ddaa50b31ccb5 | |
5 | SHA512 (llvm-4.0.0.src.tar.xz) = cf681f0626ef6d568d951cdc3e143471a1d7715a0ba11e52aa273cf5d8d421e1357ef2645cc85879eaefcd577e99e74d07b01566825b3d0461171ef2cbfc7704 | 5 | SHA512 (llvm-4.0.0.src.tar.xz) = cf681f0626ef6d568d951cdc3e143471a1d7715a0ba11e52aa273cf5d8d421e1357ef2645cc85879eaefcd577e99e74d07b01566825b3d0461171ef2cbfc7704 | |
6 | Size (llvm-4.0.0.src.tar.xz) = 21016340 bytes | 6 | Size (llvm-4.0.0.src.tar.xz) = 21016340 bytes | |
7 | SHA1 (patch-cmake_modules_AddLLVM.cmake) = 4bfb98c5d99797155d0fb13a43352d31f6cfe783 | 7 | SHA1 (patch-cmake_modules_AddLLVM.cmake) = 4bfb98c5d99797155d0fb13a43352d31f6cfe783 | |
8 | SHA1 (patch-cmake_modules_HandleLLVMOptions.cmake) = 271e6f5a8cebf8162c4e3b758e96f451b434269b | 8 | SHA1 (patch-cmake_modules_HandleLLVMOptions.cmake) = 271e6f5a8cebf8162c4e3b758e96f451b434269b | |
9 | SHA1 (patch-include_llvm_Support_Host.h) = a4e19a72714084b211b0182c04ccc51bd606e150 | 9 | SHA1 (patch-include_llvm_Support_Host.h) = a4e19a72714084b211b0182c04ccc51bd606e150 | |
10 | SHA1 (patch-lib_Support_Unix_Path.inc) = 08db2e5a098e6450652ca4b239c677716ba9f69f | |||
10 | SHA1 (patch-tools_llvm-shlib_CMakeLists.txt) = 18e6ec7b8895e55ecdf93c9d4781e92052a6fcb1 | 11 | SHA1 (patch-tools_llvm-shlib_CMakeLists.txt) = 18e6ec7b8895e55ecdf93c9d4781e92052a6fcb1 | |
12 | SHA1 (patch-utils_unittest_googletest_include_gtest_internal_gtest-port-arch.h) = 973941b2180dde3b0c6362bba3a472951b7a5a49 | |||
13 | SHA1 (patch-utils_unittest_googletest_include_gtest_internal_gtest-port.h) = 8a39fa48a44cb1f7e6bd555670089a44b4bee9a1 |
$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();
}
$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__
$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