GCC ELF-compatible compilers

Notes: Start of change
  • GCC 4.1 is no longer supported as of June 30, 2018.
  • GCC 4.6 is no longer supported as of August 3, 2023.
End of change

For the GNU Compiler Collection (GCC) executable and linking format (ELF)-compatible compilers, the z/TPF system supports a staged approach to upgrading your compiler.

Start of changeFor example, assume both GCC 4.6 and GCC 7 are still supported. To migrate to a new version of the compiler, you can have a combination of the following compiled product and application code levels:End of change
  • Continue with all product and application code compiled with GCC 4.6.
  • Compile all product code with GCC 7, with some applications compiled with GCC 4.6 and some applications compiled with GCC 7.
  • Compile all product and application code with GCC 7.

All of the combinations assume that you installed all of the compiler-related APARs for the z/TPF system.

GCC 4.6 only

Apply the APARs for GCC 7 support even if you do not intend to use GCC 7 at this time. Applying the APARs means that your z/TPF system remains current while you avoid recompiling your product and application code. You do not need to do anything else to continue using GCC 4.6 until you are ready to install and use the GCC 7 compiler.

GCC 7 only

Using the GCC 7 compiler exclusively involves installing the compiler-related APARs, getting and installing the GCC 7 compiler, and rebuilding your product and application code with the GCC 7 compiler.

To use the GCC 7 compiler exclusively, complete the following steps:
  1. Install the compiler-related APARs
  2. Get and install the GCC 7 compiler
  3. Optional: Rebuild your product and application code with the GCC 7 compiler as needed

Mixed-mode GCC 7 and GCC 4.6

After you install the z/TPF system APARs that are associated with GCC 7, you can get and install the GCC 7 compiler and rebuild your product code. You can start getting some of the benefit from GCC 7 by compiling some application code with GCC 7 even while some application objects and CSOs remain compiled with GCC 4.6. For example, you might choose to use the GCC 7 compiler for all future compiles while you continue to run with objects and CSOs that were built with the GCC 4.6 compiler. That is, a C/C++ program that was built and linked by using the GCC 7 compiler can call a function in a library that contains C/C++ code that was built with the GCC 4.6 compiler. This is possible because there is no change to the application binary interface (ABI) between the two versions of the GCC compiler used by the MakeTPF tools by default.

When you want to start using the GCC 7 compiler, rebuild all z/TPF product C and C++ code with the GCC 7 compiler before using the compiler with any C/C++ applications. Rebuilding all z/TPF C and C++ product code is not required, but is encouraged to help in problem reporting for the z/TPF system. At a minimum, several archive libraries and z/TPF module CPP1 must be rebuilt with the GCC 7 compiler and loaded before any other C/C++ product or application code built with the GCC 7 compiler is loaded.

For more information about the GCC compilers, see the GCC website.