-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"'-pcrel' / '-prefixed' is not a recognized feature for this target" when building .S files #1839
Comments
If clang takes -mno-vsx and other code generation options then it seems consistent to not warn with these new options either. In any case thanks for the fix, that should get it working. |
I agree.
I will wait a few days to see if the LLVM folks have any comments on this issue. If not, I'll send that patch along as a quick fix, although I see there is some discussion on the linuxppc issue linked above that may end up superseding that fix, so I will keep an eye on it before sending the patch. |
Thanks, I posted something to the list, but mpe might prefer your minimal fix at least to start with, so feel free to post your patch to the linuxppc list as an alternative. I found a couple more issues with llvm with the pcrel code model when doing that. I've opened llvm issues for them, do you like to open issues to mirror such issues here? |
Thanks, I assume that is this series? https://lore.kernel.org/20230426055848.402993-1-npiggin@gmail.com/ I think patches 3-5 could easily be taken as fixes at some point during the 6.4 cycle and even if they have to wait for 6.5, I do not think that it is the end of the world. The warning is a little annoying but it is not breaking the build and your series is a better overall fix than mine would be so I think we can just let that play out. Worst case, I will send my fix in a few weeks if there is no movement on that series :)
Thanks, looks like these ones? llvm/llvm-project#62372 I do not think we need to mirror them here, we only tend to do that when the issue was first opened and triaged here but needs to be resolved by others on the LLVM side, unless others have a different opinion :) Thanks a lot for taking the time to test with LLVM and report those, it is much appreciated! |
Yes.
Thinking about it a bit more, yours is the correct minimal fix for the recent commit 648a178, which is what that change should have been, so it's actually better for commit history to put in first even if more changes are coming. Plus mpe won't be happy about making bigger changes here until the next release, so if you could send your patch when you get time would be really good. For the above patch, Reviewed-by: Nicholas Piggin npiggin@gmail.com
Yeah those ones. Okay I we work around them in Linux for now so no problem.
Thank you for helping out with powerpc and making it all work so well. I need to make a point to do more llvm testing especially on build changes.. |
Ack, I have submitted https://lore.kernel.org/20230427-remove-power10-args-from-boot-aflags-clang-v1-1-9107f7c943bc@kernel.org/ with your tag, thanks a lot for the guidance and review! |
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. Cc: stable@vger.kernel.org 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>
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/linux#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
Workaround in mainline: https://git.kernel.org/linus/2b694fc96fe33a7c042e3a142d27d945c8c668b0 |
[ Upstream commit 2b694fc ] 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 Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 2b694fc ] 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 Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 2b694fc ] 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 Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 2b694fc ] 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/linux#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 Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit 2b694fc ] 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/linux#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 Signed-off-by: Sasha Levin <sashal@kernel.org>
BugLink: https://bugs.launchpad.net/bugs/2042884 [ Upstream commit 2b694fc96fe33a7c042e3a142d27d945c8c668b0 ] 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: ClangBuiltLinux/linux#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 Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2042884 [ Upstream commit 2b694fc96fe33a7c042e3a142d27d945c8c668b0 ] 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: ClangBuiltLinux/linux#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 Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
After commit 648a1783fe25 ("powerpc/boot: Fix boot wrapper code generation with CONFIG_POWER10_CPU") in the PowerPC tree, I see:
This appears to occur when
-mno-pcrel
or-mno-prefixed
is passed with-x assembler
:This is easy enough to just work around in the kernel (see diff below, it just moves the flags so that they are not added to
AFLAGS
) but I wonder if LLVM should be warning in this case?cc @mpe @nemanjai
The text was updated successfully, but these errors were encountered: