GCC Newspaper
JULY 29, 2026
Date
/
Architectures
Components
Topics
News & Policy
build

Preserve all *_FOR_TARGET environment variables during build configuration.

Build configuration now consistently preserves existing *_FOR_TARGET environment variables.

Previously, some *_FOR_TARGET environment variables were not consistently preserved during the build configuration process, especially when the build and host platforms differed. This change ensures that any user-set *_FOR_TARGET variables (like CC_FOR_TARGET or AS_FOR_TARGET) take precedence over cached or automatically detected tool settings, preventing unexpected overwrites and ensuring build consistency.

In Details

The ACX_CHECK_INSTALLED_TARGET_TOOL macro, used for configuring target tools, incorrectly overwrote certain *_FOR_TARGET environment variables in specific build/host configurations. This commit modifies the macro to ensure that any pre-existing user-defined environment variables are respected, aligning its behavior with the NCN_STRICT_CHECK_TARGET_TOOLS macro and ensuring predictable toolchain configuration.

Filed Under: buildconfigure