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

Remove HAVE_GNU_AS, standardize assembler option handling

Removes the HAVE_GNU_AS macro, standardizing assembler option handling via ASM_V_SPEC for consistency across targets.

This commit removes the HAVE_GNU_AS macro and refactors GCC’s driver options to use ASM_V_SPEC for handling assembler flags. This change standardizes how options like -v, -w, and -I are mapped to assembler equivalents across different targets, simplifying the build system and improving consistency, particularly for non-GNU assemblers.

In Details

The HAVE_GNU_AS macro has been eliminated from GCC's driver and configuration files. Its roles in mapping driver options (like -v, -w, -I) to assembler options via asm_options in gcc.cc, and in target-specific configurations such as Darwin, NVPTX, and AIX, are now consolidated under the ASM_V_SPEC macro. This promotes a uniform approach to assembler option handling, reducing special cases and improving maintainability. The Solaris 2 configuration's specific handling of -v and -w has also been migrated to a Solaris-as specific ASM_V_SPEC.

For Context
HAVE_GNU_AS
A macro used in GCC to indicate if the GNU Assembler (gas) is the default or preferred assembler. Its removal streamlines assembler configuration.
ASM_V_SPEC
A driver specification string in GCC used to define how compiler driver options are translated into assembler options. This provides a consistent mechanism across different targets.
spec string
A mechanism within GCC's driver to customize how command-line options are passed to the compiler, assembler, and linker. They are essentially formatted strings that perform substitutions and translations.
assembler
A program that translates assembly language source code into machine code (object code).
IA-64
A 64-bit instruction set architecture developed by Intel, targeting high-performance computing and servers. It was later evolved into the Itanium architecture.
NVPTX
An intermediate representation used by NVIDIA for programming their GPUs. GCC can target NVPTX to generate code for NVIDIA graphics cards.
AIX
Advanced Interactive eXecutive, an operating system developed by IBM for their RS/6000 and other high-end workstations and servers.
Filed Under: buildassemblerconfigure