Changes in / [5365c7a:f2c8c6e]


Ignore:
Files:
6 added
30 edited

Legend:

Unmodified
Added
Removed
  • chapter04/addinguser.xml

    r5365c7a rf2c8c6e  
    8181  <systemitem class="username">lfs</systemitem> the owner:</para>
    8282
    83 <screen><userinput>chown -v lfs $LFS/{usr{,/*},lib*,var,etc,bin,sbin,tools}</userinput></screen>
     83<screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}
     84case $(uname -m) in
     85  x86_64) chown -v lfs $LFS/lib64 ;;
     86esac</userinput></screen>
    8487
    8588<note><para>In some host systems, the following <command>su</command> command does not complete
  • chapter04/creatingminlayout.xml

    r5365c7a rf2c8c6e  
    2828done
    2929
    30 mkdir -pv $LFS/lib64</userinput></screen>
     30case $(uname -m) in
     31  x86_64) mkdir -pv $LFS/lib64 ;;
     32esac</userinput></screen>
    3133
    3234  <para>Programs in <xref linkend="chapter-temporary-tools"/> will be compiled
  • chapter04/settingenviron.xml

    r5365c7a rf2c8c6e  
    4444LFS=/mnt/lfs
    4545LC_ALL=POSIX
    46 LFS_TGT=mips64el-lfs-linux-gnuabi64
     46LFS_TGT=$(uname -m)-lfs-linux-gnu
    4747PATH=/usr/bin
    4848if [ ! -L /bin ]; then PATH=/bin:$PATH; fi
  • chapter05/binutils-pass1.xml

    r5365c7a rf2c8c6e  
    149149        <term><parameter>--enable-default-hash-style=gnu</parameter></term>
    150150        <listitem>
    151           <para>By default, the linker would generate the classic ELF hash
    152           table for shared libraries and dynamically linked executables
    153           because the GNU-style hash table is incompatible with the MIPS o32
    154           ABI. The hash tables are only intended for a dynamic linker to
    155           perform symbol lookup.  On LFS the dynamic linker (provided by the
    156           Glibc package) supports the GNU-style hash table, and this LFS
    157           edition does not support the o32 ABI.  So this is used to make the
    158           linker generate the GNU-style hash table instead of the classic
    159           ELF hash table by default, as the GNU-style hash table is faster
    160           to query.</para>
     151          <para>By default, the linker would generate both the GNU-style
     152          hash table and the classic ELF hash table for shared libraries and
     153          dynamically linked executables.  The hash tables are only intended
     154          for a dynamic linker to perform symbol lookup.  On LFS the dynamic
     155          linker (provided by the Glibc package) will always use the
     156          GNU-style hash table which is faster to query.  So the classic
     157          ELF hash table is completely useless.  This makes the linker
     158          only generate the GNU-style hash table by default, so we can avoid
     159          wasting time to generate the classic ELF hash table when we build
     160          the packages, or wasting disk space to store it.</para>
    161161        </listitem>
    162162      </varlistentry>
  • chapter05/gcc-pass1.xml

    r5365c7a rf2c8c6e  
    6363mv -v mpc-&mpc-version; mpc</userinput></screen>
    6464
    65     <para>On 64-bit MIPS hosts, set the default directory name for
     65    <para>On x86_64 hosts, set the default directory name for
    6666    64-bit libraries to <quote>lib</quote>:</para>
    6767
    68 <screen><userinput remap="pre">sed -e 's/lib64/lib/' \
    69     -i.orig gcc/config/mips/{mips.h,t-linux64}</userinput></screen>
     68<screen><userinput remap="pre">case $(uname -m) in
     69  x86_64)
     70    sed -e '/m64=/s/lib64/lib/' \
     71        -i.orig gcc/config/i386/t-linux64
     72 ;;
     73esac</userinput></screen>
    7074
    7175    <para>The GCC documentation recommends building GCC
     
    7478<screen><userinput remap="pre">mkdir -v build
    7579cd       build</userinput></screen>
    76 
    77     <para>Probe the NaN encoding of the CPU:</para>
    78 
    79 <screen><userinput remap="pre">cat > nan2008.c &lt;&lt; \EOF
    80 <literal>#include &lt;stdio.h&gt;
    81 int main()
    82 {
    83   int x;
    84   asm("cfc1\t%0,$31":"=r"(x));
    85   return !(x &amp; 1 &lt;&lt; 18);
    86 }</literal>
    87 EOF
    88 gcc nan2008.c -o nan2008
    89 if ./nan2008; then
    90   NAN_SWITCH=--with-nan=2008
    91 fi</userinput></screen>
    9280
    9381    <para>Prepare GCC for compilation:</para>
     
    9684    --target=$LFS_TGT         \
    9785    --prefix=$LFS/tools       \
    98     --with-arch=mips64r2      \
    9986    --with-glibc-version=&glibc-version; \
    10087    --with-sysroot=$LFS       \
     
    113100    --disable-libvtv          \
    114101    --disable-libstdcxx       \
    115     --enable-languages=c,c++  \
    116     $NAN_SWITCH</userinput></screen>
     102    --enable-languages=c,c++</userinput></screen>
    117103    <variablelist>
    118104      <title>The meaning of the configure options:</title>
    119 
    120       <varlistentry>
    121         <term><parameter>--with-arch=mips64r2</parameter></term>
    122         <listitem>
    123           <para>Set the default value of <option>-march=</option> to
    124           mips64r2.  Most distros use it as the baseline for the MIPS port,
    125           so we are doing the same.  You may change it if your CPU is not
    126           compatible with mips64r2 (for example, mips3 or mips64r6), or
    127           your CPU is stronger than mips64r2 and you don't care about the
    128           compatibility with mips64r2, but we've not tested any setting
    129           other than mips64r2.</para>
    130         </listitem>
    131       </varlistentry>
    132105
    133106      <varlistentry>
     
    187160        <term><parameter>--disable-multilib</parameter></term>
    188161        <listitem>
    189           <para>On 64-bit MIPS, LFS does not support a multilib configuration.</para>
     162          <para>On x86_64, LFS does not support a multilib configuration.
     163          This switch is harmless for x86.</para>
    190164        </listitem>
    191165      </varlistentry>
     
    210184          <para>This option ensures that only the C and C++ compilers are built.
    211185          These are the only languages needed now.</para>
    212         </listitem>
    213       </varlistentry>
    214 
    215       <varlistentry>
    216         <term><parameter>$NAN_SWITCH</parameter></term>
    217         <listitem>
    218           <para>If the CPU encodes NaN (Not a Number) values following
    219           IEEE 754-2008 (indicated by the 16th bit of FCSR), this variable
    220           will be set to <option>--with-nan=2008</option> so GCC will be
    221           configured to use the IEEE 754-2008 encoding for NaN values as
    222                   the default.  If this option is not properly set to match the CPU,
    223                   many Glibc and Python tests will fail because of the wrong NaN
    224                   encoding.</para>
    225186        </listitem>
    226187      </varlistentry>
  • chapter05/glibc.xml

    r5365c7a rf2c8c6e  
    4444    <title>Installation of Glibc</title>
    4545
    46     <para>Create a compatibility symbolic link required for proper
     46    <para>First, create a symbolic link for LSB compliance. Additionally,
     47    for x86_64, create a compatibility symbolic link required for proper
    4748    operation of the dynamic library loader:</para>
    4849
    49 <screen><userinput remap="pre">if $LFS_TGT-gcc -v 2>&amp;1 | grep nan=2008 &amp;>/dev/null; then
    50   ln -sfv ../lib/ld-linux-mipsn8.so.1 $LFS/lib64
    51 else
    52   ln -sfv ../lib/ld.so.1 $LFS/lib64
    53 fi</userinput></screen>
     50<screen><userinput remap="pre">case $(uname -m) in
     51    i?86)   ln -sfv ld-linux.so.2 $LFS/lib/ld-lsb.so.3
     52    ;;
     53    x86_64) ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64
     54            ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64/ld-lsb-x86-64.so.3
     55    ;;
     56esac</userinput></screen>
    5457
    5558    <note>
     
    204207
    205208<screen><userinput>echo 'int main(){}' | $LFS_TGT-gcc -xc -
    206 readelf -l a.out | grep /ld</userinput></screen>
     209readelf -l a.out | grep ld-linux</userinput></screen>
    207210
    208211      <para>If everything is working correctly, there should be no errors,
    209212      and the output of the last command will be of the form:</para>
    210213
    211 <screen><computeroutput>[Requesting program interpreter: /lib64/ld.so.1</computeroutput></screen>
    212 
    213       <para>Note that if <parameter>--with-nan=2008</parameter> is used for
    214       GCC, the interpreter name will be
    215       <filename>/lib64/ld-linux-mipsn8.so.1</filename>.</para>
     214<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
     215
     216      <para>Note that for 32-bit machines, the interpreter name will be
     217      <filename>/lib/ld-linux.so.2</filename>.</para>
    216218
    217219      <para>If the output is not as shown above, or there is no output at all,
  • chapter06/gcc-pass2.xml

    r5365c7a rf2c8c6e  
    5858mv -v mpc-&mpc-version; mpc</userinput></screen>
    5959
    60     <para>For building on 64-bit MIPS, change the default directory name for
    61     64-bit libraries to <quote>lib</quote>:</para>
     60    <para>If building on x86_64, change the default directory name for 64-bit
     61    libraries to <quote>lib</quote>:</para>
    6262
    63 <screen><userinput remap="pre">sed -e 's/lib64/lib/' \
    64     -i.orig gcc/config/mips/{mips.h,t-linux64}</userinput></screen>
     63<screen><userinput remap="pre">case $(uname -m) in
     64  x86_64)
     65    sed -e '/m64=/s/lib64/lib/' \
     66        -i.orig gcc/config/i386/t-linux64
     67  ;;
     68esac</userinput></screen>
    6569
    6670    <para>Override the building rule of libgcc and libstdc++ headers, to
     
    8690    LDFLAGS_FOR_TARGET=-L$PWD/$LFS_TGT/libgcc      \
    8791    --prefix=/usr                                  \
    88     --with-arch=mips64r2                           \
    8992    --with-build-sysroot=$LFS                      \
    9093    --enable-default-pie                           \
     
    98101    --disable-libssp                               \
    99102    --disable-libvtv                               \
    100     --enable-languages=c,c++                       \
    101     $($LFS_TGT-gcc -v 2>&amp;1 | grep -o ..with-nan=2008)</userinput></screen>
     103    --enable-languages=c,c++</userinput></screen>
    102104
    103105    <variablelist>
  • chapter07/changingowner.xml

    r5365c7a rf2c8c6e  
    3434  command:</para>
    3535
    36 <screen><userinput>chown --from lfs -R root:root $LFS/{usr,lib,lib64,var,etc,bin,sbin,tools}</userinput></screen>
     36<screen><userinput>chown --from lfs -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}
     37case $(uname -m) in
     38  x86_64) chown --from lfs -R root:root $LFS/lib64 ;;
     39esac</userinput></screen>
    3740
    3841</sect1>
  • chapter08/binutils.xml

    r5365c7a rf2c8c6e  
    5252<screen><userinput remap="configure">../configure --prefix=/usr       \
    5353             --sysconfdir=/etc   \
     54             --enable-gold       \
    5455             --enable-ld=default \
    5556             --enable-plugins    \
     
    6364    <variablelist>
    6465      <title>The meaning of the new configure parameters:</title>
     66
     67      <varlistentry>
     68        <term><parameter>--enable-gold</parameter></term>
     69        <listitem>
     70          <para>Build the gold linker and install it as ld.gold (alongside the
     71          default linker).</para>
     72        </listitem>
     73      </varlistentry>
    6574
    6675      <varlistentry>
     
    128137<screen><userinput remap="test">grep '^FAIL:' $(find -name '*.log')</userinput></screen>
    129138
     139    <para>Twelve tests fail in the gold test suite when the
     140    <option>--enable-default-pie</option> and
     141    <option>--enable-default-ssp</option> options are passed to GCC.</para>
     142
    130143 <!--    <para>Three tests in the gprofng suite are also known to fail.</para>-->
    131 
    132     <para>In the ld test suite 84 tests are known to fail because they
    133     are not designed compatible with either the n64 ABI or the
    134     <option>--enable-default-hash-style=gnu</option> option.  In the
    135     binutils test suite one test named <literal>readelf -S bintest</literal>
    136     is known to fail as well.</para>
    137144
    138145    <para>Install the package:</para>
     
    155162
    156163      <seglistitem>
    157         <seg>addr2line, ar, as, c++filt, dwp, elfedit, gprof, gprofng, ld, ld.bfd, nm,
     164        <seg>addr2line, ar, as, c++filt, dwp, elfedit, gprof, gprofng, ld, ld.bfd, ld.gold, nm,
    158165        objcopy, objdump, ranlib, readelf, size, strings, and strip</seg>
    159166        <seg>libbfd.so, libctf.so, libctf-nobfd.so, libgprofng.so,
     
    261268          <indexterm zone="ch-system-binutils ld">
    262269            <primary sortas="b-ld">ld</primary>
     270          </indexterm>
     271        </listitem>
     272      </varlistentry>
     273
     274      <varlistentry id="ld.gold">
     275        <term><command>ld.gold</command></term>
     276        <listitem>
     277          <para>A cut down version of ld that only supports the
     278          elf object file format</para>
     279          <indexterm zone="ch-system-binutils ld.gold">
     280            <primary sortas="b-ld.gold">ld.gold</primary>
    263281          </indexterm>
    264282        </listitem>
  • chapter08/chapter08.xml

    r5365c7a rf2c8c6e  
    7676  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/>
    7777  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="groff.xml"/>
     78  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grub.xml"/>
    7879  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gzip.xml"/>
    7980  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iproute2.xml"/>
  • chapter08/gcc.xml

    r5365c7a rf2c8c6e  
    4242    <title>Installation of GCC</title>
    4343
    44     <para>For building on 64-bit MIPS, change the default directory name for
    45     64-bit libraries to <quote>lib</quote>:</para>
    46 
    47 <screen><userinput remap="pre">sed -e 's/lib64/lib/' \
    48     -i.orig gcc/config/mips/{mips.h,t-linux64}</userinput></screen>
     44    <para>If building on x86_64, change the default directory name for 64-bit
     45    libraries to <quote>lib</quote>:</para>
     46
     47<screen><userinput remap="pre">case $(uname -m) in
     48  x86_64)
     49    sed -e '/m64=/s/lib64/lib/' \
     50        -i.orig gcc/config/i386/t-linux64
     51  ;;
     52esac</userinput></screen>
    4953
    5054    <para>The GCC documentation recommends building GCC in a dedicated build directory:</para>
     
    6468             --disable-bootstrap      \
    6569             --disable-fixincludes    \
    66              --with-arch=mips64r2     \
    67              --with-system-zlib       \
    68              $(cc -v 2>&amp;1 | grep -o .-with-nan=2008)</userinput></screen>
     70             --with-system-zlib</userinput></screen>
    6971
    7072    <para>GCC supports seven different computer languages, but the
     
    172174    url="&test-results;"/> and
    173175    <ulink url="https://gcc.gnu.org/ml/gcc-testresults/"/>.</para>
    174 
    175     <para>Hundreds of gcc and g++ tests can fail on MIPS systems, as MIPS
    176     is not a primary platform of GCC and many MIPS tests are not written
    177     with <option>--enable-default-pie</option> or
    178     <option>--enable-default-ssp</option> in mind.</para>
    179 
    180     <para>In libstdc++ tests, the tests named
    181     <filename>abi_check</filename> and
    182     <filename>compare_exchange_padding.cc</filename> are known to fail.</para>
    183 
     176<!--
     177    <para>
     178    Eight gcc tests (out of over 185,000):
     179    <!- - https://gcc.gnu.org/PR106375 - -><filename>pr56837.c</filename>
     180    and seven tests in the <filename class='directory'>analyzer</filename>
     181    directory are known to fail.
     182
     183    <!- - https://gcc.gnu.org/PR109353 - ->
     184    One libstdc++ test (out of over 15000), <filename>copy.cc</filename>, is
     185    known to fail.
     186
     187    For g++, 21 tests (out of approximately 250,000): 14
     188    <quote>AddressSanitizer*</quote>
     189    tests and 7 <filename>interception-malloc-test-1.C</filename> tests, are
     190    known to fail.
     191
     192    Additionally, several tests in the
     193    <filename class='directory'>vect</filename> directory are known to fail
     194    if the hardware does not support AVX.</para>
     195-->
    184196    <para>A few unexpected failures cannot always be avoided. In some cases
    185197    test failures depend on the specific hardware of the system.<!--The GCC developers
     
    231243  platform-specific differences in the dynamic linker name):</para>
    232244
    233 <screen><computeroutput>[Requesting program interpreter: /lib64/ld.so.1]</computeroutput></screen>
     245<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
    234246
    235247  <para>Now make sure that we're set up to use the correct start files:</para>
     
    239251  <para>The output of the last command should be:</para>
    240252
    241 <screen><computeroutput>/usr/lib/gcc/mips64el-unknown-linux-gnuabi64/&gcc-version;/../../../../lib/Scrt1.o succeeded
    242 /usr/lib/gcc/mips64el-unknown-linux-gnuabi64/&gcc-version;/../../../../lib/crti.o succeeded
    243 /usr/lib/gcc/mips64el-unknown-linux-gnuabi64/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
     253<screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded
     254/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
     255/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
    244256
    245257  <para>Depending on your machine architecture, the above may differ slightly.
     
    258270
    259271<screen><computeroutput>#include &lt;...&gt; search starts here:
    260  /usr/lib/gcc/mips64el-unknown-linux-gnuabi64/&gcc-version;/include
     272 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
    261273 /usr/local/include
    262  /usr/lib/gcc/mips64el-unknown-linux-gnuabi64/&gcc-version;/include-fixed
     274 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
    263275 /usr/include</computeroutput></screen>
    264276
     
    273285  be ignored, but otherwise the output of the last command should be:</para>
    274286
    275 <screen><computeroutput>SEARCH_DIR("/usr/mips64el-unknown-linux-gnuabi64/lib64")
     287<screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
    276288SEARCH_DIR("/usr/local/lib64")
    277289SEARCH_DIR("/lib64")
    278290SEARCH_DIR("/usr/lib64")
    279 SEARCH_DIR("/usr/mips64el-unknown-linux-gnuabi64/lib")
     291SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
    280292SEARCH_DIR("/usr/local/lib")
    281293SEARCH_DIR("/lib")
    282294SEARCH_DIR("/usr/lib");</computeroutput></screen>
    283 <!--
     295
    284296   <para>A 32-bit system may use a few other directories. For example, here
    285297   is the output from an i686 machine:</para>
     
    293305SEARCH_DIR("/lib")
    294306SEARCH_DIR("/usr/lib");</computeroutput></screen>
    295 -->
     307
    296308  <para>Next make sure that we're using the correct libc:</para>
    297309
     
    309321  platform-specific differences in dynamic linker name):</para>
    310322
    311 <screen><computeroutput>found ld.so.1 at /usr/lib/ld.so.1</computeroutput></screen>
     323<screen><computeroutput>found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen>
    312324
    313325  <para>If the output does not appear as shown above or is not received
     
    342354
    343355        <seg>libasan.{a,so}, libatomic.{a,so}, libcc1.so, libgcc.a, libgcc_eh.a,
    344         libgcc_s.so, libgcov.a, libgomp.{a,so},
    345         liblto_plugin.so,
     356        libgcc_s.so, libgcov.a, libgomp.{a,so}, libhwasan.{a,so}, libitm.{a,so},
     357        liblsan.{a,so}, liblto_plugin.so,
    346358        libquadmath.{a,so}, libssp.{a,so}, libssp_nonshared.a,
    347         libstdc++.{a,so}, libstdc++exp.a, libstdc++fs.a, libsupc++.a,
     359        libstdc++.{a,so}, libstdc++exp.a, libstdc++fs.a, libsupc++.a, libtsan.{a,so},
    348360        and libubsan.{a,so}</seg>
    349361
     
    552564      </varlistentry>
    553565
     566      <varlistentry id="libhwasan">
     567        <term><filename class="libraryfile">libhwasan</filename></term>
     568        <listitem>
     569          <para>The Hardware-assisted Address Sanitizer runtime library</para>
     570          <indexterm zone="ch-system-gcc libhwasan">
     571            <primary sortas="c-libhwasan">libhwasan</primary>
     572          </indexterm>
     573        </listitem>
     574      </varlistentry>
     575
     576      <varlistentry id="libitm">
     577        <term><filename class="libraryfile">libitm</filename></term>
     578        <listitem>
     579          <para>The GNU transactional memory library</para>
     580          <indexterm zone="ch-system-gcc libitm">
     581            <primary sortas="c-libitm">libitm</primary>
     582          </indexterm>
     583        </listitem>
     584      </varlistentry>
     585
     586      <varlistentry id="liblsan">
     587        <term><filename class="libraryfile">liblsan</filename></term>
     588        <listitem>
     589          <para>The Leak Sanitizer runtime library</para>
     590          <indexterm zone="ch-system-gcc liblsan">
     591            <primary sortas="c-liblsan">liblsan</primary>
     592          </indexterm>
     593        </listitem>
     594      </varlistentry>
     595
    554596      <varlistentry id="liblto_plugin">
    555597        <term><filename class="libraryfile">liblto_plugin</filename></term>
     
    626668      </varlistentry>
    627669
     670      <varlistentry id="libtsan">
     671        <term><filename class="libraryfile">libtsan</filename></term>
     672        <listitem>
     673          <para>The Thread Sanitizer runtime library</para>
     674          <indexterm zone="ch-system-gcc libtsan">
     675            <primary sortas="c-libtsan">libtsan</primary>
     676          </indexterm>
     677        </listitem>
     678      </varlistentry>
     679
    628680      <varlistentry id="libubsan">
    629681        <term><filename class="libraryfile">libubsan</filename></term>
  • chapter08/glibc.xml

    r5365c7a rf2c8c6e  
    181181        <emphasis>nss/tst-nss-files-hosts-multi</emphasis> with ten times
    182182        the original timeout.</para>
    183       </listitem>
    184 
    185       <listitem>
    186         <para>On MIPS, six elf audit tests, the test named
    187         <emphasis>elf/tst-ro-dynamic</emphasis>, and the test named
    188         <emphasis>elf/tst-sprof-basic</emphasis> are known to fail.</para>
    189       </listitem>
    190 
    191       <!-- https://sourceware.org/pipermail/libc-alpha/2024-January/154221.html
    192            https://sourceware.org/glibc/wiki/Testing/Tests/stdlib/tst-arc4random-thread -->
    193       <listitem>
    194         <para>The <emphasis>stdlib/tst-arc4random-thread</emphasis>
    195         test is known to fail with some host kernel versions due to a
    196         kernel bug on MIPS.</para>
    197       </listitem>
    198 
    199       <!-- https://sourceware.org/pipermail/libc-alpha/2024-February/154915.html -->
    200       <listitem>
    201         <para>Six <emphasis>math</emphasis> tests are known to fail due
    202         to outdated test data.</para>
    203183      </listitem>
    204184
     
    642622        pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace,
    643623        zdump, and zic</seg>
    644         <seg>ld.so.1, ld-linux-mipsn8.so.1
     624        <seg>ld-linux-x86-64.so.2, ld-linux.so.2,
    645625        libBrokenLocale.{a,so}, libanl.{a,so},
    646626        libc.{a,so}, libc_nonshared.a, libc_malloc_debug.so,
  • chapter08/gmp.xml

    r5365c7a rf2c8c6e  
    4141  <sect2 role="installation">
    4242    <title>Installation of GMP</title>
    43 <!--
     43
    4444    <note>
    4545      <para>If you are building for 32-bit x86, but you have a CPU which is
     
    5050<screen role="nodump"><userinput><parameter>ABI=32</parameter> ./configure ...</userinput></screen></para>
    5151    </note>
    52 -->
     52
    5353    <note>
    5454      <para>The default settings of GMP produce libraries optimized for
     
    6868            --enable-cxx     \
    6969            --disable-static \
    70             ABI=64           \
    7170            --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen>
    7271
     
    7877        <listitem>
    7978          <para>This parameter enables C++ support</para>
    80         </listitem>
    81       </varlistentry>
    82 
    83       <varlistentry>
    84         <term><parameter>ABI=64</parameter></term>
    85         <listitem>
    86           <para>This package defaults to use N32 ABI on 64-bit MIPS systems,
    87           but LFS expects 64-bit ABI.</para>
    8879        </listitem>
    8980      </varlistentry>
  • chapter08/libcap.xml

    r5365c7a rf2c8c6e  
    6060          <para>This parameter sets the library directory to
    6161          <filename>/usr/lib</filename> rather than
    62           <filename>/usr/lib64</filename> on 64-bit MIPS.</para>
     62          <filename>/usr/lib64</filename> on x86_64. It has no effect on
     63          x86.</para>
    6364        </listitem>
    6465      </varlistentry>
  • chapter08/libelf.xml

    r5365c7a rf2c8c6e  
    5959<screen><userinput remap="test">make check</userinput></screen>
    6060
    61     <para>Eight tests are known to fail due to incomplete MIPS
    62     support.</para>
    63 
    6461    <para>Install only Libelf:</para>
    6562
  • chapter08/libffi.xml

    r5365c7a rf2c8c6e  
    7777          system, use the less capable system as a parameter. For details
    7878          about alternative system types, see <ulink
    79           url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/MIPS-Options.html'>
    80           the MIPS options in the GCC manual</ulink>.</para>
     79          url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/x86-Options.html'>
     80          the x86 options in the GCC manual</ulink>.</para>
    8181        </listitem>
    8282      </varlistentry>
  • chapter08/openssl.xml

    r5365c7a rf2c8c6e  
    5050    -i crypto/bn/rsaz_exp_x2.c</userinput></screen>
    5151-->
    52     <para>Remove an outdated compiler option causing build failure:</para>
    53 
    54 <screen><userinput remap="pre">sed 's/-mips3//' -i Configure</userinput></screen>
    55 
    5652    <para>Prepare OpenSSL for compilation:</para>
    5753
     
    5955         --openssldir=/etc/ssl \
    6056         --libdir=lib          \
    61          linux64-mips64        \
    6257         shared                \
    6358         zlib-dynamic</userinput></screen>
  • chapter08/perl.xml

    r5365c7a rf2c8c6e  
    4747<screen><userinput remap="pre">patch -Np1 -i ../&perl-fix-patch;</userinput></screen>
    4848-->
    49     <para>Workaround an building issue on MIPS:</para>
    50 
    51 <screen><userinput remap="pre">sed 's@/bin/mips@/bin/false@g' -i Configure</userinput></screen>
    52 
    5349    <para>This version of Perl builds the Compress::Raw::Zlib and
    5450    Compress::Raw::BZip2 modules. By
  • chapter08/pkgmgt.xml

    r5365c7a rf2c8c6e  
    377377    earlier versions.</para></note>
    378378
    379     <para>Finally, the new system has to be made bootable by configuring
    380     a bootloader correctly.</para>
     379    <para>Finally, the new system has to be made bootable via <xref
     380    linkend="ch-bootable-grub"/>.</para>
    381381
    382382  </sect2>
  • chapter08/stripping.xml

    r5365c7a rf2c8c6e  
    5050  rationale for using the <command>install</command> command here.)</para>
    5151
    52   <note><para>The ELF loader's name may be platform specific.
    53   The contruct below selects the correct name for the current architecture,
    54   excluding anything ending with <literal>g</literal>, in case the commands
    55   below have already been run.</para></note>
     52  <note><para>The ELF loader's name is ld-linux-x86-64.so.2 on 64-bit systems
     53  and ld-linux.so.2 on 32-bit systems.  The construct below selects the
     54  correct name for the current architecture, excluding anything ending
     55  with <literal>g</literal>, in case the commands below have already been
     56  run.</para></note>
    5657
    5758  <important>
     
    7071
    7172<!--<screen><userinput>save_lib="ld-2.25.so libc-2.25.so libpthread-2.25.so libthread_db-1.0.so"-->
    72 <screen><userinput>save_usrlib="$(cd /usr/lib; ls ld*.so.*[^g])
     73<screen><userinput>save_usrlib="$(cd /usr/lib; ls ld-linux*[^g])
    7374             libc.so.6
    7475             libthread_db.so.1
  • chapter08/systemd.xml

    r5365c7a rf2c8c6e  
    5454cd       build
    5555
    56 CFLAGS+=" -Wno-format-overflow" \
    5756meson setup ..                \
    5857      --prefix=/usr           \
  • chapter08/util-linux.xml

    r5365c7a rf2c8c6e  
    129129    </para>
    130130
    131     <para>Two tests named <filename>fadvise/drop</filename> and
    132     <filename>fincore/count</filename> are known to fail if the page
    133     size of the host kernel is not 4 KB.</para>
    134 
    135131    <para>Install the package:</para>
    136132
     
    156152        eject, fallocate, fdisk, fincore, findfs, findmnt, flock, fsck,
    157153        fsck.cramfs, fsck.minix, fsfreeze, fstrim, getopt, hardlink, hexdump, hwclock,
    158         ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last,
     154        i386 (link to setarch), ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last,
    159155        lastb (link to last), ldattach, linux32 (link to setarch), linux64 (link to setarch),
    160156        logger, look, losetup, lsblk, lscpu, lsipc, lsirq, lsfd, lslocks, lslogins,
    161         lsmem, lsns, mcookie, mesg, mips (link to setarch), mips32 (link
    162         to setarch), mips64 (link to setarch), mkfs, mkfs.bfs, mkfs.cramfs,
    163         mkfs.minix, mkswap,
     157        lsmem, lsns, mcookie, mesg, mkfs, mkfs.bfs, mkfs.cramfs, mkfs.minix, mkswap,
    164158        more, mount, mountpoint, namei, nsenter, partx, pivot_root, prlimit,
    165159        readprofile, rename, renice, resizepart, rev, rfkill, rtcwake, script,
     
    167161        swapoff, swapon, switch_root, taskset, uclampset, ul,
    168162        umount, uname26 (link to setarch), unshare, utmpdump, uuidd, uuidgen, uuidparse,
    169         wall, wdctl, whereis, wipefs, and zramctl</seg>
     163        wall, wdctl, whereis, wipefs, x86_64 (link to setarch), and zramctl</seg>
    170164        <seg>libblkid.so, libfdisk.so, libmount.so,
    171165        libsmartcols.so, and libuuid.so</seg>
     
    550544      </varlistentry>
    551545
     546      <varlistentry id="i386">
     547        <term><command>i386</command></term>
     548        <listitem>
     549          <para>A symbolic link to setarch</para>
     550          <indexterm zone="ch-system-util-linux i386">
     551            <primary sortas="b-i386">i386</primary>
     552          </indexterm>
     553        </listitem>
     554      </varlistentry>
     555
    552556      <varlistentry id="ionice">
    553557        <term><command>ionice</command></term>
     
    816820          <indexterm zone="ch-system-util-linux mesg">
    817821            <primary sortas="b-mesg">mesg</primary>
    818           </indexterm>
    819         </listitem>
    820       </varlistentry>
    821 
    822       <varlistentry id="mips">
    823         <term><command>mips</command></term>
    824         <listitem>
    825           <para>A symbolic link to setarch</para>
    826           <indexterm zone="ch-system-util-linux mips">
    827             <primary sortas="b-mips">mips</primary>
    828           </indexterm>
    829         </listitem>
    830       </varlistentry>
    831 
    832       <varlistentry id="mips32">
    833         <term><command>mips32</command></term>
    834         <listitem>
    835           <para>A symbolic link to setarch</para>
    836           <indexterm zone="ch-system-util-linux mips32">
    837             <primary sortas="b-mips32">mips32</primary>
    838           </indexterm>
    839         </listitem>
    840       </varlistentry>
    841 
    842       <varlistentry id="mips64">
    843         <term><command>mips64</command></term>
    844         <listitem>
    845           <para>A symbolic link to setarch</para>
    846           <indexterm zone="ch-system-util-linux mips64">
    847             <primary sortas="b-mips64">mips64</primary>
    848822          </indexterm>
    849823        </listitem>
     
    13311305      </varlistentry>
    13321306
     1307      <varlistentry id="x86_64">
     1308        <term><command>x86_64</command></term>
     1309        <listitem>
     1310          <para>A symbolic link to setarch</para>
     1311          <indexterm zone="ch-system-util-linux x86_64">
     1312            <primary sortas="b-x86_64">x86_64</primary>
     1313          </indexterm>
     1314        </listitem>
     1315      </varlistentry>
     1316
    13331317      <varlistentry id="zramctl">
    13341318        <term><command>zramctl</command></term>
  • chapter09/symlinks.xml

    r5365c7a rf2c8c6e  
    3838      that have just one ethernet device of a particular type.  Laptops
    3939      often have two ethernet connections named eth0 and
    40       wlan0; such laptops can also use this method.</para>
     40      wlan0; such laptops can also use this method.  The command line
     41      is in the GRUB configuration file.
     42      See <xref linkend="grub-cfg" role='.'/></para>
    4143    </sect3>
    4244
  • chapter10/chapter10.xml

    r5365c7a rf2c8c6e  
    1515  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="fstab.xml"/>
    1616  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kernel.xml"/>
     17  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grub.xml"/>
    1718
    1819</chapter>
  • chapter10/kernel.xml

    r5365c7a rf2c8c6e  
    142142        href="kernel/systemd.xml"/>
    143143   
     144      <para>Enable some additional features if you are building a 64-bit
     145      system.  If you are using menuconfig, enable them in the order of
     146      <parameter>CONFIG_PCI_MSI</parameter> first, then
     147      <parameter>CONFIG_IRQ_REMAP</parameter>, at last
     148      <parameter>CONFIG_X86_X2APIC</parameter> because an option only
     149      shows up after its dependencies are selected.</para>
     150
     151      <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     152        href="kernel/x2apic.xml"/>
     153
     154      <para>If you are building a 32-bit system running on a hardware
     155      with RAM more than 4GB, adjust the configuration so the kernel will
     156      be able to use up to 64GB physical RAM:</para>
     157
     158      <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     159        href="kernel/highmem.xml"/>
     160
    144161      <para>If the partition for the LFS system is in a NVME SSD (i. e. the
    145162      device node for the partition is <filename>/dev/nvme*</filename>
     
    269286          enabled, you should enable these two options as well or you'll see
    270287          a blank screen once the DRI driver is loaded.</para>
     288        </listitem>
     289      </varlistentry>
     290
     291      <varlistentry>
     292        <term><parameter>Support x2apic</parameter></term>
     293        <listitem>
     294          <para>Support running the interrupt controller of 64-bit x86
     295          processors in x2APIC mode.  x2APIC may be enabled by firmware on
     296          64-bit x86 systems, and a kernel without this option enabled will
     297          panic on boot if x2APIC is enabled by firmware.  This option
     298          has no effect, but also does no harm if x2APIC is disabled by the
     299          firmware.</para>
    271300        </listitem>
    272301      </varlistentry>
     
    324353
    325354    <para>The path to the kernel image may vary depending on the platform being
    326     used. The filename below can be changed to suit your taste.</para>
    327 
    328 <screen><userinput remap="install">cp -iv vmlinuz /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen>
     355    used. The filename below can be changed to suit your taste, but the stem of
     356    the filename should be <emphasis>vmlinuz</emphasis> to be compatible with
     357    the automatic setup of the boot process described in the next section.  The
     358    following command assumes an x86 architecture:</para>
     359
     360<screen><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen>
    329361
    330362    <para><filename>System.map</filename> is a symbol file for the kernel.
     
    343375
    344376<screen><userinput remap="install">cp -iv .config /boot/config-&linux-version;</userinput></screen>
    345 
    346     <important>
    347       <para>At this point, you should install and/or configure your
    348       bootloader to boot the LFS system with the kernel just installed.
    349       The firmware interface of MIPS systems is not standardized so the
    350       detailed process will be board-specific.  You can reuse the bootloader
    351       from your host distro if possible.</para>
    352     </important>
    353377
    354378    <para>Install the documentation for the Linux kernel:</para>
  • chapter10/kernel/kernel-config.py

    r5365c7a rf2c8c6e  
    2424if_stack = []
    2525
    26 expand_var_mp = { 'SRCARCH': 'mips' }
     26expand_var_mp = { 'SRCARCH': 'x86' }
    2727main_dep = {}
    2828
  • chapter10/kernel/systemd.xml

    r5365c7a rf2c8c6e  
    1818  [ ] <emphasis role='blue'>C</emphasis>onfigure standard kernel features (expert users) ---&gt;            [EXPERT]
    1919
    20 <emphasis role='blue'>K</emphasis>ernel type ---&gt;
    21   [*] <emphasis role='blue'>R</emphasis>elocatable kernel                                           [RELOCATABLE]
    22   [*]   <emphasis role='blue'>R</emphasis>andomize the address of the kernel image               [RANDOMIZE_BASE]
     20<emphasis role='blue'>P</emphasis>rocessor type and features ---&gt;
     21  [*] <emphasis role='blue'>B</emphasis>uild a relocatable kernel                                   [RELOCATABLE]
     22  [*]   <emphasis role='blue'>R</emphasis>andomize the address of the kernel image (KASLR)       [RANDOMIZE_BASE]
    2323
    2424<emphasis role='blue'>G</emphasis>eneral architecture-dependent options ---&gt;
  • chapter10/kernel/sysv.xml

    r5365c7a rf2c8c6e  
    1515  [ ] <emphasis role='blue'>C</emphasis>onfigure standard kernel features (expert users) ---&gt;            [EXPERT]
    1616
    17 <emphasis role='blue'>K</emphasis>ernel type ---&gt;
    18   [*] <emphasis role='blue'>R</emphasis>elocatable kernel                                           [RELOCATABLE]
    19   [*]   <emphasis role='blue'>R</emphasis>andomize the address of the kernel image               [RANDOMIZE_BASE]
     17<emphasis role='blue'>P</emphasis>rocessor type and features ---&gt;
     18  [*] <emphasis role='blue'>B</emphasis>uild a relocatable kernel                                   [RELOCATABLE]
     19  [*]   <emphasis role='blue'>R</emphasis>andomize the address of the kernel image (KASLR)       [RANDOMIZE_BASE]
    2020
    2121<emphasis role='blue'>G</emphasis>eneral architecture-dependent options ---&gt;
  • git-version.sh

    r5365c7a rf2c8c6e  
    5454sha="$(git describe --abbrev=1)"
    5555rev=$(echo "$sha" | sed 's/-g[^-]*$//')
    56 version="mips64el-$rev"
    57 versiond="mips64el-$rev-systemd"
     56version="$rev"
     57versiond="$rev-systemd"
    5858
    5959if [ "$(git diff HEAD | wc -l)" != "0" ]; then
  • prologue/architecture.xml

    r5365c7a rf2c8c6e  
    1111  <title>LFS Target Architectures</title>
    1212
    13 <para>The primary target architectures of this LFS edition are the little
    14 endian MIPS64 release 2 to 5 CPUs (the release 6 is not backward-compatible
    15 with earlier releases).  On the other hand, the instructions
    16 in this book are also known to work, with some modifications, for
    17 MIPS CPUs with a different byte order, word size, or ISA version.  To
     13<para>The primary target architectures of LFS are the AMD/Intel x86 (32-bit)
     14and x86_64 (64-bit) CPUs.  On the other hand, the instructions in this book are
     15also known to work, with some modifications, with the Power PC and ARM CPUs. To
    1816build a system that utilizes one of these alternative CPUs, the main prerequisite, in
    1917addition to those on the next page, is an existing Linux system such as an
    2018earlier LFS installation, Ubuntu, Red Hat/Fedora, SuSE, or some other distribution
    21 that targets that architecture.</para>
     19that targets that architecture. (Note that a 32-bit
     20distribution can be installed and used as a host system on a 64-bit AMD/Intel
     21computer.)</para>
    2222
    23 <para>There are three widely-used ABIs for 64-bit MIPS programs.
    24 The <quote>o32</quote> ABI is compatible with the ABI of the legacy 32-bit
    25 MIPS programs and it's used for running those legacy 32-bit programs on a
    26 64-bit MIPS CPU.  The <quote>n64</quote> ABI is designed for taking the full
    27 advantage of 64-bit capability.  The <quote>n32</quote> ABI is similar to
    28 n64 but using 32-bit pointers, mainly used for 64-bit devices with a small
    29 amount of RAM. The default 64-bit build that results from LFS is a
    30 <quote>pure</quote> n64 system. That is, it supports n64 executables
     23<para>The gain from building on a 64-bit system, as
     24compared to a 32-bit system, is minimal.
     25For example, in a test build of LFS-9.1 on a Core i7-4790 CPU based system,
     26using 4 cores, the following statistics were measured:</para>
     27
     28<screen><computeroutput>Architecture Build Time     Build Size
     2932-bit       239.9 minutes  3.6 GB
     3064-bit       233.2 minutes  4.4 GB</computeroutput></screen>
     31
     32<para>As you can see, on the same hardware, the 64-bit build is only 3% faster
     33(and 22% larger) than the 32-bit build. If you plan to use LFS as a LAMP
     34server, or a firewall, a 32-bit CPU may be good enough. On the other
     35hand, several packages in BLFS now need more than 4 GB of RAM to be built
     36and/or to run; if you plan to use LFS as a desktop, the LFS authors
     37recommend building a 64-bit system.</para>
     38
     39<para>The default 64-bit build that results from LFS is a
     40<quote>pure</quote> 64-bit system. That is, it supports 64-bit executables
    3141only. Building a <quote>multi-lib</quote> system requires compiling many
    32 applications multiple times, each time for an ABI to be supported.
     42applications twice, once for a 32-bit system and once for a 64-bit system.
    3343This is not directly supported in LFS because it would interfere with the
    3444educational objective of providing the minimal instructions needed for a
     
    3646of LFS, accessible at <ulink
    3747url="https://www.linuxfromscratch.org/~thomas/multilib/index.html"/>. But
    38 it's for x86_64, and anyway multilib is an advanced topic.</para>
     48that's an advanced topic.</para>
    3949
    4050</sect1>
Note: See TracChangeset for help on using the changeset viewer.