On Sat, Sep 25, 2021 at 3:18 AM Xi Ruoyao <xry111@xxxxxxxxxxxxxxxx> wrote: > If you want a compiler running in sysroot (after reboot/chroot into it), > cross-compile it with a cross compiler (using --host=x86_64-sysroot- > linux-gnu). > > You may find some way to pretend the executables for sysroot "runnable > on the host", but it's not the expected usage of GCC building system and > likely to be broken if something in the building system changes. > I am trying to get both: such executables run on the host system, yet all run-time dependencies are located within the "sysroot". I vaguely remember someone calling such a x86-to-x86 cross-compiler a "Canadian cross"... The idea here is to enforce a tight, fully-encapsulated build environment for the host and then ship it all into the production. This combo runs on any Linux distro... Oleg.