Is it known problem, that zfs.ko could not be built with system compiler (clang 3.9.1) without optimization?

Andriy Gapon avg at FreeBSD.org
Wed Feb 22 21:58:35 UTC 2017


On 22/02/2017 22:47, Lev Serebryakov wrote:
> Hello Freebsd-stable,
> 
>    Now if you build zfs.ko with -O0 it panics on boot.

I have seen a problem that matches your description, but not necessarily the
same one:
https://lists.freebsd.org/pipermail/freebsd-hackers/2016-July/049768.html

>    If you use default optimization level, a lot of fbt DTreace probes are
>   missing.

You can try several different (orthogonal, even) approaches:
- compile ZFS into the kernel
- use higher optimization level, but add -fno-optimize-sibling-calls to CLFAGS
- pkg install amd64-xtoolchain-gcc and then use CROSS_TOOLCHAIN=amd64-gcc
command line argument for buildkernel


-- 
Andriy Gapon


More information about the freebsd-fs mailing list