1 |
commit: 0498c7f2801e67309d52220fe1492e37d9434df9 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 30 02:24:06 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 30 02:25:15 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0498c7f2 |
7 |
|
8 |
sys-process/psmisc: add workaround for cross compiles |
9 |
|
10 |
Force the value of the configure test given upstream |
11 |
neglect the result and it builds fine with it. The test |
12 |
is too aggressive in cross-compile situations and gives |
13 |
unreliable results. |
14 |
|
15 |
See also: https://lists.gnu.org/archive/html/autoconf/2011-04/msg00019.html |
16 |
|
17 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
18 |
|
19 |
sys-process/psmisc/psmisc-23.4-r1.ebuild | 12 ++++++++++++ |
20 |
1 file changed, 12 insertions(+) |
21 |
|
22 |
diff --git a/sys-process/psmisc/psmisc-23.4-r1.ebuild b/sys-process/psmisc/psmisc-23.4-r1.ebuild |
23 |
index 513db3dbf38..8f354d0fbc9 100644 |
24 |
--- a/sys-process/psmisc/psmisc-23.4-r1.ebuild |
25 |
+++ b/sys-process/psmisc/psmisc-23.4-r1.ebuild |
26 |
@@ -3,6 +3,8 @@ |
27 |
|
28 |
EAPI=7 |
29 |
|
30 |
+inherit toolchain-funcs |
31 |
+ |
32 |
DESCRIPTION="A set of tools that use the proc filesystem" |
33 |
HOMEPAGE="http://psmisc.sourceforge.net/" |
34 |
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz" |
35 |
@@ -28,6 +30,16 @@ PATCHES=( |
36 |
) |
37 |
|
38 |
src_configure() { |
39 |
+ if tc-is-cross-compiler ; then |
40 |
+ # This isn't ideal but upstream don't provide a placement |
41 |
+ # when malloc is missing anyway, leading to errors like: |
42 |
+ # pslog.c:(.text.startup+0x108): undefined reference to `rpl_malloc' |
43 |
+ # See https://sourceforge.net/p/psmisc/bugs/71/ |
44 |
+ # (and https://lists.gnu.org/archive/html/autoconf/2011-04/msg00019.html) |
45 |
+ export ac_cv_func_malloc_0_nonnull=yes \ |
46 |
+ ac_cv_func_realloc_0_nonnull=yes |
47 |
+ fi |
48 |
+ |
49 |
local myeconfargs=( |
50 |
--disable-harden-flags |
51 |
$(use_enable ipv6) |