pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/llvm Omit check for native 8-byte atomics, platfo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ca3b5bd6a115
branches:  trunk
changeset: 378104:ca3b5bd6a115
user:      he <he%pkgsrc.org@localhost>
date:      Sat Mar 31 15:13:28 2018 +0000

description:
Omit check for native 8-byte atomics, platform may not have them,
and they are actually not required here.  Makes powerpc build llvm.
OK'ed by joerg@.
Bump PKGREVISION.

diffstat:

 lang/llvm/Makefile                                      |   4 +-
 lang/llvm/distinfo                                      |   3 +-
 lang/llvm/patches/patch-cmake_modules_CheckAtomic.cmake |  38 +++++++++++++++++
 3 files changed, 42 insertions(+), 3 deletions(-)

diffs (77 lines):

diff -r acaeb50933df -r ca3b5bd6a115 lang/llvm/Makefile
--- a/lang/llvm/Makefile        Sat Mar 31 11:33:52 2018 +0000
+++ b/lang/llvm/Makefile        Sat Mar 31 15:13:28 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2018/03/04 01:49:21 gdt Exp $
+# $NetBSD: Makefile,v 1.30 2018/03/31 15:13:28 he Exp $
 #
 # when updating this, please also update:
 # devel/include-what-you-use
@@ -18,7 +18,7 @@
 
 DISTNAME=      llvm-5.0.1.src
 PKGNAME=       ${DISTNAME:S/.src//}
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    lang devel
 MASTER_SITES=  http://llvm.org/releases/${PKGVERSION_NOREV}/
 EXTRACT_SUFX=  .tar.xz
diff -r acaeb50933df -r ca3b5bd6a115 lang/llvm/distinfo
--- a/lang/llvm/distinfo        Sat Mar 31 11:33:52 2018 +0000
+++ b/lang/llvm/distinfo        Sat Mar 31 15:13:28 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2018/01/08 10:48:34 jperkin Exp $
+$NetBSD: distinfo,v 1.14 2018/03/31 15:13:28 he Exp $
 
 SHA1 (llvm-5.0.1.src.tar.xz) = 43d3659f8a3cef43e7435a3a874b0711f5888052
 RMD160 (llvm-5.0.1.src.tar.xz) = 3d17de87813313b6eac5b5dc8592f676c5cee561
@@ -7,6 +7,7 @@
 SHA1 (patch-CMakeLists.txt) = 78e2dab2bf73f7e466ca2788fe6444e39b4ebd80
 SHA1 (patch-cmake_config-ix.cmake) = 4675b1dfca3850dbed6c494bf6a8f6fc6d500c20
 SHA1 (patch-cmake_modules_AddLLVM.cmake) = 4bfb98c5d99797155d0fb13a43352d31f6cfe783
+SHA1 (patch-cmake_modules_CheckAtomic.cmake) = 51e4fdf3bc24b50fc4d4bfa1ec5ba6c82ef946b4
 SHA1 (patch-cmake_modules_HandleLLVMOptions.cmake) = 271e6f5a8cebf8162c4e3b758e96f451b434269b
 SHA1 (patch-include_llvm_Support_DataTypes.h.cmake) = 18ebb1fcd2499d1216d5c3afe0bbb55fe63fe3ef
 SHA1 (patch-tools_llvm-shlib_CMakeLists.txt) = 70d8f320f217d99e6f991709a080450bc05631cd
diff -r acaeb50933df -r ca3b5bd6a115 lang/llvm/patches/patch-cmake_modules_CheckAtomic.cmake
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/llvm/patches/patch-cmake_modules_CheckAtomic.cmake   Sat Mar 31 15:13:28 2018 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-cmake_modules_CheckAtomic.cmake,v 1.1 2018/03/31 15:13:28 he Exp $
+
+Omit check for native 8-byte atomics, platform may not have them,
+and they are actually not required here.  Makes powerpc build llvm.
+
+--- cmake/modules/CheckAtomic.cmake.orig       2016-06-23 06:39:35.000000000 +0000
++++ cmake/modules/CheckAtomic.cmake
+@@ -62,18 +62,18 @@ else()
+ endif()
+ 
+ # If not, check if the library exists, and atomics work with it.
+-if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
+-  check_library_exists(atomic __atomic_load_8 "" HAVE_CXX_LIBATOMICS64)
+-  if(HAVE_CXX_LIBATOMICS64)
+-    list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
+-    check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITH_LIB)
+-    if (NOT HAVE_CXX_ATOMICS64_WITH_LIB)
+-      message(FATAL_ERROR "Host compiler must support std::atomic!")
+-    endif()
+-  else()
+-    message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
+-  endif()
+-endif()
++#if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
++#  check_library_exists(atomic __atomic_load_8 "" HAVE_CXX_LIBATOMICS64)
++#  if(HAVE_CXX_LIBATOMICS64)
++#    list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
++#    check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITH_LIB)
++#    if (NOT HAVE_CXX_ATOMICS64_WITH_LIB)
++#      message(FATAL_ERROR "Host compiler must support std::atomic!")
++#    endif()
++#  else()
++#    message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
++#  endif()
++#endif()
+ 
+ ## TODO: This define is only used for the legacy atomic operations in
+ ## llvm's Atomic.h, which should be replaced.  Other code simply



Home | Main Index | Thread Index | Old Index