Ignore:
Timestamp:
12/20/2004 04:38:42 PM (20 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 12.2, 12.2-rc1, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
fba1478
Parents:
faf3398
Message:

Removed text in chapter 05 - first round.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4431 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter05/binutils-pass1.xml

    rfaf3398 r6790655  
    1313
    1414<sect2 role="package"><title/>
    15 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/binutils.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    1615
    1716<segmentedlist>
     
    2120</segmentedlist>
    2221
    23 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/binutils.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
    24 
    2522</sect2>
    2623
    2724<sect2 role="installation">
    2825<title>Installation of Binutils</title>
    29 
    30 <para>It is important that Binutils be the first package to get compiled,
    31 because both Glibc and GCC perform various tests on the available linker and
    32 assembler to determine which of their own features to enable.</para>
    33 
    34 <para>This package is known to behave badly when you change its default
    35 optimization flags (including the <parameter>-march</parameter> and
    36 <parameter>-mcpu</parameter> options). Therefore, if you have defined any
    37 environment variables that override default optimizations, such as CFLAGS and
    38 CXXFLAGS, we recommend un-setting them when building Binutils.</para>
    3926
    4027<para>The current version of Binutils in use has a bug that causes strip to
     
    4431<screen><userinput>patch -Np1 -i ../binutils-&binutils-version;-fix_strip-1.patch</userinput></screen>
    4532
    46 <para>The Binutils documentation recommends building Binutils outside of the
    47 source directory in a dedicated build directory:</para>
    48 
    4933<screen><userinput>mkdir ../binutils-build
    5034cd ../binutils-build</userinput></screen>
    5135
    52 <note><para>If you want the SBU values listed in the rest of the book to be of
    53 any use, you will have to measure the time it takes to build this package --
    54 from the configuration up to and including the first install. To achieve this
    55 easily, you could wrap the four commands in a <command>time</command> command
    56 like this: <userinput>time { ./configure ... &amp;&amp; ... &amp;&amp; ...
     36<note><para>If you want the SBU values you could wrap the four commands in a
     37<command>time</command> command like this:
     38<userinput>time { ./configure ... &amp;&amp; ... &amp;&amp; ...
    5739&amp;&amp; make install; }</userinput>.</para></note>
    5840
     
    6143<screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools --disable-nls</userinput></screen>
    6244
    63 <para>The meaning of the configure options:</para>
    64 
    65 <variablelist>
    66 <varlistentry>
    67 <term><parameter>--prefix=/tools</parameter></term>
    68 <listitem><para>This tells the configure script to prepare to install the Binutils
    69 programs in the <filename class="directory">/tools</filename> directory.</para></listitem>
    70 </varlistentry>
    71 
    72 <varlistentry>
    73 <term><parameter>--disable-nls</parameter></term>
    74 <listitem><para>This disables internationalization (a word often shortened to
    75 i18n). We don't need this for our static programs and <emphasis>nls</emphasis>
    76 often causes problems when linking statically.</para></listitem>
    77 </varlistentry>
    78 </variablelist>
    79 
    8045<para>Continue with compiling the package:</para>
    8146
    8247<screen><userinput>make configure-host
    8348make LDFLAGS="-all-static"</userinput></screen>
    84 
    85 <para>The meaning of the make parameters:</para>
    86 
    87 <variablelist>
    88 <varlistentry>
    89 <term><parameter>configure-host</parameter></term>
    90 <listitem><para>This forces all the subdirectories to be configured immediately.
    91 A statically linked build will fail without it. We therefore use this option to work
    92 around the problem.</para></listitem>
    93 </varlistentry>
    94 
    95 <varlistentry>
    96 <term><parameter>LDFLAGS="-all-static"</parameter></term>
    97 <listitem><para>This tells the linker that all the Binutils programs should be
    98 linked statically. However, strictly speaking, <parameter>"-all-static"</parameter>
    99 is passed to the <command>libtool</command> program, which then passes
    100 <parameter>"-static"</parameter> to the linker.</para></listitem>
    101 </varlistentry>
    102 </variablelist>
    103 
    104 <para>Compilation is complete. Normally we would now run the test suite, but
    105 at this early stage the test suite framework (Tcl, Expect and DejaGNU) is not
    106 yet in place. And there would be little point in running the tests anyhow,
    107 since the programs from this first pass will soon be replaced by those from the
    108 second.</para>
    10949
    11050<para>Now install the package:</para>
     
    11757make -C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib</userinput></screen>
    11858
    119 <para>The meaning of the make parameters:</para>
    120 
    121 <variablelist>
    122 <varlistentry>
    123 <term><parameter>-C ld clean</parameter></term>
    124 <listitem><para>This tells the make program to remove all the compiled files
    125 in the <filename class="directory">ld</filename> subdirectory.</para></listitem>
    126 </varlistentry>
    127 
    128 <varlistentry>
    129 <term><parameter>-C ld LDFLAGS="-all-static"
    130 LIB_PATH=/tools/lib</parameter></term>
    131 <listitem><para>This option rebuilds everything in the
    132 <filename class="directory">ld</filename> subdirectory. Specifying the LIB_PATH
    133 makefile variable on the command line allows us to override the default value
    134 and have it point to our temporary tools location. The value of this variable
    135 specifies the linker's default library search path. You will see how this
    136 preparation is used later on in the chapter.</para></listitem>
    137 </varlistentry>
    138 </variablelist>
    139 
    140 
    14159<warning><para><emphasis>Do not yet remove</emphasis> the Binutils build and
    14260source directories. You will need them again in their current state a bit
    14361further on in this chapter.</para></warning>
    14462
    145 
    146 </sect2>
    147 
    148 <sect2 role="content"><title/>
    149 <para>The details on this package are found in <xref linkend="contents-binutils"/>.</para>
    15063</sect2>
    15164
Note: See TracChangeset for help on using the changeset viewer.