1 |
Hi James, |
2 |
|
3 |
Sorry that I have re-ordered your text. |
4 |
|
5 |
> A check was added to Portage to ensure this held. Myself, the |
6 |
> ChromiumOS team, and others have since been caught out by this check |
7 |
> when trying to bootstrap brand new systems from scratch. You cannot |
8 |
> bootstrap with no headers at all! The check will therefore be adjusted |
9 |
> to merely ensure that SYSROOT is / when ROOT is /. |
10 |
|
11 |
It is very encouraging to see contributions from the ChromiumOS team to |
12 |
Gentoo! |
13 |
|
14 |
> What if we want to bootstrap a brand new prefixed system using the |
15 |
> crossdev system as SYSROOT? This is the distinct SYSROOT case. The |
16 |
> problem is that there is no distinct variable for SYSROOT's prefix |
17 |
> and, as already stated, ESYSROOT is always ${SYSROOT}${EPREFIX}. We |
18 |
> therefore cannot do it! If the crossdev prefix is blank then ROOT's |
19 |
> must be blank too. |
20 |
|
21 |
My question: is there a case when both SYSROOT and ESYSROOT are needed? |
22 |
As far as I can see, SYSROOT is strictly build-time. Therefore setting |
23 |
SYSROOT=<crossdev toolchain path> would be enough for all. |
24 |
|
25 |
Why did ESYSROOT exist in the first place? Was it only for the sake of |
26 |
symmetry, or did I miss something? |
27 |
|
28 |
> It was originally envisaged (but not stated in PMS) that SYSROOT would |
29 |
> only ever need to equal / or ROOT as a distinct SYSROOT would have no |
30 |
> benefit. |
31 |
... |
32 |
> There were differing assumptions about how prefixes applied to the |
33 |
> above. EPREFIX is traditionally something the user sets so some |
34 |
> thought that it would be applied to SYSROOT, regardless of the |
35 |
> latter's value. In order to honor the rule about there being no |
36 |
> distinct SYSROOT, this would mean that if SYSROOT is / then EPREFIX |
37 |
> would have to match BROOT. |
38 |
... |
39 |
> I also never intended to have the aforementioned limitation where |
40 |
> EPREFIX must match BROOT when SYSROOT is /. These are both entirely |
41 |
> artificial restrictions. |
42 |
|
43 |
I agree. This is an artificial restrictions. |
44 |
|
45 |
> What about the cross-prefix case? Here, SYSROOT matches both / and |
46 |
> ROOT so which prefix do we choose? The bootstrap-prefix.sh script sets |
47 |
> flags to build against the target prefix so EPREFIX is used in this |
48 |
> case. This happens to fit the current definition of ESYSROOT anyway. |
49 |
|
50 |
In this bootstrap case, SYSROOT=EPREFIX would do. Again, no ESYSROOT is |
51 |
needed. |
52 |
|
53 |
|
54 |
In conclusion, IMHO, if SYSROOT can be overridden without restriction |
55 |
("distinct" in your email), we could cover all the use cases. |
56 |
|
57 |
Yours, |
58 |
Benda |