[PATCH 13/14] ARM: use .arch directives instead of assembler command line flags
Nathan Chancellor
nathan at kernel.org
Fri Jan 21 14:17:43 PST 2022
Hi Arnd,
On Tue, Sep 28, 2021 at 05:41:42PM +0200, Arnd Bergmann wrote:
> From: Nick Desaulniers <ndesaulniers at google.com>
>
> Similar to commit a6c30873ee4a ("ARM: 8989/1: use .fpu assembler
> directives instead of assembler arguments").
>
> GCC and GNU binutils support setting the "sub arch" via -march=,
> -Wa,-march, target function attribute, and .arch assembler directive.
>
> Clang's integrated assembler does not support -Wa,-march (and the logic
> to overrule one when multiple of the above are used), and this can
> cause annoying warnings such as:
>
> clang: warning: argument unused during compilation: '-march=armv6k' [-Wunused-command-line-argument]
> clang: warning: argument unused during compilation: '-march=armv6k' [-Wunused-command-line-argument]
> clang: warning: argument unused during compilation: '-march=armv6k' [-Wunused-command-line-argument]
>
> Since most assembler is non-conditionally assembled with one sub arch
> (modulo arch/arm/delay-loop.S which conditionally is assembled as armv4
> based on CONFIG_ARCH_RPC, and arch/arm/mach-at91/pm-suspend.S which is
> conditionally assembled as armv7-a based on CONFIG_CPU_V7), prefer the
> .arch assembler directive.
>
> Link: https://bugs.llvm.org/show_bug.cgi?id=48894
> Link: https://github.com/ClangBuiltLinux/linux/issues/1195
> Suggested-by: Arnd Bergmann <arnd at arndb.de>
> Signed-off-by: Nick Desaulniers <ndesaulniers at google.com>
> [arnd] add a few more instances found in compile testing
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>
Did anything ever come of this patch (or series)? I would like to add
-Werror=unused-command-line-argument to CLANG_FLAGS so that invalid
flags will not cause cascading cc-option failures but we cannot not do
that until this is resolved.
Cheers,
Nathan
More information about the linux-arm-kernel
mailing list