Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

C, C++, and Fortran in AL2023 - Amazon Linux 2023

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.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.