Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 70488 - prepstrip does not respect CTARGET
Summary: prepstrip does not respect CTARGET
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-08 11:18 UTC by David Bélanger
Modified: 2004-12-05 19:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Bélanger 2004-11-08 11:18:53 UTC
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.
Comment 1 SpanKY gentoo-dev 2004-11-09 21:35:39 UTC
order the variables should be checked in:
CHOST
CTARGET
CBUILD
Comment 2 solar (RETIRED) gentoo-dev 2004-11-09 21:50:13 UTC
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
Comment 3 David Bélanger 2004-11-10 15:55:22 UTC
"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
Comment 4 SpanKY gentoo-dev 2004-12-05 19:36:51 UTC
fixed in current cvs