- Timestamp:
- 05/03/2004 09:28:58 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:
- 5f505ff, c8ba565
- Parents:
- 411ceb8
- Location:
- chapter05
- Files:
-
- 6 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter05/bash.xml
r411ceb8 r9dfc02f 30 30 <para>Now prepare Bash for compilation:</para> 31 31 32 <screen><userinput>./configure --prefix=/tools </userinput></screen>32 <screen><userinput>./configure --prefix=/tools --without-bash-malloc</userinput></screen> 33 33 34 34 <para>Compile the program:</para> -
chapter05/binutils-pass2.xml
r411ceb8 r9dfc02f 51 51 will do so:</para> 52 52 53 <screen><userinput>make check</userinput></screen> 53 <screen><userinput>make -k check</userinput></screen> 54 55 <para>Except for a few known failures, the binutils tests should all pass. The 56 exceptions to this rule are as follows:</para> 57 58 <screen>* 5 FAIL (unexpected failure) for visibility 59 * 1 FAIL for selective4 60 * 1 FAIL for selective5</screen> 61 62 <!-- 54 63 55 64 <para>There should be no unexpected failures here, expected failures are fine. … … 59 68 60 69 <blockquote><screen>make[1]: *** [check-binutils] Error 2</screen></blockquote> 70 71 --> 61 72 62 73 <para>And install the package:</para> -
chapter05/bzip2.xml
r411ceb8 r9dfc02f 24 24 25 25 <para>The Bzip2 package doesn't contain a <command>configure</command> 26 script. Compile and install it with a straightforward:</para> 26 script. Compile it with a straightforward:</para> 27 28 <screen><userinput>make</userinput></screen> 29 30 <para>And install it:</para> 27 31 28 32 <screen><userinput>make PREFIX=/tools install</userinput></screen> -
chapter05/chapter05.xml
r411ceb8 r9dfc02f 10 10 11 11 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/> 12 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hostreqs.xml"/> 12 13 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="toolchaintechnotes.xml"/> 13 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils-pass1.xml"/> 14 15 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-pass1.xml"/> 16 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="linux-libc-headers.xml"/> 15 17 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kernel-headers.xml"/> 16 18 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="glibc.xml"/> … … 36 38 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="texinfo.xml"/> 37 39 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bash.xml"/> 40 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="m4.xml"/> 41 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bison.xml"/> 42 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="flex.xml"/> 38 43 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="util-linux.xml"/> 39 44 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="perl.xml"/> 45 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="udev.xml"/> 40 46 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="stripping.xml"/> 41 47 -
chapter05/gcc-pass1.xml
r411ceb8 r9dfc02f 41 41 42 42 <screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \ 43 --with-local-prefix=/tools \ 44 --disable-nls --enable-shared \ 45 --enable-languages=c</userinput></screen> 43 --libexecdir=/tools/lib --with-local-prefix=/tools \ 44 --disable-nls --enable-shared --enable-languages=c</userinput></screen> 46 45 47 46 <para>The meaning of the configure options:</para> -
chapter05/gcc-pass2.xml
r411ceb8 r9dfc02f 84 84 85 85 <screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \ 86 --with-local-prefix=/tools \ 87 --enable-clocale=gnu --enable-shared \ 88 --enable-threads=posix --enable-__cxa_atexit \ 89 --enable-languages=c,c++</userinput></screen> 86 --libexecdir=/tools/lib --with-local-prefix=/tools \ 87 --enable-clocale=gnu --enable-shared --enable-threads=posix \ 88 --enable-__cxa_atexit --enable-languages=c,c++</userinput></screen> 90 89 91 90 <para>The meaning of the new configure options:</para> … … 142 141 mailing list for similar configurations to your own. For an example of how 143 142 current GCC-&gcc-version; should look on i686-pc-linux-gnu, see 144 <ulink url="http://gcc.gnu.org/ml/gcc-testresults/2004-01/msg00826.html"/>.</para> 145 146 <para>Note that the results contain:</para> 147 148 <screen>* 1 XPASS (unexpected pass) for g++ 149 * 1 FAIL (unexpected failure) for gcc 150 * 24 XPASS's for libstdc++</screen> 151 152 <para>The unexpected pass for g++ is due to the use of 153 <emphasis>--enable-__cxa_atexit</emphasis>. Apparently not all platforms 154 supported by GCC have support for <quote>__cxa_atexit</quote> in their C 155 libraries, so this test is not always expected to pass.</para> 156 157 <para>The 24 unexpected passes for libstdc++ are due to the use of 158 <emphasis>--enable-clocale=gnu</emphasis>. This option, which is the correct 159 choice on Glibc-based systems of versions 2.2.5 and above, enables in the GNU C 160 library a locale support that is superior to the otherwise selected 161 <emphasis>generic</emphasis> model (which may be applicable if for instance you 162 were using Newlibc, Sun-libc or whatever other libc). The libstdc++ test suite 163 is apparently expecting the <emphasis>generic</emphasis> model, hence those 164 tests are not always expected to pass.</para> 143 <ulink url="http://gcc.gnu.org/ml/gcc-testresults/2004-04/msg00414.html"/>.</para> 165 144 166 145 <para>Having a few unexpected failures often cannot be avoided. The GCC 167 146 developers are usually aware of these, but haven't yet gotten around to fixing 168 them. One particular case in point is the filebuf_members test in the C++ 169 standard library testsuite. This test has been observed to fail in some 170 situations, but succeeed in others. In short, unless your results are vastly 171 different from those at the above URL, it is safe to continue.</para> 147 them. In short, unless your results are vastly different from those at the above 148 URL, it is safe to continue.</para> 172 149 173 150 <para>And finally install the package:</para> -
chapter05/gettext.xml
r411ceb8 r9dfc02f 25 25 <para>Prepare Gettext for compilation:</para> 26 26 27 <screen><userinput>./configure --prefix=/tools</userinput></screen> 27 <screen><userinput>./configure --prefix=/tools --disable-libasprintf \ 28 --disable-csharp</userinput></screen> 29 30 <itemizedlist> 31 <listitem><para><userinput>--disable-libasprintf</userinput>: This flag tells 32 Gettext that we don't want its asprintf library. Nothing in Chapter 5 or 6 33 requires this, and gettext gets rebuilt later, so we exclude it to save 34 time/space.</para></listitem> 35 36 <listitem><para><userinput>--disable-csharp</userinput>: Gettext has a nasty 37 habit of searching for a C# compiler on the host, and building bindings for it. 38 We've already <quote>locked</quote> ourselves into the temporary tools though, 39 which doesn't have a C# compiler.</para></listitem> 40 </itemizedlist> 28 41 29 42 <para>Compile the programs:</para> -
chapter05/glibc.xml
r411ceb8 r9dfc02f 40 40 <para>Next, prepare Glibc for compilation:</para> 41 41 42 <screen><userinput>../glibc-&glibc-version; -20031202/configure --prefix=/tools \43 --disable-profile --enable-add-ons= linuxthreads \44 --with-binutils=/tools/bin --with -headers=/tools/include\45 --with out-gd --without-cvs</userinput></screen>42 <screen><userinput>../glibc-&glibc-version;/configure --prefix=/tools \ 43 --disable-profile --enable-add-ons=nptl --with-tls \ 44 --with-binutils=/tools/bin --without-gd --without-cvs \ 45 --with-headers=/tools/glibc-kernheaders</userinput></screen> 46 46 47 47 <para>The meaning of the configure options:</para> 48 48 49 49 <itemizedlist> 50 <listitem><para><userinput>--disable-profile</userinput>: This 51 builds the libraries without profiling information. Omit this option if you 52 plan to do profiling on the temporary tools.</para></listitem> 53 54 <listitem><para><userinput>--enable-add-ons=linuxthreads</userinput>: This 55 tells Glibc to use the Linuxthreads add-on as its threading 56 library.</para></listitem> 57 58 <listitem><para><userinput>--with-binutils=/tools/bin</userinput> and 59 <userinput>--with-headers=/tools/include</userinput>: Strictly speaking 60 these switches are not required. But they ensure nothing can go wrong with 61 regard to what kernel headers and Binutils programs get used during the 62 Glibc build.</para></listitem> 63 64 <listitem><para><userinput>--without-gd</userinput>: This prevents 65 the build of the <command>memusagestat</command> program, which 66 strangely enough insists on linking against the host's libraries (libgd, 67 libpng, libz, and so forth).</para></listitem> 50 <listitem><para><userinput>--disable-profile</userinput>: This builds the 51 libraries without profiling information. Omit this option if you plan to do 52 profiling on the temporary tools.</para></listitem> 53 54 <listitem><para><userinput>--enable-add-ons=nptl</userinput>: This 55 tells Glibc to use the NPTL add-on as its threading library.</para></listitem> 56 57 <listitem><para><userinput>--with-tls</userinput>: This tells Glibc to include 58 support for TLS (thread-local storage). This is required for NPTL to work. 59 </para></listitem> 60 61 <listitem><para><userinput>--with-binutils=/tools/bin</userinput>: Strictly 62 speaking this switch is not required. But it does ensure nothing can go wrong 63 with regard to what Binutils programs get used during the Glibc build.</para></listitem> 64 65 <listitem><para><userinput>--without-gd</userinput>: This prevents the build 66 of the <command>memusagestat</command> program, which strangely enough insists 67 on linking against the host's libraries (libgd, libpng, libz, and so forth). 68 </para></listitem> 68 69 69 70 <listitem><para><userinput>--without-cvs</userinput>: This is meant to prevent … … 72 73 suppresses an annoying but harmless warning about a missing 73 74 <command>autoconf</command> program.</para></listitem> 75 76 <listitem><para><userinput>--with-headers=/tools/glibc-kernheaders</userinput>: 77 This tells Glibc to compile against the <quote>raw</quote> kernel headers, so 78 that it knows exactly what features the kernel has, and can optimize itself 79 accordingly. Not strictly necessary, but nice to have.</para></listitem> 74 80 </itemizedlist> 75 81 -
chapter05/kernel-headers.xml
r411ceb8 r9dfc02f 39 39 symlink:</para> 40 40 41 <screen><userinput>make symlinks</userinput></screen>41 <screen><userinput>make include/asm</userinput></screen> 42 42 43 43 <para>Install the platform-specific header files:</para> 44 44 45 <screen><userinput>mkdir /tools/ include/asm46 cp include/asm/* /tools/include/asm47 cp -R include/asm-generic /tools/ include</userinput></screen>45 <screen><userinput>mkdir /tools/glibc-kernheaders 46 cp -HR include/asm /tools/glibc-kernheaders 47 cp -R include/asm-generic /tools/glibc-kernheaders</userinput></screen> 48 48 49 49 <para>Finally, install the cross-platform kernel header files:</para> 50 50 51 <screen><userinput>cp -R include/linux /tools/ include</userinput></screen>51 <screen><userinput>cp -R include/linux /tools/glibc-kernheaders</userinput></screen> 52 52 53 53 </sect2> -
chapter05/perl.xml
r411ceb8 r9dfc02f 26 26 27 27 <screen><userinput>patch -Np1 -i ../perl-&perl-version;-libc-1.patch</userinput></screen> 28 29 <para>Perl insists on using the <command>arch</command> program to find out30 the machine type. Create a little script to mimic this command:</para>31 32 <screen><userinput>echo "uname -m" > /tools/bin/arch33 chmod 755 /tools/bin/arch</userinput></screen>34 28 35 29 <para>Now prepare Perl for compilation (make sure you get the 'IO Fcntl POSIX' -
chapter05/util-linux.xml
r411ceb8 r9dfc02f 23 23 <title>Installation of Util-linux</title> 24 24 25 <para>Util-linux has issues with the Linux 2.6 kernel series - fix these issues 26 by applying the following patch:</para> 27 28 <screen><userinput>patch -Np1 -i ../util-linux-&util-linux-version;-kernel-dj-2.6-1.patch</userinput></screen> 29 25 30 <para>Util-linux doesn't use the freshly installed headers and libraries 26 31 from the /tools directory. This is fixed by altering the configure 27 32 script:</para> 28 33 29 <screen><userinput>cp configure configure.backup 30 sed "s@/usr/include@/tools/include@g" configure.backup > configure</userinput></screen> 34 <screen><userinput>sed -i "s@/usr/include@/tools/include@g" configure</userinput></screen> 31 35 32 36 <para>Prepare Util-linux for compilation:</para>
Note:
See TracChangeset
for help on using the changeset viewer.