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
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.
it's not in IUSE on purpose: these are internal variables that the user should know nothing about
It sounds like maybe CROSSCOMPILE_OPTS doesn't really fit well in USE_EXPAND then...
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.
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.
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