Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 228907

Summary: sys-apps/portage-2.2_rc1 breaks CROSSCOMPILE_OPTS
Product: Portage Development Reporter: SpanKY <vapier>
Component: Core - Ebuild SupportAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 133327, 176467    
Bug Blocks:    

Description SpanKY gentoo-dev 2008-06-22 14:59:10 UTC
portage apparently is removing CROSSCOMPILE_OPTS from the environment thus breaking any cross-compiles of glibc

for example, adding this to any ebuild:
pkg_setup() { die $CROSSCOMPILE_OPTS ; }

and then emerging it by doing:
CROSSCOMPILE_OPTS="headers-only" emerge ...

shows that the variable is empty when it clearly should not be

the related command "use crosscompile_opts_headers-only" also fails
Comment 1 Zac Medico gentoo-dev 2008-06-22 18:05:23 UTC
The problem is that CROSSCOMPILE_OPTS is in USE_EXPAND yet glibc doesn't have crosscompile_opts_headers-only in IUSE. In order to stop CROSSCOMPILE_OPTS="headers-only" from being filtered, you can remove CROSSCOMPILE_OPTS from USE_EXPAND or else add crosscompile_opts_headers-only to IUSE.
Comment 2 SpanKY gentoo-dev 2008-06-22 19:33:50 UTC
it's not in IUSE on purpose: these are internal variables that the user should know nothing about
Comment 3 Zac Medico gentoo-dev 2008-06-22 20:59:30 UTC
It sounds like maybe CROSSCOMPILE_OPTS doesn't really fit well in USE_EXPAND then...
Comment 4 Zac Medico gentoo-dev 2008-06-22 21:13:16 UTC
If you really need to keep CROSSCOMPILE_OPTS in USE_EXPAND for some reason, you can just add the relevant flags to IUSE. Since CROSSCOMPILE is also in USE_EXPAND_HIDDEN, users won't see those flags in emerge output.
Comment 5 Zac Medico gentoo-dev 2008-06-22 21:34:00 UTC
If CROSSCOMPILE_OPTS must be in USE_EXPAND and you absolutely refuse to add the relevant flags to IUSE, we have another option. We can add an exemption for USE_EXPAND_HIDDEN variables that exempts them from the IUSE filtering behavior.
Comment 6 SpanKY gentoo-dev 2008-06-23 00:47:49 UTC
i didnt opt for the IUSE_EXPAND cruft, someone else did.  if adding the stuff to IUSE fixes things and it wont show up in -pv output, that's fine.  of course Bug 133327 still needs to be implemented, but until then ...

thanks for researching + fix