Linux: unsupported argument '-W' to option 'Wa,'

Created on 22 Sep 2019  路  6Comments  路  Source: ClangBuiltLinux/linux

I'm trying to compile arm32_v5/arm32_v6/arm32_v7 kernel using AS=clang (integrated-as in being used). The following error message is produced when compiling scripts/mod/empty.o:

clang: error: unsupported argument '-W' to option 'Wa,'

This argument is added here:
https://github.com/ClangBuiltLinux/linux/blob/b08918fb3f27d1843152986e6bc79ec723dba8cc/arch/arm/Makefile#L116
The compilation continues without error if the option is removed:

--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -113,7 +113,7 @@ CFLAGS_ABI  +=-funwind-tables
 endif

 # Accept old syntax despite ".syntax unified"
-AFLAGS_NOWARN  :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W)
+AFLAGS_NOWARN  :=$(call as-option,-Wa$(comma)-mno-warn-deprecated)

 ifeq ($(CONFIG_THUMB2_KERNEL),y)
 CFLAGS_ISA :=-mthumb -Wa,-mimplicit-it=always $(AFLAGS_NOWARN)
[ARCH] arm32 [BUG] llvm [FIXED][LLVM] 10 [TOOL] integrated-as

All 6 comments

What should -W do when passed to the assembler?

From man page of GNU as:

       -W
       --no-warn
           Suppress warning messages.

That sounds useful to implement in Clang.

def massembler_no_warn : Flag<["-"], "massembler-no-warn">,
205: HelpText<"Make assembler not emit warnings">;
Seems we could simply add -W as an alis for this option in llvm.

fixed in r374834

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tpgxyz picture tpgxyz  路  4Comments

nickdesaulniers picture nickdesaulniers  路  5Comments

nathanchance picture nathanchance  路  4Comments

nathanchance picture nathanchance  路  3Comments

nickdesaulniers picture nickdesaulniers  路  4Comments