Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o, Ambroz Bizjak <ambrop7@×××××.com>
Subject: Re: [gentoo-dev] RFC: method of checking for cross compilation from ebuild functions
Date: Sat, 22 Sep 2012 17:02:43
Message-Id: 505DEEF6.3050307@gentoo.org
In Reply to: [gentoo-dev] RFC: method of checking for cross compilation from ebuild functions by Ambroz Bizjak
1 On 09/22/2012 09:48 AM, Ambroz Bizjak wrote:
2 > Zac, I think you misunderstood me here. Crosscompile-only HDEPEND is
3 > definitely necessary, I've seen many packages need this. But what I'm
4 > suggesting is that we also, and maybe only, need "ROOT != /" - only
5 > HDEPEND dependencies. This means that the dependency would only be
6 > required if the package is being built for a ROOT that is not /. The
7 > idea is to eliminate the strange case that is ROOT!=/ but FEATURES has
8 > no crosscompile. If the package requires tools that it would build
9 > itself if ROOT was /, it will use the host's version of the tool
10 > whenever ROOT!=/ It wouldn't have to worry about whether the tools it
11 > builds link to libraries in ROOT.
12 >
13 > So my proposal is basically, instead of:
14 > HDEPEND="crosscompile? ( ~${CATEGORY}/${P} ) (yes, that seems to be
15 > the most common case)
16 >
17 > there would also, and maybe only, be:
18 > HDEPEND="root_not_slash? ( ~${CATEGORY}/${P} )"
19 >
20 > root_not_slash (or another name) would essentially be a superset of
21 > crosscompile, since crosscompile implies ROOT!=/.
22
23 Maybe call it "sysroot" instead of root_not_slash, since gcc and other
24 tools seem to refer to it as sysroot.
25 --
26 Thanks,
27 Zac

Replies

Subject Author
Re: [gentoo-dev] RFC: method of checking for cross compilation from ebuild functions Ambroz Bizjak <ambrop7@×××××.com>