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

--- Comment #5 from Jim Wilson <wilson at gcc dot gnu.org> ---
The wiki is wrong.  Combined tree builds should not be used anymore.

Combined tree builds date back to when Cygnus was maintainer for everything. 
We put everything in a single source tree, and wrote configure and makefile
support so that you could check them out with a single command, and configure
and build them with a single command.  But Cygnus is no longer controlling
everything, and different packages are now in different source trees, and are
meant to be compiled separately.

When you build packages separately, each package after the first uses feature
tests to configure itself appropriately to use the earlier packages.  When you
use a combined tree build, feature tests can't be used because earlier packages
haven't been installed yet, so configure just makes guesses.  We have the most
commonly correct results hardwired in as guesses.  This was fine when packages
were smaller, and we had a smaller number of targets.  Nowadays, there is too
much risk that the guesses will be wrong. A combined tree build may not give
you the exact same result as building separately because of this.  Of course,
if you just need a throw away toolchain to check how something works for a
different architecture than your own, this is fine.  But if you want to make a
product release that will be used by customers, this can be dangerous.

None of the major build scripts use combined tree builds.  None of the linux
distros (Fedora, Debian, OpenSuse) do this.  None of the embedded linux build
systems to this (OpenEmbedded/Yocto, Buildroot).  crosstool-ng doesn't do
builds this way.  And github.com/riscv/riscv-gnu-toolchain doesn't do builds
this way.  There are so many easy ways to build toolchains that we don't need
combined tree builds to work.

This is of course my personal opinion, and I expect that people will disagree
with me.  But I rarely if ever see anyone update the combined tree support, so
I will continue to tell people that it is dangerous to rely on it.

Reply via email to