Changeset 4e82d47 for chapter05/gcc-pass1.xml
- Timestamp:
- 12/05/2008 08:46:02 PM (15 years ago)
- 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, 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
- Children:
- 6f2cc22
- Parents:
- 6e88633
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter05/gcc-pass1.xml
r6e88633 r4e82d47 42 42 43 43 <sect2 role="installation"> 44 <title>Installation of GCC</title>44 <title>Installation of Cross GCC</title> 45 45 46 46 <para>GCC now requires the GMP and MPFR packages. As these packages may … … 61 61 <para>Prepare GCC for compilation:</para> 62 62 63 <screen><userinput remap="configure">CC="gcc -B/usr/bin/" ../gcc-&gcc-version;/configure --prefix=/tools \ 64 --with-local-prefix=/tools --disable-nls --disable-shared --disable-libssp \ 65 --disable-multilib --enable-languages=c</userinput></screen> 63 <screen><userinput remap="configure">../gcc-&gcc-version;/configure \ 64 --target=$LFS_TGT --prefix=/tools \ 65 --disable-nls --disable-shared --disable-multilib \ 66 --disable-decimal-float --disable-threads \ 67 --disable-libmudflap --disable-libssp \ 68 --disable-libgomp --enable-languages=c</userinput></screen> 66 69 67 70 <variablelist> 68 71 <title>The meaning of the configure options:</title> 69 70 <varlistentry>71 <term><envar>CC="gcc -B/usr/bin/"</envar></term>72 <listitem>73 <para>This forces <command>gcc</command> to prefer the linker from74 the host in <filename class="directory">/usr/bin</filename>. This75 is necessary on some hosts where the new <command>ld</command>76 built in the previous section is not compatible with the host's77 <command>gcc</command>.</para>78 </listitem>79 </varlistentry>80 81 <varlistentry>82 <term><parameter>--with-local-prefix=/tools</parameter></term>83 <listitem>84 <para>The purpose of this switch is to remove <filename85 class="directory">/usr/local/include</filename> from86 <command>gcc</command>'s include search path. This is not87 absolutely essential, however, it helps to minimize the88 influence of the host system.</para>89 </listitem>90 </varlistentry>91 72 92 73 <varlistentry> … … 100 81 101 82 <varlistentry> 102 <term><parameter>--disable- libssp</parameter></term>83 <term><parameter>--disable-decimal-float, --disable-threads, --disable-libmudflap, --disable-libssp, --disable-libgomp</parameter></term> 103 84 <listitem> 104 <para>This switch prevents a conflict with older versions of 105 glibc which can cause the build to fail.</para> 85 <para>These switches disable support for the decimal floating point extension, 86 threading, libmudflap, libssp and libgomp respectively. These features will fail 87 to compile when building a cross-compiler and are not necessary for the task of 88 cross-compiling the temporary libc.</para> 89 </listitem> 90 </varlistentry> 91 92 <varlistentry> 93 <term><parameter>--disable-multilib</parameter></term> 94 <listitem> 95 <para>On x86_64, LFS does not yet support a multilib configuration. 96 This switch is harmless for x86.</para> 106 97 </listitem> 107 98 </varlistentry> … … 115 106 </varlistentry> 116 107 117 <varlistentry>118 <term><parameter>--disable-multilib</parameter></term>119 <listitem>120 <para>We currently only want to build support for 64-bit libraries.</para>121 </listitem>122 </varlistentry>123 124 108 </variablelist> 125 109 126 <para>The following command will compile GCC not once, but several times. It 127 uses the programs compiled in a first round to compile itself a second time, 128 and then again a third time. It then compares these second and third compiles 129 to make sure it can reproduce itself flawlessly. This is called 130 <quote>bootstrapping</quote>. Building GCC in this way ensures that it was 131 compiled correctly and is now the default configuration for the released 132 package. Continue with compiling by running:</para> 110 <para>Compile GCC by running:</para> 133 111 134 112 <screen><userinput remap="make">make</userinput></screen> … … 147 125 <filename>libgcc_eh.a</filename> file isn't created and installed. The 148 126 Glibc package depends on this library as it uses 149 <parameter>-lgcc_eh</parameter> within its build system. We can satisfy150 that dependencyby creating a symlink to <filename>libgcc.a</filename>,127 <parameter>-lgcc_eh</parameter> within its build system. This dependency 128 can be satisfied by creating a symlink to <filename>libgcc.a</filename>, 151 129 since that file will end up containing the objects normally contained in 152 130 <filename>libgcc_eh.a</filename>.</para> 153 131 154 <screen><userinput remap="install">ln -vs libgcc.a ` gcc -print-libgcc-file-name | \132 <screen><userinput remap="install">ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | \ 155 133 sed 's/libgcc/&_eh/'`</userinput></screen> 156 157 <para>As a finishing touch, create a symlink. Many programs and scripts158 run <command>cc</command> instead of <command>gcc</command>, which is159 used to keep programs generic and therefore usable on all kinds of UNIX160 systems where the GNU C compiler is not always installed. Running161 <command>cc</command> leaves the system administrator free to decide162 which C compiler to install:</para>163 164 <screen><userinput remap="install">ln -vs gcc /tools/bin/cc</userinput></screen>165 134 166 135 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.