C, C++, and Fortran in AL2023 - Amazon Linux 2023
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

C, C++, and Fortran in AL2023

AL2023 includes both the GNU Compiler Collection (GCC) and the Clang frontend for LLVM (Low Level Virtual Machine).

The major version of GCC will remain constant throughout the life time of AL2023. Minor releases bring bug fixes and might be included in AL2023 releases. Other bug, performance, and security fixes might be backported to the major version of GCC that ships in AL2023.

AL2023 includes version 11 of GCC with the C (gcc), C++ (g++), and Fortran (gfortran) frontends.

AL2023 does not enable the Ada (gnat), Go (gcc-go), Objective-C, or Objective-C++ frontends.

The default compiler flags that AL2023 RPMs are built with include optimization and hardening flags. To build your own code with GCC, we recommend you include optimization and hardening flags.

Note

When gcc --version is invoked, a version string such as gcc (GCC) 11.3.1 20221121 (Red Hat 11.3.1-4) is displayed. Red Hat refers to the GCC vendor branch that the Amazon Linux GCC package is based upon. According to the bug report URL shown by gcc --help, all bug reports and support requests should be directed to Amazon Linux.

For more information about some of the long-term changes in this vendor branch, such as the __GNUC_RH_RELEASE__ macro, see Fedora package sources.

For more information on the core toolchain, see Core toolchain packages glibc, gcc, binutils.

For more information on AL2023 and its relationship to other Linux distributions, see Relationship to Fedora.

For more information on the compiler triplet change in AL2023 compared to AL2, see Compiler Triplet.