commit:     ace109502422577c5c773346a9753566a52ad721
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 10 10:40:07 2022 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Apr 10 10:40:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ace10950

sys-libs/binutils-libs-2.38-r1: fix compilation on Darwin

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 sys-libs/binutils-libs/binutils-libs-2.38-r1.ebuild | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sys-libs/binutils-libs/binutils-libs-2.38-r1.ebuild 
b/sys-libs/binutils-libs/binutils-libs-2.38-r1.ebuild
index 00524e029d8b..e4d12985ba3a 100644
--- a/sys-libs/binutils-libs/binutils-libs-2.38-r1.ebuild
+++ b/sys-libs/binutils-libs/binutils-libs-2.38-r1.ebuild
@@ -46,6 +46,15 @@ src_prepare() {
        # Fix cross-compile relinking issue, bug #626402
        elibtoolize
 
+       if [[ ${CHOST} == *-darwin* ]] ; then
+               # somehow libtool/configure is messed up and (custom patch at
+               # upstream?) and misdetects (basically assumes) nm can be called
+               # with -B arg -- can't run eautoreconf (fails), so patch up
+               # manually, this would break any target that needs -B to nm
+               sed -i -e 's/lt_cv_path_NM="$tmp_nm 
-B"/lt_cv_path_NM="$tmp_nm"/' \
+                       libctf/configure || die
+       fi
+
        default
 }
 

Reply via email to