libstdc++-pass2.xml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-tools-libstdcpp-pass2" role="wrap">
  8. <?dbhtml filename="gcc-libstdc++-pass2.html"?>
  9. <sect1info condition="script">
  10. <productname>gcc-libstdc++</productname>
  11. <productnumber>&gcc-version;</productnumber>
  12. <address>&gcc-url;</address>
  13. </sect1info>
  14. <title>Libstdc++ from GCC-&gcc-version;, Pass 2</title>
  15. <indexterm zone="ch-tools-libstdcpp-pass2">
  16. <primary sortas="a-GCC">GCC</primary>
  17. <secondary>tools, libstdc++ pass 2</secondary>
  18. </indexterm>
  19. <sect2 role="package">
  20. <title/>
  21. <para>Again, when building <xref linkend="ch-tools-gcc-pass2"/>, we had to
  22. defer the installation of the C++ standard library, because no suitable
  23. compiler was available to compile it: we could not use the compiler
  24. installed, because this compiler is a native
  25. compiler, and should not be used outside of chroot without being at
  26. risk of polluting the build with some host components.</para>
  27. <segmentedlist>
  28. <segtitle>&buildtime;</segtitle>
  29. <segtitle>&diskspace;</segtitle>
  30. <!-- TODO -->
  31. <seglistitem>
  32. <seg>&libstdcpp-ch5-sbu;</seg>
  33. <seg>&libstdcpp-ch5-du;</seg>
  34. </seglistitem>
  35. </segmentedlist>
  36. </sect2>
  37. <sect2 role="installation">
  38. <title>Installation of Target Libstdc++</title>
  39. <note>
  40. <para><application>Libstdc++</application> is part of the GCC sources.
  41. You should first unpack the GCC tarball and change to the
  42. <filename>gcc-&gcc-version;</filename> directory.</para>
  43. </note>
  44. <para>Create a link which exists when building Libstdc++ in the gcc
  45. tree:</para>
  46. <screen><userinput remap="pre">ln -s gthr-posix.h libgcc/gthr-default.h</userinput></screen>
  47. <para>Create a separate build directory for Libstdc++ and enter it:</para>
  48. <screen><userinput remap="pre">mkdir -v build
  49. cd build</userinput></screen>
  50. <para>Prepare Libstdc++ for compilation:</para>
  51. <screen><userinput remap="configure">../libstdc++-v3/configure \
  52. CXXFLAGS="-g -O2 -D_GNU_SOURCE" \
  53. --prefix=/usr \
  54. --disable-multilib \
  55. --disable-nls \
  56. --disable-libstdcxx-pch</userinput></screen>
  57. <variablelist>
  58. <title>The meaning of the configure options:</title>
  59. <varlistentry>
  60. <term><parameter>CXXFLAGS="-g -O2 -D_GNU_SOURCE"</parameter></term>
  61. <listitem>
  62. <para>Those flags are passed by the top level Makefile when doing
  63. a full build of GCC.</para>
  64. </listitem>
  65. </varlistentry>
  66. <varlistentry>
  67. <term><parameter>--disable-libstdcxx-pch</parameter></term>
  68. <listitem>
  69. <para>This switch prevents the installation of precompiled
  70. include files, which are not needed at this stage.</para>
  71. </listitem>
  72. </varlistentry>
  73. </variablelist>
  74. <para>Compile libstdc++ by running:</para>
  75. <screen><userinput remap="make">make</userinput></screen>
  76. <para>Install the library:</para>
  77. <screen><userinput remap="install">make install</userinput></screen>
  78. </sect2>
  79. <sect2 role="content">
  80. <title/>
  81. <para>Details on this package are located in
  82. <xref linkend="contents-gcc" role="."/></para>
  83. </sect2>
  84. </sect1>