mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Fix Clang 15 compilation errors
- Clang 15 doesn't support `-fno-ipa-sra` anymore. Do a separate check for `-fno-ipa-sra` support by $KERNEL_CC. - Don't enable `-mgeneral-regs-only` for certain module files. Fix #13260 - Scope `GCC diagnostic ignored` statements to GCC only. Clang doesn't need them to compile the code. Porting notes: - Moved the stanzas removing -mgeneral-regs-only to Makefile.in since they wouldn't readily work in Kbuild.in and that did. Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: szubersk <szuberskidamian@gmail.com> Closes #13260 Closes #14150 Closes #14624 Ported-by: Rich Ercolani <rincebrain@gmail.com Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
This commit is contained in:
@@ -225,8 +225,10 @@ __div_u64(uint64_t u, uint32_t v)
|
||||
* replacements for libgcc-provided functions and will never be called
|
||||
* directly.
|
||||
*/
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Implementation of 64-bit unsigned division for 32-bit machines.
|
||||
@@ -425,7 +427,9 @@ __aeabi_ldivmod(int64_t u, int64_t v)
|
||||
EXPORT_SYMBOL(__aeabi_ldivmod);
|
||||
#endif /* __arm || __arm__ */
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif /* BITS_PER_LONG */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user