# Optimize performance using Link-Time Optimization with GCC

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/servers-and-cloud-computing/gcc-lto/)
- [An LTO Primer](https://learn.arm.com/learning-paths/servers-and-cloud-computing/gcc-lto/background/)
- [Deploying LTO](https://learn.arm.com/learning-paths/servers-and-cloud-computing/gcc-lto/request-lto/)
- [Potential Gains](https://learn.arm.com/learning-paths/servers-and-cloud-computing/gcc-lto/performance-uplift/)
- [Next Steps](https://learn.arm.com/learning-paths/servers-and-cloud-computing/gcc-lto/_next-steps/)

## About this Learning Path

|  |  |
| --- | --- |
| Skill level: | Introductory |
| Reading time: | 15 min |
| Last updated: | 12 Nov 2026 |

|  |  |
| --- | --- |
| Author: | Victor Do Nascimento , Arm |
| Arm IP: | [Neoverse](https://support.arm.com/?tab=compute-ip&Product%20Type=Infrastructure%20Processors) [Cortex-A](https://support.arm.com/?tab=compute-ip&Product%20Type=Application%20Processors) |
| Tags: | [Performance and Architecture](https://learn.arm.com/tag/performance-and-architecture/) [Arm AGI CPU](https://learn.arm.com/tag/arm-agi-cpu) [AWS Graviton](https://learn.arm.com/tag/aws-graviton) [Microsoft Azure Cobalt](https://learn.arm.com/tag/microsoft-azure-cobalt) [Google Axion](https://learn.arm.com/tag/google-axion) [Linux](https://learn.arm.com/tag/linux) [GCC](https://learn.arm.com/tag/gcc) |

### Who is this for?
This is an introductory topic for developers who want to improve application performance using link-time optimization (LTO) with the GCC toolchain.

### What will you learn?
After completing this Learning Path, you'll be able to perform the following tasks:
- Understand how LTO works and when to apply it.
- Enable and configure LTO with GCC compiler flags.
- Evaluate the performance and code size trade-offs of LTO.

### Prerequisites
Before starting, you'll need the following prerequisites:
- An Arm-based Linux system (cloud-hosted, virtualized, or on-premise), including Arm AGI CPU-based systems.
- A recent version of the [GCC toolchain](https://learn.arm.com/install-guides/gcc/).

### Summary
You’ll explore LTO with GCC on Arm Linux systems. First, you’ll enable LTO with the `-flto` flag during compilation and linking, then inspect how GCC performs whole-program optimization. You’ll compare runtime and binary size before and after LTO, using SPEC CPU2017 integer rate as a reference.
