-
Notifications
You must be signed in to change notification settings - Fork 15
LLVM commit a79995ca6004 breaks as-instr and as-option for ARCH=arm on older kernels #1878
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
Comments
The LLVM integrated assembler does not handle |
Thanks, llvm/llvm-project@fe5bab5 helps avoid this issue when using the integrated assembler but it does not appear to resolve the issue when using
|
Sorry for missing the notification. I don't have a good personal filtering system for https://github.com/notifications and it is full of items (mostly llvm-project issues), so I easily miss notifications that I should pay attention to...
Sent https://reviews.llvm.org/D154736 to downgrade the error to |
Previously, Clang Driver reported a warning when assembler input was assembled with the -mabi= option. D152856 added TargetSpecific to -mabi= option and reported an error for such a case. This change restores the previous behavior by reporting a warning. GCC translates -mabi={apcs-gnu,atpcs} to gas -meabi=gnu and other -mabi= values to -meabi=5. We don't support setting e_flags to any value other than EF_ARM_EABI_VER5. Close ClangBuiltLinux/linux#1878 Reviewed By: michaelplatings Differential Revision: https://reviews.llvm.org/D153691
Previously, Clang Driver reported a warning when assembler input was assembled with the -mabi= option. D152856 added TargetSpecific to -mabi= option and reported an error for such a case. This change restores the previous behavior by reporting a warning. GCC translates -mabi={apcs-gnu,atpcs} to gas -meabi=gnu and other -mabi= values to -meabi=5. We don't support setting e_flags to any value other than EF_ARM_EABI_VER5. Close ClangBuiltLinux/linux#1878 Reviewed By: michaelplatings Differential Revision: https://reviews.llvm.org/D153691
…ted-as Similar to D153691, but for `-x assembler -fno-integrated-as`. Close ClangBuiltLinux/linux#1878 Reviewed By: michaelplatings Differential Revision: https://reviews.llvm.org/D154736
CI reports several build failures due to the
smc
instruction when buildingARCH=arm multi_v7_defconfig
with LLVM 17 onlinux-5.4.y
and earlier.https://github.com/ClangBuiltLinux/continuous-integration2/actions/runs/5306568615/jobs/9604484659
I bisected this to llvm/llvm-project@a79995c:
Comparing the command of
drivers/firmware/qcom_scm-32.o
before and after the change reveals-DREQUIRES_SEC
is getting dropped:Dumping the
as-instr
invocation fromdrivers/firmware/Makefile
reveals:-mabi=aapcs-linux
is added to bothKBUILD_CFLAGS
andKBUILD_AFLAGS
but it errors with-x assembler
, whichas-instr
andas-option
use on older kernels, whereas the actual.S
build step will use-x assembler-with-cpp
internally.The error above is not visible with 5.10 and newer due to commit 0224898152bd ("firmware: qcom_scm-32: Use SMC arch wrappers"), which may be backportable as a solution to that one error. As mentioned above, there are other errors on older branches for similar reasons, so it may be better to fix this in a more universal way.
We may be able to move older releases to using
-x assembler-with-cpp
like we have with newer versions:But I see another internal error on 5.4, there must have been some additional Kbuild refactoring done at some point to avoid this on newer releases:
which comes from
-include asm/unified.h
inarch/arm/Makefile
'sKBUILD_AFLAGS
. I will continue to look at ways to workaround this on the Linux side but it would be nice if-mabi=
would not error with-x assembler
in the first place, although I understand the error is pointing out that the flag does nothing for that particular target (even though GCC won't warn).cc @MaskRay
The text was updated successfully, but these errors were encountered: