All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/4] pass -march= only to compiler
@ 2022-10-14 20:13 ` Nick Desaulniers
  0 siblings, 0 replies; 26+ messages in thread
From: Nick Desaulniers @ 2022-10-14 20:13 UTC (permalink / raw)
  To: Russell King
  Cc: Arnd Bergmann, Ard Biesheuvel, Masahiro Yamada, Linus Walleij,
	linux-arm-kernel, linux-kernel, llvm, Nathan Chancellor,
	Nick Desaulniers

When both -march= and -Wa,-march= are specified for assembler or
assembler-with-cpp sources, GCC and Clang will prefer the -Wa,-march=
value but Clang will warn that -march= is unused.

warning: argument unused during compilation: '-march=armv6k'
[-Wunused-command-line-argument]

This is the top group of warnings we observe when using clang to
assemble the kernel via `ARCH=arm make LLVM=1`.

Arnd sent a v2 of my previous patch
https://lore.kernel.org/linux-arm-kernel/20210928154143.2106903-14-arnd@kernel.org/
I added yet a few more instances I found since then. Nathan pointed out
a new one too that I've fixed since v3.

Fixing this will allow us to enable
-Werror=unused-command-line-argument for clang builds.

v3 had an issue wrt. __thumb2__
https://lore.kernel.org/llvm/CAKwvOdmkd2PxvMUZA=A-72eATGDZkqDj--Bv1W+Xt_K_LWdROA@mail.gmail.com/
I've incorporated idea from Nathan and Ard on that.

Nick Desaulniers (4):
  ARM: remove lazy evaluation in Makefile
  ARM: use .arch directives instead of assembler command line flags
  ARM: only use -mtp=cp15 for the compiler
  ARM: pass -march= only to compiler

 arch/arm/Makefile                   | 78 ++++++++++++++++-------------
 arch/arm/boot/compressed/Makefile   |  1 -
 arch/arm/common/Makefile            |  2 -
 arch/arm/common/mcpm_head.S         |  2 +
 arch/arm/common/vlock.S             |  2 +
 arch/arm/kernel/Makefile            |  2 -
 arch/arm/kernel/hyp-stub.S          |  2 +
 arch/arm/kernel/swp_emulate.c       |  1 +
 arch/arm/lib/Makefile               |  4 --
 arch/arm/lib/delay-loop.S           |  4 ++
 arch/arm/mach-at91/Makefile         |  3 --
 arch/arm/mach-at91/pm_suspend.S     |  4 ++
 arch/arm/mach-imx/Makefile          |  3 --
 arch/arm/mach-imx/headsmp.S         |  2 +
 arch/arm/mach-imx/resume-imx6.S     |  2 +
 arch/arm/mach-imx/suspend-imx6.S    |  2 +
 arch/arm/mach-mvebu/Makefile        |  3 --
 arch/arm/mach-mvebu/coherency_ll.S  |  1 +
 arch/arm/mach-mvebu/pmsu.c          |  1 +
 arch/arm/mach-npcm/Makefile         |  2 -
 arch/arm/mach-npcm/headsmp.S        |  2 +
 arch/arm/mach-tegra/Makefile        |  2 -
 arch/arm/mach-tegra/reset-handler.S |  2 +
 arch/arm/mach-tegra/sleep-tegra20.S |  2 +
 arch/arm/mach-tegra/sleep-tegra30.S |  2 +
 arch/arm/mach-tegra/sleep.S         |  2 +
 arch/arm/mm/Makefile                | 15 ------
 arch/arm/mm/abort-ev6.S             |  1 +
 arch/arm/mm/abort-ev7.S             |  1 +
 arch/arm/mm/cache-v6.S              |  2 +
 arch/arm/mm/cache-v7.S              |  2 +
 arch/arm/mm/cache-v7m.S             |  2 +
 arch/arm/mm/copypage-feroceon.c     |  1 +
 arch/arm/mm/proc-v6.S               |  2 +
 arch/arm/mm/proc-v7-2level.S        |  2 +
 arch/arm/mm/proc-v7.S               |  2 +
 arch/arm/mm/tlb-v6.S                |  2 +
 arch/arm/mm/tlb-v7.S                |  2 +
 drivers/memory/Makefile             |  2 -
 drivers/memory/ti-emif-sram-pm.S    |  1 +
 drivers/soc/bcm/brcmstb/pm/Makefile |  1 -
 drivers/soc/bcm/brcmstb/pm/s2-arm.S |  1 +
 42 files changed, 97 insertions(+), 75 deletions(-)

-- 
2.38.0.413.g74048e4d9e-goog


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2022-11-08 18:41 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-14 20:13 [PATCH v4 0/4] pass -march= only to compiler Nick Desaulniers
2022-10-14 20:13 ` Nick Desaulniers
2022-10-14 20:13 ` [PATCH v4 1/4] ARM: remove lazy evaluation in Makefile Nick Desaulniers
2022-10-14 20:13   ` Nick Desaulniers
2022-10-14 21:18   ` Nathan Chancellor
2022-10-14 21:18     ` Nathan Chancellor
2022-10-14 20:13 ` [PATCH v4 2/4] ARM: use .arch directives instead of assembler command line flags Nick Desaulniers
2022-10-14 20:13   ` Nick Desaulniers
2022-10-14 21:19   ` Nathan Chancellor
2022-10-14 21:19     ` Nathan Chancellor
2022-11-08 18:30   ` Nathan Chancellor
2022-11-08 18:30     ` Nathan Chancellor
2022-11-08 18:37     ` Russell King (Oracle)
2022-11-08 18:37       ` Russell King (Oracle)
2022-11-08 18:40       ` Nathan Chancellor
2022-11-08 18:40         ` Nathan Chancellor
2022-10-14 20:13 ` [PATCH v4 3/4] ARM: only use -mtp=cp15 for the compiler Nick Desaulniers
2022-10-14 20:13   ` Nick Desaulniers
2022-10-14 21:20   ` Nathan Chancellor
2022-10-14 21:20     ` Nathan Chancellor
2022-10-14 20:13 ` [PATCH v4 4/4] ARM: pass -march= only to compiler Nick Desaulniers
2022-10-14 20:13   ` Nick Desaulniers
2022-10-14 21:21   ` Nathan Chancellor
2022-10-14 21:21     ` Nathan Chancellor
2022-10-14 20:16 ` [PATCH v4 0/4] " Nick Desaulniers
2022-10-14 20:16   ` Nick Desaulniers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.