Page MenuHomeFreeBSD

stand/libsa/zfs: disable ZSTD_TRACE and DYNAMIC_BMI2 code paths
ClosedPublic

Authored by rlibby on May 7 2026, 5:08 AM.
Tags
None
Referenced Files
F163419501: D56866.id177377.diff
Thu, Jul 23, 1:32 AM
Unknown Object (File)
Tue, Jul 21, 6:38 PM
Unknown Object (File)
Fri, Jul 17, 4:36 PM
Unknown Object (File)
Wed, Jul 15, 5:44 AM
Unknown Object (File)
Wed, Jul 15, 5:44 AM
Unknown Object (File)
Wed, Jul 8, 7:00 AM
Unknown Object (File)
Sun, Jul 5, 7:33 AM
Unknown Object (File)
Fri, Jul 3, 11:52 PM
Subscribers

Details

Summary

Enabling ZSTD_TRACE leaves behind undefined weak symbols, which causes a
problem for gcc builds. The bfd linker emits an obscure error about
overlapping FDEs. We don't need ZSTD_TRACE for libsa, so just disable
it.

Also disable BMI2 instruction optimizations. The addition of the
optional BMI2 code paths caused the boot loader binaries to grow larger
(28 KiB for clang, 32 KiB for gcc). The boot loader binaries are size
constrained, and this pushed the gcc-generated lua_loader.bin over the
500000 byte limit, and the clang one to within 4k of the limit.

Fixes: 8a62a2a5659d ("zfs: merge openzfs/zfs@f8e5af53e")

Test Plan

make buildworld && env MAKEOBJDIRPREFIX=/usr/obj/gcc14 CROSS_TOOLCHAIN=amd64-gcc14 make buildworld

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 72871
Build 69754: arc lint + arc unit