Changeset b3f1ebb3
- Timestamp:
- 03/31/2021 10:41:31 AM (3 years ago)
- Branches:
- ml-11.0, multilib
- Children:
- 6702623
- Parents:
- 989524c
- git-author:
- Thomas Trepl <thomas@…> (04/01/2019 05:00:45 PM)
- git-committer:
- Xℹ Ruoyao <xry111@…> (03/31/2021 10:41:31 AM)
- Files:
-
- 4 added
- 48 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r989524c rb3f1ebb3 35 35 endif 36 36 37 ifndef ARCH 38 ARCH = default 39 endif 40 ifneq ($(ARCH), default) 41 ifneq ($(ARCH), multilib) 42 $(error ARCH must be either 'default' (default if unset) or 'multilib'.) 43 endif 44 endif 45 37 46 book: validate profile-html 38 47 @echo "Generating chunked XHTML files at $(BASEDIR)/ ..." … … 131 140 --output $(RENDERTMP)/lfs-html2.xml \ 132 141 --stringparam profile.revision $(REV) \ 142 --stringparam profile.arch $(ARCH) \ 133 143 stylesheets/lfs-xsl/profile.xsl \ 134 144 index.xml … … 161 171 # $(Q)xsltproc --nonet --xinclude \ 162 172 # --stringparam profile.revision $(REV) \ 173 # --stringparam profile.arch $(ARCH) \ 163 174 # --output $(RENDERTMP)/sysd-wget.xml \ 164 175 # stylesheets/lfs-xsl/profile.xsl \ … … 178 189 $(Q)xsltproc --nonet --xinclude \ 179 190 --stringparam profile.revision $(REV) \ 191 --stringparam profile.arch $(ARCH) \ 180 192 --output $(RENDERTMP)/sysv-md5sum.xml \ 181 193 stylesheets/lfs-xsl/profile.xsl \ … … 195 207 # --output $(RENDERTMP)/lfs-html.xml \ 196 208 # --stringparam profile.revision $(REV) \ 209 # --stringparam profile.arch $(ARCH) \ 197 210 # stylesheets/lfs-xsl/profile.xsl \ 198 211 # $(RENDERTMP)/lfs-full.xml -
chapter01/askforhelp.xml
r989524c rb3f1ebb3 40 40 <listitem> 41 41 <para>The version of the book being used (in this case 42 <phrase revision="sysv">&version;</phrase> 43 <phrase revision="systemd">&versiond;</phrase>)</para> 42 <phrase arch="default" revision="sysv">&version;</phrase> 43 <phrase arch="multilib" revision="sysv">&version;-multilib</phrase> 44 <phrase arch="default" revision="systemd">&versiond;</phrase> 45 <phrase arch="multilib" revision="systemd">&versiond;-multilib</phrase>)</para> 46 44 47 </listitem> 45 48 <listitem> -
chapter01/changelog.xml
r989524c rb3f1ebb3 12 12 13 13 <para>This is version 14 <phrase revision="sysv">&version;</phrase> 15 <phrase revision="systemd">&versiond;</phrase> 14 <phrase arch="default" revision="sysv">&version;</phrase> 15 <phrase arch="multilib" revision="sysv">&version;-multilib</phrase> 16 <phrase arch="default" revision="systemd">&versiond;</phrase> 17 <phrase arch="multilib" revision="systemd">&versiond;-multilib</phrase> 16 18 of the Linux From Scratch book, dated 17 19 &releasedate;. If this book is more than six months old, a newer and better -
chapter01/whatsnew.xml
r989524c rb3f1ebb3 162 162 <para>Linux-&linux-version;</para> 163 163 </listitem> 164 <listitem> 165 <para>Linux-Firmware-&linux-firmware-version;</para> 166 </listitem> 164 167 <!--<listitem> 165 168 <para>M4-&m4-version;</para> -
chapter03/packages.xml
r989524c rb3f1ebb3 357 357 358 358 <varlistentry> 359 <term>ISL (&isl-version;) - <token>&isl-size;</token>:</term> 360 <listitem> 361 <para>Home page: <ulink url="&isl-home;"/></para> 362 <para>Download: <ulink url="&isl-url;"/></para> 363 <para>MD5 sum: <literal>&isl-md5;</literal></para> 364 </listitem> 365 </varlistentry> 366 367 <varlistentry> 359 368 <term>Kbd (&kbd-version;) - <token>&kbd-size;</token>:</term> 360 369 <listitem> … … 452 461 453 462 <varlistentry> 463 <term>Linux Firmware (&linux-firmware-version;) - <token>&linux-firmware-size;</token>:</term> 464 <listitem> 465 <para>Home page: <ulink url="&linux-firmware-home;"/></para> 466 <para>Download: <ulink url="&linux-firmware-url;"/></para> 467 <para>MD5 sum: <literal>&linux-firmware-md5;</literal></para> 468 </listitem> 469 </varlistentry> 470 471 <varlistentry> 454 472 <term>M4 (&m4-version;) - <token>&m4-size;</token>:</term> 455 473 <listitem> -
chapter04/settingenviron.xml
r989524c rb3f1ebb3 38 38 <filename>.bashrc</filename> file now:</para> 39 39 40 <screen ><userinput>cat > ~/.bashrc << "EOF"40 <screen arch="default"><userinput>cat > ~/.bashrc << "EOF" 41 41 <literal>set +h 42 42 umask 022 … … 46 46 PATH=/tools/bin:/bin:/usr/bin 47 47 export LFS LC_ALL LFS_TGT PATH</literal> 48 EOF</userinput></screen> 49 50 <screen arch="multilib"><userinput>cat > ~/.bashrc << "EOF" 51 <literal>set +h 52 umask 022 53 LFS=/mnt/lfs 54 LC_ALL=POSIX 55 LFS_TGT=x86_64-lfs-linux-gnu 56 LFS_TGT32=i686-lfs-linux-gnu 57 LFS_TGTX32=x86_64-lfs-linux-gnux32 58 PATH=/tools/bin:/bin:/usr/bin 59 export LFS LC_ALL LFS_TGT LFS_TGT32 LFS_TGTX32 PATH</literal> 48 60 EOF</userinput></screen> 49 61 -
chapter05/binutils-pass1.xml
r989524c rb3f1ebb3 73 73 <para>Now prepare Binutils for compilation:</para> 74 74 75 <screen ><userinput remap="configure">../configure --prefix=/tools \75 <screen arch="default"><userinput remap="configure">../configure --prefix=/tools \ 76 76 --with-sysroot=$LFS \ 77 77 --with-lib-path=/tools/lib \ … … 79 79 --disable-nls \ 80 80 --disable-werror</userinput></screen> 81 82 <screen arch="multilib"><userinput remap="configure">../configure --prefix=/tools \ 83 --with-sysroot=$LFS \ 84 --with-lib-path=/tools/lib:/tools/lib32:/tools/libx32 \ 85 --target=$LFS_TGT \ 86 --disable-nls \ 87 --disable-werror \ 88 --enable-64-bit-bfd \ 89 --enable-multilib</userinput></screen> 81 90 82 91 <variablelist> … … 147 156 first pass will soon be replaced by those from the second.</para> 148 157 149 <para>If building on x86_64, create a symlink to ensure the sanity of 158 <para arch="default">If building on x86_64, create a symlink to ensure the 159 sanity of the toolchain:</para> 160 161 <para arch="multilib">Create a symlink to ensure the sanity of 150 162 the toolchain:</para> 151 163 152 <screen ><userinput remap="install">case $(uname -m) in164 <screen arch="default"><userinput remap="install">case $(uname -m) in 153 165 x86_64) mkdir -v /tools/lib && ln -sv lib /tools/lib64 ;; 154 166 esac</userinput></screen> 167 168 <screen arch="multilib"><userinput remap="install">mkdir -v /tools/lib && 169 ln -sv lib /tools/lib64</userinput></screen> 155 170 156 171 <para>Install the package:</para> -
chapter05/binutils-pass2.xml
r989524c rb3f1ebb3 51 51 <para>Prepare Binutils for compilation:</para> 52 52 53 <screen ><userinput remap="configure">CC=$LFS_TGT-gcc \53 <screen arch="default"><userinput remap="configure">CC=$LFS_TGT-gcc \ 54 54 AR=$LFS_TGT-ar \ 55 55 RANLIB=$LFS_TGT-ranlib \ … … 60 60 --with-lib-path=/tools/lib \ 61 61 --with-sysroot</userinput></screen> 62 63 <screen arch="multilib"><userinput remap="configure">CC=$LFS_TGT-gcc \ 64 AR=$LFS_TGT-ar \ 65 RANLIB=$LFS_TGT-ranlib \ 66 ../configure \ 67 --prefix=/tools \ 68 --disable-nls \ 69 --disable-werror \ 70 --with-lib-path=/tools/lib:/tools/lib32:/tools/libx32 \ 71 --with-sysroot \ 72 --enable-64-bit-bfd \ 73 --enable-multilib</userinput></screen> 62 74 63 75 <variablelist> … … 73 85 </varlistentry> 74 86 75 <varlistentry >87 <varlistentry arch="default"> 76 88 <term><parameter>--with-lib-path=/tools/lib</parameter></term> 77 89 <listitem> … … 79 91 search path during the compilation of Binutils, resulting in 80 92 <filename class="directory">/tools/lib</filename> being passed 93 to the linker. This prevents the linker from searching through 94 library directories on the host.</para> 95 </listitem> 96 </varlistentry> 97 98 <varlistentry arch="multilib"> 99 <term><parameter>--with-lib-path=/tools/lib:...</parameter></term> 100 <listitem> 101 <para>This tells the configure script to specify the library 102 search path during the compilation of Binutils, resulting in 103 <filename class="directory">/tools/lib</filename>, 104 <filename class="directory">/tools/lib32</filename> and 105 <filename class="directory">/tools/libx32</filename> being passed 81 106 to the linker. This prevents the linker from searching through 82 107 library directories on the host.</para> … … 94 119 </varlistentry> 95 120 121 <varlistentry arch="multilib"> 122 <term><parameter>--enable-64-bit-bfd</parameter></term> 123 <listitem> 124 <para>TODO</para> 125 </listitem> 126 </varlistentry> 127 128 <varlistentry arch="multilib"> 129 <term><parameter>--enable-multilib</parameter></term> 130 <listitem> 131 <para>TODO</para> 132 </listitem> 133 </varlistentry> 134 96 135 </variablelist> 97 136 … … 107 146 the next chapter:</para> 108 147 109 <screen ><userinput remap="adjust">make -C ld clean148 <screen arch="default"><userinput remap="adjust">make -C ld clean 110 149 make -C ld LIB_PATH=/usr/lib:/lib 150 cp -v ld/ld-new /tools/bin</userinput></screen> 151 152 <screen arch="multilib"><userinput remap="adjust">make -C ld clean 153 make -C ld LIB_PATH=/usr/lib:/lib:/usr/lib32:/lib32:/usr/libx32:/libx32 111 154 cp -v ld/ld-new /tools/bin</userinput></screen> 112 155 -
chapter05/chapter05.xml
r989524c rb3f1ebb3 21 21 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libstdc++.xml"/> 22 22 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils-pass2.xml"/> 23 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zlib.xml"/> 23 24 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-pass2.xml"/> 24 25 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tcl.xml"/> -
chapter05/gcc-pass1.xml
r989524c rb3f1ebb3 44 44 <title>Installation of Cross GCC</title> 45 45 46 <para>GCC now requires the GMP, MPFR and MPC packages. As these packages may 47 not be included in your host distribution, they will be built with 48 GCC. Unpack each package into the GCC source directory and rename the 49 resulting directories so the GCC build procedures will automatically 50 use them:</para> 46 <para arch="default">GCC now requires the GMP, MPFR, and MPC packages. As 47 these packages may not be included in your host distribution, they will be 48 built with GCC. Unpack each package into the GCC source directory and 49 rename the resulting directories so the GCC build procedures will 50 automatically use them:</para> 51 52 <para arch="multilib">GCC now requires the GMP, ISL, MPFR, and MPC packages. 53 As these packages may not be included in your host distribution, they will 54 be built with GCC. Unpack each package into the GCC source directory and 55 rename the resulting directories so the GCC build procedures will 56 automatically use them:</para> 51 57 52 58 <note><para>There are frequent misunderstandings about this chapter. The … … 56 62 proceed with the instructions below.</para></note> 57 63 58 <screen ><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz64 <screen arch="default"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz 59 65 mv -v mpfr-&mpfr-version; mpfr 60 66 tar -xf ../gmp-&gmp-version;.tar.xz … … 62 68 tar -xf ../mpc-&mpc-version;.tar.gz 63 69 mv -v mpc-&mpc-version; mpc</userinput></screen> 70 <screen arch="multilib"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz 71 mv -v mpfr-&mpfr-version; mpfr 72 tar -xf ../gmp-&gmp-version;.tar.xz 73 mv -v gmp-&gmp-version; gmp 74 tar -xf ../mpc-&mpc-version;.tar.gz 75 mv -v mpc-&mpc-version; mpc 76 tar -xf ../isl-&isl-version;.tar.xz 77 mv -v isl-&isl-version; isl</userinput></screen> 64 78 65 79 <para>The following command will change the location of GCC's default … … 72 86 do 73 87 cp -uv $file{,.orig} 74 sed -e 's@/lib\(64\)\?\(32\)\? /ld@/tools&@g' \88 sed -e 's@/lib\(64\)\?\(32\)\?\(x32\)\?/ld@/tools&@g' \ 75 89 -e 's@/usr@/tools@g' $file.orig > $file 76 90 echo ' … … 98 112 inadvertently run twice.</para> 99 113 100 <para >Finally, on x86_64 hosts, set the default directory name for101 64-bit libraries to <quote>lib</quote>:</para>102 103 <screen ><userinput remap="pre">case $(uname -m) in114 <para arch="default">Finally, on x86_64 hosts, set the default directory 115 name for 64-bit libraries to <quote>lib</quote>:</para> 116 117 <screen arch="default"><userinput remap="pre">case $(uname -m) in 104 118 x86_64) 105 119 sed -e '/m64=/s/lib64/lib/' \ … … 108 122 esac</userinput></screen> 109 123 124 <screen arch="multilib"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \ 125 -i.orig gcc/config/i386/t-linux64 126 cat > gcc/config/i386/t-linux64 <<"EOF" 127 comma=, 128 MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) 129 MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) 130 MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu) 131 MULTILIB_OSDIRNAMES+= m32=../lib32$(call if_multiarch,:i386-linux-gnu) 132 MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) 133 EOF</userinput></screen> 134 110 135 <!-- 111 136 <para>GCC doesn't detect stack protection correctly, which causes problems … … 121 146 <screen><userinput remap="pre">sed -i 's/if \((code.*))\)/if (\1 \&\& \!DEBUG_INSN_P (insn))/' gcc/sched-deps.c</userinput></screen> 122 147 --> 148 149 <!-- Following patch might be obsolete with gcc >= 8.2.1 --> 150 <!-- see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724 --> 151 <!-- Fix applied in ch5-gcc-pass{1,2}, ch6-gcc --> 152 <para arch="multilib">Fix an issue with isl-&isl-version;:</para> 153 154 <screen arch="multilib"><userinput remap="pre">sed -e "/#include <isl\/schedule_node.h>/ a#include <isl/id.h>\n#include <isl/space.h>" \ 155 -i gcc/graphite.h</userinput></screen> 156 123 157 <para>The GCC documentation recommends building GCC 124 158 in a dedicated build directory:</para> … … 129 163 <para>Prepare GCC for compilation:</para> 130 164 131 <screen ><userinput remap="configure">../configure \165 <screen arch="default"><userinput remap="configure">../configure \ 132 166 --target=$LFS_TGT \ 133 167 --prefix=/tools \ … … 151 185 --disable-libstdcxx \ 152 186 --enable-languages=c,c++</userinput></screen> 187 188 <screen arch="multilib"><userinput remap="configure">../configure \ 189 --target=$LFS_TGT \ 190 --prefix=/tools \ 191 --with-glibc-version=2.11 \ 192 --with-sysroot=$LFS \ 193 --with-newlib \ 194 --without-headers \ 195 --with-local-prefix=/tools \ 196 --with-native-system-header-dir=/tools/include \ 197 --disable-nls \ 198 --disable-shared \ 199 --enable-multilib \ 200 --with-multilib-list=m32,m64,mx32 \ 201 --disable-decimal-float \ 202 --disable-threads \ 203 --disable-libatomic \ 204 --disable-libgomp \ 205 --disable-libmpx \ 206 --disable-libquadmath \ 207 --disable-libssp \ 208 --disable-libvtv \ 209 --disable-libstdcxx \ 210 --enable-languages=c,c++</userinput></screen> 211 153 212 <variablelist> 154 213 <title>The meaning of the configure options:</title> … … 220 279 </varlistentry> 221 280 222 <varlistentry >281 <varlistentry arch="default"> 223 282 <term><parameter>--disable-multilib</parameter></term> 224 283 <listitem> 225 284 <para>On x86_64, LFS does not yet support a multilib configuration. 226 285 This switch is harmless for x86.</para> 286 </listitem> 287 </varlistentry> 288 289 <varlistentry arch="multilib"> 290 <term><parameter>--enable-multilib, 291 --with-multilib-list=m32,m64,mx32</parameter></term> 292 <listitem> 293 <para>LFS now supports a multilib configuration. Enable it for the 294 32bit, the 64-bit, and the mixed mode.</para> 227 295 </listitem> 228 296 </varlistentry> -
chapter05/gcc-pass2.xml
r989524c rb3f1ebb3 74 74 do 75 75 cp -uv $file{,.orig} 76 sed -e 's@/lib\(64\)\?\(32\)\? /ld@/tools&@g' \76 sed -e 's@/lib\(64\)\?\(32\)\?\(x32\)\?/ld@/tools&@g' \ 77 77 -e 's@/usr@/tools@g' $file.orig > $file 78 78 echo ' … … 84 84 done</userinput></screen> 85 85 86 <para >If building on x86_64, change the default directory name for 64-bit87 libraries to <quote>lib</quote>:</para>88 89 <screen ><userinput remap="pre">case $(uname -m) in86 <para arch="default">If building on x86_64, change the default directory 87 name for 64-bit libraries to <quote>lib</quote>:</para> 88 89 <screen arch="default"><userinput remap="pre">case $(uname -m) in 90 90 x86_64) 91 91 sed -e '/m64=/s/lib64/lib/' \ … … 94 94 esac</userinput></screen> 95 95 96 <para>As in the first build of GCC it requires the GMP, MPFR and MPC 97 packages. Unpack the tarballs and move them into the required directory 98 names:</para> 99 100 <screen><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz 96 <para arch="multilib">Change the default directory name for 64-bit 97 libraries to <quote>lib</quote>:</para> 98 99 <screen arch="multilib"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \ 100 -i.orig gcc/config/i386/t-linux64 101 cat > gcc/config/i386/t-linux64 <<"EOF" 102 comma=, 103 MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) 104 MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) 105 MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu) 106 MULTILIB_OSDIRNAMES+= m32=../lib32$(call if_multiarch,:i386-linux-gnu) 107 MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) 108 EOF</userinput></screen> 109 110 <para arch="default">As in the first build of GCC it requires the GMP, 111 MPFR, and MPC packages. Unpack the tarballs and move them into the 112 required directory names:</para> 113 114 <para arch="multilib">As in the first build of GCC it requires the GMP, 115 ISL, MPFR, and MPC packages. Unpack the tarballs and move them into the 116 required directory names:</para> 117 118 <screen arch="default"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz 101 119 mv -v mpfr-&mpfr-version; mpfr 102 120 tar -xf ../gmp-&gmp-version;.tar.xz … … 104 122 tar -xf ../mpc-&mpc-version;.tar.gz 105 123 mv -v mpc-&mpc-version; mpc</userinput></screen> 106 <!-- 107 <para>As in the first build of GCC, fix a problem identified upstream:</para> 108 109 <screen><userinput remap="pre">sed -i 's/if \((code.*))\)/if (\1 \&\& \!DEBUG_INSN_P (insn))/' gcc/sched-deps.c</userinput></screen> 110 --> 124 <screen arch="multilib"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz 125 mv -v mpfr-&mpfr-version; mpfr 126 tar -xf ../gmp-&gmp-version;.tar.xz 127 mv -v gmp-&gmp-version; gmp 128 tar -xf ../mpc-&mpc-version;.tar.gz 129 mv -v mpc-&mpc-version; mpc 130 tar -xf ../isl-&isl-version;.tar.xz 131 mv -v isl-&isl-version; isl</userinput></screen> 132 133 <!-- Following patch might be obsolete with gcc >= 8.2.1 --> 134 <para arch="multilib">Fix an issue with isl-&isl-version;:</para> 135 136 <screen arch="multilib"><userinput remap="pre">sed -e "/#include <isl\/schedule_node.h>/ a#include <isl/id.h>\n#include <isl/space.h>" \ 137 -i gcc/graphite.h</userinput></screen> 138 111 139 <para>Create a separate build directory again:</para> 112 140 … … 119 147 <para>Now prepare GCC for compilation:</para> 120 148 121 <screen ><userinput remap="configure">CC=$LFS_TGT-gcc \149 <screen arch="default"><userinput remap="configure">CC=$LFS_TGT-gcc \ 122 150 CXX=$LFS_TGT-g++ \ 123 151 AR=$LFS_TGT-ar \ … … 130 158 --disable-libstdcxx-pch \ 131 159 --disable-multilib \ 160 --disable-bootstrap \ 161 --disable-libgomp</userinput></screen> 162 163 <screen arch="multilib"><userinput remap="configure">CC=$LFS_TGT-gcc \ 164 CXX=$LFS_TGT-g++ \ 165 AR=$LFS_TGT-ar \ 166 RANLIB=$LFS_TGT-ranlib \ 167 ../configure \ 168 --prefix=/tools \ 169 --with-local-prefix=/tools \ 170 --with-native-system-header-dir=/tools/include \ 171 --enable-languages=c,c++ \ 172 --disable-libstdcxx-pch \ 173 --enable-multilib \ 174 --with-multilib-list=m32,m64,mx32 \ 175 --with-system-zlib \ 132 176 --disable-bootstrap \ 133 177 --disable-libgomp</userinput></screen> … … 200 244 <screen><computeroutput>[Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]</computeroutput></screen> 201 245 202 <para>Note that the dynamic linker will be /tools/lib/ld-linux.so.2 203 for 32-bit machines.</para> 246 247 <para arch="multilib">Repeat the test for 32-bit:</para> 248 249 <screen arch="multilib"><userinput>cc -m32 dummy.c 250 readelf -l a.out | grep ': /tools'</userinput></screen> 251 252 <para arch="multilib">In this case, the output shoud be:</para> 253 254 <screen arch="multilib"><computeroutput>[Requesting program interpreter: /tools/lib/ld-linux.so.2]</computeroutput></screen> 255 256 <para arch="multilib">Repeat the test for x32-bit:</para> 257 258 <screen arch="multilib"><userinput>cc -mx32 dummy.c 259 readelf -l a.out | grep ': /tools'</userinput></screen> 260 261 <para arch="multilib">In this case, the output shoud be:</para> 262 263 <screen arch="multilib"><computeroutput>[Requesting program interpreter: /tools/lib/ld-linux-x32.so.2]</computeroutput></screen> 264 265 <para arch="default">Note that the dynamic linker will be 266 /tools/lib/ld-linux.so.2 for 32-bit machines.</para> 204 267 205 268 <para>If the output is not shown as above or there was no output at all, -
chapter05/glibc.xml
r989524c rb3f1ebb3 83 83 </varlistentry> 84 84 85 <varlistentry arch="multilib"> 86 <term><parameter>--enable-multi-arch</parameter></term> 87 <listitem> 88 <para>Enables glibc for multiarch environments.</para> 89 </listitem> 90 </varlistentry> 91 85 92 <varlistentry> 86 93 <term><parameter>--with-headers=/tools/include</parameter></term> … … 185 192 </sect2> 186 193 194 <sect2 arch="multilib" role="installation"> 195 <title>Installation of Glibc 32-bit</title> 196 197 <para>Clean the build directory for redoing glibc for 32-bit:</para> 198 <screen><userinput remap="pre">mkdir ../build32 199 cd ../build32</userinput></screen> 200 201 <para>Rebuild glibc for 32-bit:</para> 202 <screen><userinput remap="configure">echo slibdir=/tools/lib32 > configparms 203 BUILD_CC="gcc -m32" \ 204 CC="${LFS_TGT}-gcc -m32" \ 205 CXX="${LFS_TGT}-g++ -m32" \ 206 AR="${LFS_TGT}-ar" \ 207 RANLIB="${LFS_TGT}-ranlib" \ 208 ../configure --prefix=/tools \ 209 --build=$(../scripts/config.guess) \ 210 --host=${LFS_TGT32} \ 211 --enable-kernel=&min-kernel; \ 212 --enable-multi-arch \ 213 --libdir=/tools/lib32 \ 214 --libexecdir=/tools/lib32 \ 215 --with-headers=/tools/include \ 216 --with-binutils=/tools/bin \ 217 libc_cv_forced_unwind=yes \ 218 libc_cv_c_cleanup=yes</userinput></screen> 219 220 <para>Now compile the 32-bit version of glibc:</para> 221 <screen><userinput remap="make">make</userinput></screen> 222 223 <para>Install 32-bit version of glibc:</para> 224 <screen><userinput remap="install">make install_root="${PWD}/DESTDIR" install 225 install -vdm755 /tools/lib32 226 cp -Rv DESTDIR/tools/lib32/* /tools/lib32 227 install -vm644 DESTDIR/tools/include/gnu/{lib-names,stubs}-32.h \ 228 /tools/include/gnu/ 229 ln -svf /tools/lib32/ld-linux.so.2 /tools/lib/ 230 cd ..</userinput></screen> 231 232 </sect2> 233 234 <sect2 arch="multilib" role="installation"> 235 <title>Installation of Glibc x32-bit</title> 236 237 <para>Create a build directory for redoing glibc for x32-bit:</para> 238 <screen><userinput remap="pre">mkdir build32x 239 cd build32x</userinput></screen> 240 241 <para>Rebuild glibc for x32-bit:</para> 242 <screen><userinput remap="configure">echo slibdir=/tools/libx32 > configparms 243 BUILD_CC="gcc -mx32" \ 244 CC="${LFS_TGT}-gcc -mx32" \ 245 CXX="${LFS_TGT}-g++ -mx32" \ 246 AR="${LFS_TGT}-ar" \ 247 RANLIB="${LFS_TGT}-ranlib" \ 248 ../configure --prefix=/tools \ 249 --build=$(../scripts/config.guess) \ 250 --host=${LFS_TGTX32} \ 251 --enable-kernel=&min-kernel; \ 252 --enable-multi-arch \ 253 --libdir=/tools/libx32 \ 254 --libexecdir=/tools/libx32 \ 255 --with-headers=/tools/include \ 256 --with-binutils=/tools/bin \ 257 libc_cv_forced_unwind=yes \ 258 libc_cv_c_cleanup=yes</userinput></screen> 259 260 <para>Now compile the x32-bit version of glibc:</para> 261 <screen><userinput remap="make">make</userinput></screen> 262 263 <para>Install x32-bit version of glibc:</para> 264 <screen><userinput remap="install">make install_root="${PWD}/DESTDIR" install 265 install -vdm755 /tools/libx32 266 cp -Rv DESTDIR/tools/libx32/* /tools/libx32 267 install -vm644 DESTDIR/tools/include/gnu/lib-names-x32.h \ 268 /tools/include/gnu/ 269 [ -e DESTDIR/tools/include/gnu/stubs-x32.h ] \ 270 && install -vm644 DESTDIR/tools/include/gnu/stubs-x32.h /tools/include/gnu/ \ 271 || ln -v /tools/include/gnu/stubs-64.h /tools/include/gnu/stubs-x32.h 272 ln -svf /tools/libx32/ld-linux-x32.so.2 /tools/lib/</userinput></screen> 273 <!-- For whatever reason the stubs-x32.h doesn't get created. The 'ln' above is 274 just a "brute force" workaraound - by copying the stubs-64.h file. --> 275 276 <caution> 277 <para>At this point, it is imperative to stop and ensure that the basic 278 functions (compiling and linking) of the new toolchain are working as 279 expected. To perform a sanity check, run the following commands:</para> 280 281 <screen><userinput>echo 'int main(){}' > dummy.c 282 $LFS_TGT-gcc -m32 dummy.c 283 readelf -l a.out | grep ': /tools'</userinput></screen> 284 285 <para>If everything is working correctly, there should be no errors, 286 and the output of the last command will be of the form:</para> 287 288 <screen><computeroutput>[Requesting program interpreter: /tools/lib/ld-linux.so.2]</computeroutput></screen> 289 290 <para>Redo test for x32-ABI:</para> 291 292 <screen><userinput>echo 'int main(){}' > dummy.c 293 $LFS_TGT-gcc -mx32 dummy.c 294 readelf -l a.out | grep ': /tools'</userinput></screen> 295 296 <para>Output should be like:</para> 297 298 <screen><computeroutput>[Requesting program interpreter: /tools/lib/ld-linux-x32.so.2]</computeroutput></screen> 299 300 <para>If the output is not shown as above or there was no output at all, 301 then something is wrong. Investigate and retrace the steps to find out 302 where the problem is and correct it. This issue must be resolved before 303 continuing on.</para> 304 305 <para>Once all is well, clean up the test files:</para> 306 307 <screen><userinput>rm -v dummy.c a.out</userinput></screen> 308 309 </caution> 310 </sect2> 311 187 312 <sect2 role="content"> 188 313 <title/> -
chapter05/ncurses.xml
r989524c rb3f1ebb3 113 113 </sect2> 114 114 115 <sect2 arch="multilib" role="installation"> 116 <title>Installation of Ncurses - 32 bit</title> 117 118 <para>Prepare Ncurses for compilation:</para> 119 120 <screen><userinput remap="configure">make distclean && 121 CC="${LFS_TGT}-gcc -m32" \ 122 ./configure --prefix=/tools \ 123 --libdir=/tools/lib32 \ 124 --with-shared \ 125 --without-debug \ 126 --without-ada \ 127 --enable-widec \ 128 --enable-overwrite \ 129 --host="${LFS_TGT32}"</userinput></screen> 130 131 <para>Compile the package:</para> 132 133 <screen><userinput remap="make">make</userinput></screen> 134 135 <para>To test the results, issue:</para> 136 137 <screen><userinput remap="test">make check</userinput></screen> 138 139 <para>Install the package:</para> 140 141 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR_32 install && 142 cp -Rv DESTDIR_32/tools/lib32/* /tools/lib32</userinput></screen> 143 144 </sect2> 145 146 <sect2 arch="multilib" role="installation"> 147 <title>Installation of Ncurses - x32 bit</title> 148 149 <para>Repeat for the x32-ABI:</para> 150 151 <screen><userinput remap="configure">make distclean && 152 CC="${LFS_TGT}-gcc -mx32" \ 153 ./configure --prefix=/tools \ 154 --libdir=/tools/libx32 \ 155 --with-shared \ 156 --without-debug \ 157 --without-ada \ 158 --enable-widec \ 159 --enable-overwrite \ 160 --host="${LFS_TGTX32}"</userinput></screen> 161 162 <screen><userinput remap="make">make</userinput></screen> 163 164 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR_x32 install && 165 cp -Rv DESTDIR_x32/tools/libx32/* /tools/libx32</userinput></screen> 166 167 </sect2> 168 115 169 <sect2 role="content"> 116 170 <title/> -
chapter05/stripping.xml
r989524c rb3f1ebb3 16 16 debugging symbols. Remove those symbols with:</para> 17 17 18 <screen><userinput>strip --strip-debug /tools/lib/* 18 <screen arch="default"><userinput>strip --strip-debug /tools/lib/* 19 /usr/bin/strip --strip-unneeded /tools/{,s}bin/*</userinput></screen> 20 21 <screen arch="multilib"><userinput>strip --strip-debug /tools/lib{,{,x}32}/* 19 22 /usr/bin/strip --strip-unneeded /tools/{,s}bin/*</userinput></screen> 20 23 … … 34 37 <para>Remove unneeded files:</para> 35 38 36 <screen><userinput>find /tools/{lib,libexec} -name \*.la -delete</userinput></screen> 39 <screen arch="default"><userinput>find /tools/{lib,libexec} -name \*.la -delete</userinput></screen> 40 41 <screen arch="multilib"><userinput>find /tools/{lib{,{,x}32},libexec} -name \*.la -delete</userinput></screen> 37 42 38 43 <para>At this point, you should have at least 3 GB of free space in -
chapter05/util-linux.xml
r989524c rb3f1ebb3 122 122 </sect2> 123 123 124 <sect2 arch="multilib" role="installation"> 125 <title>Installation of Util-Linux - 32 bit</title> 126 127 <para>Prepare Util-Linux for compilation:</para> 128 129 <screen><userinput remap="configure">make distclean && 130 CC="${LFS_TGT}-gcc -m32" \ 131 ./configure \ 132 --prefix=/tools \ 133 --libdir=/tools/lib32 \ 134 --without-python \ 135 --disable-makeinstall-chown \ 136 --without-systemdsystemunitdir \ 137 --without-ncurses \ 138 --host="${LFS_TGT32}" \ 139 PKG_CONFIG=""</userinput></screen> 140 141 <para>Compile the package:</para> 142 143 <screen><userinput remap="make">make</userinput></screen> 144 145 <para>To test the results, issue:</para> 146 147 <screen><userinput remap="test">make check</userinput></screen> 148 149 <para>Install the package:</para> 150 151 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR_32 install && 152 cp -Rv DESTDIR_32/tools/lib32/* /tools/lib32</userinput></screen> 153 154 </sect2> 155 156 <sect2 arch="multilib" role="installation"> 157 <title>Installation of Util-Linux - x32 bit</title> 158 159 <para>Repeat for the x32-ABI:</para> 160 161 <screen><userinput remap="configure">make distclean && 162 CC="${LFS_TGT}-gcc -mx32" \ 163 ./configure \ 164 --prefix=/tools \ 165 --libdir=/tools/libx32 \ 166 --without-python \ 167 --disable-makeinstall-chown \ 168 --without-systemdsystemunitdir \ 169 --without-ncurses \ 170 --host="${LFS_TGTX32}" \ 171 PKG_CONFIG=""</userinput></screen> 172 173 <screen><userinput remap="make">make</userinput></screen> 174 175 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR_x32 install && 176 cp -Rv DESTDIR_x32/tools/libx32/* /tools/libx32</userinput></screen> 177 178 </sect2> 179 124 180 </sect1> -
chapter05/xz.xml
r989524c rb3f1ebb3 64 64 </sect2> 65 65 66 <sect2 arch="multilib" role="installation"> 67 <title>Installation of Xz - 32 bit</title> 68 69 <para>Prepare Xz for compilation:</para> 70 71 <screen><userinput remap="configure">make distclean && 72 CC="${LFS_TGT}-gcc -m32" \ 73 ./configure \ 74 --prefix=/tools \ 75 --libdir=/tools/lib32 \ 76 --host="${LFS_TGT32}"</userinput></screen> 77 78 <para>Compile the package:</para> 79 80 <screen><userinput remap="make">make</userinput></screen> 81 82 <para>To test the results, issue:</para> 83 84 <screen><userinput remap="test">make check</userinput></screen> 85 86 <para>Install the package:</para> 87 88 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR_32 install && 89 cp -Rv DESTDIR_32/tools/lib32/* /tools/lib32</userinput></screen> 90 91 </sect2> 92 93 <sect2 arch="multilib" role="installation"> 94 <title>Installation of Xz - x32 bit</title> 95 96 <para>Repeat for the x32-ABI:</para> 97 98 <screen><userinput remap="configure">make distclean && 99 CC="${LFS_TGT}-gcc -mx32" \ 100 ./configure \ 101 --prefix=/tools \ 102 --libdir=/tools/libx32 \ 103 --host="${LFS_TGTX32}"</userinput></screen> 104 105 <screen><userinput remap="make">make</userinput></screen> 106 107 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR_x32 install && 108 cp -Rv DESTDIR_x32/tools/libx32/* /tools/libx32</userinput></screen> 109 110 </sect2> 111 66 112 <sect2 role="content"> 67 113 <title/> -
chapter06/acl.xml
r989524c rb3f1ebb3 80 80 </sect2> 81 81 82 <sect2 arch="multilib" role="installation"> 83 <title>Installation of Acl - 32-bit</title> 84 85 <para>Clean previous build:</para> 86 87 <screen><userinput remap="pre">make distclean</userinput></screen> 88 89 <para>Prepare Acl for compilation:</para> 90 91 <screen><userinput remap="configure">CC="gcc -m32" ./configure \ 92 --prefix=/usr --libdir=/usr/lib32 \ 93 --disable-static --libexecdir=/usr/lib32 \ 94 --host=i686-pc-linux-gnu</userinput></screen> 95 96 <para>Compile the package:</para> 97 98 <screen><userinput remap="make">make</userinput></screen> 99 100 <para>Install the package:</para> 101 102 <screen><userinput remap="install">make DESTDIR=$(pwd)/DESTDIR install 103 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 104 rm -rf DESTDIR</userinput></screen> 105 106 </sect2> 107 108 <sect2 arch="multilib" role="installation"> 109 <title>Installation of Acl - x32-bit</title> 110 111 <para>Clean previous build:</para> 112 113 <screen><userinput remap="pre">make distclean</userinput></screen> 114 115 <para>Prepare Acl for compilation:</para> 116 117 <screen><userinput remap="configure">CC="gcc -mx32" ./configure \ 118 --prefix=/usr --libdir=/usr/libx32 \ 119 --disable-static --libexecdir=/usr/libx32 \ 120 --host=x86_64-pc-linux-gnux32</userinput></screen> 121 122 <para>Compile the package:</para> 123 124 <screen><userinput remap="make">make</userinput></screen> 125 126 <para>Install the package:</para> 127 128 <screen><userinput remap="install">make DESTDIR=$(pwd)/DESTDIR install 129 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 130 rm -rf DESTDIR</userinput></screen> 131 132 </sect2> 133 82 134 <sect2 id="contents-acl" role="content"> 83 135 <title>Contents of Acl</title> -
chapter06/attr.xml
r989524c rb3f1ebb3 79 79 </sect2> 80 80 81 <sect2 arch="multilib" role="installation"> 82 <title>Installation of Attr - 32-bit</title> 83 84 <para>Clean previous build:</para> 85 86 <screen><userinput remap="pre">make distclean</userinput></screen> 87 88 <para>Prepare Attr for compilation:</para> 89 90 <screen><userinput remap="configure">CC="gcc -m32" ./configure \ 91 --prefix=/usr \ 92 --disable-static \ 93 --libdir=/usr/lib32 \ 94 --host=i686-pc-linux-gnu</userinput></screen> 95 96 <para>Compile the package:</para> 97 98 <screen><userinput remap="make">make</userinput></screen> 99 100 <para>Install the package:</para> 101 102 <screen><userinput remap="install">make DESTDIR=$(pwd)/DESTDIR install 103 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 104 rm -rf DESTDIR</userinput></screen> 105 106 </sect2> 107 108 <sect2 arch="multilib" role="installation"> 109 <title>Installation of Attr - x32-bit</title> 110 111 <para>Clean previous build:</para> 112 113 <screen><userinput remap="pre">make distclean</userinput></screen> 114 115 <para>Prepare Attr for compilation:</para> 116 117 <screen><userinput remap="configure"> 118 CC="gcc -mx32" ./configure \ 119 --prefix=/usr \ 120 --disable-static \ 121 --libdir=/usr/libx32 \ 122 --host=x86_64-pc-linux-gnux32</userinput></screen> 123 124 <para>Compile the package:</para> 125 126 <screen><userinput remap="make">make</userinput></screen> 127 128 <para>Install the package:</para> 129 130 <screen><userinput remap="install">make DESTDIR=$(pwd)/DESTDIR install 131 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 132 rm -rf DESTDIR</userinput></screen> 133 134 </sect2> 135 81 136 <sect2 id="contents-attr" role="content"> 82 137 <title>Contents of Attr</title> -
chapter06/bzip2.xml
r989524c rb3f1ebb3 95 95 ln -sv bzip2 /bin/bunzip2 96 96 ln -sv bzip2 /bin/bzcat</userinput></screen> 97 98 </sect2> 99 100 <sect2 arch="multilib" role="installation"> 101 <title>Installation of Bzip2 - 32-bit</title> 102 103 <para>Clean previous build:</para> 104 105 <screen><userinput remap="pre">make clean</userinput></screen> 106 107 <para>Compile the package:</para> 108 109 <screen><userinput remap="make">sed -e "s/^CC=.*/CC=gcc -m32/" \ 110 -i Makefile{,-libbz2_so} 111 make -f Makefile-libbz2_so 112 make libbz2.a</userinput></screen> 113 114 <para>Install the package:</para> 115 116 <screen><userinput remap="install">install -Dm755 libbz2.so.1.0.6 /usr/lib32/libbz2.so.1.0.6 117 ln -sf libbz2.so.1.0.6 /usr/lib32/libbz2.so 118 ln -sf libbz2.so.1.0.6 /usr/lib32/libbz2.so.1 119 ln -sf libbz2.so.1.0.6 /usr/lib32/libbz2.so.1.0 120 install -Dm644 libbz2.a /usr/lib32/libbz2.a</userinput></screen> 121 122 </sect2> 123 124 <sect2 arch="multilib" role="installation"> 125 <title>Installation of Bzip2 - x32-bit</title> 126 127 <para>Clean previous build:</para> 128 129 <screen><userinput remap="pre">make clean</userinput></screen> 130 131 <para>Compile the package:</para> 132 133 <screen><userinput remap="make">sed -e "s/^CC=.*/CC=gcc -mx32/" \ 134 -i Makefile{,-libbz2_so} 135 make -f Makefile-libbz2_so 136 make libbz2.a</userinput></screen> 137 138 <para>Install the package:</para> 139 140 <screen><userinput remap="install">install -Dm755 libbz2.so.1.0.6 /usr/libx32/libbz2.so.1.0.6 141 ln -sf libbz2.so.1.0.6 /usr/libx32/libbz2.so 142 ln -sf libbz2.so.1.0.6 /usr/libx32/libbz2.so.1 143 ln -sf libbz2.so.1.0.6 /usr/libx32/libbz2.so.1.0 144 install -Dm644 libbz2.a /usr/libx32/libbz2.a</userinput></screen> 97 145 98 146 </sect2> -
chapter06/chapter06.xml
r989524c rb3f1ebb3 22 22 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc.xml"/> 23 23 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="adjusting.xml"/> 24 25 <!-- arch="multilib" only --> 26 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc-32.xml"/> 27 24 28 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zlib.xml"/> 25 29 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/> … … 31 35 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpfr.xml"/> 32 36 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpc.xml"/> 37 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="isl.xml"/> 33 38 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="shadow.xml"/> 34 39 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc.xml"/> … … 83 88 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/> 84 89 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="vim.xml"/> 85 86 90 <!-- systemd only --> 87 91 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd.xml"/> 88 92 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dbus.xml"/> 89 93 90 <!-- these p ackages libsystemd on systemd builds-->94 <!-- these programs will use libsystemd if available --> 91 95 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="procps.xml"/> 92 96 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/> … … 98 102 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eudev.xml"/> 99 103 104 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="linux-firmware.xml"/> 100 105 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="aboutdebug.xml"/> 101 106 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="strippingagain.xml"/> -
chapter06/createfiles.xml
r989524c rb3f1ebb3 40 40 software has been installed:</para> 41 41 42 <screen ><userinput>ln -sv /tools/bin/{bash,cat,chmod,dd,echo,ln,mkdir,pwd,rm,stty,touch} /bin42 <screen arch="default"><userinput>ln -sv /tools/bin/{bash,cat,chmod,dd,echo,ln,mkdir,pwd,rm,stty,touch} /bin 43 43 ln -sv /tools/bin/{env,install,perl,printf} /usr/bin 44 44 ln -sv /tools/lib/libgcc_s.so{,.1} /usr/lib … … 46 46 47 47 install -vdm755 /usr/lib/pkgconfig 48 49 ln -sv bash /bin/sh</userinput></screen> 50 <screen arch="multilib"><userinput>ln -sv /tools/bin/{bash,cat,chmod,dd,echo,ln,mkdir,pwd,rm,stty,touch} /bin 51 ln -sv /tools/bin/{env,install,perl,printf} /usr/bin 52 for lib in lib{,32,x32}; do 53 ln -sv /tools/$lib/libgcc_s.so{,.1} /usr/$lib 54 ln -sv /tools/$lib/libstdc++.{a,so{,.6}} /usr/$lib 55 done 56 ln -sv /usr/libx32 / 57 58 install -vdm755 /usr/lib{,32,x32}/pkgconfig 48 59 49 60 ln -sv bash /bin/sh</userinput></screen> -
chapter06/creatingdirs.xml
r989524c rb3f1ebb3 14 14 standard directory tree by issuing the following commands:</para> 15 15 16 <screen ><userinput>mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib/firmware,mnt,opt}16 <screen arch="default"><userinput>mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib/firmware,mnt,opt} 17 17 mkdir -pv /{media/{floppy,cdrom},sbin,srv,var} 18 18 install -dv -m 0750 /root … … 32 32 ln -sv /run/lock /var/lock 33 33 mkdir -pv /var/{opt,cache,lib/{color,misc,locate},local}</userinput></screen> 34 <screen arch="multilib"><userinput>mkdir -pv /{bin,boot,etc/{opt,sysconfig,ld.so.conf.d},home,lib/firmware,mnt,opt} 35 mkdir -pv /{media/{floppy,cdrom},sbin,srv,var} 36 install -dv -m 0750 /root 37 install -dv -m 1777 /tmp /var/tmp 38 mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src} 39 mkdir -pv /usr/{,local/}share/{color,dict,doc,info,locale,man} 40 mkdir -v /usr/{,local/}share/{misc,terminfo,zoneinfo} 41 mkdir -v /usr/libexec 42 mkdir -pv /usr/{,local/}share/man/man{1..8} 43 mkdir -v /lib64 44 mkdir -v /var/{log,mail,spool} 45 ln -sv /run /var/run 46 ln -sv /run/lock /var/lock 47 mkdir -pv /var/{opt,cache,lib/{color,misc,locate},local} 48 mkdir -pv /usr/lib{,x}32</userinput></screen> 34 49 35 50 <para>Directories are, by default, created with permission mode 755, but -
chapter06/eudev.xml
r989524c rb3f1ebb3 105 105 </sect2> 106 106 107 <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> 108 109 <sect2 arch="multilib" role="installation"> 110 <title>Installation of Eudev - 32-bit</title> 111 112 <para>Clean previous build:</para> 113 114 <screen><userinput remap="pre">make distclean</userinput></screen> 115 116 <para>Prepare Eudev for compilation:</para> 117 118 <screen><userinput remap="configure">CC="gcc -m32" \ 119 ./configure --host=i686-pc-linux-gnu \ 120 --prefix=/usr \ 121 --bindir=/sbin \ 122 --sbindir=/sbin \ 123 --libdir=/usr/lib32 \ 124 --sysconfdir=/etc \ 125 --libexecdir=/lib32 \ 126 --with-rootprefix= \ 127 --with-rootlibdir=/usr/lib32 \ 128 --disable-manpages \ 129 --disable-static \ 130 --config-cache</userinput></screen> 131 132 <para>Compile the package:</para> 133 134 <screen><userinput remap="make">make</userinput></screen> 135 136 <para>Install the package:</para> 137 138 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 139 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 140 rm -rf DESTDIR</userinput></screen> 141 142 </sect2> 143 144 <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> 145 146 <sect2 arch="multilib" role="installation"> 147 <title>Installation of Eudev - x32-bit</title> 148 149 <para>Clean previous build:</para> 150 151 <screen><userinput remap="pre">make distclean</userinput></screen> 152 153 <para>Prepare Eudev for compilation:</para> 154 155 <screen><userinput remap="configure">CC="gcc -mx32" \ 156 ./configure --prefix=/usr \ 157 --bindir=/sbin \ 158 --sbindir=/sbin \ 159 --libdir=/usr/libx32 \ 160 --sysconfdir=/etc \ 161 --libexecdir=/libx32 \ 162 --with-rootprefix= \ 163 --with-rootlibdir=/usr/libx32 \ 164 --disable-manpages \ 165 --disable-static \ 166 --config-cache</userinput></screen> 167 168 <para>Compile the package:</para> 169 170 <screen><userinput remap="make">make</userinput></screen> 171 172 <para>Install the package:</para> 173 174 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 175 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 176 rm -rf DESTDIR</userinput></screen> 177 178 </sect2> 179 107 180 <sect2 id="conf-eudev" role="configuration"> 108 181 <title>Configuring Eudev</title> -
chapter06/expat.xml
r989524c rb3f1ebb3 70 70 </sect2> 71 71 72 <sect2 arch="multilib" role="installation"> 73 <title>Installation of Expat - 32-bit</title> 74 75 <para>Clean previous build but keep precompiled doc because it 76 cannot be rebuilt in this stage of the system:</para> 77 78 <screen><userinput remap="pre">sed -e "/^am__append_1/ s/doc//" -i Makefile 79 make clean</userinput></screen> 80 81 <para>Prepare Expat for compilation:</para> 82 83 <screen><userinput remap="configure">CC="gcc -m32" ./configure \ 84 --prefix=/usr \ 85 --libdir=/usr/lib32 \ 86 --host=i686-pc-linux-gnu</userinput></screen> 87 88 <para>Compile the package:</para> 89 90 <screen><userinput remap="make">make</userinput></screen> 91 92 <para>Install the package:</para> 93 94 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 95 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 96 rm -rf DESTDIR</userinput></screen> 97 98 </sect2> 99 100 <sect2 arch="multilib" role="installation"> 101 <title>Installation of Zlib - x32-bit</title> 102 103 <para>Clean previous build:</para> 104 105 <screen><userinput remap="pre">sed -e "/^am__append_1/ s/doc//" -i Makefile 106 make clean</userinput></screen> 107 108 <para>Prepare Expat for compilation:</para> 109 110 <screen><userinput remap="configure"> 111 CC="gcc -mx32" ./configure \ 112 --prefix=/usr \ 113 --libdir=/usr/libx32 \ 114 --host=x86_64-pc-linux-gnux32</userinput></screen> 115 116 <para>Compile the package:</para> 117 118 <screen><userinput remap="make">make</userinput></screen> 119 120 <para>Install the package:</para> 121 122 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 123 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 124 rm -rf DESTDIR</userinput></screen> 125 126 </sect2> 127 72 128 <sect2 id="contents-expat" role="content"> 73 129 <title>Contents of Expat</title> -
chapter06/file.xml
r989524c rb3f1ebb3 60 60 </sect2> 61 61 62 <sect2 arch="multilib" role="installation"> 63 <title>Installation of File - 32-bit</title> 64 65 <para>Clean previous build:</para> 66 67 <screen><userinput remap="pre">make distclean</userinput></screen> 68 69 <para>Prepare File for compilation:</para> 70 71 <screen><userinput remap="configure">CC="gcc -m32" ./configure \ 72 --prefix=/usr \ 73 --libdir=/usr/lib32 \ 74 --host=i686-pc-linux-gnu</userinput></screen> 75 76 <para>Compile the package:</para> 77 78 <screen><userinput remap="make">make</userinput></screen> 79 80 <para>Install the package:</para> 81 82 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 83 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 84 rm -rf DESTDIR</userinput></screen> 85 86 </sect2> 87 88 <sect2 arch="multilib" role="installation"> 89 <title>Installation of File - x32-bit</title> 90 91 <para>Clean previous build:</para> 92 93 <screen><userinput remap="pre">make distclean</userinput></screen> 94 95 <para>Prepare File for compilation:</para> 96 97 <screen><userinput remap="configure"> 98 CC="gcc -mx32" ./configure \ 99 --prefix=/usr \ 100 --libdir=/usr/libx32 \ 101 --host=x86_64-pc-linux-gnux32</userinput></screen> 102 103 <para>Compile the package:</para> 104 105 <screen><userinput remap="make">make</userinput></screen> 106 107 <para>Install the package:</para> 108 109 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 110 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 111 rm -rf DESTDIR</userinput></screen> 112 113 </sect2> 62 114 63 115 <sect2 id="contents-file" role="content"> -
chapter06/gcc.xml
r989524c rb3f1ebb3 42 42 <title>Installation of GCC</title> 43 43 44 <para >If building on x86_64, change the default directory name for 64-bit45 libraries to <quote>lib</quote>:</para>46 47 <screen ><userinput remap="pre">case $(uname -m) in44 <para arch="default">If building on x86_64, change the default directory 45 name for 64-bit libraries to <quote>lib</quote>:</para> 46 47 <screen arch="default"><userinput remap="pre">case $(uname -m) in 48 48 x86_64) 49 49 sed -e '/m64=/s/lib64/lib/' \ … … 52 52 esac</userinput></screen> 53 53 54 <para arch="multilib">Change the default directory name for 64-bit 55 libraries to <quote>lib</quote>:</para> 56 57 <screen arch="multilib"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \ 58 -i.orig gcc/config/i386/t-linux64 59 cat > gcc/config/i386/t-linux64 <<"EOF" 60 comma=, 61 MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) 62 MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) 63 MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu) 64 MULTILIB_OSDIRNAMES+= m32=../lib32$(call if_multiarch,:i386-linux-gnu) 65 MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) 66 EOF</userinput></screen> 67 54 68 <para>Remove the symlink created earlier as the final gcc includes will be 55 69 installed here:</para> … … 57 71 <screen><userinput remap="pre">rm -f /usr/lib/gcc</userinput></screen> 58 72 73 <!-- Following patch might be obsolete with gcc >= 8.2.1 --> 74 <para>Fix an issue with isl-&isl-version;:</para> 75 76 <screen><userinput remap="pre">sed -e "/#include <isl\/schedule_node.h>/ a#include <isl/id.h>\n#include <isl/space.h>" \ 77 -i gcc/graphite.h</userinput></screen> 78 59 79 <para>The GCC documentation recommends building GCC in a dedicated build directory:</para> 60 80 … … 64 84 <para>Prepare GCC for compilation:</para> 65 85 66 <screen ><userinput remap="configure">SED=sed \86 <screen arch="default"><userinput remap="configure">SED=sed \ 67 87 ../configure --prefix=/usr \ 68 88 --enable-languages=c,c++ \ … … 70 90 --disable-bootstrap \ 71 91 --disable-libmpx \ 92 --with-system-zlib</userinput></screen> 93 94 <screen arch="multilib"><userinput remap="configure">SED=sed \ 95 ../configure --prefix=/usr \ 96 --enable-languages=c,c++ \ 97 --enable-multilib \ 98 --with-multilib-list=m32,m64,mx32 \ 99 --disable-bootstrap \ 72 100 --with-system-zlib</userinput></screen> 73 101 … … 266 294 SEARCH_DIR("/usr/lib");</computeroutput></screen> 267 295 268 <para >A 32-bit system may see a few different directories. For example, here269 is the output from an i686 machine:</para>270 271 <screen ><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32")296 <para arch="default">A 32-bit system may see a few different directories. 297 For example, here is the output from an i686 machine:</para> 298 299 <screen arch="default"><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32") 272 300 SEARCH_DIR("/usr/local/lib32") 273 301 SEARCH_DIR("/lib32") … … 325 353 326 354 <screen><userinput remap="install">mkdir -pv /usr/share/gdb/auto-load/usr/lib 327 mv -v /usr/lib/ *gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>355 mv -v /usr/lib/libstdc++*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen> 328 356 329 357 </sect2> -
chapter06/glibc.xml
r989524c rb3f1ebb3 97 97 --enable-kernel=&min-kernel; \ 98 98 --enable-stack-protector=strong \ 99 --with-headers=/usr/include \ 99 100 libc_cv_slibdir=/lib</userinput></screen> 100 101 -
chapter06/gmp.xml
r989524c rb3f1ebb3 121 121 </sect2> 122 122 123 <!-- ~~~~~ m32 ~~~~~ --> 124 <sect2 arch="multilib" role="installation"> 125 <title>Installation of GMP - 32-bit</title> 126 127 <para>Clean previous build:</para> 128 129 <screen><userinput remap="pre">make distclean</userinput></screen> 130 131 <para>Generic libraries can be created by running 132 the following:</para> 133 134 <screen><userinput>cp -v configfsf.guess config.guess 135 cp -v configfsf.sub config.sub</userinput></screen> 136 137 <para>Prepare GMP for compilation:</para> 138 139 <screen><userinput remap="configure">ABI="32" \ 140 CC="gcc -m32" \ 141 CXX="g++ -m32" \ 142 ./configure \ 143 --prefix=/usr \ 144 --disable-static \ 145 --enable-cxx \ 146 --libdir=/usr/lib32 \ 147 --host=i686-pc-linux-gnu</userinput></screen> 148 149 <para>Compile the package:</para> 150 151 <screen><userinput remap="make">make</userinput></screen> 152 153 <important> 154 <para>The test suite for GMP in this section is considered critical. 155 Do not skip it under any circumstances.</para> 156 </important> 157 158 <para>Test the results:</para> 159 160 <screen><userinput remap="test">make check 2>&1 | tee gmp-check-log</userinput></screen> 161 162 <para>Ensure that all 190 tests in the test suite passed. 163 Check the results by issuing the following command:</para> 164 165 <screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen> 166 167 <para>Install the package:</para> 168 169 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 170 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 171 rm -rf DESTDIR</userinput></screen> 172 173 </sect2> 174 175 <!-- ~~~~~ m32 ~~~~~ --> 176 <sect2 arch="multilib" role="installation"> 177 <title>Installation of GMP - x32-bit</title> 178 179 <para>Clean previous build:</para> 180 181 <screen><userinput remap="pre">make distclean</userinput></screen> 182 183 <para>Generic libraries can be created by running 184 the following:</para> 185 186 <screen><userinput>cp -v configfsf.guess config.guess 187 cp -v configfsf.sub config.sub</userinput></screen> 188 189 <para>Prepare GMP for compilation:</para> 190 191 <screen><userinput remap="configure">ABI="x32" \ 192 CC="gcc -mx32" \ 193 CXX="g++ -mx32" \ 194 ./configure \ 195 --prefix=/usr \ 196 --disable-static \ 197 --enable-cxx \ 198 --libdir=/usr/libx32 \ 199 --host=x86_64-pc-linux-gnux32</userinput></screen> 200 201 <para>Compile the package:</para> 202 203 <screen><userinput remap="make">make</userinput></screen> 204 205 <important> 206 <para>The test suite for GMP in this section is considered critical. 207 Do not skip it under any circumstances.</para> 208 </important> 209 210 <para>Test the results:</para> 211 212 <screen><userinput remap="test">make check 2>&1 | tee gmp-check-log</userinput></screen> 213 214 <para>Ensure that all 190 tests in the test suite passed. 215 Check the results by issuing the following command:</para> 216 217 <screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen> 218 219 <para>Install the package:</para> 220 221 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 222 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 223 rm -rf DESTDIR</userinput></screen> 224 225 </sect2> 226 123 227 <sect2 id="contents-gmp" role="content"> 124 228 <title>Contents of GMP</title> -
chapter06/kmod.xml
r989524c rb3f1ebb3 95 95 96 96 ln -sfv kmod /bin/lsmod</userinput></screen> 97 98 </sect2> 99 100 <sect2 arch="multilib" role="installation"> 101 <title>Installation of Kmod - 32-bit</title> 102 103 <para>Clean previous build but keep man pages as they cannot be recreated 104 since xsltproc isn't installed yet:</para> 105 106 <screen><userinput>sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile 107 make clean</userinput></screen> 108 109 <para>Prepare Kmod for compilation:</para> 110 111 <screen><userinput remap="configure">CC="gcc -m32" ./configure \ 112 --prefix=/usr \ 113 --bindir=/bin \ 114 --libdir=/usr/lib32 \ 115 --sysconfdir=/etc \ 116 --with-xz --with-zlib \ 117 --host=i686-pc-linux-gnu \ 118 --with-rootlibdir=/usr/lib32</userinput></screen> 119 120 <para>Compile the package:</para> 121 122 <screen><userinput remap="make">make</userinput></screen> 123 124 <para>Install the package:</para> 125 126 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 127 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 128 rm -rf DESTDIR</userinput></screen> 129 130 </sect2> 131 132 <sect2 arch="multilib" role="installation"> 133 <title>Installation of Kmod - x32-bit</title> 134 135 <para>Clean previous build:</para> 136 137 <screen><userinput>sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile 138 make clean</userinput></screen> 139 140 <para>Prepare Kmod for compilation:</para> 141 142 <screen><userinput remap="configure">CC="gcc -mx32" ./configure \ 143 --prefix=/usr \ 144 --bindir=/bin \ 145 --libdir=/usr/libx32 \ 146 --sysconfdir=/etc \ 147 --with-xz \ 148 --with-zlib \ 149 --host=x86_64-pc-linux-gnux32 \ 150 --with-rootlibdir=/usr/libx32</userinput></screen> 151 152 <para>Compile the package:</para> 153 154 <screen><userinput remap="make">make</userinput></screen> 155 156 <para>Install the package:</para> 157 158 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 159 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 160 rm -rf DESTDIR</userinput></screen> 97 161 98 162 </sect2> -
chapter06/libcap.xml
r989524c rb3f1ebb3 93 93 </sect2> 94 94 95 <sect2 arch="multilib" role="installation"> 96 <title>Installation of Libcap - 32-bit</title> 97 98 <para>Clean previous build:</para> 99 100 <screen><userinput remap="pre">make distclean</userinput></screen> 101 102 <para>Compile the package:</para> 103 104 <screen><userinput remap="make">make CC="gcc -m32 -march=i686"</userinput></screen> 105 106 <para>Install the package:</para> 107 108 <screen><userinput remap="install">make lib=lib32 prefix=$PWD/DESTDIR/usr -C libcap install 109 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 110 rm -rf DESTDIR</userinput></screen> 111 112 </sect2> 113 114 <sect2 arch="multilib" role="installation"> 115 <title>Installation of Libcap - x32-bit</title> 116 117 <para>Clean previous build:</para> 118 119 <screen><userinput remap="pre">make distclean</userinput></screen> 120 121 <para>Compile the package:</para> 122 123 <screen><userinput remap="make">make CC="gcc -mx32"</userinput></screen> 124 125 <para>Install the package:</para> 126 127 <screen><userinput remap="install">make lib=libx32 prefix=$PWD/DESTDIR/usr -C libcap install 128 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 129 rm -rf DESTDIR</userinput></screen> 130 131 </sect2> 132 95 133 <sect2 id="contents-libcap" role="content"> 96 134 <title>Contents of Libcap</title> -
chapter06/libelf.xml
r989524c rb3f1ebb3 64 64 </sect2> 65 65 66 <sect2 arch="multilib" role="installation"> 67 <title>Installation of Libelf - 32-bit</title> 68 69 <para>Clean previous build:</para> 70 71 <screen><userinput remap="pre">make distclean</userinput></screen> 72 73 <para>Prepare Libelf for compilation:</para> 74 75 <screen><userinput remap="configure">CC="gcc -m32" ./configure \ 76 --prefix=/usr \ 77 --libdir=/usr/lib32 \ 78 --host=i686-pc-linux-gnu</userinput></screen> 79 80 <para>Compile the package:</para> 81 82 <screen><userinput remap="make">make</userinput></screen> 83 84 <para>Install the package:</para> 85 86 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR -C libelf install 87 install -vDm644 config/libelf.pc DESTDIR/usr/lib32/pkgconfig/libelf.pc 88 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 89 rm -rf DESTDIR</userinput></screen> 90 91 </sect2> 92 93 <sect2 arch="multilib" role="installation"> 94 <title>Installation of Libelf - x32-bit</title> 95 96 <para>Clean previous build:</para> 97 98 <screen><userinput remap="pre">make distclean</userinput></screen> 99 100 <para>Prepare Libelf for compilation:</para> 101 102 <screen><userinput remap="configure">CC="gcc -mx32" ./configure \ 103 --prefix=/usr \ 104 --libdir=/usr/libx32 \ 105 --host=x86_64-pc-linux-gnux32</userinput></screen> 106 107 <para>Compile the package:</para> 108 109 <screen><userinput remap="make">make</userinput></screen> 110 111 <para>Install the package:</para> 112 113 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR -C libelf install 114 install -vDm644 config/libelf.pc DESTDIR/usr/libx32/pkgconfig/libelf.pc 115 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 116 rm -rf DESTDIR</userinput></screen> 117 118 </sect2> 119 66 120 <sect2 id="contents-elfutils" role="content"> 67 121 <title>Contents of Libelf</title> -
chapter06/libffi.xml
r989524c rb3f1ebb3 99 99 </sect2> 100 100 101 <!-- ~~~~~ m32 ~~~~~ --> 102 <sect2 arch="multilib" role="installation"> 103 <title>Installation of Libffi - 32-bit</title> 104 105 <para>Clean previous build:</para> 106 107 <screen><userinput remap="pre">make distclean</userinput></screen> 108 109 <para>Prepare Libffi for compilation:</para> 110 111 <screen><userinput remap="configure">CC="gcc -m32" CXX="g++ -m32" \ 112 ./configure \ 113 --prefix=/usr \ 114 --disable-static \ 115 --libdir=/usr/lib32 \ 116 --with-gcc-arch=i686 \ 117 --host=i686-pc-linux-gnu</userinput></screen> 118 119 <para>Compile the package:</para> 120 121 <screen><userinput remap="make">make</userinput></screen> 122 123 <para>To test the results, issue:</para> 124 125 <screen><userinput remap="test">make check</userinput></screen> 126 127 <para>Install the package:</para> 128 129 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 130 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 131 rm -rf DESTDIR</userinput></screen> 132 133 </sect2> 134 135 <!-- ~~~~~ mx32 ~~~~~ --> 136 <sect2 arch="multilib" role="installation"> 137 <title>Installation of Libffi - x32-bit</title> 138 139 <para>Clean previous build:</para> 140 141 <screen><userinput remap="pre">make distclean</userinput></screen> 142 143 <para>Prepare Libffi for compilation:</para> 144 145 <screen><userinput remap="configure">CC="gcc -mx32" CXX="g++ -mx32" \ 146 ./configure \ 147 --prefix=/usr \ 148 --disable-static \ 149 --with-gcc-arch=x86_64 \ 150 --libdir=/usr/libx32 \ 151 --host=x86_64-unknown-linux-gnux32</userinput></screen> 152 153 <para>Compile the package:</para> 154 155 <screen><userinput remap="make">make</userinput></screen> 156 157 <para>To test the results, issue:</para> 158 159 <screen><userinput remap="test">make check</userinput></screen> 160 161 <para>Install the package:</para> 162 163 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 164 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 165 rm -rf DESTDIR</userinput></screen> 166 167 </sect2> 168 101 169 <sect2 id="contents-libffi" role="content"> 102 170 <title>Contents of Libffi</title> -
chapter06/libtool.xml
r989524c rb3f1ebb3 72 72 73 73 74 <sect2 arch="multilib" role="installation"> 75 <title>Installation of Libtool - 32-bit</title> 76 77 <para>Clean previous build:</para> 78 79 <screen><userinput remap="pre">make distclean</userinput></screen> 80 81 <para>Prepare Libtool for compilation:</para> 82 83 <screen><userinput remap="configure">CC="gcc -m32" ./configure \ 84 --prefix=/usr \ 85 --libdir=/usr/lib32 \ 86 --host=i686-pc-linux-gnu</userinput></screen> 87 88 <para>Compile the package:</para> 89 90 <screen><userinput remap="make">make</userinput></screen> 91 92 <para>Install the package:</para> 93 94 <screen><userinput remap="install">make DESTDIR=$(pwd)/DESTDIR install 95 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 96 rm -rf DESTDIR</userinput></screen> 97 98 </sect2> 99 100 <sect2 arch="multilib" role="installation"> 101 <title>Installation of Libtool - x32-bit</title> 102 103 <para>Clean previous build:</para> 104 105 <screen><userinput remap="pre">make distclean</userinput></screen> 106 107 <para>Prepare Libtool for compilation:</para> 108 109 <screen><userinput remap="configure"> 110 CC="gcc -mx32" ./configure \ 111 --prefix=/usr \ 112 --libdir=/usr/libx32 \ 113 --host=x86_64-pc-linux-gnux32</userinput></screen> 114 115 <para>Compile the package:</para> 116 117 <screen><userinput remap="make">make</userinput></screen> 118 119 <para>Install the package:</para> 120 121 <screen><userinput remap="install">make DESTDIR=$(pwd)/DESTDIR install 122 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 123 rm -rf DESTDIR</userinput></screen> 124 125 </sect2> 126 127 74 128 <sect2 id="contents-libtool" role="content"> 75 129 <title>Contents of Libtool</title> -
chapter06/ncurses.xml
r989524c rb3f1ebb3 48 48 <para>Prepare Ncurses for compilation:</para> 49 49 50 <screen ><userinput remap="configure">./configure --prefix=/usr \50 <screen arch="default"><userinput remap="configure">./configure --prefix=/usr \ 51 51 --mandir=/usr/share/man \ 52 52 --with-shared \ … … 55 55 --enable-pc-files \ 56 56 --enable-widec</userinput></screen> 57 <screen arch="multilib"><userinput remap="configure">./configure --prefix=/usr \ 58 --mandir=/usr/share/man \ 59 --with-shared \ 60 --without-debug \ 61 --without-normal \ 62 --enable-pc-files \ 63 --enable-widec \ 64 --with-pkg-config-libdir=/usr/lib/pkgconfig</userinput></screen> 57 65 58 66 <variablelist> … … 89 97 </varlistentry> 90 98 99 <varlistentry arch="multilib"> 100 <term><parameter>--with-pkg-config-libdir=/usr/lib/pkgconfig</parameter></term> 101 <listitem> 102 <para>This switch forces .pc to be installed in /usr/lib/pkgconfig. If 103 not set, .pc files gets installed in /usr/lib32 even for 64bit binaries. 104 </para> 105 </listitem> 106 </varlistentry> 107 91 108 </variablelist> 92 109 … … 140 157 141 158 <note> 142 143 159 <para>The instructions above don't create non-wide-character Ncurses 144 160 libraries since no package installed by compiling from sources would link … … 149 165 following commands:</para> 150 166 151 <screen role="nodump"><userinput>make distclean167 <screen><userinput remap="install">make distclean 152 168 ./configure --prefix=/usr \ 153 169 --with-shared \ … … 158 174 make sources libs 159 175 cp -av lib/lib*.so.5* /usr/lib</userinput></screen> 176 160 177 </note> 161 178 179 </sect2> 180 181 <sect2 arch="multilib" role="installation"> 182 <title>Installation of Ncurses - 32-bit</title> 183 184 <para>Clean previous build:</para> 185 186 <screen><userinput remap="pre">make distclean</userinput></screen> 187 188 <para>Prepare Ncurses for compilation:</para> 189 190 <screen><userinput remap="configure">CC="gcc -m32" CXX="g++ -m32" \ 191 ./configure --prefix=/usr \ 192 --libdir=/usr/lib32 \ 193 --mandir=/usr/share/man \ 194 --with-shared \ 195 --without-debug \ 196 --without-normal \ 197 --enable-pc-files \ 198 --enable-widec \ 199 --host=i686-pc-linux-gnu \ 200 --with-pkg-config-libdir=/usr/lib32/pkgconfig</userinput></screen> 201 202 <para>Compile the package:</para> 203 204 <screen><userinput remap="make">make -j1</userinput></screen> 205 206 <para>Install the package:</para> 207 208 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 209 for lib in ncurses form panel menu ; do 210 rm -vf DESTDIR/usr/lib32/lib${lib}.so 211 echo "INPUT(-l${lib}w)" > DESTDIR/usr/lib32/lib${lib}.so 212 ln -svf ${lib}w.pc DESTDIR/usr/lib32/pkgconfig/$lib.pc 213 done 214 rm -vf DESTDIR/usr/lib32/libcursesw.so 215 echo "INPUT(-lncursesw)" > DESTDIR/usr/lib32/libcursesw.so 216 ln -sfv libncurses.so DESTDIR/usr/lib32/libcurses.so 217 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 218 rm -rf DESTDIR</userinput></screen> 219 220 <para>If desired, make the version 5 libraries in 32bit as well:</para> 221 222 <screen><userinput remap="install">make distclean 223 CC="gcc -m32" CXX="g++ -m32" \ 224 ./configure --prefix=/usr \ 225 --with-shared \ 226 --without-normal \ 227 --without-debug \ 228 --without-cxx-binding \ 229 --with-abi-version=5 \ 230 --host=i686-pc-linux-gnu 231 make -j1 sources libs 232 cp -av lib/lib*.so.5* /usr/lib32</userinput></screen> 233 234 </sect2> 235 236 <sect2 arch="multilib" role="installation"> 237 <title>Installation of Ncurses - x32-bit</title> 238 239 <para>Clean previous build:</para> 240 241 <screen><userinput remap="pre">make distclean</userinput></screen> 242 243 <para>Prepare Ncurses for compilation:</para> 244 245 <screen><userinput remap="configure">CC="gcc -mx32" CXX="g++ -mx32" \ 246 ./configure --prefix=/usr \ 247 --libdir=/usr/libx32 \ 248 --mandir=/usr/share/man \ 249 --with-shared \ 250 --without-debug \ 251 --without-normal \ 252 --enable-pc-files \ 253 --enable-widec \ 254 --host=x86_64-pc-linux-gnux32 \ 255 --with-pkg-config-libdir=/usr/libx32/pkgconfig</userinput></screen> 256 257 <para>Compile the package:</para> 258 259 <screen><userinput remap="make">make -j1</userinput></screen> 260 261 <para>Install the package:</para> 262 263 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 264 for lib in ncurses form panel menu ; do 265 rm -vf DESTDIR/usr/libx32/lib${lib}.so 266 echo "INPUT(-l${lib}w)" > DESTDIR/usr/libx32/lib${lib}.so 267 ln -svf ${lib}w.pc DESTDIR/usr/libx32/pkgconfig/$lib.pc 268 done 269 rm -vf DESTDIR/usr/libx32/libcursesw.so 270 echo "INPUT(-lncursesw)" > DESTDIR/usr/libx32/libcursesw.so 271 ln -sfv libncurses.so DESTDIR/usr/libx32/libcurses.so 272 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 273 rm -rf DESTDIR</userinput></screen> 274 275 <!-- Any package out there which still needs version 5? 276 Leave it out for x32bit for now. 277 278 <para>If desired, make the version 5 libraries in x32bit as well:</para> 279 280 <screen><userinput remap="install">make distclean 281 CC="gcc -mx32" CXX="g++ -mx32" \ 282 ./configure - -prefix=/usr \ 283 - -with-shared \ 284 - -without-normal \ 285 - -without-debug \ 286 - -without-cxx-binding \ 287 - -with-abi-version=5 288 make -j1 sources libs 289 cp -av lib/lib*.so.5* /usr/libx32</userinput></screen> 290 --> 162 291 </sect2> 163 292 -
chapter06/openssl.xml
r989524c rb3f1ebb3 72 72 <screen><userinput remap="install">mv -v /usr/share/doc/openssl /usr/share/doc/openssl-&openssl-version; 73 73 cp -vfr doc/* /usr/share/doc/openssl-&openssl-version;</userinput></screen> 74 75 </sect2> 76 77 <!-- ~~~~~ 32-bit ~~~~~ --> 78 <sect2 arch="multilib" role="installation"> 79 <title>Installation of OpenSSL - 32-bit</title> 80 81 <para>Clean previous build:</para> 82 83 <screen><userinput remap="pre">make distclean</userinput></screen> 84 85 <para>Prepare OpenSSL for compilation:</para> 86 87 <screen><userinput remap="configure">MACHINE="i686" \ 88 CC="gcc -m32 -march=i686" \ 89 CXX="g++ -m32 -march=i686" \ 90 ./config \ 91 --prefix=/usr \ 92 --libdir=/usr/lib32 \ 93 --openssldir=/etc/ssl \ 94 --libdir=lib32 \ 95 shared \ 96 zlib-dynamic</userinput></screen> 97 98 <para>Compile the package:</para> 99 100 <screen><userinput remap="make">make</userinput></screen> 101 <para>Install the package:</para> 102 103 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 104 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 105 rm -rf DESTDIR</userinput></screen> 106 107 </sect2> 108 109 <!-- ~~~~~ x32-bit ~~~~~ --> 110 <sect2 arch="multilib" role="installation"> 111 <title>Installation of OpenSSL - x32-bit</title> 112 113 <para>Clean previous build:</para> 114 115 <screen><userinput remap="pre">make distclean</userinput></screen> 116 117 <para>Prepare OpenSSL for compilation:</para> 118 119 <screen><userinput remap="configure">MACHINE="x86_64" \ 120 CC="gcc -mx32" \ 121 CXX="g++ -mx32" \ 122 ./config \ 123 --prefix=/usr \ 124 --libdir=/usr/libx32 \ 125 --openssldir=/etc/ssl \ 126 --libdir=libx32 \ 127 shared \ 128 zlib-dynamic</userinput></screen> 129 130 <para>Compile the package:</para> 131 132 <screen><userinput remap="make">make</userinput></screen> 133 <para>Install the package:</para> 134 135 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 136 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 137 rm -rf DESTDIR</userinput></screen> 74 138 75 139 </sect2> -
chapter06/readline.xml
r989524c rb3f1ebb3 93 93 </sect2> 94 94 95 <sect2 arch="multilib" role="installation"> 96 <title>Installation of Readline - 32-bit</title> 97 98 <para>Clean previous build:</para> 99 100 <screen><userinput remap="pre">make distclean</userinput></screen> 101 102 <para>Prepare Readline for compilation:</para> 103 104 <screen><userinput remap="configure">CC="gcc -m32 -march=i686" ./configure \ 105 --prefix=/usr \ 106 --libdir=/usr/lib32 \ 107 --disable-static \ 108 --host=i686-pc-linux-gnu</userinput></screen> 109 110 <para>Compile the package:</para> 111 112 <screen><userinput remap="make">make</userinput></screen> 113 114 <para>Install the package:</para> 115 116 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 117 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 118 rm -rf DESTDIR</userinput></screen> 119 120 </sect2> 121 122 <sect2 arch="multilib" role="installation"> 123 <title>Installation of Readline - x32-bit</title> 124 125 <para>Clean previous build:</para> 126 127 <screen><userinput remap="pre">make distclean</userinput></screen> 128 129 <para>Prepare Readline for compilation:</para> 130 131 <screen><userinput remap="configure">CC="gcc -mx32" ./configure \ 132 --prefix=/usr \ 133 --libdir=/usr/libx32 \ 134 --disable-static \ 135 --host=x86_64-pc-linux-gnux32</userinput></screen> 136 137 <para>Compile the package:</para> 138 139 <screen><userinput remap="make">make</userinput></screen> 140 141 <para>Install the package:</para> 142 143 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 144 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 145 rm -rf DESTDIR</userinput></screen> 146 147 </sect2> 148 95 149 <sect2 id="contents-readline" role="content"> 96 150 <title>Contents of Readline</title> -
chapter06/revisedchroot.xml
r989524c rb3f1ebb3 63 63 at this point. To remove them, run:</para> 64 64 65 <screen><userinput>find /usr/lib /usr/libexec -name \*.la -delete</userinput></screen> 65 <screen arch="default"><userinput>find /usr/lib /usr/libexec -name \*.la -delete</userinput></screen> 66 67 <screen arch="multilib"><userinput>find /usr/lib{,{,x}32} /usr/libexec -name \*.la -delete</userinput></screen> 66 68 67 69 <para>For more information about libtool archive files, see the <ulink -
chapter06/strippingagain.xml
r989524c rb3f1ebb3 34 34 35 35 <!--<screen><userinput>save_lib="ld-2.25.so libc-2.25.so libpthread-2.25.so libthread_db-1.0.so"--> 36 <screen ><userinput>save_lib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so"36 <screen arch="default"><userinput>save_lib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so" 37 37 38 38 cd /lib … … 53 53 strip --strip-unneeded $LIB 54 54 objcopy --add-gnu-debuglink=$LIB.dbg $LIB 55 done 56 57 unset LIB save_lib save_usrlib</userinput></screen> 58 59 <screen arch="multilib"><userinput>save_lib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so" 60 61 cd /lib 62 63 for LIB in $save_lib; do 64 objcopy --only-keep-debug $LIB $LIB.dbg 65 strip --strip-unneeded $LIB 66 objcopy --add-gnu-debuglink=$LIB.dbg $LIB 67 done 68 69 save_usrlib="libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version; 70 libitm.so.&libitm-version; libatomic.so.&libatomic-version;" <!-- libcilkrts.so.&libcilkrts-version;--> 71 72 for libdir in /usr/lib{,{,x}32}; do 73 cd $libdir 74 for LIB in $save_usrlib; do 75 objcopy --only-keep-debug $LIB $LIB.dbg 76 strip --strip-unneeded $LIB 77 objcopy --add-gnu-debuglink=$LIB.dbg $LIB 78 done 55 79 done 56 80 … … 81 105 <para>Now the binaries and libraries can be safely stripped:</para> 82 106 83 <screen ><userinput>/tools/bin/find /usr/lib -type f -name \*.a \107 <screen arch="default"><userinput>/tools/bin/find /usr/lib -type f -name \*.a \ 84 108 -exec /tools/bin/strip --strip-debug {} ';' 85 109 86 110 /tools/bin/find /lib /usr/lib -type f \( -name \*.so* -a ! -name \*dbg \) \ 111 -exec /tools/bin/strip --strip-unneeded {} ';' 112 113 /tools/bin/find /{bin,sbin} /usr/{bin,sbin,libexec} -type f \ 114 -exec /tools/bin/strip --strip-all {} ';'</userinput></screen> 115 116 <screen arch="multilib"><userinput>/tools/bin/find /usr/lib{,{,x}32} -type f -name \*.a \ 117 -exec /tools/bin/strip --strip-debug {} ';' 118 119 /tools/bin/find /lib /usr/lib{,{,x}32} -type f \( -name \*.so* -a ! -name \*dbg \) \ 87 120 -exec /tools/bin/strip --strip-unneeded {} ';' 88 121 -
chapter06/systemd.xml
r989524c rb3f1ebb3 208 208 EOF 209 209 chmod 755 /lib/systemd/systemd-user-sessions</userinput></screen> 210 211 </sect2> 212 213 <!-- ====== 32-bit ===== --> 214 215 <sect2 arch="multilib" role="installation"> 216 <title>Installation of systemd - 32-bit</title> 217 218 <para>If still in the build directory, step out:</para> 219 <screen><userinput remap="pre">cd ..</userinput></screen> 220 221 <para>Clean previous build:</para> 222 223 <screen><userinput remap="pre">rm -rf build</userinput></screen> 224 225 <para>Create a symlink to work around missing xsltproc:</para> 226 227 <screen><userinput remap="pre">ln -sf /tools/bin/true /usr/bin/xsltproc</userinput></screen> 228 229 <para>Because we have not yet installed the final version of Util-Linux, 230 create links to the libraries in the approprite location:</para> 231 232 <screen><userinput remap="pre">for file in /tools/lib32/lib{blkid,mount,uuid}*; do 233 ln -sf $file /usr/lib32/ 234 done</userinput></screen> 235 236 <para>Set up the man pages:</para> 237 238 <screen><userinput remap="pre">tar -xf ../systemd-man-pages-&systemd-version;.tar.xz</userinput></screen> 239 240 <para>Prepare systemd for compilation:</para> 241 242 <screen><userinput remap="configure">cd build 243 PKG_CONFIG_PATH="/usr/lib32/pkgconfig:/tools/lib32/pkgconfig" \ 244 CC="gcc -m32 -march=i686" \ 245 CXX="g++ -m32 -march=i686" \ 246 LANG=en_US.UTF-8 \ 247 meson --prefix=/usr \ 248 --sysconfdir=/etc \ 249 --localstatedir=/var \ 250 -Dblkid=true \ 251 -Dbuildtype=release \ 252 -Ddefault-dnssec=no \ 253 -Dfirstboot=false \ 254 -Dinstall-tests=false \ 255 -Dkill-path=/bin/kill \ 256 -Dkmod-path=/bin/kmod \ 257 -Dldconfig=false \ 258 -Dmount-path=/bin/mount \ 259 -Drootprefix= \ 260 -Drootlibdir=/usr/lib32 \ 261 -Dsplit-usr=true \ 262 -Dsulogin-path=/sbin/sulogin \ 263 -Dsysusers=false \ 264 -Dumount-path=/bin/umount \ 265 -Db_lto=false \ 266 ..</userinput></screen> 267 268 <para>Compile the package:</para> 269 270 <screen><userinput remap="make">LANG=en_US.UTF-8 ninja</userinput></screen> 271 272 <para>Install the package:</para> 273 274 <screen><userinput remap="install">LANG=en_US.UTF-8 DESTDIR=$PWD/DESTDIR ninja install 275 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 276 rm -rf DESTDIR 277 rm -f /usr/bin/xsltproc</userinput></screen> 278 279 </sect2> 280 281 <!-- ====== x32-bit ===== --> 282 283 <sect2 arch="multilib" role="installation"> 284 <title>Installation of systemd - x32-bit</title> 285 286 <para>If still in the build directory, step out:</para> 287 <screen><userinput remap="pre">cd ..</userinput></screen> 288 289 <para>Clean previous build:</para> 290 291 <screen><userinput remap="pre">rm -rf build</userinput></screen> 292 293 <para>Create a symlink to work around missing xsltproc:</para> 294 295 <screen><userinput remap="pre">ln -sf /tools/bin/true /usr/bin/xsltproc</userinput></screen> 296 297 <para>Because we have not yet installed the final version of Util-Linux, 298 create links to the libraries in the approprite location:</para> 299 300 <screen><userinput remap="pre">for file in /tools/libx32/lib{blkid,mount,uuid}*; do 301 ln -sf $file /usr/libx32/ 302 done</userinput></screen> 303 304 <para>Set up the man pages:</para> 305 306 <screen><userinput remap="pre">tar -xf ../systemd-man-pages-&systemd-version;.tar.xz</userinput></screen> 307 308 <para>Fix an issue on x32:</para> 309 310 <screen><userinput remap="pre">sed '/log_debug/s@PRI_TIMEX@PRIi64@' -i src/timesync/timesyncd-manager.c 311 sed '/long drift_freq;/s@long @int64_t @' -i src/timesync/timesyncd-manager.h</userinput></screen> 312 313 <para>Prepare systemd for compilation:</para> 314 315 <screen><userinput remap="configure">cd build 316 PKG_CONFIG_PATH="/tools/libx32/pkgconfig:/usr/libx32/pkgconfig" \ 317 CC="gcc -mx32" \ 318 CXX="g++ -mx32" \ 319 CFLAGS+="-Wno-error=shift-overflow" \ 320 CXXFLAGS+="-Wno-error=shift-overflow" \ 321 LANG=en_US.UTF-8 \ 322 meson --prefix=/usr \ 323 --sysconfdir=/etc \ 324 --localstatedir=/var \ 325 -Dblkid=true \ 326 -Dbuildtype=release \ 327 -Ddefault-dnssec=no \ 328 -Dfirstboot=false \ 329 -Dinstall-tests=false \ 330 -Dkill-path=/bin/kill \ 331 -Dkmod-path=/bin/kmod \ 332 -Dldconfig=false \ 333 -Dmount-path=/bin/mount \ 334 -Drootprefix= \ 335 -Drootlibdir=/usr/libx32 \ 336 -Dsplit-usr=true \ 337 -Dsulogin-path=/sbin/sulogin \ 338 -Dsysusers=false \ 339 -Dumount-path=/bin/umount \ 340 -Db_lto=false \ 341 ..</userinput></screen> 342 343 <para>Compile the package:</para> 344 345 <screen><userinput remap="make">LANG=en_US.UTF-8 ninja</userinput></screen> 346 347 <para>Install the package:</para> 348 349 <screen><userinput remap="install">LANG=en_US.UTF-8 DESTDIR=$PWD/DESTDIR ninja install 350 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 351 rm -rf DESTDIR 352 rm -f /usr/bin/xsltproc</userinput></screen> 210 353 211 354 </sect2> -
chapter06/util-linux.xml
r989524c rb3f1ebb3 53 53 </sect2> 54 54 55 <!-- ~~~~~~~~~~~~~~~~~~~~~ default ABI ~~~~~~~~~~~~~~~~~~~~~ --> 55 56 <sect2 role="installation"> 56 57 <title>Installation of Util-linux</title> … … 119 120 120 121 <screen><userinput remap="install">make install</userinput></screen> 122 123 </sect2> 124 125 <!-- ~~~~~~~~~~~~~~~~~~~~~ ABI 32-bit ~~~~~~~~~~~~~~~~~~~~~ --> 126 <sect2 arch="multilib" role="installation"> 127 <title>Installation of Util-linux - 32-bit</title> 128 129 <para>Clean previous build:</para> 130 131 <screen><userinput remap="pre">make distclean</userinput></screen> 132 133 <para>Prepare Util-linux for compilation:</para> 134 135 <screen revision="sysv"><userinput remap="configure">CC="gcc -m32" \ 136 ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ 137 --docdir=/usr/share/doc/util-linux-&util-linux-version; \ 138 --disable-chfn-chsh \ 139 --disable-login \ 140 --disable-nologin \ 141 --disable-su \ 142 --disable-setpriv \ 143 --disable-runuser \ 144 --disable-pylibmount \ 145 --disable-static \ 146 --without-python \ 147 --without-systemd \ 148 --libdir=/usr/lib32 \ 149 --host=i686-pc-linux-gnu \ 150 --without-systemdsystemunitdir \ 151 --enable-libmount-force-mountinfo</userinput></screen> 152 153 <screen revision="systemd"><userinput remap="configure">CC="gcc -m32" \ 154 ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ 155 --docdir=/usr/share/doc/util-linux-&util-linux-version; \ 156 --disable-chfn-chsh \ 157 --disable-login \ 158 --disable-nologin \ 159 --disable-su \ 160 --disable-setpriv \ 161 --disable-runuser \ 162 --disable-pylibmount \ 163 --disable-static \ 164 --without-python \ 165 --libdir=/usr/lib32 \ 166 --host=i686-pc-linux-gnu \ 167 --enable-libmount-force-mountinfo</userinput></screen> 168 169 <para>Compile the package:</para> 170 171 <screen><userinput remap="make">make</userinput></screen> 172 173 <para>Install the package:</para> 174 175 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 176 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 177 rm -rf DESTDIR</userinput></screen> 178 179 </sect2> 180 181 <!-- ~~~~~~~~~~~~~~~~~~~~~ ABI x32-bit ~~~~~~~~~~~~~~~~~~~~~ --> 182 <sect2 arch="multilib" role="installation"> 183 <title>Installation of Util-linux - x32-bit</title> 184 185 <para>Clean previous build:</para> 186 187 <screen><userinput remap="pre">make distclean</userinput></screen> 188 189 <para>Prepare Util-linux for compilation:</para> 190 191 <screen revision="sysv"><userinput remap="configure">CC="gcc -mx32" \ 192 ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ 193 --docdir=/usr/share/doc/util-linux-&util-linux-version; \ 194 --disable-chfn-chsh \ 195 --disable-login \ 196 --disable-nologin \ 197 --disable-su \ 198 --disable-setpriv \ 199 --disable-runuser \ 200 --disable-pylibmount \ 201 --disable-static \ 202 --without-python \ 203 --without-systemd \ 204 --without-systemdsystemunitdir \ 205 --libdir=/usr/libx32 \ 206 --host=x86_64-pc-linux-gnux32 \ 207 --enable-libmount-force-mountinfo</userinput></screen> 208 209 <screen revision="systemd"><userinput remap="configure">CC="gcc -mx32" \ 210 ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ 211 --docdir=/usr/share/doc/util-linux-&util-linux-version; \ 212 --disable-chfn-chsh \ 213 --disable-login \ 214 --disable-nologin \ 215 --disable-su \ 216 --disable-setpriv \ 217 --disable-runuser \ 218 --disable-pylibmount \ 219 --disable-static \ 220 --without-python \ 221 --libdir=/usr/libx32 \ 222 --host=x86_64-pc-linux-gnux32 \ 223 --enable-libmount-force-mountinfo</userinput></screen> 224 225 <para>Compile the package:</para> 226 227 <screen><userinput remap="make">make</userinput></screen> 228 229 <para>Install the package:</para> 230 231 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 232 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 233 rm -rf DESTDIR</userinput></screen> 121 234 122 235 </sect2> -
chapter06/xz.xml
r989524c rb3f1ebb3 66 66 mv -v /usr/lib/liblzma.so.* /lib 67 67 ln -svf ../../lib/$(readlink /usr/lib/liblzma.so) /usr/lib/liblzma.so</userinput></screen> 68 69 </sect2> 70 71 <sect2 arch="multilib" role="installation"> 72 <title>Installation of Xz - 32-bit</title> 73 74 <para>Clean previous build:</para> 75 76 <screen><userinput remap="pre">make distclean</userinput></screen> 77 78 <para>Prepare Xz for compilation:</para> 79 80 <screen><userinput remap="configure">CC="gcc -m32" ./configure \ 81 --prefix=/usr \ 82 --disable-static \ 83 --libdir=/usr/lib32 \ 84 --host=i686-pc-linux-gnu</userinput></screen> 85 86 <para>Compile the package:</para> 87 88 <screen><userinput remap="make">make</userinput></screen> 89 90 <para>Install the package:</para> 91 92 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 93 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 94 rm -rf DESTDIR</userinput></screen> 95 96 </sect2> 97 98 <sect2 arch="multilib" role="installation"> 99 <title>Installation of Xz - x32-bit</title> 100 101 <para>Clean previous build:</para> 102 103 <screen><userinput remap="pre">make distclean</userinput></screen> 104 105 <para>Prepare Xz for compilation:</para> 106 107 <screen><userinput remap="configure"> 108 CC="gcc -mx32" ./configure \ 109 --prefix=/usr \ 110 --disable-static \ 111 --libdir=/usr/libx32 \ 112 --host=x86_64-pc-linux-gnux32</userinput></screen> 113 114 <para>Compile the package:</para> 115 116 <screen><userinput remap="make">make</userinput></screen> 117 118 <para>Install the package:</para> 119 120 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 121 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 122 rm -rf DESTDIR</userinput></screen> 68 123 69 124 </sect2> -
chapter06/zlib.xml
r989524c rb3f1ebb3 68 68 </sect2> 69 69 70 <sect2 arch="multilib" role="installation"> 71 <title>Installation of Zlib - 32-bit</title> 72 73 <para>Clean previous build:</para> 74 75 <screen><userinput remap="pre">make distclean</userinput></screen> 76 77 <para>Prepare Zlib for compilation:</para> 78 79 <!-- configure doesn't know option - -host=i686-pc-linux-gnu --> 80 <screen><userinput remap="configure">CC="gcc -m32 -march=i686" \ 81 ./configure --prefix=/usr \ 82 --libdir=/usr/lib32</userinput></screen> 83 84 <para>Compile the package:</para> 85 86 <screen><userinput remap="make">make</userinput></screen> 87 88 <para>Install the package:</para> 89 90 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 91 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 92 rm -rf DESTDIR</userinput></screen> 93 94 </sect2> 95 96 <sect2 arch="multilib" role="installation"> 97 <title>Installation of Zlib - x32-bit</title> 98 99 <screen><userinput remap="pre">make distclean</userinput></screen> 100 101 <para>Prepare Zlib for compilation:</para> 102 103 <screen><userinput remap="configure">CC="gcc -mx32" \ 104 ./configure --prefix=/usr \ 105 --libdir=/usr/libx32</userinput></screen> 106 107 <para>Compile the package:</para> 108 109 <screen><userinput remap="make">make</userinput></screen> 110 111 <para>Install the package:</para> 112 113 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 114 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 115 rm -rf DESTDIR</userinput></screen> 116 117 </sect2> 118 70 119 <sect2 id="contents-zlib" role="content"> 71 120 <title>Contents of Zlib</title> -
chapter08/grub.xml
r989524c rb3f1ebb3 140 140 <para>Generate <filename>/boot/grub/grub.cfg</filename>:</para> 141 141 142 <screen revision="sysv"><userinput>cat > /boot/grub/grub.cfg << "EOF"142 <screen arch="default" revision="sysv"><userinput>cat > /boot/grub/grub.cfg << "EOF" 143 143 <literal># Begin /boot/grub/grub.cfg 144 144 set default=0 … … 153 153 EOF</userinput></screen> 154 154 155 <screen revision="systemd"><userinput>cat > /boot/grub/grub.cfg << "EOF"155 <screen arch="default" revision="systemd"><userinput>cat > /boot/grub/grub.cfg << "EOF" 156 156 <literal># Begin /boot/grub/grub.cfg 157 157 set default=0 … … 163 163 menuentry "GNU/Linux, Linux &linux-version;-lfs-&versiond;" { 164 164 linux /boot/vmlinuz-&linux-version;-lfs-&versiond; root=/dev/sda2 ro 165 }</literal> 166 EOF</userinput></screen> 167 168 <screen arch="multilib" revision="sysv"><userinput>cat > /boot/grub/grub.cfg << "EOF" 169 <literal># Begin /boot/grub/grub.cfg 170 set default=0 171 set timeout=5 172 173 insmod ext2 174 set root=(hd0,2) 175 176 menuentry "GNU/Linux, Linux &linux-version;-lfs-&version;-multilib" { 177 linux /boot/vmlinuz-&linux-version;-lfs-&version;-multilib root=/dev/sda2 ro 178 }</literal> 179 EOF</userinput></screen> 180 181 <screen arch="multilib" revision="systemd"><userinput>cat > /boot/grub/grub.cfg << "EOF" 182 <literal># Begin /boot/grub/grub.cfg 183 set default=0 184 set timeout=5 185 186 insmod ext2 187 set root=(hd0,2) 188 189 menuentry "GNU/Linux, Linux &linux-version;-lfs-&versiond;-multilib" { 190 linux /boot/vmlinuz-&linux-version;-lfs-&versiond;-multilib root=/dev/sda2 ro 165 191 }</literal> 166 192 EOF</userinput></screen> -
chapter08/kernel.xml
r989524c rb3f1ebb3 236 236 following command assumes an x86 architecture:</para> 237 237 238 <screen revision="sysv"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen> 239 240 <screen revision="systemd"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&versiond;</userinput></screen> 238 <screen arch="default" revision="sysv"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen> 239 240 <screen arch="multilib" revision="sysv"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;-multilib</userinput></screen> 241 242 <screen arch="default" revision="systemd"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&versiond;</userinput></screen> 243 244 <screen arch="multilib" revision="systemd"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&versiond;-multilib</userinput></screen> 245 241 246 242 247 <para><filename>System.map</filename> is a symbol file for the kernel. … … 347 352 <seglistitem> 348 353 <seg>config-&linux-version;, 349 <phrase revision="sysv">vmlinuz-&linux-version;-lfs-&version;,</phrase> 350 <phrase revision="systemd">vmlinuz-&linux-version;-lfs-&versiond;,</phrase> 354 <phrase arch="default" revision="sysv">vmlinuz-&linux-version;-lfs-&version;,</phrase> 355 <phrase arch="default" revision="systemd">vmlinuz-&linux-version;-lfs-&versiond;,</phrase> 356 <phrase arch="multilib" revision="sysv">vmlinuz-&linux-version;-lfs-&version;-multilib,</phrase> 357 <phrase arch="multilib" revision="systemd">vmlinuz-&linux-version;-lfs-&versiond;-multilib,</phrase> 351 358 and System.map-&linux-version;</seg> 352 359 <seg>/lib/modules, /usr/share/doc/linux-&linux-version;</seg> -
chapter09/theend.xml
r989524c rb3f1ebb3 29 29 file required by systemd:</para> 30 30 31 <screen revision="systemd"><userinput>cat > /etc/os-release << "EOF"31 <screen arch="default" revision="systemd"><userinput>cat > /etc/os-release << "EOF" 32 32 NAME="Linux From Scratch" 33 33 VERSION="&versiond;" 34 34 ID=lfs 35 35 PRETTY_NAME="Linux From Scratch &versiond;" 36 VERSION_CODENAME="<your name here>" 37 EOF</userinput></screen> 38 39 <screen arch="multilib" revision="systemd"><userinput>cat > /etc/os-release << "EOF" 40 NAME="Linux From Scratch" 41 VERSION="&versiond;" 42 ID=lfs 43 PRETTY_NAME="Linux From Scratch &versiond; Multlib" 36 44 VERSION_CODENAME="<your name here>" 37 45 EOF</userinput></screen> … … 43 51 running:</para> 44 52 45 <screen revision="sysv"><userinput>echo &version; > /etc/lfs-release</userinput></screen> 53 <screen arch="default" revision="sysv"><userinput>echo &version; > /etc/lfs-release</userinput></screen> 54 <screen arch="multilib" revision="sysv"><userinput>echo &version;-multilib > /etc/lfs-release</userinput></screen> 46 55 47 56 <para revision="systemd">Creating the file … … 57 66 this file, run:</para> 58 67 59 <screen revision="sysv"><userinput>cat > /etc/lsb-release << "EOF"68 <screen arch="default" revision="sysv"><userinput>cat > /etc/lsb-release << "EOF" 60 69 DISTRIB_ID="Linux From Scratch" 61 70 DISTRIB_RELEASE="&version;" … … 64 73 EOF</userinput></screen> 65 74 66 <screen revision="systemd"><userinput>cat > /etc/lsb-release << "EOF"75 <screen arch="default" revision="systemd"><userinput>cat > /etc/lsb-release << "EOF" 67 76 DISTRIB_ID="Linux From Scratch" 68 77 DISTRIB_RELEASE="&versiond;" 78 DISTRIB_CODENAME="<your name here>" 79 DISTRIB_DESCRIPTION="Linux From Scratch" 80 EOF</userinput></screen> 81 82 <screen arch="multilib" revision="sysv"><userinput>cat > /etc/lsb-release << "EOF" 83 DISTRIB_ID="Linux From Scratch" 84 DISTRIB_RELEASE="&version;-multilib" 85 DISTRIB_CODENAME="<your name here>" 86 DISTRIB_DESCRIPTION="Linux From Scratch" 87 EOF</userinput></screen> 88 89 <screen arch="multilib" revision="systemd"><userinput>cat > /etc/lsb-release << "EOF" 90 DISTRIB_ID="Linux From Scratch" 91 DISTRIB_RELEASE="&versiond;-multilib" 69 92 DISTRIB_CODENAME="<your name here>" 70 93 DISTRIB_DESCRIPTION="Linux From Scratch" -
packages.ent
r989524c rb3f1ebb3 358 358 <!ENTITY iproute2-ch6-sbu "0.2 SBU"> 359 359 360 <!ENTITY isl-version "0.20"> 361 <!ENTITY isl-size "1.5 MB"> 362 <!ENTITY isl-url "http://isl.gforge.inria.fr/isl-&isl-version;.tar.xz"> 363 <!ENTITY isl-md5 "2ee25141b7d1688afb63e5bf3ac12999"> 364 <!ENTITY isl-home "http://isl.gforge.inria.fr/"> 365 <!ENTITY isl-ch6-du "20 MB"> 366 <!ENTITY isl-ch6-sbu "0.1 SBU"> 367 360 368 <!ENTITY kbd-version "2.0.4"> 361 369 <!ENTITY kbd-size "1,008 KB"> … … 441 449 <!ENTITY linux-headers-ch6-du "941 MB"> 442 450 <!ENTITY linux-headers-ch6-sbu "less than 0.1 SBU"> 451 452 <!ENTITY linux-firmware-version "20180929"> 453 <!ENTITY linux-firmware-size "82,268 KB"> 454 <!ENTITY linux-firmware-url "http://www.linuxfromscratch.org/~dj/linux-firmware-&linux-firmware-version;.tar.xz"> 455 <!ENTITY linux-firmware-md5 "f803f618f0bd186b99da3a913e6c2dd2"> 456 <!ENTITY linux-firmware-home "http://www.kernel.org/"> 457 <!ENTITY linux-firmware-ch6-du "287 MB"> 458 <!ENTITY linux-firmware-ch6-sbu "0.2 SBU"> 443 459 444 460 <!ENTITY m4-version "1.4.18"> -
prologue/architecture.xml
r989524c rb3f1ebb3 41 41 on a 64-bit system when given a choice.</para></note> 42 42 43 <para >The default 64-bit build that results from LFS is considered a "pure"44 64-bit system. That is, it supports 64-bit executables only. Building a 45 "multi-lib" system requires compiling many applications twice, once for a 46 32-bit system and once for a 64-bit system. This is not directly supported in 47 LFS because it would interfere with the educational objective of providing the 48 instructions needed for a straightforward base Linux system. You can refer to 49 t he <ulink url="http://trac.clfs.org/">Cross Linux From Scratch</ulink>43 <para arch="default">The default 64-bit build that results from LFS is 44 considered a "pure" 64-bit system. That is, it supports 64-bit executables only. 45 Building a "multi-lib" system requires compiling many applications twice, once 46 for a 32-bit system and once for a 64-bit system. This is not directly supported 47 in LFS because it would interfere with the educational objective of providing 48 the instructions needed for a straightforward base Linux system. You can refer 49 to the <ulink url="http://trac.clfs.org/">Cross Linux From Scratch</ulink> 50 50 project for this advanced topic.</para> 51 51 … … 62 62 --> 63 63 64 <para arch="multilib">You are reading the 65 <emphasis>LFS-&version;-multilib</emphasis> book. Building a multilib system 66 requires compiling many applications three times: once for the primary 67 64-bit architecture; once for the minor 32-bit architecture; and once again for 68 the 32-bit architecture with 64-bit memory extensions.</para> 69 70 <para arch="multilib">Multilib goes a bit beyond the basic educational approach 71 of LFS which is to teach you how to build a Linux system. If you haven't 72 previously built by the standard LFS book, you are encouraged to do so before 73 attempting this edition.</para> 74 75 <para arch="multilib">Continue only if you meet the following requirements: 76 <itemizedlist> 77 <listitem><para>you have a x86_64 compatible machine</para></listitem> 78 <listitem><para>you already have experience with LFS</para></listitem> 79 <listitem><para>you have a need for 32-bit support</para></listitem> 80 </itemizedlist> 81 </para> 82 64 83 </sect1> 65 84 -
prologue/bookinfo.xml
r989524c rb3f1ebb3 8 8 <bookinfo> 9 9 <title>Linux From Scratch</title> 10 <subtitle revision='sysv' >Version &version; </subtitle> 11 <subtitle revision='systemd'>Version &versiond;</subtitle> 10 <subtitle arch="default" revision='sysv'>Version &version;</subtitle> 11 <subtitle arch="default" revision='systemd'>Version &versiond;</subtitle> 12 <subtitle arch="multilib" revision='sysv'>Version &version;-multilib</subtitle> 13 <subtitle arch="multilib" revision='systemd'>Version &versiond;-multilib</subtitle> 12 14 13 15 <authorgroup> … … 29 31 <firstname>Editor: DJ</firstname> 30 32 <surname>Lucas</surname> 33 </author> 34 35 <author arch="multilib"> 36 <firstname>Editor: Thomas</firstname> 37 <surname>Trepl</surname> 31 38 </author> 32 39 </authorgroup>
Note:
See TracChangeset
for help on using the changeset viewer.