- <p>GCC 2.95.x is not supported under HP-UX 11 and cannot be used to
-compile GCC 3.0 and up. Refer to <a href="binaries.html">binaries</a> for
-information about obtaining precompiled GCC binaries for HP-UX.
-
- <p>GNU binutils 2.13 or later is recommended with the 64-bit port.
-The HP assembler is not supported. It is <em>highly</em> recommended
-that the GNU linker be used as well. Either binutils must be built
-prior to gcc, or a binary distribution of gcc or binutils must be
-obtained for the initial builds. When starting with a HP compiler,
-it is preferable to use the ANSI compiler as the bundled compiler
-only supports traditional C. Bootstrapping with the bundled compiler
-is tested infrequently and problems often arise because of the subtle
-differences in semantics between traditional and ISO C. There also
-have been problems reported with various binary distributions. This
-port still is undergoing significant development.
-
- <hr />
-
-<h3 class="heading"><a name="TOC23"></a><a name="i370-*-*"></a>i370-*-*</h3>
-
- <p>This port is very preliminary and has many known bugs. We hope to
-have a higher-quality port for this machine soon.
-
- <hr />
-
-<h3 class="heading"><a name="TOC24"></a><a name="*-*-linux-gnu"></a>*-*-linux-gnu</h3>
-
- <p>If you use glibc 2.2 (or 2.1.9x), GCC 2.95.2 won't install
-out-of-the-box. You'll get compile errors while building <code>libstdc++</code>.
-The patch <a href="glibc-2.2.patch">glibc-2.2.patch</a>, that is to be
-applied in the GCC source tree, fixes the compatibility problems.
-
- <p>
-
- <p>Currently Glibc 2.2.3 (and older releases) and GCC 3.0 are out of sync
-since the latest exception handling changes for GCC. Compiling glibc
-with GCC 3.0 will give a binary incompatible glibc and therefore cause
-lots of problems and might make your system completly unusable. This
-will definitly need fixes in glibc but might also need fixes in GCC. We
-strongly advise to wait for glibc 2.2.4 and to read the release notes of
-glibc 2.2.4 whether patches for GCC 3.0 are needed. You can use glibc
-2.2.3 with GCC 3.0, just do not try to recompile it.
-
- <hr />
-
-<h3 class="heading"><a name="TOC25"></a><a name="ix86-*-linux*oldld"></a>i?86-*-linux*oldld</h3>
-
- <p>Use this configuration to generate <code>a.out</code> binaries on Linux-based
-GNU systems if you do not have gas/binutils version 2.5.2 or later
-installed.
-
- <p>This configuration is obsoleted in GCC 3.1.
-
- <hr />
-
-<h3 class="heading"><a name="TOC26"></a><a name="ix86-*-linux*aout"></a>i?86-*-linux*aout</h3>
-
- <p>Use this configuration to generate <code>a.out</code> binaries on Linux-based
-GNU systems. This configuration is being superseded. You must use
-gas/binutils version 2.5.2 or later.
-
- <hr />
-
-<h3 class="heading"><a name="TOC27"></a><a name="ix86-*-linux*"></a>i?86-*-linux*</h3>
-
- <p>You will need binutils 2.9.1.0.15 or newer for exception handling to work.
+ <p>The C++ ABI has changed incompatibly in GCC 4.0. COMDAT subspaces are
+used for one-only code and data. This resolves many of the previous
+problems in using C++ on this target. However, the ABI is not compatible
+with the one implemented under HP-UX 11 using secondary definitions.
+
+ <p><hr />
+
+<h3 class="heading"><a name="TOC15"></a><a name="hppa_002dhp_002dhpux11"></a>hppa*-hp-hpux11</h3>
+
+<p>GCC 3.0 and up support HP-UX 11. GCC 2.95.x is not supported and cannot
+be used to compile GCC 3.0 and up.
+
+ <p>The libffi and libjava libraries haven't been ported to 64-bit HP-UX and don't build.
+
+ <p>Refer to <a href="binaries.html">binaries</a> for information about obtaining
+precompiled GCC binaries for HP-UX. Precompiled binaries must be obtained
+to build the Ada language as it can't be bootstrapped using C. Ada is
+only available for the 32-bit PA-RISC runtime.
+
+ <p>Starting with GCC 3.4 an ISO C compiler is required to bootstrap. The
+bundled compiler supports only traditional C; you will need either HP's
+unbundled compiler, or a binary distribution of GCC.
+
+ <p>It is possible to build GCC 3.3 starting with the bundled HP compiler,
+but the process requires several steps. GCC 3.3 can then be used to
+build later versions. The fastjar program contains ISO C code and
+can't be built with the HP bundled compiler. This problem can be
+avoided by not building the Java language. For example, use the
+<samp><span class="option">--enable-languages="c,c++,f77,objc"</span></samp> option in your configure
+command.
+
+ <p>There are several possible approaches to building the distribution.
+Binutils can be built first using the HP tools. Then, the GCC
+distribution can be built. The second approach is to build GCC
+first using the HP tools, then build binutils, then rebuild GCC.
+There have been problems with various binary distributions, so it
+is best not to start from a binary distribution.
+
+ <p>On 64-bit capable systems, there are two distinct targets. Different
+installation prefixes must be used if both are to be installed on
+the same system. The ‘<samp><span class="samp">hppa[1-2]*-hp-hpux11*</span></samp>’ target generates code
+for the 32-bit PA-RISC runtime architecture and uses the HP linker.
+The ‘<samp><span class="samp">hppa64-hp-hpux11*</span></samp>’ target generates 64-bit code for the
+PA-RISC 2.0 architecture.
+
+ <p>The script config.guess now selects the target type based on the compiler
+detected during configuration. You must define <samp><span class="env">PATH</span></samp> or <samp><span class="env">CC</span></samp> so
+that configure finds an appropriate compiler for the initial bootstrap.
+When <samp><span class="env">CC</span></samp> is used, the definition should contain the options that are
+needed whenever <samp><span class="env">CC</span></samp> is used.
+
+ <p>Specifically, options that determine the runtime architecture must be
+in <samp><span class="env">CC</span></samp> to correctly select the target for the build. It is also
+convenient to place many other compiler options in <samp><span class="env">CC</span></samp>. For example,
+<samp><span class="env">CC="cc -Ac +DA2.0W -Wp,-H16376 -D_CLASSIC_TYPES -D_HPUX_SOURCE"</span></samp>
+can be used to bootstrap the GCC 3.3 branch with the HP compiler in
+64-bit K&R/bundled mode. The <samp><span class="option">+DA2.0W</span></samp> option will result in
+the automatic selection of the ‘<samp><span class="samp">hppa64-hp-hpux11*</span></samp>’ target. The
+macro definition table of cpp needs to be increased for a successful
+build with the HP compiler. _CLASSIC_TYPES and _HPUX_SOURCE need to
+be defined when building with the bundled compiler, or when using the
+<samp><span class="option">-Ac</span></samp> option. These defines aren't necessary with <samp><span class="option">-Ae</span></samp>.
+
+ <p>It is best to explicitly configure the ‘<samp><span class="samp">hppa64-hp-hpux11*</span></samp>’ target
+with the <samp><span class="option">--with-ld=...</span></samp> option. This overrides the standard
+search for ld. The two linkers supported on this target require different
+commands. The default linker is determined during configuration. As a
+result, it's not possible to switch linkers in the middle of a GCC build.
+This has been reported to sometimes occur in unified builds of binutils
+and GCC.
+
+ <p>A recent linker patch must be installed for the correct operation of
+GCC 3.3 and later. <code>PHSS_26559</code> and <code>PHSS_24304</code> are the
+oldest linker patches that are known to work. They are for HP-UX
+11.00 and 11.11, respectively. <code>PHSS_24303</code>, the companion to
+<code>PHSS_24304</code>, might be usable but it hasn't been tested. These
+patches have been superseded. Consult the HP patch database to obtain
+the currently recommended linker patch for your system.
+
+ <p>The patches are necessary for the support of weak symbols on the
+32-bit port, and for the running of initializers and finalizers. Weak
+symbols are implemented using SOM secondary definition symbols. Prior
+to HP-UX 11, there are bugs in the linker support for secondary symbols.
+The patches correct a problem of linker core dumps creating shared
+libraries containing secondary symbols, as well as various other
+linking issues involving secondary symbols.
+
+ <p>GCC 3.3 uses the ELF DT_INIT_ARRAY and DT_FINI_ARRAY capabilities to
+run initializers and finalizers on the 64-bit port. The 32-bit port
+uses the linker <samp><span class="option">+init</span></samp> and <samp><span class="option">+fini</span></samp> options for the same
+purpose. The patches correct various problems with the +init/+fini
+options, including program core dumps. Binutils 2.14 corrects a
+problem on the 64-bit port resulting from HP's non-standard use of
+the .init and .fini sections for array initializers and finalizers.
+
+ <p>Although the HP and GNU linkers are both supported for the
+‘<samp><span class="samp">hppa64-hp-hpux11*</span></samp>’ target, it is strongly recommended that the
+HP linker be used for link editing on this target.
+
+ <p>At this time, the GNU linker does not support the creation of long
+branch stubs. As a result, it can't successfully link binaries
+containing branch offsets larger than 8 megabytes. In addition,
+there are problems linking shared libraries, linking executables
+with <samp><span class="option">-static</span></samp>, and with dwarf2 unwind and exception support.
+It also doesn't provide stubs for internal calls to global functions
+in shared libraries, so these calls can't be overloaded.
+
+ <p>The HP dynamic loader does not support GNU symbol versioning, so symbol
+versioning is not supported. It may be necessary to disable symbol
+versioning with <samp><span class="option">--disable-symvers</span></samp> when using GNU ld.
+
+ <p>POSIX threads are the default. The optional DCE thread library is not
+supported, so <samp><span class="option">--enable-threads=dce</span></samp> does not work.
+
+ <p><hr />
+
+<h3 class="heading"><a name="TOC16"></a><a name="x_002dx_002dlinux_002dgnu"></a>*-*-linux-gnu</h3>
+
+<p>Versions of libstdc++-v3 starting with 3.2.1 require bug fixes present
+in glibc 2.2.5 and later. More information is available in the
+libstdc++-v3 documentation.
+
+ <p><hr />
+
+<h3 class="heading"><a name="TOC17"></a><a name="ix86_002dx_002dlinux"></a>i?86-*-linux*</h3>
+
+<p>As of GCC 3.3, binutils 2.13.1 or later is required for this platform.
+See <a href="http://gcc.gnu.org/PR10877">bug 10877</a> for more information.