summaryrefslogtreecommitdiff
path: root/lang/llvm
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2017-05-05 18:12:24 +0000
committerjoerg <joerg@pkgsrc.org>2017-05-05 18:12:24 +0000
commit5b38e2adbb01d9e7001015f023e373d1b0751e76 (patch)
tree9ee4549b82547e27202f767c762acb3f9b88e09c /lang/llvm
parent69edec7c1c9eb9aa0fb950a73d7ab087a15bd976 (diff)
downloadpkgsrc-5b38e2adbb01d9e7001015f023e373d1b0751e76.tar.gz
Don't explicit disable tests. Merge two upstream patches for fixing
build and runtime errors in the test suite on NetBSD.
Diffstat (limited to 'lang/llvm')
-rw-r--r--lang/llvm/Makefile3
-rw-r--r--lang/llvm/distinfo5
-rw-r--r--lang/llvm/patches/patch-lib_Support_Unix_Path.inc26
-rw-r--r--lang/llvm/patches/patch-utils_unittest_googletest_include_gtest_internal_gtest-port-arch.h15
-rw-r--r--lang/llvm/patches/patch-utils_unittest_googletest_include_gtest_internal_gtest-port.h15
5 files changed, 61 insertions, 3 deletions
diff --git a/lang/llvm/Makefile b/lang/llvm/Makefile
index 7c787319729..6cae78aa6a5 100644
--- a/lang/llvm/Makefile
+++ b/lang/llvm/Makefile
@@ -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
diff --git a/lang/llvm/distinfo b/lang/llvm/distinfo
index e032ea5e9c9..a1caa6f05d5 100644
--- a/lang/llvm/distinfo
+++ b/lang/llvm/distinfo
@@ -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
diff --git a/lang/llvm/patches/patch-lib_Support_Unix_Path.inc b/lang/llvm/patches/patch-lib_Support_Unix_Path.inc
new file mode 100644
index 00000000000..51ee03f60e8
--- /dev/null
+++ b/lang/llvm/patches/patch-lib_Support_Unix_Path.inc
@@ -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();
+ }
diff --git a/lang/llvm/patches/patch-utils_unittest_googletest_include_gtest_internal_gtest-port-arch.h b/lang/llvm/patches/patch-utils_unittest_googletest_include_gtest_internal_gtest-port-arch.h
new file mode 100644
index 00000000000..c6d6d3601da
--- /dev/null
+++ b/lang/llvm/patches/patch-utils_unittest_googletest_include_gtest_internal_gtest-port-arch.h
@@ -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__
diff --git a/lang/llvm/patches/patch-utils_unittest_googletest_include_gtest_internal_gtest-port.h b/lang/llvm/patches/patch-utils_unittest_googletest_include_gtest_internal_gtest-port.h
new file mode 100644
index 00000000000..26b4d3d8881
--- /dev/null
+++ b/lang/llvm/patches/patch-utils_unittest_googletest_include_gtest_internal_gtest-port.h
@@ -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
+