Currently in the glibc ebuilds there is # Avoid stripping binaries not targeted by ${CHOST}. Or else # ${CHOST}-strip would break binaries build for ${CTARGET}. is_crosscompile && dostrip -x / which avoids the stripping phase when cross-compiling (CHOST != CTARGET), since the $CHOST-strip tool doesn't understand the CTARGET object files when multitarget is not enabled: see 697428 for the details. However, I'm using llvm-strip for the stripping, which doesn't have the mentioned problem, and I would like to have the stripping of the object files occur. My solution is to change the above line for [[ "$STRIP" != "llvm-strip" ]] && is_crosscompile && dostrip -x / Is this solution reasonable (for a PR), or is some other way preferred? Thanks.
I think it sounds reasonable. It might be nice if we checked whether `strip` is capable of it (so we handle the multitarget case) as well.
(In reply to Sergio Gomez from comment #0) > Is this solution reasonable (for a PR), or is some other way preferred? > > Thanks. A PR is good. If you can, please see about some portable-ish solution where we can make it work for binutils[multitarget] too. But I don't insist.
(In reply to Sam James from comment #2) > (In reply to Sergio Gomez from comment #0) > > Is this solution reasonable (for a PR), or is some other way preferred? > > > > Thanks. > > A PR is good. If you can, please see about some portable-ish solution where > we can make it work for binutils[multitarget] too. But I don't insist. Thanks. Not sure I understand. AFAIU binutils[multitarget] doesn't have any stripping issues when CHOST != CTARGET (precisely in virtue of its 'multitarget' FEATURE)?