Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/numactl/, sys-process/numactl/files/
Date: Mon, 05 Jul 2021 16:53:33
Message-Id: 1625504002.c5d15ae7a8562758324929aec51ee08c6c8b8ac5.marecki@gentoo
1 commit: c5d15ae7a8562758324929aec51ee08c6c8b8ac5
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 5 16:43:37 2021 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 5 16:53:22 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5d15ae7
7
8 sys-process/numactl: keyword 2.0.14 for ~riscv
9
10 Needed a backported upstream patch to link against libatomic
11 but with that in place, builds and installs just fine.
12
13 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
14
15 .../numactl/files/numactl-2.0.14-latomic.patch | 50 ++++++++++++++++++++++
16 sys-process/numactl/numactl-2.0.14.ebuild | 3 +-
17 2 files changed, 52 insertions(+), 1 deletion(-)
18
19 diff --git a/sys-process/numactl/files/numactl-2.0.14-latomic.patch b/sys-process/numactl/files/numactl-2.0.14-latomic.patch
20 new file mode 100644
21 index 00000000000..61655f40996
22 --- /dev/null
23 +++ b/sys-process/numactl/files/numactl-2.0.14-latomic.patch
24 @@ -0,0 +1,50 @@
25 +From e0de0d9e981ddb53bdeb4a4b9dc43046c9ff4ff9 Mon Sep 17 00:00:00 2001
26 +From: Fabrice Fontaine <fontaine.fabrice@×××××.com>
27 +Date: Thu, 6 May 2021 23:08:36 +0200
28 +Subject: [PATCH] link with -latomic if needed
29 +
30 +numactl unconditionally uses __atomic_fetch_and but some architectures
31 +(e.g. sparc) needs to link with -latomic to be able to use it. So check
32 +if -latomic is needed and update numa.pc accordingly
33 +
34 +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@×××××.com>
35 +---
36 + Makefile.am | 1 +
37 + configure.ac | 2 ++
38 + numa.pc.in | 1 +
39 + 3 files changed, 4 insertions(+)
40 +
41 +diff --git a/Makefile.am b/Makefile.am
42 +index 44d0d76..34f6815 100644
43 +--- a/Makefile.am
44 ++++ b/Makefile.am
45 +@@ -151,6 +151,7 @@ SED_PROCESS = \
46 + -e 's,@exec_prefix\@,$(exec_prefix),g' \
47 + -e 's,@libdir\@,$(libdir),g' \
48 + -e 's,@includedir\@,$(includedir),g' \
49 ++ -e 's,@LIBS\@,$(LIBS),g' \
50 + < $< > $@ || rm $@
51 +
52 + %.pc: %.pc.in Makefile
53 +diff --git a/configure.ac b/configure.ac
54 +index 659a765..e3b0eb3 100644
55 +--- a/configure.ac
56 ++++ b/configure.ac
57 +@@ -24,6 +24,8 @@ AM_CONDITIONAL([HAVE_TREE_VECTORIZE], [test x"${tree_vectorize}" = x"true"])
58 +
59 + AC_CONFIG_FILES([Makefile])
60 +
61 ++AC_SEARCH_LIBS([__atomic_fetch_and_1], [atomic])
62 ++
63 + # GCC tries to be "helpful" and only issue a warning for unrecognized
64 + # attributes. So we compile the test with Werror, so that if the
65 + # attribute is not recognized the compilation fails
66 +diff --git a/numa.pc.in b/numa.pc.in
67 +index 8a0f202..cc04d50 100644
68 +--- a/numa.pc.in
69 ++++ b/numa.pc.in
70 +@@ -8,3 +8,4 @@ Description: NUMA policy library
71 + Version: @VERSION@
72 + Cflags: -I${includedir}
73 + Libs: -L${libdir} -lnuma
74 ++Libs.Private: @LIBS@
75
76 diff --git a/sys-process/numactl/numactl-2.0.14.ebuild b/sys-process/numactl/numactl-2.0.14.ebuild
77 index 05dee9031d2..e6f89bb776d 100644
78 --- a/sys-process/numactl/numactl-2.0.14.ebuild
79 +++ b/sys-process/numactl/numactl-2.0.14.ebuild
80 @@ -13,7 +13,7 @@ if [[ "${PV}" == 9999 ]] ; then
81 else
82 SRC_URI="https://github.com/numactl/numactl/releases/download/v${PV}/${P}.tar.gz"
83 # ARM lacks the __NR_migrate_pages syscall.
84 - KEYWORDS="~alpha amd64 -arm arm64 ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux"
85 + KEYWORDS="~alpha amd64 -arm arm64 ~ia64 ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux"
86 fi
87
88 LICENSE="GPL-2"
89 @@ -21,6 +21,7 @@ SLOT="0"
90 IUSE="static-libs"
91
92 PATCHES=(
93 + "${FILESDIR}"/${PN}-2.0.14-latomic.patch
94 "${FILESDIR}"/${PN}-2.0.14-numademo-cflags.patch #540856
95 )