powerpc/boot: Disable power10 features after BOOTAFLAGS assignment
authorNathan Chancellor <nathan@kernel.org>
Thu, 27 Apr 2023 19:34:53 +0000 (12:34 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 12 May 2023 06:20:18 +0000 (16:20 +1000)
commit2b694fc96fe33a7c042e3a142d27d945c8c668b0
treee80ff742396c4b3837b40458f69b20da3a9afd62
parent66b2ca086210732954a7790d63d35542936fc664
powerpc/boot: Disable power10 features after BOOTAFLAGS assignment

When building the boot wrapper assembly files with clang after
commit 648a1783fe25 ("powerpc/boot: Fix boot wrapper code generation
with CONFIG_POWER10_CPU"), the following warnings appear for each file
built:

  '-prefixed' is not a recognized feature for this target (ignoring feature)
  '-pcrel' is not a recognized feature for this target (ignoring feature)

While it is questionable whether or not LLVM should be emitting a
warning when passed negative versions of code generation flags when
building assembly files (since it does not emit a warning for the
altivec and vsx flags), it is easy enough to work around this by just
moving the disabled flags to BOOTCFLAGS after the assignment of
BOOTAFLAGS, so that they are not added when building assembly files.
Do so to silence the warnings.

Fixes: 648a1783fe25 ("powerpc/boot: Fix boot wrapper code generation with CONFIG_POWER10_CPU")
Link: https://github.com/ClangBuiltLinux/linux/issues/1839
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230427-remove-power10-args-from-boot-aflags-clang-v1-1-9107f7c943bc@kernel.org
arch/powerpc/boot/Makefile