Simple cross build fails out of the box on Fedora
Maciej W. Rozycki
macro@orcam.me.uk
Sun Mar 15 21:13:27 GMT 2026
On Thu, 12 Mar 2026, Rot127 wrote:
> But --with-build-sysroot should probably be removed. Since it obviously
> doesn't do what it promises.
The top-level `configure' script is shared with the GCC project. Here's
what GCC installation documentations says about `--with-build-sysroot':
'--with-build-sysroot'
'--with-build-sysroot=DIR'
Tells GCC to consider DIR as the system root (see '--with-sysroot')
while building target libraries, instead of the directory specified
with '--with-sysroot'. This option is only useful when you are
already using '--with-sysroot'. You can use '--with-build-sysroot'
when you are configuring with '--prefix' set to a directory that is
different from the one in which you are installing GCC and your
target libraries.
This option affects the system root for the compiler used to build
target libraries (which runs on the build system); it does not
affect the compiler which is used to build GCC itself.
If you specify the '--with-native-system-header-dir=DIRNAME' option
then the compiler will search that directory within DIRNAME for
native system headers rather than the default '/usr/include'.
Since no target libraries are built in the course of building binutils,
this option is irrelevant. You might consider passing `--sysroot=...'
directly to your cross-compiler via $CC in `configure' invocation if it
hasn't been configured to use the intended directory automatically.
Maciej
More information about the Binutils
mailing list