Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Feb 2017 23:57:35 +0200
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Lev Serebryakov <lev@FreeBSD.org>, freebsd-stable@FreeBSD.org, freebsd-fs@FreeBSD.org
Subject:   Re: Is it known problem, that zfs.ko could not be built with system compiler (clang 3.9.1) without optimization?
Message-ID:  <85ad9000-b585-35e7-ccf1-6601ac4c062c@FreeBSD.org>
In-Reply-To: <492944119.20170222234742@serebryakov.spb.ru>
References:  <492944119.20170222234742@serebryakov.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?85ad9000-b585-35e7-ccf1-6601ac4c062c>