Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/prog/gcc.xml

    r8558044 r48771ae  
    77  <!ENTITY gcc-download-http  "&gnu-http;/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.xz">
    88  <!ENTITY gcc-download-ftp   "&gnu-ftp;/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.xz">
    9   <!ENTITY gcc-md5sum         "31c86f2ced76acac66992eeedce2fce2">
    10   <!ENTITY gcc-size           "77 MB">
    11   <!ENTITY gcc-buildsize      "8.0 GB (2.4 GB installed with all listed languages; add 1.0 GB for tests)">
    12   <!-- For me the SBU values are a bit faster on haswell, but much slower on ryzen 3400G,
    13        so keeping these existing values as an approximation - ken -->
    14   <!ENTITY gcc-time           "26 SBU (add 56 SBU for tests; both with parallelism=4)">
     9  <!-- Update this also on the grub-uefi page -->
     10  <!ENTITY gcc-md5sum         "73bafd0af874439dcdb9fc063b6fb069">
     11  <!ENTITY gcc-size           "81 MB">
     12  <!ENTITY gcc-buildsize      "10.5 GB (2.4 GB installed with all listed languages; add 1.3 GB for tests)">
     13  <!ENTITY gcc-time           "32 SBU (add 66 SBU for tests; both with parallelism=4)">
    1514]>
    1615
     
    1817  <?dbhtml filename="gcc.html" ?>
    1918
    20   <sect1info>
    21     <date>$Date$</date>
    22   </sect1info>
    2319
    2420  <title>GCC-&gcc-version;</title>
     
    3430      The <application>GCC</application> package contains the GNU Compiler
    3531      Collection. This page describes the installation of compilers for the
    36       following languages: C, C++, D, Fortran, Objective C, Objective C++, and Go.
    37       <!--One additional language, Ada, is available in the collection. It has
    38       a binary bootstrap requirement for the first installation, so it is
    39       described on a separate page (<xref linkend="gcc-ada"/>) but can be added
    40       here if you are performing a rebuild or upgrade. Since C and C++ are
    41       installed in LFS, this page is  either for upgrading C and C++, or for
    42       installing additional compilers.-->
    43     </para>
    44 
    45     &lfs110a_checked;
     32      following languages: C, C++, Fortran, Objective C, Objective C++, and Go.
     33      Since C and C++ are installed in LFS, this page is either for upgrading
     34      C and C++, or for installing additional compilers.
     35    </para>
     36
     37    <note>
     38      <para>
     39        Additional languages, among which D and ADA, are available in the
     40        collection. D and ADA have a binary bootstrap requirement for the first
     41        installation, so their installation is not described here. To install
     42        them, you can proceed along the same lines as below after installing
     43        the corresponding compiler from a binary package, adding
     44        <option>ada</option> or <option>d</option> to the
     45        <parameter>--enable-languages</parameter> line.
     46      </para>
     47    </note>
     48
     49    &lfs112_checked;
    4650
    4751    <caution>
     
    7579        <command>
    7680         /usr/libexec/gcc/x86_64-pc-linux-gnu/&gcc-version;/install-tools/mkheaders
    77         </command>. The machine triplet may be different on a 32bit system.
     81        </command>. The machine triplet may be different on a 32-bit system.
    7882      </para>
    7983    </caution>
     
    112116      </listitem>
    113117    </itemizedlist>
    114 
     118<!--
     119    <bridgehead renderas="sect3">Additional Downloads</bridgehead>
     120    <itemizedlist spacing="compact">
     121      <listitem>
     122        <para>
     123          Required patch for building against glibc-2.36:
     124          <ulink url="&patch-root;/gcc-&gcc-version;-glibc_2.36-1.patch"/>
     125        </para>
     126      </listitem>
     127    </itemizedlist>
     128-->
    115129    <bridgehead renderas="sect3">GCC Dependencies</bridgehead>
    116 <!--
    117     <bridgehead renderas="sect4">Recommended</bridgehead>
    118     <para role="recommended">
    119       <xref linkend="dejagnu"/>, for tests
    120     </para>
    121 -->
     130
    122131    <bridgehead renderas="sect4">Optional</bridgehead>
    123132    <para role="optional">
     
    142151        installation process will overwrite your existing
    143152        <application>GCC</application> C and C++ compilers and libraries.
    144         <!--Having the <application>Tcl</application>,
    145         <application>Expect</application> and <application>DejaGnu</application>
    146         packages installed before beginning the build is highly recommended so
    147         you can run the full suite of tests.-->
    148153        Running the full suite of tests is recommended.
    149154      </para>
     
    164169      <quote>bootstrap</quote> process. Bootstrapping is needed for robustness
    165170      and is highly recommended when upgrading the compilers version. To disable
    166       bootstrap anyways, add <parameter>--disable-bootstrap</parameter> to the
     171      bootstrap anyway, add <parameter>--disable-bootstrap</parameter> to the
    167172      <command>./configure</command> options below.
    168173    </para>
    169 
    170     <para>
    171       As in LFS fix an issue breaking libasan.a identified upstream:
    172     </para>
    173 
    174 <screen><userinput>sed -e '/static.*SIGSTKSZ/d' \
    175     -e 's/return kAltStackSize/return SIGSTKSZ * 4/' \
    176     -i libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp</userinput></screen>
    177 
     174<!--
     175    <para>
     176      First fix a problem with glibc-2.36:
     177    </para>
     178
     179<screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-glibc_2.36-1.patch</userinput></screen>
     180-->
    178181    <para>
    179182      Install <application>GCC</application> by running the following commands:
     
    193196    --disable-multilib                                 \
    194197    --with-system-zlib                                 \
    195     --enable-languages=c,c++,d,fortran,go,objc,obj-c++ &amp;&amp;
     198    --enable-default-pie                               \
     199    --enable-default-ssp                               \
     200    --enable-languages=c,c++,fortran,go,objc,obj-c++ &amp;&amp;
    196201make</userinput></screen>
    197202
     
    199204      If you have installed additional packages such as
    200205      <application>Valgrind</application> and <application>GDB</application>,
    201       the <application>GCC</application> part of the testsuite will run more
     206      the <application>GCC</application> part of the test suite will run more
    202207      tests than in LFS. Some of those will report FAIL and others XPASS
    203       (pass when expected to FAIL). As of gcc-11.1.0, about 90 FAIL occur
     208      (pass when expected to FAIL). As of gcc-12.2.0, about 60 FAIL occur
    204209      in the <quote>guality</quote> suite, as well as miscellaneous failures
    205       throughout the rest of the test suite. If all the compilers above are
    206       built, there will be  around 102 unexpected failures out of over
    207       481,000 tests. To run the tests, issue:
     210      throughout the rest of the test suite, fifteen of which are already
     211      present in the GCC tests of LFS. If all the compilers above are
     212      built, there will be around 80 unexpected failures out of over
     213      482,000 tests. To run the tests, issue:
    208214    </para>
    209215
     
    221227<screen><userinput>../contrib/test_summary</userinput></screen>
    222228
    223     <para>A few tests, less than 20 out of about 450,000, will fail, but unless
    224     the failures are excessive, they can be ignored.</para>
    225 
    226229    <para>
    227230      Now, as the <systemitem class="username">root</systemitem> user:
     
    234237
    235238chown -v -R root:root \
    236     /usr/lib/gcc/*linux-gnu/&gcc-version;/include{,-fixed}
    237 
    238 rm -rf /usr/lib/gcc/$(gcc -dumpmachine)/&gcc-version;/include-fixed/bits/</userinput></screen>
     239    /usr/lib/gcc/*linux-gnu/&gcc-version;/include{,-fixed}</userinput></screen>
    239240
    240241    <para>
     
    272273      <application>zlib</application> instead of the bundled one.
    273274      <application>zlib</application> is used for compressing
    274       and uncompressing <application>GCC</application>'s intermediate
     275      and decompressing <application>GCC</application>'s intermediate
    275276      language in LTO (Link Time Optimization) object files.
    276277    </para>
    277278
    278279    <para>
    279       <parameter>--enable-languages=c,c++,d,fortran,go,objc,obj-c++</parameter>:
     280      <parameter>--enable-default-pie</parameter>: Makes the
     281      <option>-fpie</option> option the default when compiling programs.
     282      Together with the <xref linkend="gASLR"/> feature enabled in the kernel,
     283      this defeats some kind of attacks based on known memory layouts.
     284    </para>
     285
     286    <para>
     287      <parameter>--enable-default-ssp</parameter>: Makes the
     288      <option>-fstack-protector-strong</option> option the default when
     289      compiling programs. <xref linkend="gSSP"/> is a technique preventing
     290      alteration of the program flow by corrupting the parameter stack.
     291    </para>
     292
     293    <para>
     294      <parameter>--enable-languages=c,c++,fortran,go,objc,obj-c++</parameter>:
    280295      This command identifies which languages to build. You may modify
    281       this command to remove undesired languages. Three other languages can be
    282       added, including ADA, BRIG (add
     296      this command to remove undesired languages. Other languages can be
     297      added, including ADA, D, BRIG (add
    283298      <parameter>brig</parameter> to the list of enabled languages), a binary
    284299      format for HSAIL (Heterogeneous System Architecture Intermediate
     
    288303      been tested by the BLFS developers.
    289304    </para>
    290     <!-- It's been three major versions now, and many years.
    291     Commenting out unless needed somewhere. -renodr
    292     <para>
    293       <option>- -with-default-libstdcxx-abi=gcc4-compatible</option>: Use this
    294       switch if you are upgrading from a <application>GCC</application>
    295       version prior to 5.1.0, and you do not want to recompile all the
    296       libraries written in C++.
    297     </para>
    298    -->
    299305
    300306    <para>
     
    332338    </para>
    333339
    334     <para>
    335       <command>rm -rf .../include-fixed/bits/</command>:  Remove an erroneous
    336       file in gcc added by the fixincludes process.
    337     </para>
    338 
    339340  </sect2>
    340341
     
    345346      Some program and library names and descriptions are not listed here,
    346347      but can be found at
    347       <ulink url="&lfs-root;/chapter08/gcc.html#contents-gcc"/> as they were
     348      <ulink url="&lfs-root;/chapter08/gcc.html#contents-gcc">LFS section
     349      for GCC</ulink> as they were
    348350      initially installed during the building of LFS.
    349351    </para>
     
    356358      <seglistitem>
    357359        <seg>
    358           gccgo, gdc, gfortran, go, and gofmt, hard-linked to architecture
     360          gccgo, gfortran, go, and gofmt, hard-linked to architecture
    359361          specific names
    360362        </seg>
    361363        <seg>
    362364          libgfortran.{so,a},
    363           libgdruntime.{so,a}, libgphobos.{so,a}
    364365          libgo.{so,a}, libgobegin.a, libgolibbegin.a,
    365366          libobjc.{so,a}, and numerous other run-time libraries and executables
     
    412413        </listitem>
    413414      </varlistentry>
    414 
     415      <!--
    415416      <varlistentry id="gdc">
    416417        <term><command>gdc</command></term>
     
    425426        </listitem>
    426427      </varlistentry>
    427 
     428      -->
    428429      <varlistentry id="gfortran">
    429430        <term><command>gfortran</command></term>
Note: See TracChangeset for help on using the changeset viewer.