Changeset 574b0ea
- Timestamp:
- 05/30/2004 01:41:04 PM (20 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.0, 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/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 07f719a
- Parents:
- b711e1d
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter05/adjusting.xml
rb711e1d r574b0ea 21 21 22 22 <para>From this point onwards everything will link <emphasis>only</emphasis> 23 against the libraries in <filename >/tools/lib</filename>.</para>23 against the libraries in <filename class="directory">/tools/lib</filename>.</para> 24 24 25 25 <note><para>If you somehow missed the earlier warning to retain the Binutils … … 78 78 in dynamic linker name):</para> 79 79 80 <blockquote><screen> [Requesting program interpreter: /tools/lib/ld-linux.so.2]</screen></blockquote>80 <blockquote><screen><computeroutput>[Requesting program interpreter: /tools/lib/ld-linux.so.2]</computeroutput></screen></blockquote> 81 81 82 82 <para>Note especially that <filename class="directory">/tools/lib</filename> -
chapter05/binutils-pass1.xml
rb711e1d r574b0ea 33 33 34 34 <para>This package is known to behave badly when you change its default 35 optimization flags (including the < emphasis>-march</emphasis> and36 < emphasis>-mcpu</emphasis> options). Therefore, if you have defined any35 optimization flags (including the <parameter>-march</parameter> and 36 <parameter>-mcpu</parameter> options). Therefore, if you have defined any 37 37 environment variables that override default optimizations, such as CFLAGS and 38 38 CXXFLAGS, we recommend un-setting them when building Binutils.</para> … … 59 59 <variablelist> 60 60 <varlistentry> 61 <term>< userinput>--prefix=/tools</userinput></term>61 <term><parameter>--prefix=/tools</parameter></term> 62 62 <listitem><para>This tells the configure script to prepare to install the Binutils 63 programs in the <filename >/tools</filename> directory.</para></listitem>63 programs in the <filename class="directory">/tools</filename> directory.</para></listitem> 64 64 </varlistentry> 65 65 66 66 <varlistentry> 67 <term>< userinput>--disable-nls</userinput></term>67 <term><parameter>--disable-nls</parameter></term> 68 68 <listitem><para>This disables internationalization (a word often shortened to 69 69 i18n). We don't need this for our static programs and <emphasis>nls</emphasis> … … 81 81 <variablelist> 82 82 <varlistentry> 83 <term>< userinput>configure-host</userinput></term>83 <term><parameter>configure-host</parameter></term> 84 84 <listitem><para>This forces all the subdirectories to be configured immediately. 85 85 A statically linked build will fail without it. We therefore use this option to work … … 88 88 89 89 <varlistentry> 90 <term>< userinput>LDFLAGS="-all-static"</userinput></term>90 <term><parameter>LDFLAGS="-all-static"</parameter></term> 91 91 <listitem><para>This tells the linker that all the Binutils programs should be 92 linked statically. However, strictly speaking, < emphasis>"-all-static"</emphasis>92 linked statically. However, strictly speaking, <parameter>"-all-static"</parameter> 93 93 is passed to the <command>libtool</command> program, which then passes 94 < emphasis>"-static"</emphasis> to the linker.</para></listitem>94 <parameter>"-static"</parameter> to the linker.</para></listitem> 95 95 </varlistentry> 96 96 </variablelist> … … 115 115 <variablelist> 116 116 <varlistentry> 117 <term>< userinput>-C ld clean</userinput></term>117 <term><parameter>-C ld clean</parameter></term> 118 118 <listitem><para>This tells the make program to remove all the compiled files 119 119 in the <filename class="directory">ld</filename> subdirectory.</para></listitem> … … 121 121 122 122 <varlistentry> 123 <term>< userinput>-C ld LDFLAGS="-all-static"124 LIB_PATH=/tools/lib</ userinput></term>123 <term><parameter>-C ld LDFLAGS="-all-static" 124 LIB_PATH=/tools/lib</parameter></term> 125 125 <listitem><para>This option rebuilds everything in the 126 126 <filename class="directory">ld</filename> subdirectory. Specifying the LIB_PATH -
chapter05/binutils-pass2.xml
rb711e1d r574b0ea 39 39 <variablelist> 40 40 <varlistentry> 41 <term>< userinput>--with-lib-path=/tools/lib</userinput></term>41 <term><parameter>--with-lib-path=/tools/lib</parameter></term> 42 42 <listitem><para>This tells the configure script to specify the library search path 43 during the compilation of Binutils, resulting in < emphasis>/tools/lib</emphasis>43 during the compilation of Binutils, resulting in <parameter>/tools/lib</parameter> 44 44 to be passed to the linker. This prevents the linker from searching through library 45 45 directories on the host.</para></listitem> … … 64 64 exceptions to this rule are as follows:</para> 65 65 66 <screen> * 5 FAIL (unexpected failure) for visibility66 <screen><computeroutput>* 5 FAIL (unexpected failure) for visibility 67 67 * 1 FAIL for selective4 68 * 1 FAIL for selective5</ screen>68 * 1 FAIL for selective5</computeroutput></screen> 69 69 70 70 <!-- … … 75 75 to spot. The output shown will contain something like:</para> 76 76 77 <blockquote><screen> make[1]: *** [check-binutils] Error 2</screen></blockquote>77 <blockquote><screen><computeroutput>make[1]: *** [check-binutils] Error 2</computeroutput></screen></blockquote> 78 78 79 79 --> … … 83 83 <screen><userinput>make install</userinput></screen> 84 84 85 <para>Now prepare the linker for the "Re-adjusting"phase in the next85 <para>Now prepare the linker for the <quote>Re-adjusting</quote> phase in the next 86 86 chapter:</para> 87 87 -
chapter05/coreutils.xml
rb711e1d r574b0ea 32 32 <screen><userinput>DEFAULT_POSIX2_VERSION=199209 ./configure --prefix=/tools</userinput></screen> 33 33 34 <para>This package has an issue when compiled against versions of glibc34 <para>This package has an issue when compiled against versions of Glibc 35 35 later than 2.3.2. Some of the Coreutils utilities (such as 36 36 (<command>head</command>, <command>tail</command> and <command>sort</command>) … … 39 39 should be preserved until the many places where it is used can be 40 40 updated. Backwards compatibility is achieved by setting the 41 DEFAULT_POSIX2_VERSION environment variable to "199209"in the above42 command. If you don 't want coreutils to be backwards compatible41 DEFAULT_POSIX2_VERSION environment variable to <quote>199209</quote> in the above 42 command. If you don't want coreutils to be backwards compatible 43 43 with the traditional syntax, then simply omit setting the DEFAULT_POSIX2_VERSION 44 environment variable. Realise though, that doing so will mean you 'll have44 environment variable. Realise though, that doing so will mean you'll have 45 45 to deal with the consequences yourself: patch the many packages that still use 46 46 the old syntax. We therefore recommend using the instructions exactly as given … … 53 53 <para>(If you insist on testing the results, then issue: 54 54 <userinput>make RUN_EXPENSIVE_TESTS=yes check</userinput>. The 55 < emphasis>RUN_EXPENSIVE_TESTS=yes</emphasis> parameter tells the test suite to55 <parameter>RUN_EXPENSIVE_TESTS=yes</parameter> parameter tells the test suite to 56 56 run several additional tests that are considered relatively expensive on some 57 57 platforms but generally are not a problem on Linux.)</para> -
chapter05/dejagnu.xml
rb711e1d r574b0ea 54 54 <indexterm zone="ch-tools-dejagnu runtest"><primary sortas="b-runtest">runtest</primary></indexterm> 55 55 <para>is the wrapper script that finds the proper 56 expectshell and then runs DejaGnu.</para>56 <command>expect</command> shell and then runs DejaGnu.</para> 57 57 </listitem> 58 58 </varlistentry> -
chapter05/expect.xml
rb711e1d r574b0ea 43 43 <variablelist> 44 44 <varlistentry> 45 <term>< userinput>--with-tcl=/tools/lib</userinput></term>45 <term><parameter>--with-tcl=/tools/lib</parameter></term> 46 46 <listitem><para>This ensures that 47 47 the configure script finds the Tcl installation in our temporary tools location. … … 51 51 52 52 <varlistentry> 53 <term>< userinput>--with-x=no</userinput></term>53 <term><parameter>--with-x=no</parameter></term> 54 54 <listitem><para>This tells the configure 55 55 script not to search for Tk (the Tcl GUI component) or the X Window System … … 76 76 <variablelist> 77 77 <varlistentry> 78 <term>< userinput>SCRIPTS=""</userinput></term>78 <term><parameter>SCRIPTS=""</parameter></term> 79 79 <listitem><para>This prevents installation 80 80 of the supplementary expect scripts which are not needed.</para></listitem> -
chapter05/gcc-pass1.xml
rb711e1d r574b0ea 32 32 33 33 <para>This package is known to behave badly when you change its default 34 optimization flags (including the < emphasis>-march</emphasis> and35 < emphasis>-mcpu</emphasis> options). Therefore, if you have defined any34 optimization flags (including the <parameter>-march</parameter> and 35 <parameter>-mcpu</parameter> options). Therefore, if you have defined any 36 36 environment variables that override default optimizations, such as CFLAGS and 37 37 CXXFLAGS, we recommend un-setting them when building GCC.</para> … … 53 53 <variablelist> 54 54 <varlistentry> 55 <term>< userinput>--with-local-prefix=/tools</userinput></term>56 <listitem><para>The purpose of this switch is to remove <filename >/usr/local/include</filename>55 <term><parameter>--with-local-prefix=/tools</parameter></term> 56 <listitem><para>The purpose of this switch is to remove <filename class="directory">/usr/local/include</filename> 57 57 from <command>gcc</command>'s include search path. This is not absolutely 58 58 essential; however, we want to try to minimize the influence of the host … … 61 61 62 62 <varlistentry> 63 <term>< userinput>--enable-shared</userinput></term>63 <term><parameter>--enable-shared</parameter></term> 64 64 <listitem><para>This switch may 65 65 seem counter-intuitive at first. But using it allows the building of … … 67 67 having <filename>libgcc_eh.a</filename> available ensures that the configure 68 68 script for Glibc (the next package we compile) produces the proper results. 69 Note that the <command>gcc</command>binaries will still be linked70 statically, as this is controlled by the < emphasis>-static</emphasis>69 Note that the GCC binaries will still be linked 70 statically, as this is controlled by the <parameter>-static</parameter> 71 71 value of BOOT_LDFLAGS in the next step.</para></listitem> 72 72 </varlistentry> 73 73 74 74 <varlistentry> 75 <term>< userinput>--enable-languages=c</userinput></term>75 <term><parameter>--enable-languages=c</parameter></term> 76 76 <listitem><para>This option 77 77 ensures that only the C compiler is built. The option is only needed when you … … 88 88 <variablelist> 89 89 <varlistentry> 90 <term>< userinput>BOOT_LDFLAGS="-static"</userinput></term>90 <term><parameter>BOOT_LDFLAGS="-static"</parameter></term> 91 91 <listitem><para>This tells GCC to link its programs statically.</para></listitem> 92 92 </varlistentry> 93 93 94 94 <varlistentry> 95 <term>< userinput>bootstrap</userinput></term>95 <term><parameter>bootstrap</parameter></term> 96 96 <listitem><para>This target doesn't just 97 97 compile GCC, but compiles it several times. It uses the programs compiled in -
chapter05/gcc-pass2.xml
rb711e1d r574b0ea 31 31 highly dependent on properly functioning pseudo terminals (PTYs) which are 32 32 provided by your host. These days, PTYs are most commonly implemented via the 33 < emphasis>devpts</emphasis> file system. You can quickly check if your host33 <systemitem class="filesystem">devpts</systemitem> file system. You can quickly check if your host 34 34 system is set up correctly in this regard by performing a simple test:</para> 35 35 … … 38 38 <para>The response might be:</para> 39 39 40 <blockquote><screen> The system has no more ptys. Ask your system administrator to create more.</screen></blockquote>40 <blockquote><screen><computeroutput>The system has no more ptys. Ask your system administrator to create more.</computeroutput></screen></blockquote> 41 41 42 42 <para>If you receive the above message, your host doesn't have its PTYs set up … … 49 49 to unpack both the core and the g++ tarballs (and testsuite too, if you want to 50 50 run the tests). Unpacking them in your working directory, they will all unfold 51 into a single <filename >gcc-&gcc-version;/</filename> subdirectory.</para>51 into a single <filename class="directory">gcc-&gcc-version;/</filename> subdirectory.</para> 52 52 53 53 <para>First correct a problem and make an essential adjustment:</para> … … 56 56 patch -Np1 -i ../gcc-&gcc-short-version;-specs-1.patch</userinput></screen> 57 57 58 <para>The first patch disables the GCC < quote>fixincludes</quote> script. We58 <para>The first patch disables the GCC <command>fixincludes</command> script. We 59 59 mentioned this briefly earlier, but a slightly more in-depth explanation of 60 60 the fixincludes process is warranted here. Under normal circumstances, the GCC 61 fixincludesscript scans your system for header files that need to be fixed. It61 <command>fixincludes</command> script scans your system for header files that need to be fixed. It 62 62 might find that some Glibc header files on your host system need to be fixed, 63 63 fix them and put them in the GCC private include directory. Then, later on in … … 99 99 <variablelist> 100 100 <varlistentry> 101 <term>< userinput>--enable-clocale=gnu</userinput></term>101 <term><parameter>--enable-clocale=gnu</parameter></term> 102 102 <listitem><para>This option 103 103 ensures the correct locale model is selected for the C++ libraries under all … … 110 110 111 111 <varlistentry> 112 <term>< userinput>--enable-threads=posix</userinput></term>112 <term><parameter>--enable-threads=posix</parameter></term> 113 113 <listitem><para>This enables 114 114 C++ exception handling for multi-threaded code.</para></listitem> … … 116 116 117 117 <varlistentry> 118 <term>< userinput>--enable-__cxa_atexit</userinput></term>118 <term><parameter>--enable-__cxa_atexit</parameter></term> 119 119 <listitem><para>This option 120 120 allows use of __cxa_atexit, rather than atexit, to register C++ destructors for … … 126 126 127 127 <varlistentry> 128 <term>< userinput>--enable-languages=c,c++</userinput></term>128 <term><parameter>--enable-languages=c,c++</parameter></term> 129 129 <listitem><para>This option 130 130 ensures that both the C and C++ compilers are built.</para></listitem> … … 132 132 133 133 <varlistentry> 134 <term>< userinput>--disable-libstdcxx-pch</userinput></term>134 <term><parameter>--disable-libstdcxx-pch</parameter></term> 135 135 <listitem><para>Don't build the 136 136 PCH (pre-compiled header) for libstdc++. It takes up a ton of space, and we … … 143 143 <screen><userinput>make</userinput></screen> 144 144 145 <para>There is no need to use the < emphasis>bootstrap</emphasis> target now,145 <para>There is no need to use the <parameter>bootstrap</parameter> target now, 146 146 as the compiler we're using to compile this GCC was built from the exact same 147 147 version of the GCC sources we used earlier.</para> … … 154 154 <screen><userinput>make -k check</userinput></screen> 155 155 156 <para>The < emphasis>-k</emphasis> flag is used to make the test suite run156 <para>The <parameter>-k</parameter> flag is used to make the test suite run 157 157 through to completion and not stop at the first failure. The GCC test suite is 158 158 very comprehensive and is almost guaranteed to generate a few failures. To get -
chapter05/gettext.xml
rb711e1d r574b0ea 37 37 <variablelist> 38 38 <varlistentry> 39 <term>< userinput>--disable-libasprintf</userinput></term>39 <term><parameter>--disable-libasprintf</parameter></term> 40 40 <listitem><para>This flag tells 41 Gettext that we don't want its asprintf library. Nothing in Chapter 5 or 642 requires this, and gettext gets rebuilt later, so we exclude it to save41 Gettext that we don't want its asprintf library. Nothing in this chapter or the next 42 requires this, and Gettext gets rebuilt later, so we exclude it to save 43 43 time/space.</para></listitem> 44 44 </varlistentry> 45 45 46 46 <varlistentry> 47 <term>< userinput>--disable-csharp</userinput></term>47 <term><parameter>--disable-csharp</parameter></term> 48 48 <listitem><para>Gettext has a nasty 49 49 habit of searching for a C# compiler on the host, and building bindings for it. -
chapter05/glibc.xml
rb711e1d r574b0ea 29 29 30 30 <para>This package is known to behave badly when you change its default 31 optimization flags (including the < emphasis>-march</emphasis> and32 < emphasis>-mcpu</emphasis> options). Therefore, if you have defined any31 optimization flags (including the <parameter>-march</parameter> and 32 <parameter>-mcpu</parameter> options). Therefore, if you have defined any 33 33 environment variables that override default optimizations, such as CFLAGS and 34 34 CXXFLAGS, we recommend un-setting them when building Glibc.</para> … … 54 54 <variablelist> 55 55 <varlistentry> 56 <term>< userinput>--disable-profile</userinput></term>56 <term><parameter>--disable-profile</parameter></term> 57 57 <listitem><para>This builds the 58 58 libraries without profiling information. Omit this option if you plan to do … … 61 61 62 62 <varlistentry> 63 <term>< userinput>--enable-add-ons=nptl</userinput></term>63 <term><parameter>--enable-add-ons=nptl</parameter></term> 64 64 <listitem><para>This tells Glibc to use the NPTL add-on as its threading 65 65 library.</para></listitem> … … 67 67 68 68 <varlistentry> 69 <term>< userinput>--with-tls</userinput></term>69 <term><parameter>--with-tls</parameter></term> 70 70 <listitem><para>This tells Glibc to include support for TLS (thread-local storage). 71 71 This is required for NPTL to work. </para></listitem> … … 73 73 74 74 <varlistentry> 75 <term>< userinput>--with-binutils=/tools/bin</userinput></term>75 <term><parameter>--with-binutils=/tools/bin</parameter></term> 76 76 <listitem><para>Strictly speaking this switch is not required. But it does ensure 77 77 nothing can go wrong with regard to what Binutils programs get used during the … … 80 80 81 81 <varlistentry> 82 <term>< userinput>--without-gd</userinput></term>82 <term><parameter>--without-gd</parameter></term> 83 83 <listitem><para>This prevents the build of the <command>memusagestat</command> 84 84 program, which strangely enough insists on linking against the host's libraries … … 87 87 88 88 <varlistentry> 89 <term>< userinput>--without-cvs</userinput></term>89 <term><parameter>--without-cvs</parameter></term> 90 90 <listitem><para>This is meant to prevent 91 91 the Makefiles from attempting automatic CVS checkouts when using a CVS … … 96 96 97 97 <varlistentry> 98 <term>< userinput>--with-headers=/tools/glibc-kernheaders</userinput></term>98 <term><parameter>--with-headers=/tools/glibc-kernheaders</parameter></term> 99 99 <listitem><para>This tells Glibc to compile against the <quote>raw</quote> 100 100 kernel headers, so that it knows exactly what features the kernel has, and can … … 105 105 <para>During this stage you might see the following warning:</para> 106 106 107 <blockquote><screen> configure: WARNING:107 <blockquote><screen><computeroutput>configure: WARNING: 108 108 *** These auxiliary programs are missing or incompatible versions: msgfmt 109 109 *** some features will be disabled. 110 *** Check the INSTALL file for required versions.</ screen></blockquote>110 *** Check the INSTALL file for required versions.</computeroutput></screen></blockquote> 111 111 112 112 <para>The missing or incompatible <command>msgfmt</command> program is … … 143 143 144 144 <listitem><para>The <emphasis>atime</emphasis> test sometimes fails when the 145 LFS partition is mounted with the < emphasis>noatime</emphasis> option, or due145 LFS partition is mounted with the <parameter>noatime</parameter> option, or due 146 146 to other file system quirks.</para></listitem> 147 147 148 148 <listitem><para>The <emphasis>shm</emphasis> test might fail when the host 149 system is running the devfs file system but doesn't have the tmpfsfile system150 mounted at <filename >/dev/shm</filename> due to lack of support for tmpfs in149 system is running the devfs file system but doesn't have the <systemitem class="filesystem">tmpfs</systemitem> file system 150 mounted at <filename class="directory">/dev/shm</filename> due to lack of support for tmpfs in 151 151 the kernel.</para></listitem> 152 152 -
chapter05/grep.xml
rb711e1d r574b0ea 37 37 <variablelist> 38 38 <varlistentry> 39 <term>< userinput>--disable-perl-regexp</userinput></term>39 <term><parameter>--disable-perl-regexp</parameter></term> 40 40 <listitem><para>This makes sure that <command>grep</command> does not 41 41 get linked against a PCRE library that may be present on the host and would not be … … 44 44 45 45 <varlistentry> 46 <term>< userinput>--with-included-regex</userinput></term>46 <term><parameter>--with-included-regex</parameter></term> 47 47 <listitem><para>This ensures that 48 48 Grep uses its internal regular expression code. Without this switch, Grep will -
chapter05/hostreqs.xml
rb711e1d r574b0ea 11 11 running at <emphasis>least</emphasis> a 2.6.2 kernel. The reasons for this high 12 12 requirement is the use of NPTL, but more importantly the use of udev. Udev 13 creates devices dynamically by reading from the sysfsfile system. Only very13 creates devices dynamically by reading from the <systemitem class="filesystem">sysfs</systemitem> file system. Only very 14 14 recently has support for this file system been implemented in most of the kernel 15 15 drivers, however. We must be sure that all the critical system devices get -
chapter05/kernel-headers.xml
rb711e1d r574b0ea 42 42 <screen><userinput>make include/linux/version.h</userinput></screen> 43 43 44 <para>Create the platform-specific <filename >include/asm</filename>44 <para>Create the platform-specific <filename class="symlink">include/asm</filename> 45 45 symlink:</para> 46 46 -
chapter05/linux-libc-headers.xml
rb711e1d r574b0ea 26 26 27 27 <para>For years it has been common practice to use so-called <quote>raw</quote> 28 kernel headers (straight from a kernel tarball) in /usr/include, but over the28 kernel headers (straight from a kernel tarball) in <filename class="directory">/usr/include</filename>, but over the 29 29 last few years, the kernel developers have taken a strong stance that such 30 30 things should not be done. Thus was born the linux-libc-headers project, -
chapter05/ncurses.xml
rb711e1d r574b0ea 37 37 <variablelist> 38 38 <varlistentry> 39 <term>< userinput>--without-ada</userinput></term>39 <term><parameter>--without-ada</parameter></term> 40 40 <listitem><para>This tells Ncurses not 41 41 to build its Ada bindings, even if an Ada compiler is installed on the host. … … 45 45 46 46 <varlistentry> 47 <term>< userinput>--enable-overwrite</userinput></term>47 <term><parameter>--enable-overwrite</parameter></term> 48 48 <listitem><para>This tells Ncurses to install its header files into 49 49 <filename class="directory">/tools/include</filename> instead of -
chapter05/patch.xml
rb711e1d r574b0ea 29 29 30 30 <para>Prepare Patch for compilation (the preprocessor flag 31 < emphasis>-D_GNU_SOURCE</emphasis> is only needed on the PowerPC platform, on31 <parameter>-D_GNU_SOURCE</parameter> is only needed on the PowerPC platform, on 32 32 other architectures you can leave it out):</para> 33 33 -
chapter05/perl.xml
rb711e1d r574b0ea 41 41 <variablelist> 42 42 <varlistentry> 43 <term>< userinput>-Dstatic_ext='IO Fcntl POSIX'</userinput></term>43 <term><parameter>-Dstatic_ext='IO Fcntl POSIX'</parameter></term> 44 44 <listitem><para>This tells 45 45 Perl to build the minimum set of static extensions needed for installing and -
chapter05/stripping.xml
rb711e1d r574b0ea 21 21 22 22 <para>Take care <emphasis>not</emphasis> to use 23 < emphasis>--strip-unneeded</emphasis> on the libraries -- the static ones23 <parameter>--strip-unneeded</parameter> on the libraries -- the static ones 24 24 would be destroyed and you would have to build the three toolchain packages 25 25 all over again.</para> -
chapter05/tcl.xml
rb711e1d r574b0ea 51 51 to experience failures under certain host conditions that are not fully 52 52 understood. Therefore, test suite failures here are not surprising, and are not 53 considered critical. The < emphasis>TZ=UTC</emphasis> parameter sets the time53 considered critical. The <parameter>TZ=UTC</parameter> parameter sets the time 54 54 zone to Coordinated Universal Time (UTC) also known as Greenwich Mean Time 55 55 (GMT), but only for the duration of the test suite run. This ensures the clock … … 62 62 63 63 <warning><para><emphasis>Do not remove</emphasis> the 64 <filename >tcl&tcl-version;</filename> source directory yet, as the next package64 <filename class="directory">tcl&tcl-version;</filename> source directory yet, as the next package 65 65 will need its internal headers.</para></warning> 66 66 -
chapter05/toolchaintechnotes.xml
rb711e1d r574b0ea 28 28 many folks the target triplet will probably be 29 29 <emphasis>i686-pc-linux-gnu</emphasis>. A simple way to determine your target 30 triplet is to run the < filename>config.guess</filename> script that comes with30 triplet is to run the <command>config.guess</command> script that comes with 31 31 the source for many packages. Unpack the Binutils sources and run the script: 32 32 <userinput>./config.guess</userinput> and note the output.</para> … … 35 35 <emphasis>dynamic linker</emphasis>, often also referred to as the 36 36 <emphasis>dynamic loader</emphasis>, not to be confused with the standard linker 37 < emphasis>ld</emphasis> that is part of Binutils. The dynamic linker is provided37 <command>ld</command> that is part of Binutils. The dynamic linker is provided 38 38 by Glibc and has the job of finding and loading the shared libraries needed by a 39 39 program, preparing the program to run and then running it. For most folks the 40 name of the dynamic linker will be < emphasis>ld-linux.so.2</emphasis>. On40 name of the dynamic linker will be <filename>ld-linux.so.2</filename>. On 41 41 platforms that are less prevalent, the name might be 42 < emphasis>ld.so.1</emphasis> and newer 64 bit platforms might even have42 <filename>ld.so.1</filename> and newer 64 bit platforms might even have 43 43 something completely different. You should be able to determine the name 44 44 of your platform's dynamic linker by looking in the … … 64 64 65 65 <listitem><para>Careful manipulation of <command>gcc</command>'s 66 < emphasis>specs</emphasis> file to tell the compiler which target dynamic66 <filename>specs</filename> file to tell the compiler which target dynamic 67 67 linker will be used.</para></listitem> 68 68 </itemizedlist> … … 82 82 the tools in one location are hard linked to the other. An important facet of 83 83 the linker is its library search order. Detailed information can be obtained 84 from <command>ld</command> by passing it the < emphasis>--verbose</emphasis>84 from <command>ld</command> by passing it the <parameter>--verbose</parameter> 85 85 flag. For example: <command>ld --verbose | grep SEARCH</command> will 86 86 show you the current search paths and their order. You can see what files are 87 87 actually linked by <command>ld</command> by compiling a dummy program and 88 passing the < emphasis>--verbose</emphasis> switch to the linker. For example:89 < command>gcc dummy.c -Wl,--verbose 2>&1 | grep succeeded</command>88 passing the <parameter>--verbose</parameter> switch to the linker. For example: 89 <userinput>gcc dummy.c -Wl,--verbose 2>&1 | grep succeeded</userinput> 90 90 will show you all the files successfully opened during the linking.</para> 91 91 … … 93 93 <command>./configure</command> you'll see, for example:</para> 94 94 95 <blockquote><screen> checking what assembler to use... /tools/i686-pc-linux-gnu/bin/as96 checking what linker to use... /tools/i686-pc-linux-gnu/bin/ld</ screen></blockquote>95 <blockquote><screen><computeroutput>checking what assembler to use... /tools/i686-pc-linux-gnu/bin/as 96 checking what linker to use... /tools/i686-pc-linux-gnu/bin/ld</computeroutput></screen></blockquote> 97 97 98 98 <para>This is important for the reasons mentioned above. It also demonstrates … … 101 101 itself, the same search paths are not necessarily used. You can find out which 102 102 standard linker <command>gcc</command> will use by running: 103 < command>gcc -print-prog-name=ld</command>.103 <userinput>gcc -print-prog-name=ld</userinput>. 104 104 Detailed information can be obtained from <command>gcc</command> by passing 105 it the < emphasis>-v</emphasis> flag while compiling a dummy program. For106 example: < command>gcc -v dummy.c</command> will show you detailed105 it the <parameter>-v</parameter> flag while compiling a dummy program. For 106 example: <userinput>gcc -v dummy.c</userinput> will show you detailed 107 107 information about the preprocessor, compilation and assembly stages, including 108 108 <command>gcc</command>'s include search paths and their order.</para> … … 118 118 <filename class="directory">glibc-build</filename> directory for all the 119 119 important details. You'll note some interesting items like the use of 120 < emphasis>CC="gcc -B/tools/bin/"</emphasis> to control which binary tools are121 used, and also the use of the < emphasis>-nostdinc</emphasis> and122 < emphasis>-isystem</emphasis> flags to control the compiler's include search120 <parameter>CC="gcc -B/tools/bin/"</parameter> to control which binary tools are 121 used, and also the use of the <parameter>-nostdinc</parameter> and 122 <parameter>-isystem</parameter> flags to control the compiler's include search 123 123 path. These items help to highlight an important aspect of the Glibc package: 124 124 it is very self-sufficient in terms of its build machinery and generally does … … 126 126 127 127 <para>After the Glibc installation, we make some adjustments to ensure that 128 searching and linking take place only within our <filename >/tools</filename>128 searching and linking take place only within our <filename class="directory">/tools</filename> 129 129 prefix. We install an adjusted <command>ld</command>, which has a hard-wired 130 130 search path limited to <filename class="directory">/tools/lib</filename>. Then … … 134 134 hard-wired path to a dynamic linker is embedded into every ELF shared 135 135 executable. You can inspect this by running: 136 < command>readelf -l <name of binary> | grep interpreter</command>.136 <userinput>readelf -l <name of binary> | grep interpreter</userinput>. 137 137 By amending <command>gcc</command>'s specs file, we are ensuring that every 138 138 program compiled from here through the end of this chapter will use our new … … 146 146 147 147 <para>During the second pass of Binutils, we are able to utilize the 148 < emphasis>--with-lib-path</emphasis> configure switch to control148 <parameter>--with-lib-path</parameter> configure switch to control 149 149 <command>ld</command>'s library search path. From this point onwards, the 150 150 core toolchain is self-contained and self-hosted. The remainder of the -
chapter05/udev.xml
rb711e1d r574b0ea 37 37 by applying the following patch:</para> 38 38 39 <screen><userinput>patch -Np1 -i ../udev-&udev-version;-config-2.patch 40 </userinput></screen> 39 <screen><userinput>patch -Np1 -i ../udev-&udev-version;-config-2.patch</userinput></screen> 41 40 42 41 <para>The udevstart program hardcodes the path to the udev program in itself, -
chapter05/util-linux.xml
rb711e1d r574b0ea 34 34 35 35 <para>Util-linux doesn't use the freshly installed headers and libraries 36 from the /toolsdirectory. This is fixed by altering the configure36 from the <filename class="directory">/tools</filename> directory. This is fixed by altering the configure 37 37 script:</para> 38 38 -
stylesheets/lfs.css
rb711e1d r574b0ea 234 234 235 235 pre.screen { 236 color: #000; 236 237 background-color: #e9e9e9; 237 238 border: 1px solid #050505;
Note:
See TracChangeset
for help on using the changeset viewer.