diff options
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r-- | eclass/toolchain.eclass | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 0dd23d93e383..479814f0df3e 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1200,6 +1200,21 @@ toolchain_src_configure() { confgcc+=( --enable-threads=posix ) ;; esac + + if ! use prefix-guest ; then + # GNU ld scripts, such as those in glibc, reference unprefixed paths + # as the sysroot given here is automatically prepended. For + # prefix-guest, we use the host's libc instead. + if [[ -n ${EPREFIX} ]] ; then + confgcc+=( --with-sysroot="${EPREFIX}" ) + fi + + # We need to build against the right headers and libraries. Again, + # for prefix-guest, this is the host's. + if [[ -n ${ESYSROOT} ]] ; then + confgcc+=( --with-build-sysroot="${ESYSROOT}" ) + fi + fi fi # __cxa_atexit is "essential for fully standards-compliant handling of |