SYSROOT.ECLASS
Section: eclass-manpages (5)Updated: Feb 2026
Index Return to Main Contents
NAME
sysroot.eclass - Common functions for using a different (sys)rootDESCRIPTION
This eclass provides common functions to run executables within a different root or sysroot, with or without emulation by QEMU. Despite the name, these functions can be used in src_* or pkg_* phase functions.SUPPORTED EAPIS
7 8FUNCTIONS
- qemu_arch
- Return the QEMU architecture name for the given target or CHOST. This name is used in qemu-user binary filenames, e.g. qemu-ppc64le.
- qemu_arch_if_needed
- If QEMU is needed to run binaries for the given target or CHOST on the build system, return the QEMU architecture, otherwise return status code 1.
- sysroot_make_run_prefixed
-
Create a wrapper script for directly running executables within a (sys)root
without changing the root directory. The path to that script is returned. If
no (sys)root has been set, then return status code 1. If the wrapper cannot be
created for a permissible reason like QEMU being missing or broken, then
return status code 2.
The script explicitly uses QEMU if this is necessary and it is available in this environment. It may otherwise implicitly use a QEMU outside this environment if binfmt_misc has been used with the F flag. It is not feasible to add a conditional dependency on QEMU.
- sysroot_run_prefixed
- Create a wrapper script with sysroot_make_run_prefixed if necessary, and use it to execute the given command, otherwise just execute the command directly. Return unsuccessfully if the wrapper cannot be created.
- sysroot_try_run_prefixed
- Create a wrapper script with sysroot_make_run_prefixed if necessary, and use it to execute the given command, otherwise just execute the command directly. Print a warning and return successfully if the wrapper cannot be created.
AUTHORS
James Le Cuirot <chewi@gentoo.org>MAINTAINERS
cross@gentoo.orgREPORTING BUGS
Please report bugs via https://bugs.gentoo.org/FILES
sysroot.eclassSEE ALSO
ebuild(5)https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/sysroot.eclass
Index
This document was created by man2html, using the manual pages.
Time: 03:27:01 GMT, February 19, 2026