source: chapter05/binutils-pass1.xml@ bc2136e

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 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/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since bc2136e was bc2136e, checked in by Archaic <archaic@…>, 19 years ago

Several minor grammatical fixes. Thanks to Randy and Steve.

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

  • Property mode set to 100644
File size: 4.8 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 <!ENTITY % patches-entities SYSTEM "../patches.ent">
5 %general-entities;
6 %patches-entities;
7]>
8<sect1 id="ch-tools-binutils-pass1" role="wrap">
9<title>Binutils-&binutils-version; - Pass 1</title>
10<?dbhtml filename="binutils-pass1.html"?>
11
12<indexterm zone="ch-tools-binutils-pass1">
13<primary sortas="a-Binutils">Binutils</primary>
14<secondary>tools, pass 1</secondary></indexterm>
15
16<sect2 role="package"><title/>
17<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/binutils.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
18
19<segmentedlist>
20<segtitle>&buildtime;</segtitle>
21<segtitle>&diskspace;</segtitle>
22<seglistitem><seg>1.0 SBU</seg><seg>170 MB</seg></seglistitem>
23</segmentedlist>
24
25<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/binutils.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
26
27</sect2>
28
29<sect2 role="installation">
30<title>Installation of Binutils</title>
31
32<para>It is important that Binutils be the first package compiled
33because both Glibc and GCC perform various tests on the available
34linker and assembler to determine which of their own features to
35enable.</para>
36
37<para>This package is known to have issues when its default
38optimization flags (including the <parameter>-march</parameter> and
39<parameter>-mcpu</parameter> options) are changed. If any environment
40variables that override default optimizations have been defined, such
41as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>,
42unset them when building Binutils.</para>
43
44<para>The Binutils documentation recommends building Binutils outside of the
45source directory in a dedicated build directory:</para>
46
47<screen><userinput>mkdir ../binutils-build
48cd ../binutils-build</userinput></screen>
49
50<note><para>In order for the SBU values listed in the rest of the book
51to be of any use, measure the time it takes to build this package from
52the configuration, up to and including the first install. To achieve
53this easily, wrap the three commands in a <command>time</command>
54command like this: <userinput>time { ./configure ... &amp;&amp; make
55&amp;&amp; make install; }</userinput>.</para></note>
56
57<para>Now prepare Binutils for compilation:</para>
58
59<screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools --disable-nls</userinput></screen>
60
61<para>The meaning of the configure options:</para>
62
63<variablelist>
64<varlistentry>
65<term><parameter>--prefix=/tools</parameter></term>
66<listitem><para>This tells the configure script to prepare to install the Binutils
67programs in the <filename class="directory">/tools</filename> directory.</para></listitem>
68</varlistentry>
69
70<varlistentry>
71<term><parameter>--disable-nls</parameter></term>
72<listitem><para>This disables internationalization as i18n is not needed for the
73temporary tools.</para></listitem>
74</varlistentry>
75</variablelist>
76
77<para>Continue with compiling the package:</para>
78
79<screen><userinput>make</userinput></screen>
80
81<para>Compilation is now complete. Ordinarily we would now run the
82test suite, but at this early stage the test suite framework (Tcl,
83Expect, and DejaGNU) is not yet in place. The benefits of running the
84tests at this point are minimal since the programs from this
85first pass will soon be replaced by those from the second.</para>
86
87<para>Install the package:</para>
88
89<screen><userinput>make install</userinput></screen>
90
91<para>Next, prepare the linker for the <quote>Adjusting</quote> phase
92later on:</para>
93
94<screen><userinput>make -C ld clean
95make -C ld LIB_PATH=/tools/lib</userinput></screen>
96
97<para>The meaning of the make parameters:</para>
98
99<variablelist>
100<varlistentry>
101<term><parameter>-C ld clean</parameter></term>
102<listitem><para>This tells the make program to remove all compiled
103files in the <filename class="directory">ld</filename>
104subdirectory.</para></listitem>
105</varlistentry>
106
107<varlistentry>
108<term><parameter>-C ld LIB_PATH=/tools/lib</parameter></term>
109<listitem><para>This option rebuilds everything in the
110<filename class="directory">ld</filename> subdirectory. Specifying
111the <envar>LIB_PATH</envar> Makefile variable on the command
112line allows us to override the default value
113and point it to the temporary tools location. The value of this variable
114specifies the linker's default library search path. This preparation
115is used later in the chapter.</para></listitem>
116</varlistentry>
117</variablelist>
118
119<warning><para><emphasis>Do not</emphasis> remove the Binutils
120build and source directories yet. These will be needed again in their
121current state later in this chapter.</para></warning>
122
123</sect2>
124
125<sect2 role="content"><title/>
126<para>Details on this package are located in <xref
127linkend="contents-binutils" role="."/></para>
128</sect2>
129
130</sect1>
131
Note: See TracBrowser for help on using the repository browser.