Fix definition of ESYSROOT to use SYSROOT's prefix

For a given location, we were basing ESYSROOT on the prefix of that
location instead of the prefix used by the SYSROOT location. For
example, if BROOT=/foo, ROOT=/bar, EPREFIX=/baz, EROOT=/bar/baz, and
SYSROOT=/ then ESYSROOT should be /foo, not /baz.

Cherry-picked from
Upstream status: Not sent


Change-Id: Ie8bfc4f3ad947f5d004e2665ef4e8e0bf43f382b
Tested-by: Chris McDonald <>
Commit-Ready: Chris McDonald <>
Legacy-Commit-Queue: Commit Bot <>
Reviewed-by: Mike Frysinger <>
2 files changed