mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +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. 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
This commit is contained in:
committed by
Brian Behlendorf
parent
3c1e1933b6
commit
fe975048da
@@ -42,6 +42,12 @@ endif
|
||||
asflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_MODULE_CPPFLAGS)
|
||||
ccflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_MODULE_CPPFLAGS)
|
||||
|
||||
ifeq ($(CONFIG_ARM64),y)
|
||||
CFLAGS_REMOVE_zcommon/zfs_fletcher_aarch64_neon.o += -mgeneral-regs-only
|
||||
CFLAGS_REMOVE_zfs/vdev_raidz_math_aarch64_neon.o += -mgeneral-regs-only
|
||||
CFLAGS_REMOVE_zfs/vdev_raidz_math_aarch64_neonx2.o += -mgeneral-regs-only
|
||||
endif
|
||||
|
||||
# Suppress unused-value warnings in sparc64 architecture headers
|
||||
ccflags-$(CONFIG_SPARC64) += -Wno-unused-value
|
||||
|
||||
|
||||
@@ -346,9 +346,11 @@ Q256(size_t bitlen, const uint32_t *data, uint32_t *restrict p)
|
||||
* which only goes over it by a hair (1248 bytes on ARM32).
|
||||
*/
|
||||
#include <sys/isa_defs.h> /* for _ILP32 */
|
||||
#ifdef _ILP32 /* We're 32-bit, assume small stack frames */
|
||||
#if defined(_ILP32) /* We're 32-bit, assume small stack frames */
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic ignored "-Wframe-larger-than="
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__IBMC__) && defined(_AIX) && defined(__64BIT__)
|
||||
static inline size_t
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
* the #pragma here to ignore the warning.
|
||||
*/
|
||||
#if defined(_ILP32) || defined(__powerpc) /* Assume small stack */
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic ignored "-Wframe-larger-than="
|
||||
#endif
|
||||
/*
|
||||
* We're running on 32-bit, don't unroll loops to save stack frame space
|
||||
*
|
||||
|
||||
+2
-1
@@ -197,7 +197,8 @@ l_noret luaD_throw (lua_State *L, int errcode) {
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(HAVE_INFINITE_RECURSION)
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
defined(HAVE_INFINITE_RECURSION)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
||||
@@ -254,8 +254,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.
|
||||
@@ -449,7 +451,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 */
|
||||
|
||||
|
||||
@@ -210,9 +210,13 @@ DEFINE_GEN_METHODS(aarch64_neonx2);
|
||||
* If compiled with -O0, gcc doesn't do any stack frame coalescing
|
||||
* and -Wframe-larger-than=1024 is triggered in debug mode.
|
||||
*/
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic ignored "-Wframe-larger-than="
|
||||
#endif
|
||||
DEFINE_REC_METHODS(aarch64_neonx2);
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
static boolean_t
|
||||
raidz_will_aarch64_neonx2_work(void)
|
||||
|
||||
Reference in New Issue
Block a user