Fixes PR57976.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Driver/Driver.cpp | ||
---|---|---|
636–637 | Would it make more sense to move this into the if? It makes the diff bigger since everything inside has to be reindented, but only querying the flag if target is MIPS seems cleaner to me than the noclaim+a->claim approach. | |
660–661 | Don't we have the same problem here? |
clang/test/Driver/mabi.c | ||
---|---|---|
2 | -target is legacy. Use --target= |
clang/lib/Driver/Driver.cpp | ||
---|---|---|
636–637 | I wasn't sure if I should expect someone might want to add another target. I'll change it. |
Address review comments.
I didn't test the -march because all of the target I'm familiar with use -march.
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.
If that's intentional, should we call this out as a potentially breaking change in the release notes and post an announcement?
I feel that this is still a minor issue. If we consider this as potentially breaking change, then we'd add many many driver changes as potentially breaking.
I think we should wait for more evidence.
Perfect, thank you for verifying! (That's my intuition as well, but I was on the fence and wondering if my intuition was wrong.)
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.
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.
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.
clang-format not found in user’s local PATH; not linting file.