pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc devel/boost-libs: Make fiber compiles on FreeBSD
details: https://anonhg.NetBSD.org/pkgsrc/rev/76ad97cc9106
branches: trunk
changeset: 379872:76ad97cc9106
user: minskim <minskim%pkgsrc.org@localhost>
date: Sun May 06 18:56:35 2018 +0000
description:
devel/boost-libs: Make fiber compiles on FreeBSD
https://github.com/boostorg/fiber/commit/225b0d75
diffstat:
devel/boost-libs/Makefile | 3 +-
meta-pkgs/boost/distinfo | 4 +-
meta-pkgs/boost/patches/patch-libs_fiber_src_numa_freebsd_pin__thread.cpp | 48 ++++++++++
3 files changed, 52 insertions(+), 3 deletions(-)
diffs (92 lines):
diff -r c3a42dfc30b5 -r 76ad97cc9106 devel/boost-libs/Makefile
--- a/devel/boost-libs/Makefile Sun May 06 18:46:48 2018 +0000
+++ b/devel/boost-libs/Makefile Sun May 06 18:56:35 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.67 2018/04/30 09:18:47 martin Exp $
+# $NetBSD: Makefile,v 1.68 2018/05/06 18:56:35 minskim Exp $
BOOST_PACKAGE= libs
BOOST_COMMENT= (binary libraries)
@@ -6,6 +6,7 @@
BOOST_INSTALL_LIBS= yes
.include "../../meta-pkgs/boost/Makefile.common"
+PKGREVISION= 1
INSTALLATION_DIRS+= lib
diff -r c3a42dfc30b5 -r 76ad97cc9106 meta-pkgs/boost/distinfo
--- a/meta-pkgs/boost/distinfo Sun May 06 18:46:48 2018 +0000
+++ b/meta-pkgs/boost/distinfo Sun May 06 18:56:35 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.118 2018/05/06 18:46:09 minskim Exp $
+$NetBSD: distinfo,v 1.119 2018/05/06 18:56:35 minskim Exp $
SHA1 (boost_1_67_0.tar.bz2) = 694ae3f4f899d1a80eb7a3b31b33be73c423c1ae
RMD160 (boost_1_67_0.tar.bz2) = d5bf97b8a953b87c08e367556856204a05346315
@@ -25,12 +25,12 @@
SHA1 (patch-boost_stacktrace_detail_frame__unwind.ipp) = 0b06b1a1b28decbe61a6f6891b91c6751ff647e1
SHA1 (patch-boost_stacktrace_detail_location__from__symbol.hpp) = 860bfd99ffce4f6462683fc344d43850632cb6c1
SHA1 (patch-boost_test_impl_execution__monitor.ipp) = 573e2c8a4575ce1fc50338ddff0968e1c3ed1a61
-SHA1 (patch-boost_wave_cpplexer_re2clex_cpp__re.hpp) = 3f8c14994e68b9aa0efbfc9153e20e9285938d2f
SHA1 (patch-boostcpp.jam) = f624d0bede17c61de9758033705eaff94d42775b
SHA1 (patch-libs_config_configure) = e2f204d4fa4f1bd9b4131d28f9be0a1ac22bf711
SHA1 (patch-libs_config_test_boost__no__range__based__for.ipp) = d9936c472fc2c696d86522b36eb12813ae91bee4
SHA1 (patch-libs_context_src_asm_jump_arm_aapcs_elf_gas.S) = 644ecdae0f72fc02a529cd432f9261fb31e9b4e3
SHA1 (patch-libs_context_src_asm_ontop_arm_aapcs_elf_gas.S) = 2ae88227308ee9332fb01ece870eb22fb8383756
SHA1 (patch-libs_fiber_build_Jamfile.v2) = 28c1aba2d074f2db7104e37cd900d33f5fcffb09
+SHA1 (patch-libs_fiber_src_numa_freebsd_pin__thread.cpp) = 0fbc6c9bcc17a4e042f3b62ca5fdf33f014cf773
SHA1 (patch-tools_build_src_engine_build.jam) = dc59422ade217aa49eb5d6928f02f7bc4734aa43
SHA1 (patch-tools_build_src_engine_build.sh) = ed5e29d049f04e8a1e055844e66c549e5cd4bb01
diff -r c3a42dfc30b5 -r 76ad97cc9106 meta-pkgs/boost/patches/patch-libs_fiber_src_numa_freebsd_pin__thread.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/meta-pkgs/boost/patches/patch-libs_fiber_src_numa_freebsd_pin__thread.cpp Sun May 06 18:56:35 2018 +0000
@@ -0,0 +1,48 @@
+$NetBSD: patch-libs_fiber_src_numa_freebsd_pin__thread.cpp,v 1.1 2018/05/06 18:56:35 minskim Exp $
+
+Use pthread_setaffinity_np() on FreeBSD.
+
+https://github.com/boostorg/fiber/commit/225b0d75
+
+--- libs/fiber/src/numa/freebsd/pin_thread.cpp.orig 2018-04-11 13:49:02.000000000 +0000
++++ libs/fiber/src/numa/freebsd/pin_thread.cpp
+@@ -7,10 +7,8 @@
+ #include "boost/fiber/numa/pin_thread.hpp"
+
+ extern "C" {
+-#include <errno.h>
+-#include <sys/param.h>
+-#include <sys/cpuset.h>
+-#include <sys/thread.h>
++#include <pthread.h>
++#include <pthread_np.h>
+ }
+
+ #include <system_error>
+@@ -25,18 +23,19 @@ namespace numa {
+
+ BOOST_FIBERS_DECL
+ void pin_thread( std::uint32_t cpuid) {
+- pin_thread( cpuid, ::thr_self() );
++ pin_thread( cpuid, ::pthread_self() );
+ }
+
+ BOOST_FIBERS_DECL
+ void pin_thread( std::uint32_t cpuid, std::thread::native_handle_type h) {
+- cpuset_t mask;
+- CPU_ZERO( & mask);
+- CPU_SET( cpuid, & mask);
+- if ( BOOST_UNLIKELY( 0 != ::cpuset_setaffinity( CPU_LEVEL_WHICH, CPU_WHICH_TID, h, sizeof( mask), & mask) ) ) {
++ cpuset_t set;
++ CPU_ZERO( & set);
++ CPU_SET( cpuid, & set);
++ int err = 0;
++ if ( BOOST_UNLIKELY( 0 != ( err = ::pthread_setaffinity_np( h, sizeof( set), & set) ) ) ) {
+ throw std::system_error(
+- std::error_code( errno, std::system_category() ),
+- "::cpuset_setaffinity() failed");
++ std::error_code( err, std::system_category() ),
++ "pthread_setaffinity_np() failed");
+ }
+ }
+
Home |
Main Index |
Thread Index |
Old Index