GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
ada

Ada: Pass GNATMAKE_FOR_BUILD directly to sub-makes

Fixes the Ada toolchain's build system to correctly propagate the GNATMAKE_FOR_BUILD variable.

The Ada toolchain’s build system incorrectly handled the GNATMAKE_FOR_BUILD Makefile variable. Instead of passing it directly to sub-makes, it was exported for sub-configures, leading to incorrect build behavior. This change modifies the Makefiles to ensure GNATMAKE_FOR_BUILD is passed directly as intended, resolving build issues related to this variable.

In Details

The GNAT build system uses Makefiles to manage the compilation of Ada projects. The GNATMAKE_FOR_BUILD variable specifies the GNATmake executable to use during the build process, especially for cross-compilation. This commit adjusts Makefile.def, Makefile.tpl, and Makefile.in to ensure GNATMAKE_FOR_BUILD is passed directly to recursive make invocations (sub-makes) rather than being exported as an environment variable for configuration steps. This aligns with the intended mechanism for propagating build-time tools.

For Context
GNATMAKE
The build tool for Ada projects using the GNAT compiler. It automates the compilation and linking process.
Makefile
A file containing rules for the make utility, used to automate the build process of software projects.
sub-make
A recursive invocation of the make command from within another make process, typically used for building subdirectories or components of a larger project.
Filed Under: adabuild system