Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/gcc.xml

    r560c147 r2b76c89  
    4242    <title>Installation of GCC</title>
    4343
    44     <para>Set 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/loongarch/{t-linux,linux.h}</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>
     
    136140    </important>
    137141
    138    <para>One set of tests in the GCC test suite is known to exhaust the default
    139    stack, so increase the stack size prior to running the tests:</para>
    140 
    141 <screen><userinput remap="test">ulimit -s 32768</userinput></screen>
     142    <para>GCC may need more stack space compiling some extremely complex
     143    code patterns.  As a precaution for the host distros with a tight stack
     144    limit, explicitly set the stack size hard limit to infinite.
     145    On most host distros (and the final LFS system) the hard limit is
     146    infinite by default, but there is no harm done by setting it explicitly.
     147    It's not necessary to change the stack size soft limit because GCC will
     148    automatically set it to an appropriate value, as long as the value does
     149    not exceed the hard limit:</para>
     150
     151<screen><userinput remap="test">ulimit -s -H unlimited</userinput></screen>
    142152
    143153    <para>Now remove/fix several known test failures:</para>
    144154
    145 <screen><userinput remap="test">sed -e '/cpython/d'               -i ../gcc/testsuite/gcc.dg/plugin/plugin.exp</userinput></screen>
     155<screen><userinput remap="test">sed -e '/cpython/d'               -i ../gcc/testsuite/gcc.dg/plugin/plugin.exp
     156sed -e 's/no-pic /&amp;-no-pie /'     -i ../gcc/testsuite/gcc.target/i386/pr113689-1.c
     157sed -e 's/300000/(1|300000)/'     -i ../libgomp/testsuite/libgomp.c-c++-common/pr109062.c
     158sed -e 's/{ target nonpic } //' \
     159    -e '/GOTPCREL/d'              -i ../gcc/testsuite/gcc.target/i386/fentryname3.c</userinput></screen>
    146160
    147161    <para>Test the results as a non-privileged user, but do not stop at errors:</para>
     
    180194    if the hardware does not support AVX.</para>
    181195-->
    182 
    183     <!-- gen-vect-*: Likely https://gcc.gnu.org/PR113418
    184          pr108357.c: https://gcc.gnu.org/PR108357#c5
    185          update-threading.c: https://gcc.gnu.org/PR110628
    186          vect-117.c: https://gcc.gnu.org/PR113685
    187          pr64076: Binutils bug (ld crashes), needs a triage -->
    188     <para>The tests named
    189     <filename>gen-vect-11b.c</filename>,
    190     <filename>gen-vect-11c.c</filename>,
    191     <filename>gen-vect-26.c</filename>,
    192     <filename>gen-vect-28.c</filename>,
    193     <filename>pr64076</filename>,
    194     <filename>pr108357.c</filename>,
    195     <filename>update-threading.c</filename>,
    196     and <filename>vect-117.c</filename> are known to fail.</para>
    197 
    198196    <para>A few unexpected failures cannot always be avoided. In some cases
    199197    test failures depend on the specific hardware of the system.<!--The GCC developers
     
    245243  platform-specific differences in the dynamic linker name):</para>
    246244
    247 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-loongarch-lp64d.so.1]</computeroutput></screen>
     245<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
    248246
    249247  <para>Now make sure that we're set up to use the correct start files:</para>
     
    253251  <para>The output of the last command should be:</para>
    254252
    255 <screen><computeroutput>/usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded
    256 /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
    257 /usr/lib/gcc/loongarch64-unknown-linux-gnu/&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>
    258256
    259257  <para>Depending on your machine architecture, the above may differ slightly.
     
    272270
    273271<screen><computeroutput>#include &lt;...&gt; search starts here:
    274  /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/include
     272 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
    275273 /usr/local/include
    276  /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/include-fixed
     274 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
    277275 /usr/include</computeroutput></screen>
    278276
     
    287285  be ignored, but otherwise the output of the last command should be:</para>
    288286
    289 <screen><computeroutput>SEARCH_DIR("/usr/loongarch64-unknown-linux-gnu/lib64")
     287<screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
    290288SEARCH_DIR("/usr/local/lib64")
    291289SEARCH_DIR("/lib64")
    292290SEARCH_DIR("/usr/lib64")
    293 SEARCH_DIR("/usr/loongarch64-unknown-linux-gnu/lib")
     291SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
    294292SEARCH_DIR("/usr/local/lib")
    295293SEARCH_DIR("/lib")
    296294SEARCH_DIR("/usr/lib");</computeroutput></screen>
    297 <!--
     295
    298296   <para>A 32-bit system may use a few other directories. For example, here
    299297   is the output from an i686 machine:</para>
     
    307305SEARCH_DIR("/lib")
    308306SEARCH_DIR("/usr/lib");</computeroutput></screen>
    309 -->
     307
    310308  <para>Next make sure that we're using the correct libc:</para>
    311309
     
    323321  platform-specific differences in dynamic linker name):</para>
    324322
    325 <screen><computeroutput>found ld-linux-loongarch-lp64d.so.1 at /usr/lib/ld-linux-loongarch-lp64d.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>
    326324
    327325  <para>If the output does not appear as shown above or is not received
Note: See TracChangeset for help on using the changeset viewer.