GCC Upgrades and ABI Migration
Why moving a fleet from GCC 9 to GCC 14 is a platform migration and not a version bump: the libstdc++ dual ABI, warnings promoted to errors, changed language defaults, and a staged rollout that does not strand production.
Overview
A compiler upgrade is a platform migration
The task 'Manage and upgrade GCC compiler toolchains, ensuring compatibility and optimal performance across platforms' describes a platform migration, not a package update. In a large C++ estate the compiler is the most load-bearing dependency: every binary, static library, vendor .so and container image encodes assumptions about it.
Key concepts
- Dual ABI (_GLIBCXX_USE_CXX11_ABI)
- std::__cxx11 and abi_tag
- GLIBCXX_3.4.x version node
- Warnings promoted to errors
- Side-by-side toolchains
- abidiff and abi-compliance-checker
- Canary target
- Dual-build window
Interview questions
- A build fails with: undefined reference to foo(std::__cxx11::basic_string, std::allocator > const&). Explain exactly what happened and give three ways to fix it.
- Your organisation is moving from GCC 9 to GCC 14 across roughly 300 repositories. Design the rollout.
- After the upgrade, one service is 12 percent slower. Walk me through diagnosing it, including how you would bisect a suspected compiler regression.
- What are the rules for mixing translation units and prebuilt third-party binaries built with different GCC versions?
- How do you verify that a shared library you maintain is still ABI-compatible after a toolchain upgrade or a source change?
- How do you run two GCC toolchains side by side, and what makes a build reproducible across them?
Sign up free to read the full topic
More DevOps topics
Start free on Cariara · Coding problems · System design studio