Open broonie opened 1 year ago
reminds me of: commit 03cab65a07e0 ("selftests/futex: fix build for clang")
Yes, that's basically the issue and roughly the fix I have - I mostly filed this because it seems like something that'll come up again and something that LLVM really ought to cope with. Still have another build issue in the signal tests but I'll send what I've got tomorrow either fixing or reporting that.
The problem here seems architecture neutral, just passing a header on the command line ought to trigger it, and I'm mainly reporting it because it looks like something clang should cope with.
Upstream shouldn't be affected once https://lore.kernel.org/r/20230111-arm64-kselftest-clang-v1-3-89c69d377727@kernel.org is applied. Like I say it still feels like something the compiler should cope with though.
When attempting to build the arm64 selftests with LLVM:
clang gets upset:
which is happening because the Makefile uses a dependency rule which includes the headers as deps to ensure appropriate autobuilding but also results in the headers being passed into clang as targets:
This is not the most elegant thing but has an obvious meaning (the header files should build as C files), is accepted by GCC and while this Makefile does not fill me with joy it does seem like the compiler should work here.
(there are other errors currently with the arm64 selftests but I've got patches for the rest already).