* [PATCH] powerpc/boot: Disable power10 features after BOOTAFLAGS assignment
@ 2023-04-27 19:34 Nathan Chancellor
2023-07-03 5:21 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2023-04-27 19:34 UTC (permalink / raw)
To: mpe
Cc: trix, llvm, ndesaulniers, patches, Nathan Chancellor, npiggin,
stable, linuxppc-dev
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.
Cc: stable@vger.kernel.org
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>
---
I do not think that 648a1783fe25 is truly to blame for this but the
Fixes tag will help the stable team ensure that this change gets
backported with 648a1783fe25. This is the minimal fix for the problem
but the true fix is separating AFLAGS and CFLAGS, which should be done
by this in-flight series by Nick:
https://lore.kernel.org/20230426055848.402993-1-npiggin@gmail.com/
---
arch/powerpc/boot/Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 85cde5bf04b7..771b79423bbc 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -34,8 +34,6 @@ endif
BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -O2 -msoft-float -mno-altivec -mno-vsx \
- $(call cc-option,-mno-prefixed) $(call cc-option,-mno-pcrel) \
- $(call cc-option,-mno-mma) \
$(call cc-option,-mno-spe) $(call cc-option,-mspe=no) \
-pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
$(LINUXINCLUDE)
@@ -71,6 +69,10 @@ BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -nostdinc
BOOTARFLAGS := -crD
+BOOTCFLAGS += $(call cc-option,-mno-prefixed) \
+ $(call cc-option,-mno-pcrel) \
+ $(call cc-option,-mno-mma)
+
ifdef CONFIG_CC_IS_CLANG
BOOTCFLAGS += $(CLANG_FLAGS)
BOOTAFLAGS += $(CLANG_FLAGS)
---
base-commit: 169f8997968ab620d750d9a45e15c5288d498356
change-id: 20230427-remove-power10-args-from-boot-aflags-clang-268c43e8c1fc
Best regards,
--
Nathan Chancellor <nathan@kernel.org>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/boot: Disable power10 features after BOOTAFLAGS assignment
2023-04-27 19:34 [PATCH] powerpc/boot: Disable power10 features after BOOTAFLAGS assignment Nathan Chancellor
@ 2023-07-03 5:21 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2023-07-03 5:21 UTC (permalink / raw)
To: Nathan Chancellor
Cc: trix, llvm, ndesaulniers, patches, npiggin, stable, linuxppc-dev
On Thu, 27 Apr 2023 12:34:53 -0700, Nathan Chancellor wrote:
> 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)
>
> [...]
Applied to powerpc/fixes.
[1/1] powerpc/boot: Disable power10 features after BOOTAFLAGS assignment
https://git.kernel.org/powerpc/c/2b694fc96fe33a7c042e3a142d27d945c8c668b0
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-03 5:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-27 19:34 [PATCH] powerpc/boot: Disable power10 features after BOOTAFLAGS assignment Nathan Chancellor
2023-07-03 5:21 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).