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

Replace HAVE_GNU_LD with HAVE_LD_AT_FILE for response file support

Replaces the generic HAVE_GNU_LD check with a specific HAVE_LD_AT_FILE check for linker response file support.

The HAVE_GNU_LD macro, which was only used to determine if the linker supports GNU-style response files (@file), has been replaced by a dedicated configure test HAVE_LD_AT_FILE. This change makes the build system’s logic more precise by directly checking for the desired functionality rather than relying on a broader linker identification.

In Details

The HAVE_GNU_LD preprocessor macro, previously serving as a proxy for linker response file support (i.e., @file option handling in collect2.cc and ada/link.c), has been removed. A new, specific configure check, HAVE_LD_AT_FILE, now directly assesses this capability. This change decouples the response file detection from the broader GNU linker identification, offering a cleaner and more targeted build configuration.

For Context
HAVE_GNU_LD
A preprocessor macro used in GCC's source code to indicate whether the build system has detected GNU ld or a compatible linker. Its use has been reduced as more specific checks are introduced.
response file
A text file containing command-line arguments that can be passed to a program, typically a compiler or linker. This is useful for commands with a very large number of arguments that exceed the operating system's command-line length limit. GNU linkers often accept response files prefixed with '@'.
HAVE_LD_AT_FILE
A new configure-defined macro that specifically checks if the target linker supports response files (arguments passed via a file).
collect2.cc
A source file in GCC that contains the code for collect2, a helper program used by the linker driver to resolve symbols and perform other link-time operations.
Filed Under: buildlinkerconfigure