Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/gcc.xml

    r09f2a24 r5f2ba8c  
    5555    <screen><userinput remap="pre">patch -Np1 -i ../&gcc-upstream-fixes-patch;</userinput></screen>
    5656-->
    57 
    58     <!-- https://gcc.gnu.org/r14-4674 -->
    59     <para>Again, fix an issue producing illegal instructions in linked
    60     executables and shared libraries with GCC &gcc-version; and
    61     Binutils-2.42:</para>
    62 
    63     <screen><userinput remap='pre'>sed -e '/ASM_OUTPUT_ALIGN_WITH_NOP/,+1d' \
    64     -i gcc/config/loongarch/loongarch.h</userinput></screen>
    65 
    66     <para>Set the default directory name for
    67     64-bit libraries to <quote>lib</quote>:</para>
    68 
    69 <screen><userinput remap="pre">sed -e 's/lib64/lib/' \
    70     -i.orig gcc/config/loongarch/{t-linux,linux.h}</userinput></screen>
     57    <para>If building on x86_64, change the default directory name for 64-bit
     58    libraries to <quote>lib</quote>:</para>
     59
     60<screen><userinput remap="pre">case $(uname -m) in
     61  x86_64)
     62    sed -e '/m64=/s/lib64/lib/' \
     63        -i.orig gcc/config/i386/t-linux64
     64  ;;
     65esac</userinput></screen>
    7166
    7267    <para>The GCC documentation recommends building GCC in a dedicated build directory:</para>
     
    179174
    180175    <para>
    181     Twelve gcc tests (out of over 150,000):
    182     seven tests in the <filename class='directory'>analyzer</filename>
    183     directory, one test named <filename>gcc.dg/uninit-pred-9_b.c</filename>,
    184     one test named <filename>pr108357.c</filename>, one test named
    185     <filename>ssa-dom-cse-2.c</filename>, and two
    186     <quote>stack-check-cfa-*.c</quote> tests are known to fail.
    187 
    188     For g++, 23 tests (out of approximately 250,000): 14
     176    Eight gcc tests (out of over 185,000):
     177    <!-- https://gcc.gnu.org/PR106375 --><filename>pr56837.c</filename>
     178    and seven tests in the <filename class='directory'>analyzer</filename>
     179    directory are known to fail.
     180
     181    <!-- https://gcc.gnu.org/PR109353 -->
     182    One libstdc++ test (out of over 15000), <filename>copy.cc</filename>, is
     183    known to fail.
     184
     185    For g++, 21 tests (out of approximately 250,000): 14
    189186    <quote>AddressSanitizer*</quote>
    190     tests, 7 <filename>interception-malloc-test-1.C</filename> tests,
    191     one <filename>pr90883.C</filename> test, and one
    192     <filename>pr64076</filename> test are known to fail.
    193     </para>
     187    tests and 7 <filename>interception-malloc-test-1.C</filename> tests, are
     188    known to fail.
     189
     190    Additionally, several tests in the
     191    <filename class='directory'>vect</filename> directory are known to fail
     192    if the hardware does not support AVX.</para>
    194193
    195194    <para>A few unexpected failures cannot always be avoided. The GCC developers
     
    241240  platform-specific differences in the dynamic linker name):</para>
    242241
    243 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-loongarch-lp64d.so.1]</computeroutput></screen>
     242<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
    244243
    245244  <para>Now make sure that we're set up to use the correct start files:</para>
     
    249248  <para>The output of the last command should be:</para>
    250249
    251 <screen><computeroutput>/usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded
    252 /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
    253 /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
     250<screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded
     251/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
     252/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
    254253
    255254  <para>Depending on your machine architecture, the above may differ slightly.
     
    268267
    269268<screen><computeroutput>#include &lt;...&gt; search starts here:
    270  /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/include
     269 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
    271270 /usr/local/include
    272  /usr/lib/gcc/loongarch64-unknown-linux-gnu/&gcc-version;/include-fixed
     271 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
    273272 /usr/include</computeroutput></screen>
    274273
     
    283282  be ignored, but otherwise the output of the last command should be:</para>
    284283
    285 <screen><computeroutput>SEARCH_DIR("/usr/loongarch64-unknown-linux-gnu/lib64")
     284<screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
    286285SEARCH_DIR("/usr/local/lib64")
    287286SEARCH_DIR("/lib64")
    288287SEARCH_DIR("/usr/lib64")
    289 SEARCH_DIR("/usr/loongarch64-unknown-linux-gnu/lib")
     288SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
    290289SEARCH_DIR("/usr/local/lib")
    291290SEARCH_DIR("/lib")
    292291SEARCH_DIR("/usr/lib");</computeroutput></screen>
    293 <!--
     292
    294293   <para>A 32-bit system may use a few other directories. For example, here
    295294   is the output from an i686 machine:</para>
     
    303302SEARCH_DIR("/lib")
    304303SEARCH_DIR("/usr/lib");</computeroutput></screen>
    305 -->
     304
    306305  <para>Next make sure that we're using the correct libc:</para>
    307306
     
    319318  platform-specific differences in dynamic linker name):</para>
    320319
    321 <screen><computeroutput>found ld-linux-loongarch-lp64d.so.1 at /usr/lib/ld-linux-loongarch-lp64d.so.1</computeroutput></screen>
     320<screen><computeroutput>found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen>
    322321
    323322  <para>If the output does not appear as shown above or is not received
Note: See TracChangeset for help on using the changeset viewer.