GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
ada

Fix light runtime configurations in Ada by moving code

This commit resolves a dependency issue in Ada's light runtime configurations by moving environment-related code from `argv.c` to `env.c`.

This commit addresses a dependency issue that arose in Ada’s light runtime configurations. A recent change introduced a dependency from argv.c (command-line argument processing) to env.c (environment variable handling). This broke configurations that support command-line arguments but not environment variables. The fix moves the environment-related code from argv.c to env.c, restoring functionality to these configurations.

In Details

The commit moves __gnat_env_count, __gnat_len_env, and __gnat_fill_env functions from argv.c to env.c. This resolves a dependency issue that surfaced in "light" runtime configurations where command-line argument support is present without full environment variable support. This is a targeted fix for a specific configuration scenario.

For Context

This commit relates to the Ada runtime library, which provides essential functions for Ada programs. 'Light' runtime configurations are designed for systems with limited resources, such as embedded systems. These configurations may not support all features of the full runtime library, such as environment variables. This commit fixes a problem that arose when code related to environment variables was inadvertently made a dependency for command-line argument processing, breaking these light runtime configurations.

Filed Under: adaruntimeconfiguration