Page MenuHomeFreeBSD

openzfs: fix gcc in-kernel builds
ClosedPublic

Authored by rlibby on Dec 20 2020, 8:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 2, 2:23 AM
Unknown Object (File)
Oct 15 2025, 9:13 AM
Unknown Object (File)
Oct 15 2025, 9:13 AM
Unknown Object (File)
Oct 15 2025, 9:13 AM
Unknown Object (File)
Oct 14 2025, 10:36 PM
Unknown Object (File)
Oct 8 2025, 1:53 AM
Unknown Object (File)
Jul 28 2025, 8:23 PM
Unknown Object (File)
Jul 7 2025, 10:27 AM
Subscribers

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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 35547
Build 32447: arc lint + arc unit

Event Timeline

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

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
230

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.