1 |
>>>>> On Thu, 13 Jun 2019, James Le Cuirot wrote: |
2 |
|
3 |
> On Thu, 13 Jun 2019 12:30 +0100 |
4 |
> Ulrich Mueller <ulm@g.o> wrote in #gentoo-dev: |
5 |
|
6 |
>> <ulm> Chewi: tbh, I don't understand your update for ESYSROOT |
7 |
>> <ulm> SYSROOT is related to DEPEND/CHOST type dependencies |
8 |
>> <ulm> so why would you have ESYSROOT="/${BROOT}" if SYSROOT is equal to / ? |
9 |
>> <ulm> since BROOT is related to BDEPEND/CBUILD |
10 |
|
11 |
> I kind of see what you mean but I've been thinking of SYSROOT as being |
12 |
> more like a mechanism to choose between building against BROOT, EROOT |
13 |
> (previously the only two valid options), or some other unprefixed |
14 |
> location. There is no dedicated variable for SYSROOT's prefix so the |
15 |
> user cannot directly define it and it can therefore only be calculated |
16 |
> from BROOT when SYSROOT=/ or EROOT when SYSROOT=${ROOT}. |
17 |
|
18 |
>> <ulm> but if SYSROOT is blank, then ESYSROOT will be blank too, |
19 |
>> ignoring EPREFIX altogether? (or at least, that's how I read your |
20 |
>> patch) |
21 |
|
22 |
> What gave you that impression? The rule is that if the prefix cannot be |
23 |
> calculated because SYSROOT is neither / nor ROOT then we have to assume |
24 |
> no prefix. Where else could we get a prefix from? |
25 |
|
26 |
> You may think that we should just create that missing SYSROOT prefix |
27 |
> variable but consider that the distinct "somewhere else" location is |
28 |
> not intended for general use. In other words, you wouldn't execute |
29 |
> commands from it or chroot into it and therefore there is no value in |
30 |
> allowing it to be prefixed. Typically this location would |
31 |
> be /usr/${CHOST} as set up by crossdev. |
32 |
|
33 |
> I haven't forgotten about the cross-prefix case. In this scenario, both |
34 |
> ROOT=/ and SYSROOT=/ but BROOT and EPREFIX are different. Which prefix |
35 |
> do we choose? We pick EPREFIX because the prefix guys try to use the |
36 |
> target prefix as much as possible. Once SYSROOT has the OS headers and |
37 |
> libc headers, you should be able to build anything. |
38 |
|
39 |
> Does this help? |
40 |
|
41 |
I fear that after your answer I'm even more confused than I was before. |
42 |
|
43 |
EPREFIX will be embedded into any (CHOST) binaries being built, so we |
44 |
want it to be applied in the same way for both DEPEND and RDEPEND, |
45 |
right? Why would it be appended to ROOT then, but not to SYSROOT? |
46 |
|
47 |
Also I still don't understand why BROOT (which points to the CBUILD |
48 |
system) would be used as a prefix for CHOST things. |
49 |
|
50 |
Ulrich |