diff options
Diffstat (limited to 'libstdc++-v3/doc/xml/manual/build_hacking.xml')
-rw-r--r-- | libstdc++-v3/doc/xml/manual/build_hacking.xml | 160 |
1 files changed, 145 insertions, 15 deletions
diff --git a/libstdc++-v3/doc/xml/manual/build_hacking.xml b/libstdc++-v3/doc/xml/manual/build_hacking.xml index daac8c0e2..771d005e7 100644 --- a/libstdc++-v3/doc/xml/manual/build_hacking.xml +++ b/libstdc++-v3/doc/xml/manual/build_hacking.xml @@ -8,7 +8,13 @@ C++ </keyword> <keyword> - BUILD_HACKING + build + </keyword> + <keyword> + configure + </keyword> + <keyword> + hacking </keyword> <keyword> version @@ -38,7 +44,50 @@ </para> </section> -<section xml:id="build_hacking.map"><info><title>Overview: What Comes from Where</title></info> +<section xml:id="build_hacking.overview"> +<info><title>Overview</title></info> + +<section xml:id="build_hacking.overview.basic"> +<info><title>General Process</title></info> + +<para> + The configure process begins the act of building libstdc++, and is + started via: +</para> + +<screen> +<computeroutput> +configure +</computeroutput> +</screen> + +<para> +The <filename>configure</filename> file is a script generated (via +<command>autoconf</command>) from the file +<filename>configure.ac</filename>. +</para> + + +<para> + After the configure process is complete, +</para> + +<screen> +<computeroutput> +make all +</computeroutput> +</screen> + +<para> +in the build directory starts the build process. The <literal>all</literal> target comes from the <filename>Makefile</filename> file, which is generated via <command>configure</command> from the <filename>Makefile.in</filename> file, which is in turn generated (via +<command>automake</command>) from the file +<filename>Makefile.am</filename>. +</para> + +</section> + + +<section xml:id="build_hacking.overview.map"><info><title>What Comes from Where</title></info> <figure> @@ -57,19 +106,19 @@ </figure> <para> - Regenerate all generated files by using the command sequence - <code>"autoreconf"</code> at the top level of the libstdc++ source - directory. The following will also work, but is much more complex: - <code>"aclocal-1.11 && autoconf-2.64 && - autoheader-2.64 && automake-1.11"</code> The version - numbers may be absent entirely or otherwise vary depending on - <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/install/prerequisites.html">the - current requirements</link> and your vendor's choice of - installation names. + Regenerate all generated files by using the command + <code>autoreconf</code> at the top level of the libstdc++ source + directory. </para> </section> -<section xml:id="build_hacking.scripts"><info><title>Storing Information in non-AC files (like configure.host)</title></info> +</section> <!-- overview --> + + +<section xml:id="build_hacking.configure"> +<info><title>Configure</title></info> + +<section xml:id="build_hacking.configure.scripts"><info><title>Storing Information in non-AC files (like configure.host)</title></info> <para> @@ -101,7 +150,7 @@ </para> </section> -<section xml:id="build_hacking.conventions"><info><title>Coding and Commenting Conventions</title></info> +<section xml:id="build_hacking.configure.conventions"><info><title>Coding and Commenting Conventions</title></info> <para> @@ -126,7 +175,7 @@ </para> </section> -<section xml:id="build_hacking.acinclude"><info><title>The acinclude.m4 layout</title></info> +<section xml:id="build_hacking.configure.acinclude"><info><title>The acinclude.m4 layout</title></info> <para> The nice thing about acinclude.m4/aclocal.m4 is that macros aren't @@ -217,7 +266,7 @@ </section> -<section xml:id="build_hacking.enable"><info><title><constant>GLIBCXX_ENABLE</constant>, the <literal>--enable</literal> maker</title></info> +<section xml:id="build_hacking.configure.enable"><info><title><constant>GLIBCXX_ENABLE</constant>, the <literal>--enable</literal> maker</title></info> <para> @@ -351,5 +400,86 @@ </para> </section> +</section> <!-- configure --> + +<section xml:id="build_hacking.make"><info><title>Make</title></info> + + <para> + The build process has to make all of object files needed for + static or shared libraries, but first it has to generate some + include files. The general order is as follows: + </para> + +<orderedlist> + <listitem> + <para> + make include files, make pre-compiled headers + </para> + </listitem> + <listitem> + <para> + make libsupc++ + </para> + <para> + Generates a libtool convenience library, + <filename>libsupc++convenience</filename> with language-support + routines. Also generates a freestanding static library, + <filename>libsupc++.a</filename>. + </para> + </listitem> + <listitem> + <para> + make src + </para> + <para> + Generates two convenience libraries, one for C++98 and one for + C++11, various compability files for shared and static + libraries, and then collects all the generated bits and creates + the final libstdc++ libraries. + </para> +<orderedlist> + <listitem> + <para> + make src/c++98 + </para> + <para> + Generates a libtool convenience library, + <filename>libc++98convenience</filename> with language-support + routines. Uses the <literal>-std=gnu++98</literal> dialect. + </para> + </listitem> + <listitem> + <para> + make src/c++11 + </para> + <para> + Generates a libtool convenience library, + <filename>libc++11convenience</filename> with language-support + routines. Uses the <literal>-std=gnu++11</literal> dialect. + </para> + </listitem> + <listitem> + <para> + make src + </para> + <para> + Generates needed compatibility objects for shared and static + libraries. Shared-only code is seggregated at compile-time via + the macro <literal>_GLIBCXX_SHARED</literal>. + </para> + + <para> + Then, collects all the generated convenience libraries, adds in + any required compatibility objects, and creates the final shared + and static libraries: <filename>libstdc++.so</filename> and + <filename>libstdc++.a</filename>. + </para> + + </listitem> +</orderedlist> + </listitem> +</orderedlist> + +</section> <!-- make --> </section> |