summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-08-30 03:24:06 +0100
committerSam James <sam@gentoo.org>2021-08-30 03:25:15 +0100
commit0498c7f2801e67309d52220fe1492e37d9434df9 (patch)
treec615043c9688bd9d7ba3363e87bf8d8a48f6ef5b /sys-process
parentsys-apps/groff: fix build failure on musl (diff)
downloadgentoo-0498c7f2801e67309d52220fe1492e37d9434df9.tar.gz
gentoo-0498c7f2801e67309d52220fe1492e37d9434df9.tar.bz2
gentoo-0498c7f2801e67309d52220fe1492e37d9434df9.zip
sys-process/psmisc: add workaround for cross compiles
Force the value of the configure test given upstream neglect the result and it builds fine with it. The test is too aggressive in cross-compile situations and gives unreliable results. See also: https://lists.gnu.org/archive/html/autoconf/2011-04/msg00019.html Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/psmisc/psmisc-23.4-r1.ebuild12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys-process/psmisc/psmisc-23.4-r1.ebuild b/sys-process/psmisc/psmisc-23.4-r1.ebuild
index 513db3dbf38b..8f354d0fbc94 100644
--- a/sys-process/psmisc/psmisc-23.4-r1.ebuild
+++ b/sys-process/psmisc/psmisc-23.4-r1.ebuild
@@ -3,6 +3,8 @@
EAPI=7
+inherit toolchain-funcs
+
DESCRIPTION="A set of tools that use the proc filesystem"
HOMEPAGE="http://psmisc.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
@@ -28,6 +30,16 @@ PATCHES=(
)
src_configure() {
+ if tc-is-cross-compiler ; then
+ # This isn't ideal but upstream don't provide a placement
+ # when malloc is missing anyway, leading to errors like:
+ # pslog.c:(.text.startup+0x108): undefined reference to `rpl_malloc'
+ # See https://sourceforge.net/p/psmisc/bugs/71/
+ # (and https://lists.gnu.org/archive/html/autoconf/2011-04/msg00019.html)
+ export ac_cv_func_malloc_0_nonnull=yes \
+ ac_cv_func_realloc_0_nonnull=yes
+ fi
+
local myeconfargs=(
--disable-harden-flags
$(use_enable ipv6)