Hi, In portage bin/prepstrip, I see: if [ ! -z "${CBUILD}" ] && [ "${CBUILD}" != "${CHOST}" ]; then STRIP=${CHOST}-strip else STRIP=strip fi However, there is no similar provision for CTARGET. I modified glibc for cross-compilation. However, the native strip is used instead of the cross-compiler ${CTARGET}-strip. Thanks, David Reproducible: Always Steps to Reproduce: 1. 2. 3.
order the variables should be checked in: CHOST CTARGET CBUILD
David, what bug # include the support to allow glibc to cross compile using CTARGET? Perhaps our prepstrip could also respect a pre defined STRIP in the env while we are at it. sstrip is an example of a near drop in replacement for gnu-strip for ET_EXEC/ET_DYN elfs. I'd also suggest making use if something like STRIP_FLAGS="--strip-unneeded" and checking for that as well.. if [ "$STRIP" = "" ]; then ... fi [ "STRIP_FLAGS" = "" ] && STRIP_FLAGS="--strip-unneeded" ${STRIP} ${STRIP_FLAGS} filename
"David, what bug # include the support to allow glibc to cross compile using CTARGET?" None. There is some code in some ebuilds done by someone else for building a cross-compiler toolchain but it is incomplete and not currently not supported. That code relies on the CTARGET env var being set. I playing with it to simplify the installation of my ppc cross-compiler and with the hope that it could be completed/integrated later. I first thought that the strip issue could be fixed easily but it turns out for a gcc cross-compiler, some binaries/libs built are x86 and others are ppc... I guess having emerge respect a predefined strip variable will be an interesting option for the time being. I am not that familiar with CHOST, CTARGET, and CBUILD. Thanks, David
fixed in current cvs