%general-entities; ]> gcc-libstdc++ &gcc-version;
&gcc-url;
Libstdc++ from GCC-&gcc-version;, Pass 2 GCC tools, libstdc++ pass 2 <para>Again, when building <xref linkend="ch-tools-gcc-pass2"/>, we had to defer the installation of the C++ standard library, because no suitable compiler was available to compile it: we could not use the compiler installed, because this compiler is a native compiler, and should not be used outside of chroot without being at risk of polluting the build with some host components.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <!-- TODO --> <seglistitem> <seg>&libstdcpp-ch5-sbu;</seg> <seg>&libstdcpp-ch5-du;</seg> </seglistitem> </segmentedlist> </sect2> <sect2 role="installation"> <title>Installation of Target Libstdc++ Libstdc++ is part of the GCC sources. You should first unpack the GCC tarball and change to the gcc-&gcc-version; directory. Create a link which exists when building Libstdc++ in the gcc tree: ln -s gthr-posix.h libgcc/gthr-default.h Create a separate build directory for Libstdc++ and enter it: mkdir -v build cd build Prepare Libstdc++ for compilation: ../libstdc++-v3/configure \ CXXFLAGS="-g -O2 -D_GNU_SOURCE" \ --prefix=/usr \ --disable-multilib \ --disable-nls \ --disable-libstdcxx-pch The meaning of the configure options: CXXFLAGS="-g -O2 -D_GNU_SOURCE" Those flags are passed by the top level Makefile when doing a full build of GCC. --disable-libstdcxx-pch This switch prevents the installation of precompiled include files, which are not needed at this stage. Compile libstdc++ by running: make Install the library: make install <para>Details on this package are located in <xref linkend="contents-gcc" role="."/></para> </sect2> </sect1>