Clang build fix for 7.1 #2
Hi Linus,
Please consider pulling this small fix to disable -Wattribute-alias for clang in the few places it is already disabled for GCC, now that tip of tree clang has implemented -Wattribute-alias as GCC has. If you would prefer for this to wait until the next merge window given your recent comments on the 7.1-rc5 announcement, I can resend later. Given how simple it is coupled with just expanding what already exists, I figured it was not unreasonable to send it as a fix now, especially since it is showing up in our stable builds as well.
This has been in -next for several cycles in one form with no reported issues but I updated it yesterday to avoid breaking the build for other versions of clang-23 that do not have this flag implemented, as this can be rough on vendored toolchains or people like myself that have to bisect LLVM between releases and it was rather simple to do with another pragma line.
Please let me know if there are any issues or objections.
Cheers,
Nathan
The following changes since commit 5d6919055dec134de3c40167a490f33c74c12581:
Linux 7.1-rc3 (2026-05-10 14:08:09 -0700)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/nathan/linux.git tags/clang-fixes-7.1-2
for you to fetch changes up to 175db11786bde9061db526bf1ac5107d915f5163:
Disable -Wattribute-alias for clang-23 and newer (2026-05-28 06:51:30 -0700)
----------------------------------------------------------------
Clang build fixes for 7.1 #2
- Account for recently implemented -Wattribute-alias in clang by disabling it in the same places it is disabled for GCC.
----------------------------------------------------------------
Nathan Chancellor (1):
Disable -Wattribute-alias for clang-23 and newer
arch/riscv/include/asm/syscall_wrapper.h | 4 ++++ include/linux/compat.h | 4 ++++ include/linux/compiler-clang.h | 6 ++++++ include/linux/compiler_types.h | 4 ++++ include/linux/syscalls.h | 4 ++++ 5 files changed, 22 insertions(+)
The pull request you sent on Fri, 29 May 2026 14:00:55 -0700:
The pull request you sent on Fri, 29 May 2026 14:00:55 -0700:
Quoted 1 line
https://git.kernel.org/pub/scm/linux/kernel/git/nathan/linux.git tags/clang-fixes-7.1-2
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/77590cacabb3bffba7e2e95c359889bc44241b68
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html