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 AL2 - Amazon Linux 2

C, C++, and Fortran in AL2

AL2 includes both the GNU Compiler Collection (GCC) and the Clang frontend for LLVM.

The major version of GCC will remain constant throughout the lifetime of AL2. Bug and security fixes might be backported to the major version of GCC that ships in AL2.

By default, AL2 includes version 7.3 of GCC which builds almost all packages. The gcc10 package makes GCC 10 available to a limited extent, but we don't recommend using GCC 10 to build packages.

The default compiler flags that build AL2 RPMs include some optimization and hardening flags. We recommend that you include some optimization and hardening flags if you are building your own code with GCC.

The default compiler and optimization flags in AL2023 improve upon what is present in AL2.

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