pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/llvm llvm: use posix_madvise(2) instead of madvis...
details: https://anonhg.NetBSD.org/pkgsrc/rev/6247edd53406
branches: trunk
changeset: 383197:6247edd53406
user: tnn <tnn%pkgsrc.org@localhost>
date: Sun Aug 14 20:22:44 2022 +0000
description:
llvm: use posix_madvise(2) instead of madvise(2)
diffstat:
lang/llvm/distinfo | 3 +-
lang/llvm/patches/patch-lib_Support_Unix_Path.inc | 27 +++++++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletions(-)
diffs (46 lines):
diff -r 93e1769affb7 -r 6247edd53406 lang/llvm/distinfo
--- a/lang/llvm/distinfo Sun Aug 14 19:54:31 2022 +0000
+++ b/lang/llvm/distinfo Sun Aug 14 20:22:44 2022 +0000
@@ -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_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
diff -r 93e1769affb7 -r 6247edd53406 lang/llvm/patches/patch-lib_Support_Unix_Path.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/llvm/patches/patch-lib_Support_Unix_Path.inc Sun Aug 14 20:22:44 2022 +0000
@@ -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