From gentoo-dev Sat Sep 22 17:14:17 2012 From: Ambroz Bizjak Date: Sat, 22 Sep 2012 17:14:17 +0000 To: gentoo-dev Subject: Re: [gentoo-dev] RFC: method of checking for cross compilation from ebuild functions Message-Id: X-MARC-Message: https://marc.info/?l=gentoo-dev&m=134833415429044 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. On Sat, Sep 22, 2012 at 7:01 PM, Zac Medico wrote: > On 09/22/2012 09:48 AM, Ambroz Bizjak wrote: >> Zac, I think you misunderstood me here. Crosscompile-only HDEPEND is >> definitely necessary, I've seen many packages need this. But what I'm >> suggesting is that we also, and maybe only, need "ROOT != /" - only >> HDEPEND dependencies. This means that the dependency would only be >> required if the package is being built for a ROOT that is not /. The >> idea is to eliminate the strange case that is ROOT!=/ but FEATURES has >> no crosscompile. If the package requires tools that it would build >> itself if ROOT was /, it will use the host's version of the tool >> whenever ROOT!=/ It wouldn't have to worry about whether the tools it >> builds link to libraries in ROOT. >> >> So my proposal is basically, instead of: >> HDEPEND="crosscompile? ( ~${CATEGORY}/${P} ) (yes, that seems to be >> the most common case) >> >> there would also, and maybe only, be: >> HDEPEND="root_not_slash? ( ~${CATEGORY}/${P} )" >> >> root_not_slash (or another name) would essentially be a superset of >> crosscompile, since crosscompile implies ROOT!=/. > > Maybe call it "sysroot" instead of root_not_slash, since gcc and other > tools seem to refer to it as sysroot. > -- > Thanks, > Zac