OSDN Git Service

[lfsja-git] r11.1-117 対応。
[lfsbookja/lfsja-git.git] / src / chapter05 / gcc-pass1.ch
1 %
2 % This is part of LFSbookja package.
3 %
4 % This is a CTIE change file for the original XML source of the LFSbook.
5 %
6 @x
7 <?xml version="1.0" encoding="ISO-8859-1"?>
8 @y
9 <?xml version="1.0" encoding="UTF-8"?>
10 @z
11
12 @x
13 <sect1 id="ch-tools-gcc-pass1" role="wrap" xreflabel="gcc-pass1">
14 @y
15 <sect1 id="ch-tools-gcc-pass1" role="wrap" xreflabel="gcc 1 回め">
16 @z
17
18 @x
19   <title>GCC-&gcc-version; - Pass 1</title>
20 @y
21   <title>GCC-&gcc-version; - 1回め</title>
22 @z
23
24 @x
25   <indexterm zone="ch-tools-gcc-pass1">
26     <primary sortas="a-GCC">GCC</primary>
27     <secondary>tools, pass 1</secondary>
28   </indexterm>
29 @y
30   <indexterm zone="ch-tools-gcc-pass1">
31     <primary sortas="a-GCC">GCC</primary>
32     <secondary>&Tools;, 1回め</secondary>
33   </indexterm>
34 @z
35
36 @x
37     <title>Installation of Cross GCC</title>
38 @y
39     <title>&InstallationOf1;クロスコンパイル版 GCC&InstallationOf2;</title>
40 @z
41
42 @x
43     <para>GCC requires the GMP, MPFR and MPC packages. As these packages may
44     not be included in your host distribution, they will be built with
45     GCC.  Unpack each package into the GCC source directory and rename the
46     resulting directories so the GCC build procedures will automatically
47     use them:</para>
48 @y
49     <para>
50     GCC は GMP、MPFR、MPC の各パッケージを必要とします。
51     これらのパッケージはホストシステムに含まれていないかもしれないため、以下を実行してビルドの準備をします。
52     個々のパッケージを GCC ソースディレクトリの中に伸張 (解凍) し、ディレクトリ名を変更します。
53     これは GCC のビルド処理においてそれらを自動的に利用できるようにするためです。
54     </para>
55 @z
56
57 @x
58     <note><para>There are frequent misunderstandings about this chapter.  The
59     procedures are the same as every other chapter as explained earlier (<xref
60     linkend='buildinstr'/>).  First extract the gcc tarball from the sources
61     directory and then change to the directory created.  Only then should you
62     proceed with the instructions below.</para></note>
63 @y
64     <note><para>
65     本節においては誤解が多く発生しています。
66     ここでの手順は他のものと同様であり、手順の概要 (<xref linkend='buildinstr'/>) は説明済です。
67     まず初めに gcc の tarball を伸張 (解凍) し、生成されたソースディレクトリに移動します。
68     それに加えて本節では、以下の手順を行うものとなります。
69     </para></note>
70 @z
71
72 @x
73     <para>On x86_64 hosts, set the default directory name for
74     64-bit libraries to <quote>lib</quote>:</para>
75 @y
76     <para>
77     x86_64 ホストにおいて、64 ビットライブラリに対するデフォルトのディレクトリ名は<quote>lib</quote>です。
78     </para>
79 @z
80
81 @x
82     <para>The GCC documentation recommends building GCC
83     in a dedicated build directory:</para>
84 @y
85     <para>
86     GCC のドキュメントでは、専用のビルドディレクトリを作成することが推奨されています。
87     </para>
88 @z
89
90 @x
91     <para>Prepare GCC for compilation:</para>
92 @y
93     <para>&PreparePackage1;GCC&PreparePackage2;</para>
94 @z
95
96 @x
97       <title>The meaning of the configure options:</title>
98 @y
99       <title>&MeaningOfOption1;configure&MeaningOfOption2;</title>
100 @z
101
102 @x --with-glibc-version=&glibc-version;
103           <para>This option specifies the version of glibc which will be
104           used on the target. It is not relevant to the libc of the host
105           distro because everything compiled by pass1 gcc will run in the
106           chroot environment, which is isolated from libc of the host
107           distro.</para>
108 @y
109           <para>
110           このオプションは、ターゲットにおいて用いられることになる glibc のバージョンを指定します。
111           これはホストディストリビューションにある libc のバージョンとは関係がありません。
112           1 回めの gcc によってコンパイルされるものは、すべて chroot 環境内で実行されるものであって、ホストにある libc とは切り離されているためです。
113           </para>
114 @z
115
116 @x --with-newlib
117           <para>Since a working C library is not yet available, this ensures
118           that the inhibit_libc constant is defined when building libgcc. This prevents
119           the compiling of any code that requires libc support.</para>
120 @y
121           <para>
122           この時点では利用可能な C ライブラリがまだ存在しません。
123           したがって libgcc のビルド時に inhibit_libc 定数を定義します。
124           これを行うことで、libc サポートを必要とするコード部分をコンパイルしないようにします。
125           </para>
126 @z
127
128 @x --without-headers
129           <para>When creating a complete cross-compiler, GCC requires
130           standard headers compatible with the target system. For our
131           purposes these headers will not be needed. This switch prevents
132           GCC from looking for them.</para>
133 @y
134           <para>
135           完璧なクロスコンパイラーを構築するなら、GCC はターゲットシステムに互換性を持つ標準ヘッダーを必要とします。
136           本手順においては標準ヘッダーは必要ありません。
137           このスイッチは GCC がそういったヘッダーを探しにいかないようにします。
138           </para>
139 @z
140
141 @x --disable-shared
142           <para>This switch forces GCC to link its internal libraries
143           statically. We need this because the shared libraries require glibc,
144           which is not yet installed on the target system.</para>
145 @y
146           <para>
147           このスイッチは内部ライブラリをスタティックライブラリとしてリンクすることを指示します。
148           共有ライブラリが glibc を必要としており、処理しているシステム上にはまだインストールされていないためです。
149           </para>
150 @z
151
152 @x --disable-multilib
153           <para>On x86_64, LFS does not support a multilib configuration.
154           This switch is harmless for x86.</para>
155 @y
156           <para>
157           x86_64 に対して LFS は multilib のサポートをしていません。
158           このオプション指定は x86 には無関係です。
159           </para>
160 @z
161
162 @x --disable-decimal-float, --disable-threads, --disable-libatomic, --disable-libgomp,  --disable-libquadmath, --disable-libssp, --disable-libvtv, --disable-libstdcxx
163           <para>These switches disable support for the decimal floating point
164           extension, threading, libatomic, libgomp, libquadmath, libssp,
165           libvtv, and the C++ standard library respectively. These features
166           will fail to compile when building a cross-compiler and are not
167           necessary for the task of cross-compiling the temporary libc.</para>
168 @y
169           <para>
170           これらのオプションは順に、十進浮動小数点制御、スレッド処理、libatomic, libgomp, libquadmath, libssp, libvtv, C++ 標準ライブラリのサポートをいずれも無効にすることを指示します。
171           これらの機能を含めていると、クロスコンパイラーをビルドする際にはコンパイルに失敗します。
172           またクロスコンパイルによって一時的な libc ライブラリを構築する際には不要なものです。
173           </para>
174 @z
175
176 @x --enable-languages=c,c++
177           <para>This option ensures that only the C and C++ compilers are built.
178           These are the only languages needed now.</para>
179 @y
180           <para>
181           このオプションは C コンパイラーおよび C++ コンパイラーのみビルドすることを指示します。
182           この時点で必要なのはこの言語だけだからです。
183           </para>
184 @z
185
186 @x
187     <para>Compile GCC by running:</para>
188 @y
189     <para>GCC をコンパイルします。</para>
190 @z
191
192 @x
193     <para>Install the package:</para>
194 @y
195     <para>&InstallThePackage;</para>
196 @z
197
198 @x
199     <para>This build of GCC has installed a couple of internal system
200     headers.  Normally one of them, <filename>limits.h</filename>, would in turn
201     include the corresponding system <filename>limits.h</filename> header, in
202     this case, <filename>$LFS/usr/include/limits.h</filename>. However, at the
203     time of this build of GCC <filename>$LFS/usr/include/limits.h</filename>
204     does not exist, so the internal header that has just been installed is a
205     partial, self-contained file and does not include the extended features of
206     the system header. This is adequate for building glibc, but the full
207     internal header will be needed later.  Create a full version of the internal
208     header using a command that is identical to what the GCC build system does
209     in normal circumstances:</para>
210 @y
211     <para>
212     ここでの GCC ビルドにおいては、内部にあるシステムヘッダーファイルをいくつかインストールしました。
213     そのうちの <filename>limits.h</filename> というものは、対応するシステムヘッダーファイルである <filename>limits.h</filename> を読み込むものになっています。
214     そのファイルはここでは <filename>$LFS/usr/include/limits.h</filename> になります。
215     ただし GCC をビルドしたこの時点において <filename>$LFS/usr/include/limits.h</filename> は存在していません。
216     したがってインストールされたばかりの内部ヘッダーファイルは、部分的に自己完結したファイルとなり、システムヘッダーファイルによる拡張された機能を含むものになっていません。
217     glibc をビルドする際にはこれでもかまわないのですが、後々内部ヘッダーファイルは完全なものが必要になります。
218     以下のようなコマンドを通じて、その内部ヘッダーファイルの完成版を作り出します。
219     このコマンドは GCC ビルドが通常行っている方法と同じものです。
220     </para>
221 @z
222
223 @x
224     <para>Details on this package are located in
225     <xref linkend="contents-gcc" role="."/></para>
226 @y
227     <para>
228     &Details1;<xref linkend="contents-gcc" role=""/>&Details2;
229     </para>
230 @z