Index: general/prog/gcc-ada.xml
===================================================================
--- general/prog/gcc-ada.xml	(revision b39a80c0dd0927a99f9e710d439ac0aae2b30fe8)
+++ general/prog/gcc-ada.xml	(revision ae0673a886272fd364b9ba9ba14351499e7d26e7)
@@ -5,10 +5,10 @@
   %general-entities;
 
-  <!ENTITY gcc-download-http     "http://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
+  <!ENTITY gcc-download-http     "https://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
   <!ENTITY gcc-download-ftp      "ftp://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
-  <!ENTITY gcc-md5sum            "4df8ee253b7f3863ad0b86359cd39c43">
-  <!ENTITY gcc-size              "86 MB">
-  <!ENTITY gcc-ada-buildsize     "5.1 GB (0.7 GB added if GNAT install dir is not removed)">
-  <!ENTITY gcc-ada-time          "114 SBU (including 72 SBU for tests)">
+  <!ENTITY gcc-md5sum            "d5525b1127d07d215960e6051c5da35e">
+  <!ENTITY gcc-size              "91 MB">
+  <!ENTITY gcc-ada-buildsize     "6.4 GB (0.7 GB added if GNAT install dir is not removed)">
+  <!ENTITY gcc-ada-time          "125 SBU (including 73 SBU for tests)">
 
   <!ENTITY gnat-download-http    "https://libre.adacore.com/download/">
@@ -38,45 +38,75 @@
     <title>Introduction to the GCC Ada compiler</title>
 
-    <para>Ada is a modern programming language designed for large, long-lived
-    applications &mdash; and embedded systems in particular &mdash; where
-    reliability and efficiency are essential. It has a set of unique technical
-    features that make it highly effective for use in large, complex and
-    safety-critical projects.</para>
-
-    <para>The compiler and associated tools on this page are known as the
-    <application>GNAT</application> technology, developed by the Adacore
-    company, using the <application>GCC</application> backend. Since
-    parts of the Ada compiler are written in Ada, there is a circular
-    dependency on an Ada compiler. The instructions below first install
-    a binary compiler.</para>
+    <para>
+      Ada is a modern programming language designed for large, long-lived
+      applications &mdash; and embedded systems in particular &mdash; where
+      reliability and efficiency are essential. It has a set of unique technical
+      features that make it highly effective for use in large, complex and
+      safety-critical projects.
+    </para>
+
+    <para>
+      The compiler and associated tools on this page are known as the
+      <application>GNAT</application> technology, developed by the Adacore
+      company, using the <application>GCC</application> backend. Since
+      parts of the Ada compiler are written in Ada, there is a circular
+      dependency on an Ada compiler. The instructions below first install
+      a binary compiler. You do not need to do that if you already have built
+      <application>GNAT</application> tools.
+    </para>
 
     &lfs77_checked;
 
     <caution>
-      <para>Using the instructions on this page will have the effect that
-      the C and C++ compiler and libraries will be reinstalled, overwriting
-      the ones on your system. This may lead to some issues. Please read the
-      notes and caution on the <xref linkend="gcc"/> page.</para>
+      <para>
+        Using the instructions on this page will have the effect that
+        the C and C++ compiler and libraries will be reinstalled, overwriting
+        the ones on your system. This may lead to some issues. Please read the
+        notes and caution on the <xref linkend="gcc"/> page.
+      </para>
     </caution>
+
+    <note>
+      <para>
+        If you want to install other compilers in the <application>GCC
+        </application> collection, do that first, or specify ada in the
+        <parameter>--enable-languages</parameter> switch to <command>
+        configure</command>. If you rebuild <application>GCC</application>
+        without enabling ada after running the instructions on this page,
+        the new compiler will not be able to compile ADA anymore.
+      </para>
+    </note>
 
     <bridgehead renderas="sect3">Package Information</bridgehead>
     <itemizedlist spacing="compact">
       <listitem>
-        <para>Download (HTTP): <ulink url="&gcc-download-http;"/></para>
-      </listitem>
-      <listitem>
-        <para>Download (FTP): <ulink url="&gcc-download-ftp;"/></para>
-      </listitem>
-      <listitem>
-        <para>Download MD5 sum: &gcc-md5sum;</para>
-      </listitem>
-      <listitem>
-        <para>Download size: &gcc-size;</para>
-      </listitem>
-      <listitem>
-        <para>Estimated disk space required: &gcc-ada-buildsize;</para>
-      </listitem>
-      <listitem>
-        <para>Estimated build time: &gcc-ada-time;</para>
+        <para>
+          Download (HTTP): <ulink url="&gcc-download-http;"/>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download (FTP): <ulink url="&gcc-download-ftp;"/>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download MD5 sum: &gcc-md5sum;
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download size: &gcc-size;
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Estimated disk space required: &gcc-ada-buildsize;
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Estimated build time: &gcc-ada-time;
+        </para>
       </listitem>
     </itemizedlist>
@@ -84,10 +114,12 @@
     <bridgehead renderas="sect3">Additional Downloads</bridgehead>
     <note>
-      <para>You will need to install <application>GNAT</application>
-      temporarily to satisfy the circular dependency. You may point your
-      browser to the <ulink url="&gnat-download-http;">AdaCore download
-      page</ulink>, choose your platform and 2014, then select the file
-      to download. Alternatively, direct links to the 64 bit and 32 bit
-      linux versions are given below.</para>
+      <para>
+        You will need to install <application>GNAT</application>
+        temporarily to satisfy the circular dependency. You may point your
+        browser to the <ulink url="&gnat-download-http;">AdaCore download
+        page</ulink>, choose your platform and 2014, then select the file
+        to download. Alternatively, direct links to the 64 bit and 32 bit
+        linux versions are given below.
+      </para>
     </note>
 
@@ -123,10 +155,10 @@
         </para>
       </listitem>
-<!--      <listitem>
+      <listitem>
         <para>
           Required patch:
-          <ulink url="&patch-root;/gcc-&gcc-version;-upstream_fixes-1.patch"/>
-        </para>
-      </listitem>-->
+          <ulink url="&patch-root;/gcc-&gcc-version;-upstream_libgomp_fix-1.patch"/>
+        </para>
+      </listitem>
     </itemizedlist>
 
@@ -146,36 +178,46 @@
     <title>Installation of the GNAT binary</title>
 
-    <para>Before unpacking and changing into the GCC source directory, first
-    unpack the <application>GNAT</application> tarball, and change to the
-    GNAT directory. Then, install the <application>GNAT</application> binary
-    by running the following command as the
-    <systemitem class="username">root</systemitem> user:</para>
+    <para>
+      Before unpacking and changing into the GCC source directory, first
+      unpack the <application>GNAT</application> tarball, and change to the
+      GNAT directory. Then, install the <application>GNAT</application> binary
+      by running the following command as the
+      <systemitem class="username">root</systemitem> user:
+    </para>
 
 <screen role="root"><userinput>make ins-all prefix=/opt/gnat</userinput></screen>
 
-    <para>The <application>GNAT</application> compiler can be invoked by
-    executing the <command>gcc</command> binary installed in <filename
-    class="directory">/opt/gnat/bin</filename>.</para>
-
-    <para>You may now remove the <application>GNAT</application>
-    source directory if desired.</para>
-
-    <para>Prepare to compile <application>GCC</application> by placing the
-    <application>GNAT</application> version of <command>gcc</command> at the
-    beginning of the <envar>PATH</envar> variable by using the following
-    commands:</para>
+    <para>
+      The <application>GNAT</application> compiler can be invoked by
+      executing the <command>gcc</command> binary installed in <filename
+      class="directory">/opt/gnat/bin</filename>.
+    </para>
+
+    <para>
+      You may now remove the <application>GNAT</application>
+      source directory if desired.
+    </para>
+
+    <para>
+      Prepare to compile <application>GCC</application> by placing the
+      <application>GNAT</application> version of <command>gcc</command> at the
+      beginning of the <envar>PATH</envar> variable by using the following
+      commands:
+    </para>
 
 <screen><userinput>PATH_HOLD=$PATH &amp;&amp;
 export PATH=/opt/gnat/bin:$PATH_HOLD</userinput></screen>
 
-    <para>Doing so has the drawback that the <application>GCC</application>
-    and <application>Binutils</application> executables are taken
-    from the just installed <application>GNAT</application> package, but the
-    versions of those executables are outdated compared to those installed in
-    LFS. This is not important for the <application>GCC</application> compilers,
-    since they recompile themselves during the bootstrap process. On the other
-    hand, the outdated <command>ld</command> and <command>as</command> tools
-    are used all along. In order to use the LFS tools, issue as the
-    <systemitem class="username">root</systemitem> user:</para>
+    <para>
+      Doing so has the drawback that the <application>GCC</application>
+      and <application>Binutils</application> executables are taken
+      from the just installed <application>GNAT</application> package, but the
+      versions of those executables are outdated compared to those installed in
+      LFS. This is not important for the <application>GCC</application> compilers,
+      since they recompile themselves during the bootstrap process. On the other
+      hand, the outdated <command>ld</command> and <command>as</command> tools
+      are used all along. In order to use the LFS tools, issue as the
+      <systemitem class="username">root</systemitem> user:
+    </para>
 
 <screen role="root"><userinput>find /opt/gnat -name ld -exec mv -v {} {}.old \;
@@ -186,25 +228,21 @@
   <sect2 role="installation">
     <title>Installation of GCC Ada</title>
-<!--
-    <para>As in LFS, fix a problem identified upstream:</para>
-
-<screen><userinput>sed -i 's/if \((code.*))\)/if (\1 \&amp;\&amp; \!DEBUG_INSN_P (insn))/' gcc/sched-deps.c</userinput></screen>
--->
-
-    <para>Install <application>GCC Ada</application> by running the
-    following commands:</para>
-
-<screen><userinput><!--
-patch -Np1 -i ../gcc-&gcc-version;-upstream_fixes-1.patch &amp;&amp;
--->mkdir ../gcc-build &amp;&amp;
+
+    <para>
+      As in LFS, fix a problem identified upstream with the libgomp library:
+    </para>
+
+<screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-upstream_libgomp_fix-1.patch</userinput></screen>
+
+    <para>
+      Install <application>GCC Ada</application> by running the
+      following commands:
+    </para>
+
+<screen><userinput>mkdir ../gcc-build &amp;&amp;
 cd    ../gcc-build &amp;&amp;
 
 ../gcc-&gcc-version;/configure          \
     --prefix=/usr               \
-    --libdir=/usr/lib           \
-    --enable-shared             \
-    --enable-threads=posix      \
-    --enable-__cxa_atexit       \
-    --enable-clocale=gnu        \
     --disable-multilib          \
     --with-system-zlib          \
@@ -212,9 +250,11 @@
 make</userinput></screen>
 
-    <para>If you have installed additional packages such as
-    <application>Valgrind</application> and <application>GDB</application>,
-    the <application>GCC</application> part of the testsuite will run more
-    tests than in LFS. Some of those will report FAIL and others XPASS
-    (pass when expected to FAIL). To run the tests, issue:</para>
+    <para>
+      If you have installed additional packages such as
+      <application>Valgrind</application> and <application>GDB</application>,
+      the <application>GCC</application> part of the testsuite will run more
+      tests than in LFS. Some of those will report FAIL and others XPASS
+      (pass when expected to FAIL). To run the tests, issue:
+    </para>
 
 <screen><userinput>ulimit -s 32768 &amp;&amp;
@@ -223,11 +263,15 @@
 to be run. -->
 
-    <para>The tests are very long, and the results may be hard to find in the
-    logs, specially if you use parallel jobs with make. You can get a summary
-    of the tests with:</para>
+    <para>
+      The tests are very long, and the results may be hard to find in the
+      logs, specially if you use parallel jobs with make. You can get a summary
+      of the tests with:
+    </para>
 
 <screen><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
 
-    <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
+    <para>
+      Now, as the <systemitem class="username">root</systemitem> user:
+    </para>
 
 <screen role="root"><userinput>make install &amp;&amp;
@@ -240,9 +284,17 @@
     /usr/lib/gcc/*linux-gnu/&gcc-version;/ada{lib,include}</userinput></screen>
 
-    <para>You should now remove the <application>GNAT</application>
-    installation and perform other cleanups:</para>
-
-<screen><userinput>rm -rf /opt/gnat &amp;&amp;
-export PATH=$PATH_HOLD &amp;&amp;
+    <para>
+      You should now remove the <application>GNAT</application>
+      installation and perform other cleanups. First, as the <systemitem
+      class="username">root</systemitem> user:
+    </para>
+
+<screen role="root"><userinput>rm -rf /opt/gnat</userinput></screen>
+
+    <para>
+      Then, as a normal user:
+    </para>
+
+<screen><userinput>export PATH=$PATH_HOLD &amp;&amp;
 unset PATH_HOLD</userinput></screen>
 
@@ -251,25 +303,15 @@
   <sect2 role="commands">
     <title>Command Explanations</title>
-<!--
-    <para>
-      <command>patch ... gcc-&gcc-version;-upstream_fixes-1.patch</command>:
-      This patch corrects bugs in the C++ compiler, which lead to
-      segmentation faults in some cases.
-    </para>
--->
-
-    <para><command>mkdir ../gcc-build; cd ../gcc-build</command>: The
-    <application>GCC</application> documentation recommends
-    building the package in a dedicated build directory.</para>
-
-    <para><parameter>--enable-shared --enable-threads=posix
-    --enable-__cxa_atexit</parameter>: These parameters are required to build
-    the <application>C++</application> libraries to published standards.</para>
-
-    <para><parameter>--enable-clocale=gnu</parameter>: This parameter is a
-    failsafe for incomplete locale data.</para>
-
-    <para><parameter>--disable-multilib</parameter>: This parameter ensures
-    that files are created for the specific architecture of your computer.</para>
+
+    <para>
+      <command>mkdir ../gcc-build; cd ../gcc-build</command>: The
+      <application>GCC</application> documentation recommends
+      building the package in a dedicated build directory.
+    </para>
+
+    <para>
+      <parameter>--disable-multilib</parameter>: This parameter ensures
+      that files are created for the specific architecture of your computer.
+    </para>
 
     <para>
@@ -288,22 +330,37 @@
     </para>
 
-    <para><command>ulimit -s 32768</command>: This command prevents several
-    tests from running out of stack space.</para>
-
-    <para><command>make -k check</command>: This command runs the test suite
-    without stopping if any errors are encountered.</para>
-
-    <para><command>../gcc-&gcc-version;/contrib/test_summary</command>: This
-    command will produce a summary of the test suite results. You can append
-    <command>| grep -A7 Summ</command> to the command to produce an even more
-    condensed version of the summary. You may also wish to redirect the output
-    to a file for review and comparison later on.</para>
-
-    <para><command>chown -v -R root:root /usr/lib/gcc/*linux-gnu/...</command>:
-    If the package is built by a user other than root, the ownership of the
-    installed <filename class="directory">include</filename> and
-    <filename class="directory">adalib</filename> directories (and their
-    contents) will be incorrect. These commands change the ownership to the
-    <systemitem class="username">root</systemitem> user and group.</para>
+    <para>
+      <option>--with-default-libstdcxx-abi=c++98</option>: Use this switch if you
+      are building <application>GNAT</application> tools using a
+      <application>GCC</application> version prior to 5.1.0,
+      and you do not want to recompile all the libraries written in C++.
+    </para>
+
+    <para>
+      <command>ulimit -s 32768</command>: This command prevents several
+      tests from running out of stack space.
+    </para>
+
+    <para>
+      <command>make -k check</command>: This command runs the test suite
+      without stopping if any errors are encountered.
+    </para>
+
+    <para>
+      <command>../gcc-&gcc-version;/contrib/test_summary</command>: This
+      command will produce a summary of the test suite results. You can append
+      <command>| grep -A7 Summ</command> to the command to produce an even more
+      condensed version of the summary. You may also wish to redirect the output
+      to a file for review and comparison later on.
+    </para>
+
+    <para>
+      <command>chown -v -R root:root /usr/lib/gcc/*linux-gnu/...</command>:
+      If the package is built by a user other than root, the ownership of the
+      installed <filename class="directory">include</filename> and
+      <filename class="directory">adalib</filename> directories (and their
+      contents) will be incorrect. These commands change the ownership to the
+      <systemitem class="username">root</systemitem> user and group.
+    </para>
 
   </sect2>
@@ -320,7 +377,5 @@
         <seg>
           gnat, gnatbind, gnatchop, gnatclean, gnatfind, gnatkr,
-          gnatlink, gnatls, gnatmake, gnatname, gnatprep, gnatxref,
-          and a run-time executable, gnat1, in <filename class="directory">
-          /usr/libexec/&lt;arch-triplet&gt;/&gcc-version;</filename>
+          gnatlink, gnatls, gnatmake, gnatname, gnatprep, gnatxref
         </seg>
         <seg>
@@ -334,7 +389,9 @@
     </segmentedlist>
 
-    <para>Only the Ada specific files are listed here. Others can be found at
-    <ulink url="&lfs-root;/chapter06/gcc.html#contents-gcc"/> as they were
-    initially installed during the building of LFS.</para>
+    <para>
+      Only the Ada specific files are listed here. Others can be found at
+      <ulink url="&lfs-root;/chapter06/gcc.html#contents-gcc"/> as they were
+      initially installed during the building of LFS.
+    </para>
 
     <variablelist>
@@ -346,6 +403,8 @@
         <term><command>gnat</command></term>
         <listitem>
-          <para>is a wrapper that accepts a number of commands and calls
-          the corresponding tool from the list below.</para>
+          <para>
+            is a wrapper that accepts a number of commands and calls
+            the corresponding tool from the list below.
+          </para>
           <indexterm zone="gcc-ada gnat">
             <primary sortas="b-gnat">gnat</primary>
@@ -357,5 +416,7 @@
         <term><command>gnatbind</command></term>
         <listitem>
-          <para>is used to bind compiled objects.</para>
+          <para>
+            is used to bind compiled objects.
+          </para>
           <indexterm zone="gcc-ada gnatbind">
             <primary sortas="b-gnatbind">gnatbind</primary>
@@ -367,6 +428,8 @@
         <term><command>gnatchop</command></term>
         <listitem>
-          <para>is useful for renaming files to meet the standard
-          <application>Ada</application> default file naming conventions.</para>
+          <para>
+            is useful for renaming files to meet the standard
+            <application>Ada</application> default file naming conventions.
+          </para>
           <indexterm zone="gcc-ada gnatchop">
             <primary sortas="b-gnatchop">gnatchop</primary>
@@ -378,6 +441,8 @@
         <term><command>gnatclean</command></term>
         <listitem>
-          <para>is used to remove files associated with a
-          <application>GNAT</application> project.</para>
+          <para>
+            is used to remove files associated with a
+            <application>GNAT</application> project.
+          </para>
           <indexterm zone="gcc-ada gnatclean">
             <primary sortas="b-gnatclean">gnatclean</primary>
@@ -389,6 +454,8 @@
         <term><command>gnatfind</command></term>
         <listitem>
-          <para> is intended for locating definition and/or references to
-          specified entities in a <application>GNAT</application> project.</para>
+          <para>
+            is intended for locating definition and/or references to
+            specified entities in a <application>GNAT</application> project.
+          </para>
           <indexterm zone="gcc-ada gnatfind">
             <primary sortas="b-gnatfind">gnatfind</primary>
@@ -400,6 +467,8 @@
         <term><command>gnatkr</command></term>
         <listitem>
-          <para>is used to determine the crunched name for a given file, when
-          crunched to a specified maximum length.</para>
+          <para>
+            is used to determine the crunched name for a given file, when
+            crunched to a specified maximum length.
+          </para>
           <indexterm zone="gcc-ada gnatkr">
             <primary sortas="b-gnatkr">gnatkr</primary>
@@ -411,5 +480,7 @@
         <term><command>gnatlink</command></term>
         <listitem>
-          <para>is used to link programs and build an executable file.</para>
+          <para>
+            is used to link programs and build an executable file.
+          </para>
           <indexterm zone="gcc-ada gnatlink">
             <primary sortas="b-gnatlink">gnatlink</primary>
@@ -421,5 +492,7 @@
         <term><command>gnatls</command></term>
         <listitem>
-          <para>is the compiled unit browser.</para>
+          <para>
+            is the compiled unit browser.
+          </para>
           <indexterm zone="gcc-ada gnatls">
             <primary sortas="b-gnatls">gnatls</primary>
@@ -431,6 +504,8 @@
         <term><command>gnatmake</command></term>
         <listitem>
-          <para>is the <application>Ada</application> compiler, which performs
-          compilaton, binding and linking.</para>
+          <para>
+            is the <application>Ada</application> compiler, which performs
+            compilaton, binding and linking.
+          </para>
           <indexterm zone="gcc-ada gnatmake">
             <primary sortas="b-gnatmake">gnatmake</primary>
@@ -442,6 +517,8 @@
         <term><command>gnatname</command></term>
         <listitem>
-          <para>will list the files associated with a
-          <application>GNAT</application> project.</para>
+          <para>
+            will list the files associated with a
+            <application>GNAT</application> project.
+          </para>
           <indexterm zone="gcc-ada gnatname">
             <primary sortas="b-gnatname">gnatname</primary>
@@ -453,6 +530,7 @@
         <term><command>gnatprep</command></term>
         <listitem>
-          <para>is the <application>GNAT</application> external
-          preprocessor.</para>
+          <para>
+            is the <application>GNAT</application> external preprocessor.
+          </para>
           <indexterm zone="gcc-ada gnatprep">
             <primary sortas="b-gnatprep">gnatprep</primary>
@@ -464,6 +542,8 @@
         <term><command>gnatxref</command></term>
         <listitem>
-          <para>is similar to <command>gnatfind</command>, but generates
-          a full report of all cross-references.</para>
+          <para>
+            is similar to <command>gnatfind</command>, but generates
+            a full report of all cross-references.
+          </para>
           <indexterm zone="gcc-ada gnatxref">
             <primary sortas="b-gnatxref">gnatxref</primary>
Index: general/prog/gcc-java.xml
===================================================================
--- general/prog/gcc-java.xml	(revision b39a80c0dd0927a99f9e710d439ac0aae2b30fe8)
+++ general/prog/gcc-java.xml	(revision ae0673a886272fd364b9ba9ba14351499e7d26e7)
@@ -5,14 +5,14 @@
   %general-entities;
 
-  <!ENTITY gcc-java-download-http  "http://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
+  <!ENTITY gcc-java-download-http  "https://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
   <!ENTITY gcc-java-download-ftp   "ftp://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
-  <!ENTITY gcc-java-md5sum         "4df8ee253b7f3863ad0b86359cd39c43">
-  <!ENTITY gcc-java-size           "86 MB">
-  <!ENTITY gcc-java-buildsize      "3.0 GB">
-  <!ENTITY gcc-java-time           "84 SBU (including 70 SBU for tests)">
+  <!ENTITY gcc-java-md5sum         "d5525b1127d07d215960e6051c5da35e">
+  <!ENTITY gcc-java-size           "91 MB">
+  <!ENTITY gcc-java-buildsize      "4.1 GB">
+  <!ENTITY gcc-java-time           "78 SBU (including 65 SBU for tests)">
 
   <!ENTITY ecj-download-ftp    "ftp://sourceware.org/pub/java/ecj-latest.jar">
 
-  <!ENTITY antlr-version       "4.2.2">
+  <!ENTITY antlr-version       "4.5">
   <!ENTITY antlr-download-http "http://www.antlr.org/download/antlr-&antlr-version;-complete.jar">
 ]>
@@ -29,5 +29,5 @@
 
   <indexterm zone="gcc">
-    <primary sortas="a-gcc-java-4-0">GCC-Java-&gcc-version;</primary>
+    <primary sortas="a-gcc-java-5-0">GCC-Java-&gcc-version;</primary>
   </indexterm>
 
@@ -35,22 +35,24 @@
     <title>Introduction to GCC-Java</title>
 
-    <para>See the introduction to the Java language and system at
-    <xref linkend="java"/>. The GNU Compiler Collection (GCC) contains
-    a Java compiler to native code. Together with the
-    <application>ecj</application> Java compiler from Eclipse (to bytecode),
-    it provides a way to build an acceptable JVM from source. However, since
-    the release of <application>OpenJDK</application>, the development
-    of GCC-Java has almost stopped, and the built JVM is an old version.
-    One reason to build
-    this system is that it can be used to bootstrap <xref linkend="openjdk"/>,
-    without the need for downloading a Java binary.</para>
+    <para>
+      See the introduction to the Java language and system at
+      <xref linkend="java"/>. The GNU Compiler Collection (GCC) contains
+      a Java compiler to native code. Together with the
+      <application>ecj</application> Java compiler from Eclipse (to bytecode),
+      it provides a way to build an acceptable JVM from source. However, since
+      the release of <application>OpenJDK</application>, the development
+      of GCC-Java has almost stopped, and the built JVM is an old version,
+      which cannot be used for building <xref linkend="openjdk"/>.
+    </para>
 
     &lfs77_checked;
 
     <caution>
-      <para>Using the instructions on this page will have the effect that
-      the C and C++ compiler and libraries will be reinstalled, overwriting
-      the ones on your system. This may lead to some issues. Please read the
-      note and caution on the <xref linkend="gcc"/> page.</para>
+      <para>
+        Using the instructions on this page will have the effect that
+        the C and C++ compiler and libraries will be reinstalled, overwriting
+        the ones on your system. This may lead to some issues. Please read the
+        note and caution on the <xref linkend="gcc"/> page.
+      </para>
     </caution>
 
@@ -58,20 +60,32 @@
     <itemizedlist spacing="compact">
       <listitem>
-        <para>Download (HTTP): <ulink url="&gcc-java-download-http;"/></para>
-      </listitem>
-      <listitem>
-        <para>Download (FTP): <ulink url="&gcc-java-download-ftp;"/></para>
-      </listitem>
-      <listitem>
-        <para>Download MD5 sum: &gcc-java-md5sum;</para>
-      </listitem>
-      <listitem>
-        <para>Download size: &gcc-java-size;</para>
-      </listitem>
-      <listitem>
-        <para>Estimated disk space required: &gcc-java-buildsize;</para>
-      </listitem>
-      <listitem>
-        <para>Estimated build time: &gcc-java-time;</para>
+        <para>
+          Download (HTTP): <ulink url="&gcc-java-download-http;"/>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download (FTP): <ulink url="&gcc-java-download-ftp;"/>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download MD5 sum: &gcc-java-md5sum;
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download size: &gcc-java-size;
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Estimated disk space required: &gcc-java-buildsize;
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Estimated build time: &gcc-java-time;
+        </para>
       </listitem>
     </itemizedlist>
@@ -81,6 +95,5 @@
       <listitem>
         <para>
-          Eclipse Java compiler:
-          <ulink url="&ecj-download-ftp;"/>
+          Eclipse Java compiler: <ulink url="&ecj-download-ftp;"/>
         </para>
       </listitem>
@@ -91,19 +104,19 @@
         </para>
       </listitem>
-<!--      <listitem>
+      <listitem>
         <para>
           Required patch:
-          <ulink url="&patch-root;/gcc-&gcc-version;-upstream_fixes-1.patch"/>
-        </para>
-      </listitem>-->
+          <ulink url="&patch-root;/gcc-&gcc-version;-upstream_libgomp_fix-1.patch"/>
+        </para>
+      </listitem>
     </itemizedlist>
 
-    <bridgehead renderas="sect3">GCC Dependencies</bridgehead>
+    <bridgehead renderas="sect3">GCC Java Dependencies</bridgehead>
 
     <bridgehead renderas="sect4">Required</bridgehead>
     <para role="required">
-      <xref linkend="zip"/>,
-      <xref linkend="unzip"/>, and
-      <xref linkend="which"/>
+      <xref linkend="unzip"/>,
+      <xref linkend="which"/>, and
+      <xref linkend="zip"/>
     </para>
 
@@ -129,23 +142,25 @@
     <title>Installation of GCC Java</title>
 
-    <para>The instructions below assume that the C and C++ compilers have
-    the same version as the one you are installing, so that a
-    <quote>bootstrap</quote> is not necessary. If you are upgrading
-    the GCC version, then remove the <option>--disable-bootstrap</option> from
-    the <command>./configure</command> options below.</para>
-<!--
-    <para>As in LFS, fix a problem identified upstream:</para>
-
-<screen><userinput>sed -i 's/if \((code.*))\)/if (\1 \&amp;\&amp; \!DEBUG_INSN_P (insn))/' gcc/sched-deps.c</userinput></screen>
--->
-
-    <para>Install <application>GCC Java</application> by running the
-    following commands:</para>
+    <para>
+      The instructions below assume that the C and C++ compilers have
+      the same version as the one you are installing, so that a
+      <quote>bootstrap</quote> is not necessary. If you are upgrading
+      the GCC version, then remove the <option>--disable-bootstrap</option> from
+      the <command>./configure</command> options below.
+    </para>
+
+    <para>
+      As in LFS, fix a problem identified upstream with the libgomp library:
+    </para>
+
+<screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-upstream_libgomp_fix-1.patch</userinput></screen>
+
+    <para>
+      Install <application>GCC Java</application> by running the
+      following commands:
+    </para>
 
 <screen><userinput>sed -i 's/\(install.*:\) install-.*recursive/\1/' libffi/Makefile.in         &amp;&amp;
 sed -i 's/\(install-data-am:\).*/\1/'             libffi/include/Makefile.in &amp;&amp;
-<!--
-patch -Np1 -i ../gcc-&gcc-version;-upstream_fixes-1.patch &amp;&amp;
--->
 
 cp ../ecj-latest.jar ./ecj.jar &amp;&amp;
@@ -156,9 +171,4 @@
 ../gcc-&gcc-version;/configure           \
     --prefix=/usr                \
-    --libdir=/usr/lib            \
-    --enable-shared              \
-    --enable-threads=posix       \
-    --enable-__cxa_atexit        \
-    --enable-clocale=gnu         \
     --disable-multilib           \
     --with-system-zlib           \
@@ -170,9 +180,11 @@
 make</userinput></screen>
 
-    <para>If you have installed additional packages such as
-    <application>Valgrind</application> and <application>GDB</application>,
-    the <application>GCC</application> part of the testsuite will run more
-    tests than in LFS. Some of those will report FAIL and others XPASS
-    (pass when expected to FAIL). To run the tests, issue:</para>
+    <para>
+      If you have installed additional packages such as
+      <application>Valgrind</application> and <application>GDB</application>,
+      the <application>GCC</application> part of the testsuite will run more
+      tests than in LFS. Some of those will report FAIL and others XPASS
+      (pass when expected to FAIL). To run the tests, issue:
+    </para>
 
 <screen><userinput>ulimit -s 32768 &amp;&amp;
@@ -181,11 +193,15 @@
 to be run. -->
 
-    <para>The tests are very long, and the results may be hard to find in the
-    logs, specially if you use job control with make. You can get a summary
-    of the tests with:</para>
+    <para>
+      The tests are very long, and the results may be hard to find in the
+      logs, specially if you use job control with make. You can get a summary
+      of the tests with:
+    </para>
 
 <screen><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
 
-    <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
+    <para>
+      Now, as the <systemitem class="username">root</systemitem> user:
+    </para>
 
 <screen role="root"><userinput>make install &amp;&amp;
@@ -207,29 +223,21 @@
     <title>Command Explanations</title>
 
-    <para>The two <command>sed</command> commands prevent the
-    installation of the <application>libffi</application> library bundled
-    with <application>GCC</application>, since it is outdated compared to
-    <xref linkend="libffi"/>.</para>
-<!--
-    <para>
-      <command>patch ... gcc-&gcc-version;-upstream_fixes-1.patch</command>:
-      This patch corrects bugs in the C++ compiler, which lead to
-      segmentation faults in some cases.
-    </para>
--->
-
-    <para><command>mkdir ../gcc-build; cd ../gcc-build</command>: The
-    <application>GCC</application> documentation recommends
-    building the package in a dedicated build directory.</para>
-
-    <para><parameter>--enable-shared --enable-threads=posix
-    --enable-__cxa_atexit</parameter>: These parameters are required to build
-    the <application>C++</application> libraries to published standards.</para>
-
-    <para><parameter>--enable-clocale=gnu</parameter>: This parameter is a
-    failsafe for incomplete locale data.</para>
-
-    <para><parameter>--disable-multilib</parameter>: This parameter ensures
-    that files are created for the specific architecture of your computer.</para>
+    <para>
+      The two <command>sed</command> commands prevent the
+      installation of the <application>libffi</application> library bundled
+      with <application>GCC</application>, since it is outdated compared to
+      <xref linkend="libffi"/>.
+    </para>
+
+    <para>
+      <command>mkdir ../gcc-build; cd ../gcc-build</command>: The
+      <application>GCC</application> documentation recommends
+      building the package in a dedicated build directory.
+    </para>
+
+    <para>
+      <parameter>--disable-multilib</parameter>: This parameter ensures
+      that files are created for the specific architecture of your computer.
+    </para>
 
     <para>
@@ -262,8 +270,9 @@
 
     <para>
-    <parameter>--enable-languages=java</parameter>:
-    This command identifies which language to build. Note it is unavoidable
-    that the <application>C</application> and <application>C++</application>
-    compilers be built too.</para>
+      <parameter>--enable-languages=java</parameter>:
+      This command identifies which language to build. Note it is unavoidable
+      that the <application>C</application> and <application>C++</application>
+      compilers be built too.
+    </para>
 
     <para>
@@ -273,22 +282,30 @@
     </para>
 
-    <para><command>ulimit -s 32768</command>: This command prevents several
-    tests from running out of stack space.</para>
-
-    <para><command>make -k check</command>: This command runs the test suite
-    without stopping if any errors are encountered.</para>
-
-    <para><command>../gcc-&gcc-version;/contrib/test_summary</command>: This
-    command will produce a summary of the test suite results. You can append
-    <command>| grep -A7 Summ</command> to the command to produce an even more
-    condensed version of the summary. You may also wish to redirect the output
-    to a file for review and comparison later on.</para>
-
-    <para><command>chown -v -R root:root
-    /usr/lib/gcc/*linux-gnu/...</command>:
-    If the package is built by a user other than root, the ownership of the
-    installed <filename class="directory">include</filename> directory (and its
-    content) will be incorrect. This commands changes the ownership to the
-    <systemitem class="username">root</systemitem> user and group.</para>
+    <para>
+      <command>ulimit -s 32768</command>: This command prevents several
+      tests from running out of stack space.
+    </para>
+
+    <para>
+      <command>make -k check</command>: This command runs the test suite
+      without stopping if any errors are encountered.
+    </para>
+
+    <para>
+      <command>../gcc-&gcc-version;/contrib/test_summary</command>: This
+      command will produce a summary of the test suite results. You can append
+      <command>| grep -A7 Summ</command> to the command to produce an even more
+      condensed version of the summary. You may also wish to redirect the output
+      to a file for review and comparison later on.
+    </para>
+
+    <para>
+      <command>chown -v -R root:root
+      /usr/lib/gcc/*linux-gnu/...</command>:
+      If the package is built by a user other than root, the ownership of the
+      installed <filename class="directory">include</filename> directory (and its
+      content) will be incorrect. This commands changes the ownership to the
+      <systemitem class="username">root</systemitem> user and group.
+    </para>
 
     <para>
@@ -307,5 +324,5 @@
 
       <para>
-        The configuration is the same as for <xref linkend="openjdk"/>,
+        The configuration is the same as <xref linkend="ojdk-conf"/>,
         replacing <filename class="directory">/opt/jdk</filename> with
         <filename class="directory">/opt/gcj</filename>.
@@ -341,15 +358,16 @@
         <seg>
           /usr/include/c++/&gcc-version;/{gcj,gnu,java,javax,org,sun},
-          /usr/lib/gcj-&gcc-version;-15,
-          /usr/lib/security, /opt/gcj/{bin,jre,include,lib} and
-          /usr/share/java
+          /usr/lib/gcj-&gcc-version;-16, /usr/lib/jvm-exports,
+          /usr/lib/security, /opt/gcj and /usr/share/java
         </seg>
       </seglistitem>
     </segmentedlist>
 
-    <para>Some program and library names and descriptions are not listed here,
-    but can be found at
-    <ulink url="&lfs-root;/chapter06/gcc.html#contents-gcc"/> as they were
-    initially installed during the building of LFS.</para>
+    <para>
+      Some program and library names and descriptions are not listed here,
+      but can be found at
+      <ulink url="&lfs-root;/chapter06/gcc.html#contents-gcc"/> as they were
+      initially installed during the building of LFS.
+    </para>
 
     <variablelist>
@@ -361,6 +379,8 @@
         <term><command>aot-compile</command></term>
         <listitem>
-          <para>searches a directory for Java bytecode and uses
-          <command>gcj</command> to compile it to native code.</para>
+          <para>
+            searches a directory for Java bytecode and uses
+            <command>gcj</command> to compile it to native code.
+          </para>
           <indexterm zone="gcc aot-compile">
             <primary sortas="b-aot-compile">aot-compile</primary>
@@ -372,5 +392,7 @@
         <term><command>ecj</command></term>
         <listitem>
-          <para>is the eclipse compiler.</para>
+          <para>
+            is the eclipse compiler.
+          </para>
           <indexterm zone="gcc ecj">
             <primary sortas="b-ecj">ecj</primary>
@@ -382,5 +404,7 @@
         <term><command>gappletviewer</command></term>
         <listitem>
-          <para>loads and run a <application>Java</application> applet.</para>
+          <para>
+            loads and run a <application>Java</application> applet.
+          </para>
           <indexterm zone="gcc gappletviewer">
             <primary sortas="b-gappletviewer">gappletviewer</primary>
@@ -392,6 +416,8 @@
         <term><command>gc-analyze</command></term>
         <listitem>
-          <para>analyzes garbage collector (GC) memory dumps from
-          <application>Java</application> code.</para>
+          <para>
+            analyzes garbage collector (GC) memory dumps from
+            <application>Java</application> code.
+          </para>
           <indexterm zone="gcc gc-analyze">
             <primary sortas="b-gc-analyze">gc-analyze</primary>
@@ -403,6 +429,8 @@
         <term><command>gcj</command></term>
         <listitem>
-          <para>is an ahead-of-time compiler for the
-          <application>Java</application> language.</para>
+          <para>
+            is an ahead-of-time compiler for the <application>Java</application>
+            language.
+          </para>
           <indexterm zone="gcc gcj">
             <primary sortas="b-gcj">gcj</primary>
@@ -414,6 +442,7 @@
         <term><command>gcj-dbtool</command></term>
         <listitem>
-          <para>is a tool for creating and manipulating class file mapping
-          databases.</para>
+          <para>
+            is a tool for creating and manipulating class file mapping databases.
+          </para>
           <indexterm zone="gcc gcj-dbtool">
             <primary sortas="b-gcj-dbtool">gcj-dbtool</primary>
@@ -425,6 +454,7 @@
         <term><command>gcjh</command></term>
         <listitem>
-          <para>generates header files from <application>Java</application>
-          class files.</para>
+          <para>
+            generates header files from <application>Java</application> class files.
+          </para>
           <indexterm zone="gcc gcjh">
             <primary sortas="b-gcjh">gcjh</primary>
@@ -436,6 +466,7 @@
         <term><command>gij</command></term>
         <listitem>
-          <para>is the GNU interpreter for <application>Java</application>
-          bytecode.</para>
+          <para>
+            is the GNU interpreter for <application>Java</application> bytecode.
+          </para>
           <indexterm zone="gcc gij">
             <primary sortas="b-gij">gij</primary>
@@ -447,6 +478,8 @@
         <term><command>gjar</command></term>
         <listitem>
-          <para>is an (partial) implementation of the <command>jar</command>
-          utility that comes with Sun's JDK.</para>
+          <para>
+            is an (partial) implementation of the <command>jar</command>
+            utility that comes with Sun's JDK.
+          </para>
           <indexterm zone="gcc gjar">
             <primary sortas="b-gjar">gjar</primary>
@@ -458,6 +491,7 @@
         <term><command>gjarsigner</command></term>
         <listitem>
-          <para>is a Java ARchive (JAR) file signing and verification
-          tool.</para>
+          <para>
+            is a Java ARchive (JAR) file signing and verification tool.
+          </para>
           <indexterm zone="gcc gjarsigner">
             <primary sortas="b-gjarsigner">gjarsigner</primary>
@@ -469,5 +503,7 @@
         <term><command>gjavah</command></term>
         <listitem>
-          <para>generates header files from Java class files.</para>
+          <para>
+            generates header files from Java class files.
+          </para>
           <indexterm zone="gcc gjavah">
             <primary sortas="b-gjavah">gjavah</primary>
@@ -479,5 +515,6 @@
         <term><command>gjdoc</command></term>
         <listitem>
-          <para>is a documentation tool similar to <command>javadoc</command>.
+          <para>
+            is a documentation tool similar to <command>javadoc</command>.
           </para>
           <indexterm zone="gcc gjdoc">
@@ -490,6 +527,8 @@
         <term><command>gkeytool</command></term>
         <listitem>
-          <para>manages private keys and public certificates in a
-          <application>Java</application> environment.</para>
+          <para>
+            manages private keys and public certificates in a
+            <application>Java</application> environment.
+          </para>
           <indexterm zone="gcc gkeytool">
             <primary sortas="b-gkeytool">gkeytool</primary>
@@ -501,5 +540,7 @@
         <term><command>gnative2ascii</command></term>
         <listitem>
-          <para>is an encoding converter for <application>Java</application>.</para>
+          <para>
+            is an encoding converter for <application>Java</application>.
+          </para>
           <indexterm zone="gcc gnative2ascii">
             <primary sortas="b-gnative2ascii">gnative2ascii</primary>
@@ -511,5 +552,7 @@
         <term><command>gorbd</command></term>
         <listitem>
-          <para>is an object request broker daemon.</para>
+          <para>
+            is an object request broker daemon.
+          </para>
           <indexterm zone="gcc gorbd">
             <primary sortas="b-gorbd">gorbd</primary>
@@ -521,5 +564,7 @@
         <term><command>grmic</command></term>
         <listitem>
-          <para>generates stubs for Remote Method Invocation.</para>
+          <para>
+            generates stubs for Remote Method Invocation.
+          </para>
           <indexterm zone="gcc grmic-gcc">
             <primary sortas="b-grmic">grmic</primary>
@@ -531,5 +576,7 @@
         <term><command>grmid</command></term>
         <listitem>
-          <para>RMI activation system daemon.</para>
+          <para>
+            RMI activation system daemon.
+          </para>
           <indexterm zone="gcc grmid-gcc">
             <primary sortas="b-grmid">grmid</primary>
@@ -541,5 +588,7 @@
         <term><command>grmiregistry</command></term>
         <listitem>
-          <para> starts a remote object registry on the current host.</para>
+          <para>
+            starts a remote object registry on the current host.
+          </para>
           <indexterm zone="gcc grmiregistry-gcc">
             <primary sortas="b-grmiregistry">grmiregistry</primary>
@@ -551,5 +600,7 @@
         <term><command>gserialver</command></term>
         <listitem>
-          <para> prints the serialVersionUID of the specified class.</para>
+          <para>
+            prints the serialVersionUID of the specified class.
+          </para>
           <indexterm zone="gcc gserialver">
             <primary sortas="b-gserialver">gserialver</primary>
@@ -561,5 +612,7 @@
         <term><command>gtnameserv</command></term>
         <listitem>
-          <para> starts a naming service.</para>
+          <para>
+            starts a naming service.
+          </para>
           <indexterm zone="gcc gtnameserv">
             <primary sortas="b-gtnameserv">gtnameserv</primary>
@@ -571,6 +624,8 @@
         <term><command>jcf-dump</command></term>
         <listitem>
-          <para>prints information about <application>Java</application>
-          class files.</para>
+          <para>
+            prints information about <application>Java</application>
+            class files.
+          </para>
           <indexterm zone="gcc jcf-dump">
             <primary sortas="b-jcf-dump">jcf-dump</primary>
@@ -582,5 +637,7 @@
         <term><command>jv-convert</command></term>
         <listitem>
-          <para>converts files from one encoding to another.</para>
+          <para>
+            converts files from one encoding to another.
+          </para>
           <indexterm zone="gcc jv-convert">
             <primary sortas="b-jv-convert">jv-convert</primary>
@@ -592,7 +649,9 @@
         <term><command>rebuild-gcj-db</command></term>
         <listitem>
-          <para>Merge the per-solib databases made by
-          <application>aot-compile</application> into one system-wide
-          database.</para>
+          <para>
+            Merge the per-solib databases made by
+            <application>aot-compile</application> into one system-wide
+            database.
+          </para>
           <indexterm zone="gcc rebuild-gcj-db">
             <primary sortas="b-rebuild-gcj-db">rebuild-gcj-db</primary>
Index: general/prog/gcc.xml
===================================================================
--- general/prog/gcc.xml	(revision b39a80c0dd0927a99f9e710d439ac0aae2b30fe8)
+++ general/prog/gcc.xml	(revision ae0673a886272fd364b9ba9ba14351499e7d26e7)
@@ -5,10 +5,10 @@
   %general-entities;
 
-  <!ENTITY gcc-download-http  "http://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
+  <!ENTITY gcc-download-http  "https://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
   <!ENTITY gcc-download-ftp   "ftp://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
-  <!ENTITY gcc-md5sum         "4df8ee253b7f3863ad0b86359cd39c43">
-  <!ENTITY gcc-size           "86 MB">
-  <!ENTITY gcc-buildsize      "5.2 GB">
-  <!ENTITY gcc-time           "138 SBU (including 95 SBU for tests)">
+  <!ENTITY gcc-md5sum         "d5525b1127d07d215960e6051c5da35e">
+  <!ENTITY gcc-size           "91 MB">
+  <!ENTITY gcc-buildsize      "6.7 GB">
+  <!ENTITY gcc-time           "130 SBU (including 80 SBU for tests)">
 ]>
 
@@ -24,5 +24,5 @@
 
   <indexterm zone="gcc">
-    <primary sortas="a-gcc-4-0">GCC-&gcc-version;</primary>
+    <primary sortas="a-gcc-5-0">GCC-&gcc-version;</primary>
   </indexterm>
 
@@ -30,28 +30,44 @@
     <title>Introduction to GCC</title>
 
-    <para>The <application>GCC</application> package contains the GNU Compiler
-    Collection. This page describes the installation of compilers for the
-    following languages: C, C++, Fortran, Objective C, Objective C++, and Go.
-    Two additional languages , Ada and Java are available in the collection.
-    They have specific requirements, so they are described in separate pages
-    (<xref linkend="gcc-ada"/> and <xref linkend="gcc-java"/>). Since C and
-    C++ are installed in LFS, this page is either for upgrading C and C++,
-    or for installing additional compilers.</para>
+    <para>
+      The <application>GCC</application> package contains the GNU Compiler
+      Collection. This page describes the installation of compilers for the
+      following languages: C, C++, Fortran, Objective C, Objective C++, and Go.
+      Two additional languages , Ada and Java are available in the collection.
+      They have specific requirements, so they are described in separate pages
+      (<xref linkend="gcc-ada"/> and <xref linkend="gcc-java"/>). Since C and
+      C++ are installed in LFS, this page is either for upgrading C and C++,
+      or for installing additional compilers.
+    </para>
 
     &lfs77_checked;
 
     <caution>
-      <para>If you are upgrading <application>GCC</application> from any other
-      version prior to &gcc-version;, then you must be careful compiling 3rd
-      party kernel modules. You should ensure that the kernel and all its
-      native modules are also compiled using the same version of
-      <application>GCC</application> that you use to build the 3rd party module.
-      This issue does not affect native kernel (and kernel modules) updates,
-      as the instructions below are a complete reinstallation of
-      <application>GCC</application>. If you have existing 3rd party modules
-      installed, ensure they are recompiled using the updated version of
-      <application>GCC</application>. As always, never update the kernel
-      headers from the ones used when <application>Glibc</application> was
-      compiled during LFS.</para>
+      <para>
+        If you are upgrading <application>GCC</application> from any other
+        version prior to &gcc-version;, then you must be careful compiling 3rd
+        party kernel modules. You should ensure that the kernel and all its
+        native modules are also compiled using the same version of
+        <application>GCC</application> that you use to build the 3rd party module.
+        This issue does not affect native kernel (and kernel modules) updates,
+        as the instructions below are a complete reinstallation of
+        <application>GCC</application>. If you have existing 3rd party modules
+        installed, ensure they are recompiled using the updated version of
+        <application>GCC</application>. As always, never update the kernel
+        headers from the ones used when <application>Glibc</application> was
+        compiled during LFS.
+      </para>
+
+      <para>
+        The 5.1.0 version of GCC introduces an incompatible ABI change in the
+        C++ library <filename>libstdc++.so</filename>. This does not prevent
+        using programs compiled with the previous version of <application>GCC
+        </application>, since both old and new symbols are available in the
+        library. But compiling, with the new version, programs which use libraries
+        compiled with the old version is likely to give errors. So, if you are
+        upgrading from any previous version prior to 5.1.0, you have two solutions:
+        recompile all the libraries with the new version, or use the <option>
+        --with-default-libstdcxx-abi</option> switch to configure.
+      </para>
     </caution>
 
@@ -59,23 +75,35 @@
     <itemizedlist spacing="compact">
       <listitem>
-        <para>Download (HTTP): <ulink url="&gcc-download-http;"/></para>
-      </listitem>
-      <listitem>
-        <para>Download (FTP): <ulink url="&gcc-download-ftp;"/></para>
-      </listitem>
-      <listitem>
-        <para>Download MD5 sum: &gcc-md5sum;</para>
-      </listitem>
-      <listitem>
-        <para>Download size: &gcc-size;</para>
-      </listitem>
-      <listitem>
-        <para>Estimated disk space required: &gcc-buildsize;</para>
-      </listitem>
-      <listitem>
-        <para>Estimated build time: &gcc-time;</para>
+        <para>
+          Download (HTTP): <ulink url="&gcc-download-http;"/>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download (FTP): <ulink url="&gcc-download-ftp;"/>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download MD5 sum: &gcc-md5sum;
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download size: &gcc-size;
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Estimated disk space required: &gcc-buildsize;
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Estimated build time: &gcc-time;
+        </para>
       </listitem>
     </itemizedlist>
-<!--
+
     <bridgehead renderas="sect3">Additional Downloads</bridgehead>
     <itemizedlist spacing="compact">
@@ -83,9 +111,9 @@
         <para>
           Required patch:
-          <ulink url="&patch-root;/gcc-&gcc-version;-upstream_fixes-1.patch"/>
+          <ulink url="&patch-root;/gcc-&gcc-version;-upstream_libgomp_fix-1.patch"/>
         </para>
       </listitem>
     </itemizedlist>
--->
+
 
     <bridgehead renderas="sect3">GCC Dependencies</bridgehead>
@@ -96,6 +124,7 @@
     </para>
 
-    <para condition="html" role="usernotes">User Notes:
-    <ulink url="&blfs-wiki;/gcc"/></para>
+    <para condition="html" role="usernotes">
+      User Notes: <ulink url="&blfs-wiki;/gcc"/>
+    </para>
 
   </sect2>
@@ -105,48 +134,50 @@
 
     <important>
-      <para>Even if you specify only languages other than C and C++ to the
-      <command>./configure</command> command below, the
-      installation process will overwrite your existing
-      <application>GCC</application> C and C++ compilers and libraries.
-      Having the <application>Tcl</application>,
-      <application>Expect</application> and <application>DejaGnu</application>
-      packages installed before beginning the build is highly recommended so
-      you can run the full suite of tests.</para>
-
-      <para>Do not continue with the <command>make install</command> command
-      until you are confident the build was successful. You can compare your
-      test results with those found at <ulink
-      url="http://gcc.gnu.org/ml/gcc-testresults/"/>.  You may also want to
-      refer to the information found in the <application>GCC</application>
-      section of Chapter 6 in the LFS book (<ulink
-      url="&lfs-root;/chapter06/gcc.html"/>).</para>
+      <para>
+        Even if you specify only languages other than C and C++ to the
+        <command>./configure</command> command below, the
+        installation process will overwrite your existing
+        <application>GCC</application> C and C++ compilers and libraries.
+        Having the <application>Tcl</application>,
+        <application>Expect</application> and <application>DejaGnu</application>
+        packages installed before beginning the build is highly recommended so
+        you can run the full suite of tests.
+      </para>
+
+      <para>
+        Do not continue with the <command>make install</command> command
+        until you are confident the build was successful. You can compare your
+        test results with those found at <ulink
+        url="http://gcc.gnu.org/ml/gcc-testresults/"/>. You may also want to
+        refer to the information found in the <application>GCC</application>
+        section of Chapter 6 in the LFS book (<ulink
+        url="&lfs-root;/chapter06/gcc.html"/>).
+      </para>
     </important>
 
-    <para>The instructions below are intentionally performing a
-    <quote>bootstrap</quote> process. Bootstrapping is needed for robustness
-    and is highly recommended when upgrading the compilers version. To disable
-    bootstrap anyways, add <parameter>--disable-bootstrap</parameter> to the
-    <command>./configure</command> options below.</para>
-<!--
-    <para>As in LFS, fix a problem identified upstream:</para>
-
-<screen><userinput>sed -i 's/if \((code.*))\)/if (\1 \&amp;\&amp; \!DEBUG_INSN_P (insn))/' gcc/sched-deps.c</userinput></screen>
--->
-
-    <para>Install <application>GCC</application> by running the
-    following commands:</para>
-
-<screen><userinput><!--
-patch -Np1 -i ../gcc-&gcc-version;-upstream_fixes-1.patch    &amp;&amp;
--->mkdir ../gcc-build                                   &amp;&amp;
+    <para>
+      The instructions below are intentionally performing a
+      <quote>bootstrap</quote> process. Bootstrapping is needed for robustness
+      and is highly recommended when upgrading the compilers version. To disable
+      bootstrap anyways, add <parameter>--disable-bootstrap</parameter> to the
+      <command>./configure</command> options below.
+    </para>
+
+    <para>
+      As in LFS, fix a problem identified upstream with the libgomp library:
+    </para>
+
+<screen><userinput>patch -Np1 -i ../gcc-5.1.0-upstream_libgomp_fix-1.patch</userinput></screen>
+
+
+    <para>
+      Install <application>GCC</application> by running the following commands:
+    </para>
+
+<screen><userinput>mkdir ../gcc-build                                   &amp;&amp;
 cd    ../gcc-build                                   &amp;&amp;
 
 ../gcc-&gcc-version;/configure                               \
     --prefix=/usr                                    \
-    --libdir=/usr/lib                                \
-    --enable-shared                                  \
-    --enable-threads=posix                           \
-    --enable-__cxa_atexit                            \
-    --enable-clocale=gnu                             \
     --disable-multilib                               \
     --with-system-zlib                               \
@@ -154,9 +185,11 @@
 make</userinput></screen>
 
-    <para>If you have installed additional packages such as
-    <application>Valgrind</application> and <application>GDB</application>,
-    the <application>GCC</application> part of the testsuite will run more
-    tests than in LFS. Some of those will report FAIL and others XPASS
-    (pass when expected to FAIL). To run the tests, issue:</para>
+    <para>
+      If you have installed additional packages such as
+      <application>Valgrind</application> and <application>GDB</application>,
+      the <application>GCC</application> part of the testsuite will run more
+      tests than in LFS. Some of those will report FAIL and others XPASS
+      (pass when expected to FAIL). To run the tests, issue:
+    </para>
 
 <screen><userinput>ulimit -s 32768 &amp;&amp;
@@ -165,11 +198,15 @@
 to be run. -->
 
-    <para>The tests are very long, and the results may be hard to find in the
-    logs, specially if you use parallel jobs with make. You can get a summary
-    of the tests with:</para>
+    <para>
+      The tests are very long, and the results may be hard to find in the
+      logs, specially if you use parallel jobs with make. You can get a summary
+      of the tests with:
+    </para>
 
 <screen><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
 
-    <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
+    <para>
+      Now, as the <systemitem class="username">root</systemitem> user:
+    </para>
 
 <screen role="root"><userinput>make install &amp;&amp;
@@ -181,13 +218,17 @@
     /usr/lib/gcc/*linux-gnu/&gcc-version;/include{,-fixed}</userinput></screen>
 
-    <para>Some packages expect to find the C preprocessor in
-    <filename class="directory">/lib</filename> or may refer to the C compiler
-    under the name <command>cc</command>. The following symbolic links are not
-    needed if you have followed the LFS instructions, since they
-    have been already created. If you do not have them on your system, issue
-    as the <systemitem class="username">root</systemitem> user:</para>
-
-<screen role="root"><userinput>ln -v -sf ../usr/bin/cpp /lib &amp;&amp;
-ln -v -sf gcc /usr/bin/cc</userinput></screen>
+    <para>
+      Some packages expect to find the C preprocessor in
+      <filename class="directory">/lib</filename> or may refer to the C compiler
+      under the name <command>cc</command>. The following symbolic links are not
+      needed if you have followed the LFS instructions, since they
+      have been already created. If you do not have them on your system, issue
+      as the <systemitem class="username">root</systemitem> user:
+    </para>
+
+<screen role="root"><userinput>ln -v -sf ../usr/bin/cpp /lib          &amp;&amp;
+ln -v -sf gcc /usr/bin/cc              &amp;&amp;
+install -v -dm755 /usr/lib/bfd-plugins &amp;&amp;
+ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/&gcc-version;/liblto_plugin.so /usr/lib/bfd-plugins/</userinput></screen>
 
   </sect2>
@@ -195,11 +236,4 @@
   <sect2 role="commands">
     <title>Command Explanations</title>
-<!--
-    <para>
-      <command>patch ... gcc-&gcc-version;-upstream_fixes-1.patch</command>:
-      This patch corrects bugs in the C++ compiler, which lead to
-      segmentation faults in some cases.
-    </para>
--->
 
     <para>
@@ -208,14 +242,4 @@
       building the package in a dedicated build directory.
     </para>
-
-    <para>
-      <parameter>--enable-shared --enable-threads=posix
-      --enable-__cxa_atexit</parameter>: These parameters are required to build
-      the <application>C++</application> libraries to published standards.
-    </para>
-
-    <para>
-      <parameter>--enable-clocale=gnu</parameter>: This parameter is a
-    failsafe for incomplete locale data.</para>
 
     <para>
@@ -239,4 +263,10 @@
 
     <para>
+      <option>--with-default-libstdcxx-abi=c++98</option>: Use this switch if you
+      are upgrading from a <application>GCC</application> version prior to 5.1.0,
+      and you do not want to recompile all the libraries written in C++.
+    </para>
+
+    <para>
       <command>ulimit -s 32768</command>: This command prevents several
       tests from running out of stack space.
@@ -277,8 +307,10 @@
     <title>Contents</title>
 
-    <para>Some program and library names and descriptions are not listed here,
-    but can be found at
-    <ulink url="&lfs-root;/chapter06/gcc.html#contents-gcc"/> as they were
-    initially installed during the building of LFS.</para>
+    <para>
+      Some program and library names and descriptions are not listed here,
+      but can be found at
+      <ulink url="&lfs-root;/chapter06/gcc.html#contents-gcc"/> as they were
+      initially installed during the building of LFS.
+    </para>
 
     <segmentedlist>
@@ -289,11 +321,10 @@
       <seglistitem>
         <seg>
-          gccgo and gfortran,
-          hard-linked to architecture specific names
+          gccgo and gfortran, hard-linked to architecture specific names
         </seg>
         <seg>
           libgfortran.{so,a},
-          libgo.{so,a}, libgobegin.a, libobjc.{so,a}, and numerous other
-          run-time libraries and executables in <filename class="directory">
+          libgo.{so,a}, libgobegin.a, libnetgo.a, libobjc.{so,a}, and numerous
+          other run-time libraries and executables in <filename class="directory">
           /usr/lib/gcc</filename>, <filename class="directory">
           /usr/libexec/gcc</filename>, and <filename class="directory">
@@ -315,6 +346,7 @@
         <term><command>gccgo</command></term>
         <listitem>
-          <para>is a GCC-based compiler for the
-          <application>Go</application> language.</para>
+          <para>
+            is a GCC-based compiler for the <application>Go</application> language.
+          </para>
           <indexterm zone="gcc gccgo">
             <primary sortas="b-gccgo">gccgo</primary>
@@ -326,6 +358,8 @@
         <term><command>gfortran</command></term>
         <listitem>
-          <para>is a GCC-based compiler for the
-          <application>Fortran</application> language.</para>
+          <para>
+            is a GCC-based compiler for the <application>Fortran</application>
+            language.
+          </para>
           <indexterm zone="gcc gfortran">
             <primary sortas="b-gfortran">gfortran</primary>
Index: general/prog/prog.xml
===================================================================
--- general/prog/prog.xml	(revision b39a80c0dd0927a99f9e710d439ac0aae2b30fe8)
+++ general/prog/prog.xml	(revision ae0673a886272fd364b9ba9ba14351499e7d26e7)
@@ -34,6 +34,6 @@
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expect.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-java.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-ada.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-java.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gc.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gdb.xml"/>
Index: introduction/welcome/changelog.xml
===================================================================
--- introduction/welcome/changelog.xml	(revision b39a80c0dd0927a99f9e710d439ac0aae2b30fe8)
+++ introduction/welcome/changelog.xml	(revision ae0673a886272fd364b9ba9ba14351499e7d26e7)
@@ -47,4 +47,8 @@
       <para>May 24th, 2015 </para>
       <itemizedlist>
+        <listitem>
+          <para>[pierre] - Update to GCC-5.1.0. Fixes
+          <ulink url="&blfs-ticket-root;6430">#6430</ulink>.</para>
+        </listitem>
         <listitem>
           <para>[renodr] - Add a sed to fix a compilation issue with Valgrind
Index: packages.ent
===================================================================
--- packages.ent	(revision b39a80c0dd0927a99f9e710d439ac0aae2b30fe8)
+++ packages.ent	(revision ae0673a886272fd364b9ba9ba14351499e7d26e7)
@@ -255,5 +255,5 @@
 <!ENTITY elfutils-version             "0.161">
 <!ENTITY expect-version               "5.45">
-<!ENTITY gcc-version                  "4.9.2">
+<!ENTITY gcc-version                  "5.1.0">
 <!ENTITY gc-version                   "7.4.2">
 <!ENTITY gdb-version                  "7.9.1">
