From Segfault
Jump to: navigation, search

Per default, STATIC_TOOLCHAIN is disabled (and hidden via EXPERIMENTAL=n) but CC_STATIC_LIBSTDCXX is enabled and thus WANTS_STATIC_LINK will be selected. Generally it is a good idea to link libstdc++ statically into the gcc binary - that way we can move the resulting toolchain to a different hostsystem (of the same architecture) more easily. However, with WANTS_STATIC_LINK=y, the build might fail very early on with:

 [INFO ]  Building environment variables
 [ERROR]  Static linking impossible on the host system 'x86_64-build_unknown-linux-gnu'
 [00:02] / make: *** [build] Error 1

As a (nasty) workaround, we could edit the resulting .config like this:

sed 's/^CT_WANTS_STATIC_LINK=y/# CT_WANTS_STATIC_LINK is not set/' -i .config

However, the correct course of action is to either disable CC_STATIC_LIBSTDCXX ("C compiler""Link libstdc++ statically into the gcc binary") or to install the glibc-static resp. glibc-devel-static packages as described in the prerequisites.