[Bug other/91879] --with-build-time-tools doesn't work as expected

stsp at users dot sourceforge.net gcc-bugzilla@gcc.gnu.org
Wed Oct 9 00:39:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91879

--- Comment #36 from Stas Sergeev <stsp at users dot sourceforge.net> ---
(In reply to joseph@codesourcery.com from comment #35)
> what you want.  I'm familiar with many of the details through having 
> written multiple such build systems myself.

But even you do make the wrong expectations.
Most of your suggestions (which are very reasonable by
themselves) do not work or require additional tweaks.
configure reacts inadequately on them.

> The non-sysroot form of configuring cross toolchains is to a large extent 
> considered a *legacy* way to configure such a toolchain and so has 
> received less attention to making it feature-complete in its interactions 
> with other features (e.g. building with installed libc at a different 
> path) because most people prefer to use sysroots.

OK, that's an interesting point.
I didn't know its legacy.
The problem is that I still do not fully understand
that route.

Does --with-sysroot disable prefix, or prefix should
be set to '/' explicitly? Or to something else?

If I naively do
--with-build-sysroot=$DESTDIR --with-sysroot=/
why this won't work? I suppose there will be some
differences in a directory layout, like no $target
dir, but otherwise it can work?

You suggest --with-sysroot=$prefix/$target but I
don't understand why is so, as normally I have
(1) $prefix/bin/$target-gcc
and
(2) $prefix/$target/bin/gcc
If I set --with-sysroot=$prefix/$target then I
can get (2), but how to get (1)?

I think this is an rtfm point, is this sysroot
trick documented anywhere?


More information about the Gcc-bugs mailing list