pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/llvm



Module Name:    pkgsrc
Committed By:   he
Date:           Sun Dec 26 21:52:11 UTC 2021

Modified Files:
        pkgsrc/lang/llvm: Makefile distinfo
        pkgsrc/lang/llvm/patches: patch-cmake_config-ix.cmake

Log Message:
Allow overriding the pthread library selection via
PKGSRC_LLVM_PTHREADLIB.  LLVM insists on 64-bit atomics, and
on NetBSD/powerpc we don't have that natively, so have to rely
on -latomic from gcc.  This library is linked with -lpthread, so
the cmake logic to detect whether -lpthread is included in the C
library says "yes", leading to later breakage when clang is being
built.  On NetBSD, set PKGSRC_LLVM_PTHREADLIB to -lpthread.

OK'ed by wiz@,
bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 pkgsrc/lang/llvm/Makefile
cvs rdiff -u -r1.32 -r1.33 pkgsrc/lang/llvm/distinfo
cvs rdiff -u -r1.5 -r1.6 pkgsrc/lang/llvm/patches/patch-cmake_config-ix.cmake

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/llvm/Makefile
diff -u pkgsrc/lang/llvm/Makefile:1.67 pkgsrc/lang/llvm/Makefile:1.68
--- pkgsrc/lang/llvm/Makefile:1.67      Wed Dec  8 16:05:21 2021
+++ pkgsrc/lang/llvm/Makefile   Sun Dec 26 21:52:11 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.67 2021/12/08 16:05:21 adam Exp $
+# $NetBSD: Makefile,v 1.68 2021/12/26 21:52:11 he Exp $
 #
 # when updating this, please also update:
 # devel/include-what-you-use
@@ -21,7 +21,7 @@
 # Always update all */buildlink3.mk to require the latest stable release
 # version in BUILDLINK_API_DEPENDS, as there is no backwards compatibility
 
-PKGREVISION= 1
+PKGREVISION= 2
 .include "version.mk"
 
 DISTNAME=      llvm-${LLVM_VERSION}.src
@@ -109,6 +109,10 @@ CFLAGS+=   -mlongcall
 CXXFLAGS+=     -mlongcall
 .endif
 
+.if ${OPSYS} == "NetBSD"
+CMAKE_ARGS+=   -DPKGSRC_LLVM_PTHREADLIB=-lpthread
+.endif
+
 .include "options.mk"
 
 # replacing config.guess is required even for cmake.

Index: pkgsrc/lang/llvm/distinfo
diff -u pkgsrc/lang/llvm/distinfo:1.32 pkgsrc/lang/llvm/distinfo:1.33
--- pkgsrc/lang/llvm/distinfo:1.32      Tue Nov 23 20:55:44 2021
+++ pkgsrc/lang/llvm/distinfo   Sun Dec 26 21:52:11 2021
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.32 2021/11/23 20:55:44 wiz Exp $
+$NetBSD: distinfo,v 1.33 2021/12/26 21:52:11 he Exp $
 
 BLAKE2s (llvm-13.0.0.src.tar.xz) = ffdfed33e870715f2e8c0efdc2c29566a2bffe5a6efce90ea7ca4990c9067f0f
 SHA512 (llvm-13.0.0.src.tar.xz) = c307500a5fdc2bf6d768a808cf879d33914e24437f4f794361eccedb28ac6a98ebc41ca6140d09364c9bdec565fabd049e364d3f5b39f1751ecff51b687c4eff
 Size (llvm-13.0.0.src.tar.xz) = 45471992 bytes
 SHA1 (patch-CMakeLists.txt) = 78e2dab2bf73f7e466ca2788fe6444e39b4ebd80
-SHA1 (patch-cmake_config-ix.cmake) = 0c89e208e9e101a6d80aaa5007126eefb0d3647c
+SHA1 (patch-cmake_config-ix.cmake) = 72d15d43d6d8eb3bd8b2c1ff7d416bd6b2421908
 SHA1 (patch-cmake_modules_AddLLVM.cmake) = 148897aeba8c29b9cf55eade62554710ae0f63f3
 SHA1 (patch-include_llvm-c_DataTypes.h) = 790c9458d6590a0d6985fdcbd8785da340b9779b
 SHA1 (patch-include_llvm_Analysis_ConstantFolding.h) = 56b9374da236c346565897977040255b9766cab8

Index: pkgsrc/lang/llvm/patches/patch-cmake_config-ix.cmake
diff -u pkgsrc/lang/llvm/patches/patch-cmake_config-ix.cmake:1.5 pkgsrc/lang/llvm/patches/patch-cmake_config-ix.cmake:1.6
--- pkgsrc/lang/llvm/patches/patch-cmake_config-ix.cmake:1.5    Mon Jul 12 18:41:02 2021
+++ pkgsrc/lang/llvm/patches/patch-cmake_config-ix.cmake        Sun Dec 26 21:52:11 2021
@@ -1,10 +1,24 @@
-$NetBSD: patch-cmake_config-ix.cmake,v 1.5 2021/07/12 18:41:02 adam Exp $
+$NetBSD: patch-cmake_config-ix.cmake,v 1.6 2021/12/26 21:52:11 he Exp $
 
 Do not generate invalid llvm-config in pkgsrc.
+Allow override of pthread library selection via PKGSRC_LLVM_PTHREADLIB.
 
 --- cmake/config-ix.cmake.orig 2021-04-06 16:38:18.000000000 +0000
 +++ cmake/config-ix.cmake
-@@ -175,7 +175,7 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memor
+@@ -113,7 +113,11 @@ if(HAVE_LIBPTHREAD)
+   set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
+   set(THREADS_HAVE_PTHREAD_ARG Off)
+   find_package(Threads REQUIRED)
+-  set(LLVM_PTHREAD_LIB ${CMAKE_THREAD_LIBS_INIT})
++  if(PKGSRC_LLVM_PTHREADLIB)
++    set(LLVM_PTHREAD_LIB ${PKGSRC_LLVM_PTHREADLIB})
++  else()
++    set(LLVM_PTHREAD_LIB ${CMAKE_THREAD_LIBS_INIT})
++  endif()
+ endif()
+ 
+ if(LLVM_ENABLE_ZLIB)
+@@ -176,7 +180,7 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memor
        set(MAYBE_REQUIRED)
      endif()
      if(LLVM_ENABLE_TERMINFO)



Home | Main Index | Thread Index | Old Index