Remove HAVE_GNU_AS: Adjust for GCN assembler ('llvm-mc')
GCC's GCN target now correctly uses 'llvm-mc' as its assembler, resolving issues with the '-v' driver option.
This commit adjusts GCC’s configuration to properly handle the GCN target, which uses LLVM’s ‘llvm-mc’ as its assembler instead of GNU’s as. A previous commit removed the HAVE_GNU_AS check without accounting for this GCN-specific assembler setup. Consequently, GCC incorrectly passed the ‘-v’ driver option to ‘llvm-mc’, causing assembly failures and test regressions. The fix defines ASM_V_SPEC for the GCN target to prevent this incorrect option forwarding.
In Details
This change addresses a regression caused by the removal of HAVE_GNU_AS in commit e08a7f620c037275e2c1c5940b56b536077cd98b. The GCN backend uses 'llvm-mc' as its assembler, which does not support the '-v' option that GCC's driver automatically passes. Previously, HAVE_GNU_AS was used to conditionally define ASM_V_SPEC. Now, ASM_V_SPEC is explicitly defined for gcc/config/gcn/gcn.h to prevent '-v' from being passed to 'llvm-mc', thus fixing driver test failures.
- Assembler
- A program that translates assembly language code into machine code. GCC uses various assemblers, including GNU's
asand LLVM'sllvm-mc. - GCN
- Graphics Core Next. An old AMD GPU architecture. GCC has a backend for compiling code targeting GCN GPUs.
- llvm-mc
- The LLVM assembler. It's a component of the LLVM toolchain used to assemble LLVM intermediate representation or assembly language into machine code.
- Driver
- The main GCC command-line interface program that orchestrates the compilation, assembly, and linking stages.
- ASM_V_SPEC
- A GCC target-specific specifier that controls options passed to the assembler. This commit defines it for the GCN target to manage assembler command-line arguments.