From 0aa0e33e37fab8d5b9d6ac4a31b59fc5a8944df6 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 9 Feb 2020 19:36:07 +0100 Subject: [PATCH] mpir: fix build on ppc64, fix runtime on ppc32 --- srcpkgs/mpir/template | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/srcpkgs/mpir/template b/srcpkgs/mpir/template index a910214fc3a..dc8240f4924 100644 --- a/srcpkgs/mpir/template +++ b/srcpkgs/mpir/template @@ -12,6 +12,19 @@ homepage="http://mpir.org" distfiles="${homepage}/mpir-${version}.tar.bz2" checksum=52f63459cf3f9478859de29e00357f004050ead70b45913f2c2269d9708675bb +# prevent elfv1 asm code from being used (fails to link) +# and on ppc32, avoid textrels (assembly code is used) +case "$XBPS_TARGET_MACHINE" in + ppc64*) + export ABI=mode64 + export MPN_PATH=generic + ;; + ppc*) + nopie=yes + CFLAGS="-fPIC" + ;; +esac + mpir-devel_package() { short_desc+=" - development files" depends="${sourcepkg}>=${version}_${revision}"