From: Thomas Schwinge Date: Mon, 18 May 2026 18:10:12 +0000 (+0200) Subject: Remove HAVE_GNU_AS: Adjust for GCN assembler ('llvm-mc') X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3dfe871a2cdc7db2645fcdf21a2ff0c081e051af;p=thirdparty%2Fgcc.git Remove HAVE_GNU_AS: Adjust for GCN assembler ('llvm-mc') Fix-up for commit e08a7f620c037275e2c1c5940b56b536077cd98b "Remove HAVE_GNU_AS", which didn't consider that GCC/GCN is using LLVM's 'llvm-mc' as its assembler. In 'gcc/configure', that one was correctly detected as 'gas=no': # Check if we are using GNU as if not already set. if test -z "$gas"; then if $gcc_cv_as --version 2>/dev/null | grep GNU > /dev/null; then gas=yes else gas=no fi fi ..., so didn't get 'HAVE_GNU_AS' defined. Now we're not handling it specially anymore, so the default 'ASM_V_SPEC' applies, which changes 'gcc/specs': *asm_options: [...] {+%{v} %{w:-W} %{I*}+} [...] ..., and we regress: Running [...]/gcc.misc-tests/options.exp ... [-PASS:-]{+FAIL:+} compiler driver -fdump-ipa-all-address option(s) {+(linker options)+} [-PASS:-]{+FAIL:+} compiler driver -fdump-ipa-all-alias option(s) {+(linker options)+} [...] [-PASS:-]{+FAIL:+} compiler driver -fdump-tree-all-vops option(s) {+(linker options)+} ..., as these test cases invoke GCC with '-v', which now gets forwarded to the GCN assembler ('llvm-mc'), which that one doesn't like: [...] [...]/gcc/as -v [...] as: Unknown command line argument '-v'. Try: '[...]/as --help' as: Did you mean '-I'? compiler exited with status 1 gcc/ * config/gcn/gcn.h (ASM_V_SPEC): Define. --- diff --git a/gcc/config/gcn/gcn.h b/gcc/config/gcn/gcn.h index 3f0dc415cbe..87605edd79c 100644 --- a/gcc/config/gcn/gcn.h +++ b/gcc/config/gcn/gcn.h @@ -84,6 +84,9 @@ extern const struct gcn_device_def { {"arch", "%{!march=*:-march=%(VALUE)}" }, \ {"tune", "%{!mtune=*:-mtune=%(VALUE)}" } +/* Assembler doesn't support '-v' option. */ +#define ASM_V_SPEC "" + /* Default target_flags if no switches specified. */ #ifndef TARGET_DEFAULT #define TARGET_DEFAULT 0