Page MenuHomeFreeBSD

openzfs: fix gcc in-kernel builds
ClosedPublic

Authored by rlibby on Dec 20 2020, 8:31 AM.

Details

Summary

Fix gcc builds of in-kernel modules using CDDL_CFLAGS (e.g. options
ZFS).

  • Remove nonexistent include dirs for -Wmissing-include-dirs
  • Suppress -Wnested-externs, a useless warning
  • Sort and uniq warning flags while here
Test Plan

With options ZFS and dependencies added to GENERIC:

make buildkernel
env MAKEOBJDIRPREFIX=/usr/obj/gcc9 CROSS_TOOLCHAIN=amd64-gcc9 make buildkernel

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

This revision is now accepted and ready to land.Dec 21 2020, 1:59 PM
sys/conf/kern.pre.mk
229

BTW, @brewery discovered last week that the use of -Wno-uninitialized is covering up bugs in dtrace. I think he is looking at removing this option.

sys/conf/kern.pre.mk
229

Glad to hear it. I'll make sure to try the gcc build again after that goes in.

This revision was automatically updated to reflect the committed changes.