mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-19 05:27:39 +00:00
7610848c3a
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11987 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
138 lines
4.6 KiB
XML
138 lines
4.6 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
%general-entities;
|
|
]>
|
|
|
|
<sect1 id="ch-tools-libstdcpp-pass2" role="wrap">
|
|
<?dbhtml filename="gcc-libstdc++-pass2.html"?>
|
|
|
|
<sect1info condition="script">
|
|
<productname>gcc-libstdc++</productname>
|
|
<productnumber>&gcc-version;</productnumber>
|
|
<address>&gcc-url;</address>
|
|
</sect1info>
|
|
|
|
<title>Libstdc++ from GCC-&gcc-version;, Pass 2</title>
|
|
|
|
<indexterm zone="ch-tools-libstdcpp-pass2">
|
|
<primary sortas="a-GCC">GCC</primary>
|
|
<secondary>tools, libstdc++ pass 2</secondary>
|
|
</indexterm>
|
|
|
|
<sect2 role="package">
|
|
<title/>
|
|
|
|
<para>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 built in that
|
|
section because it is a native compiler and should not be used outside of
|
|
chroot and risks polluting the libraries with some host components.</para>
|
|
|
|
<segmentedlist>
|
|
<segtitle>&buildtime;</segtitle>
|
|
<segtitle>&diskspace;</segtitle>
|
|
|
|
<seglistitem>
|
|
<seg>&libstdcpp-tmpp2-sbu;</seg>
|
|
<seg>&libstdcpp-tmpp2-du;</seg>
|
|
</seglistitem>
|
|
</segmentedlist>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of Target Libstdc++</title>
|
|
|
|
<note>
|
|
<para><application>Libstdc++</application> is part of the GCC sources.
|
|
You should first unpack the GCC tarball and change to the
|
|
<filename>gcc-&gcc-version;</filename> directory.</para>
|
|
</note>
|
|
|
|
<para>Create a link which exists when building libstdc++ in the gcc tree:</para>
|
|
|
|
<screen><userinput remap="pre">ln -s gthr-posix.h libgcc/gthr-default.h</userinput></screen>
|
|
|
|
<para>Create a separate build directory for libstdc++ and enter it:</para>
|
|
|
|
<screen><userinput remap="pre">mkdir -v build
|
|
cd build</userinput></screen>
|
|
|
|
<para>Prepare libstdc++ for compilation:</para>
|
|
|
|
<screen arch="default"><userinput remap="configure">../libstdc++-v3/configure \
|
|
CXXFLAGS="-g -O2 -D_GNU_SOURCE" \
|
|
--prefix=/usr \
|
|
--disable-multilib \
|
|
--disable-nls \
|
|
--disable-libstdcxx-pch</userinput></screen>
|
|
<screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">../libstdc++-v3/configure \
|
|
CXXFLAGS="-g -O2 -D_GNU_SOURCE" \
|
|
--prefix=/usr \
|
|
--enable-multilib \
|
|
--disable-nls \
|
|
--disable-libstdcxx-pch \
|
|
--host=x86_64-lfs-linux-gnu</userinput></screen>
|
|
|
|
<variablelist>
|
|
<title>The meaning of the configure options:</title>
|
|
|
|
<varlistentry>
|
|
<term><parameter>CXXFLAGS="-g -O2 -D_GNU_SOURCE"</parameter></term>
|
|
<listitem>
|
|
<para>These flags are passed by the top level Makefile when doing
|
|
a full build of GCC.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term><parameter>--disable-libstdcxx-pch</parameter></term>
|
|
<listitem>
|
|
<para>This switch prevents the installation of precompiled
|
|
include files, which are not needed at this stage.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry arch="ml_32,ml_x32,ml_all">
|
|
<term><parameter>--enable-multilib</parameter></term>
|
|
<listitem>
|
|
<para>This switch is set by default but it is added here
|
|
explicitly for documentary purpose. The libstdc++ libraries
|
|
will be built for every arch (m64, m32, mx32) which are
|
|
made available in <xref linkend="ch-tools-gcc-pass1"/>.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry arch="ml_32,ml_x32,ml_all">
|
|
<term><parameter>--host=x86_64-pc-linux-gnu</parameter></term>
|
|
<listitem>
|
|
<para>Since up to now the cross-compile tools are used. This
|
|
switch is set to ensure that the headers used for multilib are
|
|
placed in correct locations where the final system can pick
|
|
them up.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
<para>Compile libstdc++ by running:</para>
|
|
|
|
<screen><userinput remap="make">make</userinput></screen>
|
|
|
|
<para>Install the library:</para>
|
|
|
|
<screen><userinput remap="install">make install</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="content">
|
|
<title/>
|
|
|
|
<para>Details on this package are located in <xref linkend="contents-gcc" role="."/></para>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|