[PATCH] D134671: [Driver] Prevent Mips specific code from claiming -mabi argument on other targets.
Nathan Chancellor via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 3 09:17:22 PDT 2022
nathanchance added a comment.
In D134671#3828197 <https://reviews.llvm.org/D134671#3828197>, @craig.topper wrote:
> In D134671#3824644 <https://reviews.llvm.org/D134671#3824644>, @nickdesaulniers wrote:
>
>> I don't think it's an issue for us to work around downstream, but this did regress support for `-mabi=ms` used in UEFI related build scripts.
>> https://github.com/ClangBuiltLinux/linux/issues/1725
>> Noting it in case others find their way here via bisection. Thanks to @nathanchance for the report.
>
> Is there an expectation that we honor -mabi=ms and something that matches gcc? The original bug report I was fixing was that we silently ignored it.
No, I don't think so. The kernel was checking `-mabi=ms` to check for the existence of `__attribute__((ms_abi))`, which is not as accurate of a check as it could have been, since the kernel has the ability to run small programs during configuration time, which could have just checked for `__attribute__((ms_abi))` directly. The kernel does not use `-mabi=ms` as part of its compiler flags anywhere, it only uses the attribute, so I don't think there is any value to trying to support `-mabi=ms` unless there is another use case for it. We are just going to clean up the `-mabi=ms` check and backport it: https://lore.kernel.org/20220929152010.835906-1-nathan@kernel.org/
> I appears clang 7 did warn for this. clang 8 stopped warning, maybe that's when the Mips code was added. If it was, I don't think it was intentional.
Right, I would agree with that assessment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134671/new/
https://reviews.llvm.org/D134671
More information about the cfe-commits
mailing list