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