aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Libby <rlibby@FreeBSD.org>2026-05-07 17:30:05 +0000
committerRyan Libby <rlibby@FreeBSD.org>2026-05-07 17:30:05 +0000
commit944a4eb089b33241b21979253e0a373ce0bdf984 (patch)
tree54462a64b183bd60c0a383ddcdee17f3454540dc
parent54625dfb363a4a00841ef7d7ee8e5cc5ea1156e0 (diff)
-rw-r--r--stand/libsa/zfs/Makefile.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.inc
index 3df6779559c9..540635d144ef 100644
--- a/stand/libsa/zfs/Makefile.inc
+++ b/stand/libsa/zfs/Makefile.inc
@@ -75,9 +75,13 @@ CFLAGS.zfs.c+= -DHAS_ZSTD_ZFS \
#
# ZSTD coding style has some issues, so suppress clang's warnings. Also, zstd's
# use of BMI instrucitons is broken in this environment, so avoid them.
+# Avoid generating the DYNAMIC_BMI2 code paths because the code duplication
+# inflates the resulting binaries. Disable ZSTD_TRACE because we don't need it
+# and the bfd linker trips over the weak undefined symbols it generates.
#
.for i in ${ZSTD_SRC}
-CFLAGS.$i+= -U__BMI__ ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.$i+= -U__BMI__ -DDYNAMIC_BMI2=0 -DZSTD_TRACE=0 \
+ ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
.endfor
CFLAGS.zfs_zstd.c+= -DIN_BASE -DIN_LIBSA