When using emerge for cross compiling portage uses the wrong strip when the package is installed. This renders any libs produced by the package unusable. Reproducible: Always Steps to Reproduce: 1. host system is i686-pc-linux-gnu 2. CHOST=sparc-unknown-linux-gnu ROOT=/tmp/cross emerge arch-sparc/glibc 3. Actual Results: In this case the resulting glibc is useless because portage uses the wrong strip. Expected Results: If the correct strip is used (sparc-unknown-linux-gnu-strip) the resulting glibc is fine. This is just an example, but is has been a problem with other libs I have cross compiled. I have placed CBUILD=i686-pc-linux-gnu in make.conf so it is always the correct value. To get the correct strip used I modifed /usr/lib/portage/bin/prepallstrip such that if $CBUILD != $CHOST it uses $CHOST-strip instead of strip.
Created attachment 9629 [details] uses the correct strip based on $CHOST This version of /usr/lib/portage/bin/prepstrip uses the correct strip if cross compiling.
Created attachment 9630 [details] uses the correct strip when cross compiling Give this another go. Just updated portage and lost my changes.
got carpaski to fix this today