Skip to content

Commit 2b694fc

Browse files
nathanchancempe
authored andcommitted
powerpc/boot: Disable power10 features after BOOTAFLAGS assignment
When building the boot wrapper assembly files with clang after commit 648a178 ("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: 648a178 ("powerpc/boot: Fix boot wrapper code generation with CONFIG_POWER10_CPU") Link: ClangBuiltLinux#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
1 parent 66b2ca0 commit 2b694fc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arch/powerpc/boot/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ endif
3434

3535
BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
3636
-fno-strict-aliasing -O2 -msoft-float -mno-altivec -mno-vsx \
37-
$(call cc-option,-mno-prefixed) $(call cc-option,-mno-pcrel) \
38-
$(call cc-option,-mno-mma) \
3937
$(call cc-option,-mno-spe) $(call cc-option,-mspe=no) \
4038
-pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
4139
$(LINUXINCLUDE)
@@ -71,6 +69,10 @@ BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -nostdinc
7169

7270
BOOTARFLAGS := -crD
7371

72+
BOOTCFLAGS += $(call cc-option,-mno-prefixed) \
73+
$(call cc-option,-mno-pcrel) \
74+
$(call cc-option,-mno-mma)
75+
7476
ifdef CONFIG_CC_IS_CLANG
7577
BOOTCFLAGS += $(CLANG_FLAGS)
7678
BOOTAFLAGS += $(CLANG_FLAGS)

0 commit comments

Comments
 (0)