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:   tnn
Date:           Sun Aug 14 20:22:44 UTC 2022

Modified Files:
        pkgsrc/lang/llvm: distinfo
Added Files:
        pkgsrc/lang/llvm/patches: patch-lib_Support_Unix_Path.inc

Log Message:
llvm: use posix_madvise(2) instead of madvise(2)


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 pkgsrc/lang/llvm/distinfo
cvs rdiff -u -r0 -r1.3 \
    pkgsrc/lang/llvm/patches/patch-lib_Support_Unix_Path.inc

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/distinfo
diff -u pkgsrc/lang/llvm/distinfo:1.35 pkgsrc/lang/llvm/distinfo:1.36
--- pkgsrc/lang/llvm/distinfo:1.35      Fri Aug 12 08:37:58 2022
+++ pkgsrc/lang/llvm/distinfo   Sun Aug 14 20:22:44 2022
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.35 2022/08/12 08:37:58 pin Exp $
+$NetBSD: distinfo,v 1.36 2022/08/14 20:22:44 tnn Exp $
 
 BLAKE2s (llvm-14.0.6.src.tar.xz) = 2d44946453add45426569fd4187654f83881341c5c0109e4ffacc60e8f73af60
 SHA512 (llvm-14.0.6.src.tar.xz) = 6461bdde27aac17fa44c3e99a85ec47ffb181d0d4e5c3ef1c4286a59583e3b0c51af3c8081a300f45b99524340773a3011380059e3b3a571c3b0a8733e96fc1d
@@ -8,4 +8,5 @@ SHA1 (patch-cmake_config-ix.cmake) = bd4
 SHA1 (patch-cmake_modules_AddLLVM.cmake) = 148897aeba8c29b9cf55eade62554710ae0f63f3
 SHA1 (patch-include_llvm-c_DataTypes.h) = 790c9458d6590a0d6985fdcbd8785da340b9779b
 SHA1 (patch-include_llvm_Analysis_ConstantFolding.h) = 56b9374da236c346565897977040255b9766cab8
+SHA1 (patch-lib_Support_Unix_Path.inc) = 91a636abf719cf5693f3078e980fe34a381185a6
 SHA1 (patch-tools_llvm-shlib_CMakeLists.txt) = 97b9c7c3487989c2909dd0294a67a5328d9ef309

Added files:

Index: pkgsrc/lang/llvm/patches/patch-lib_Support_Unix_Path.inc
diff -u /dev/null pkgsrc/lang/llvm/patches/patch-lib_Support_Unix_Path.inc:1.3
--- /dev/null   Sun Aug 14 20:22:44 2022
+++ pkgsrc/lang/llvm/patches/patch-lib_Support_Unix_Path.inc    Sun Aug 14 20:22:44 2022
@@ -0,0 +1,27 @@
+$NetBSD: patch-lib_Support_Unix_Path.inc,v 1.3 2022/08/14 20:22:44 tnn Exp $
+
+Use posix_madvise(2) instead of madvise(2).
+Some operating systems (SmartOS) have a historical prototype
+for madvise(2) which has caddr_t as the first argument.
+Adapted from upstream b66b3247f598448aab50d8ae67729dd2312f3067.
+
+--- lib/Support/Unix/Path.inc.orig     2022-06-22 16:46:24.000000000 +0000
++++ lib/Support/Unix/Path.inc
+@@ -874,12 +874,14 @@ void mapped_file_region::unmapImpl() {
+ 
+ void mapped_file_region::dontNeedImpl() {
+   assert(Mode == mapped_file_region::readonly);
++  if (!Mapping)
++    return;
+ #if defined(__MVS__) || defined(_AIX)
+   // If we don't have madvise, or it isn't beneficial, treat this as a no-op.
+-  return;
++#elif defined(POSIX_MADV_DONTNEED)
++  ::posix_madvise(Mapping, Size, POSIX_MADV_DONTNEED);
+ #else
+-  if (Mapping)
+-    ::madvise(Mapping, Size, MADV_DONTNEED);
++  ::madvise(Mapping, Size, MADV_DONTNEED);
+ #endif
+ }
+ 



Home | Main Index | Thread Index | Old Index