ab017fbb: bootstrap/gcc.bst: Fix confusion of binaries used for target and build.
When not cross-compiling, the tools have the same names, and only the first one in PATH is used. Intermediate binaries intended to run during the build might get linked to the target system rather than the current system.
b3b952d6: Fix and cleanup environment variables in elements for GCC.
There were a lot of confusions on what variables should be used to compile GCC. This ended up with "host" tools not being compiled with the proper flags. See #784 (closed).
"Build" is for tools built as intermediate that needs to run during
the build. For example source code generators. Environment variables
for those are suffixed with
_FOR_BUILD. For example
"Host" is for the compiler itself as well as all its development
tools. Default environment variables are used for those, e.g.
"Target" are the runtime and libraries that needs to be linked to the
result of compilation with the new built compiler. This is for example
libstdc++, and runtime objects (
variables for those are suffixed with
_FOR_TARGET. For example
When building a cross-compiler,
build == host. We need to set
LDFLAGS, etc. for the build/host
architecture. Then we set
etc. for the target architecture.
When cross-compiling the final compiler,
host == target. In that
CFLAGS, etc. ar set to the host/target architecture. We
then need to set
CFLAGS_FOR_BUILD, etc. for the
When we do not cross-compile, that is
build == host && host == target, we should still use the right compiler otherwise we end-up
link to the wrong library. By default GCC's configure ignore
*_FOR_BUILD tool variables in this case. We patch it to not ignore
it, because build and host really need to use different compilers.
libstc++-stage1.bst, is a subdirectory of gcc. It is a intended
for the "target", the default flags should be the one for the target.
It does not have any "build" tool so it does not need