LTO: Prevent -flto from creating crashing kernels.
authorzrj <rimvydas.jasinskas@gmail.com>
Mon, 17 Oct 2016 17:34:19 +0000 (20:34 +0300)
committerzrj <zrj@dragonflybsd.org>
Tue, 25 Oct 2016 16:31:42 +0000 (19:31 +0300)
commit2d84cb505b59a587cc37b385dee4696b846fcdd3
treee11f2fb64d1849f473a1248b87bb829eb675dab4
parentfa8104330967fab6248da216251a4382b39b1dab
LTO: Prevent -flto from creating crashing kernels.

There is something peculiar how default count of lto partitions is created
and used when compiling them. For now just enforce the use of a single one.
GENERIC as it is right now is fine, however turning off certain features
in config, causes the kernel fatal trap 12 very early on boot and reboot.
Note that -g -flto -O2 compilations can easily slurp 1.5-1.8GB of ram!
sys/conf/kern.pre.mk