From gentoo-dev Sat Sep 22 18:35:52 2012 From: Zac Medico Date: Sat, 22 Sep 2012 18:35:52 +0000 To: gentoo-dev Subject: Re: [gentoo-dev] RFC: method of checking for cross compilation from ebuild functions Message-Id: <505E0508.1050901 () gentoo ! org> X-MARC-Message: https://marc.info/?l=gentoo-dev&m=134833901330200 On 09/22/2012 10:14 AM, Ambroz Bizjak wrote: > Yes, sysroot is much better, thanks :) > > So, does anyone have any objections to just having a sysroot condition > and no --crosscompile or FEATURES=crosscompile? > > Essentially, there's still tc-is-cross-compiler, if you want the real > cross-compile semantic, and sysroot conditional dependencies cover any > host programs you may need within a tc-is-cross-compiler block, even > though it may occasionally install stuff that is not used. But I think > it's worth the reduction of complexity. (yes, tc-is-cross-compiler > doesn't work at install time, but from my experience you really want > the sysroot semantic there, which is available via use sysroot) > > If all is well, I'll proceed to implement this. Sounds good to me. Concerning IUSE, there are a few of different ways we could handle this: 1) ebuilds that utilize this flag will simply add it to IUSE 2) We set USE_IMPLICIT="sysroot" in profiles/base/make.defaults (applies to EAPI 5 and later) 3) We define our HDEPEND EAPI such that "sysroot" is automatically considered to be an implicit member of IUSE You have to pick one of these, since otherwise USE conditionals involving this flag will be considered as invalid. Maybe option #1 is best, since that will make it easy to identify ebuilds that are known to support sysroot (as long as you add "sysroot" to that _feature_flags variable that I've mentioned before, it will be exempt from emerge --newuse). -- Thanks, Zac