mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-02-21 06:33:29 +03:00

- 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>
49 lines
1.5 KiB
Plaintext
49 lines
1.5 KiB
Plaintext
# When integrated in to a monolithic kernel the spl module must appear
|
|
# first. This ensures its module initialization function is run before
|
|
# any of the other module initialization functions which depend on it.
|
|
ZFS_MODULES += spl/
|
|
ZFS_MODULES += avl/
|
|
ZFS_MODULES += icp/
|
|
ZFS_MODULES += lua/
|
|
ZFS_MODULES += nvpair/
|
|
ZFS_MODULES += unicode/
|
|
ZFS_MODULES += zcommon/
|
|
ZFS_MODULES += zfs/
|
|
ZFS_MODULES += zstd/
|
|
|
|
# The rest is only relevant when run by kbuild
|
|
ifneq ($(KERNELRELEASE),)
|
|
|
|
obj-$(CONFIG_ZFS) := $(ZFS_MODULES)
|
|
|
|
ZFS_MODULE_CFLAGS += -std=gnu99 -Wno-declaration-after-statement
|
|
ZFS_MODULE_CFLAGS += -Wmissing-prototypes
|
|
ZFS_MODULE_CFLAGS += @KERNEL_DEBUG_CFLAGS@ @NO_FORMAT_ZERO_LENGTH@
|
|
|
|
ifneq ($(KBUILD_EXTMOD),)
|
|
zfs_include = @abs_top_srcdir@/include
|
|
ZFS_MODULE_CFLAGS += -include @abs_top_builddir@/zfs_config.h
|
|
ZFS_MODULE_CFLAGS += -I@abs_top_builddir@/include
|
|
else
|
|
zfs_include = $(srctree)/include/zfs
|
|
ZFS_MODULE_CFLAGS += -include $(zfs_include)/zfs_config.h
|
|
endif
|
|
|
|
ZFS_MODULE_CFLAGS += -I$(zfs_include)/os/linux/kernel
|
|
ZFS_MODULE_CFLAGS += -I$(zfs_include)/os/linux/spl
|
|
ZFS_MODULE_CFLAGS += -I$(zfs_include)/os/linux/zfs
|
|
ZFS_MODULE_CFLAGS += -I$(zfs_include)
|
|
ZFS_MODULE_CPPFLAGS += -D_KERNEL
|
|
ZFS_MODULE_CPPFLAGS += @KERNEL_DEBUG_CPPFLAGS@
|
|
|
|
ifneq ($(KBUILD_EXTMOD),)
|
|
@CONFIG_QAT_TRUE@ZFS_MODULE_CFLAGS += -I@QAT_SRC@/include
|
|
@CONFIG_QAT_TRUE@KBUILD_EXTRA_SYMBOLS += @QAT_SYMBOLS@
|
|
endif
|
|
|
|
subdir-asflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_MODULE_CPPFLAGS)
|
|
subdir-ccflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_MODULE_CPPFLAGS)
|
|
|
|
|
|
endif
|