diff options
author | Ryan Moeller <freqlabs@FreeBSD.org> | 2020-08-25 18:22:30 +0000 |
---|---|---|
committer | Ryan Moeller <freqlabs@FreeBSD.org> | 2020-08-25 18:22:30 +0000 |
commit | 4d5d720178da72c446de071b9c9ee4dca01b1f01 (patch) | |
tree | 7f956afa5c1f247f13ebffd1e99313cb1ea44f7e | |
parent | 5e6a7bc6c1e3f42509eb6d1671528d1af9af2c25 (diff) | |
download | src-4d5d720178da72c446de071b9c9ee4dca01b1f01.tar.gz src-4d5d720178da72c446de071b9c9ee4dca01b1f01.zip |
Fix zstd in OpenZFS module with CPUTYPE?=<something with BMI>
The build breaks when something adds -march=<something with BMI> to the
compiler flags, for example CPUTYPE?=native. When the arch supports BMI,
__BMI__ is defined and zstd.c tries to include immintrin.h, which is not
present when building the kernel.
Disable experimental BMI intrinsics in zstd in the OpenZFS kernel module
by explicitly undefining __BMI__ for zstd.c.
A similar fix was needed for the original zstd import, done in r327738.
Reported by: Jakob Alvermark
Discussed with: mmacy
Sponsored by: iXsystems, Inc.
Notes
Notes:
svn path=/head/; revision=364777
-rw-r--r-- | sys/modules/zfs/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile index 5c020620e32b..b6b84f6840fb 100644 --- a/sys/modules/zfs/Makefile +++ b/sys/modules/zfs/Makefile @@ -338,7 +338,7 @@ CFLAGS.zil.c= -Wno-cast-qual CFLAGS.zio.c= -Wno-cast-qual CFLAGS.zrlock.c= -Wno-cast-qual CFLAGS.zfs_zstd.c= -Wno-cast-qual -Wno-pointer-arith -CFLAGS.zstd.c= -fno-tree-vectorize +CFLAGS.zstd.c= -U__BMI__ -fno-tree-vectorize .if ${MACHINE_CPUARCH} == "aarch64" CFLAGS.zstd.c+= -include ${SRCDIR}/zstd/include/aarch64_compat.h .endif |