Landing: c1ac0abefe57

Project / Subsystem

gcc / ada

Date

2026-05-01

Author

Eric Botcazou

Commit

c1ac0abefe574cda048760b4540bb12097fe0876

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
ada
patch_id
commit_hash
c1ac0abefe574cda048760b4540bb12097fe0876
source_type
github
headline
Link with PIC Static Ada Runtime When -pie Is Specified
tldr
The Ada compiler now correctly links with the position-independent code (PIC) static runtime when the `-pie` flag is used for building executables.
author
Eric Botcazou
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • ada
  • linker
  • security
  • pie
  • code generation
discussion_id_link
bugzilla_pr
date
2026-05-01T00:00:00.000Z

This commit modifies the Ada compiler to ensure it links with the correct static runtime library when building position-independent executables (PIE). When the -pie flag is specified, the compiler will now append _pic to the name of the static Ada runtime library, ensuring that the position-independent version is used. This fix is necessary for building secure and relocatable executables.