DF-5011 / build.log
DF-5011 build.log — full compiler output, guest DragonFly 6.5-DEVELOPMENT, cc 8.3
===============================================================================
[build kernel without device dimm/ecc/memtemp (nativekernel, incremental)]
$ cd /usr/src && make -j6 nativekernel KERNCONF=X86_64_GENERIC
>>> Kernel build for X86_64_GENERIC completed on Fri Sep 25 21:56:48 UTC 2026
--------------------------------------------------------------
324.02 real 1366.05 user 263.73 sys
$ cd /usr/src && make installkernel KERNCONF=X86_64_GENERIC
>>> Kernel install for X86_64_GENERIC completed on Fri Sep 25 21:58:08 UTC 2026
[build drainpoc.ko / deppoc.ko / pocfix.ko (v1/v2/v3, sed-derived variants)]
$ (cd v1 && make obj && make)
creating sys/ forwarding header /usr/obj/root/df5011/v1/forwarder_x86_64/include/poll.h
cc -O2 -pipe -D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wold-style-definition
-Wmissing-include-dirs -Wno-pointer-sign -Winit-self -Wundef
-Wno-unused-but-set-variable -std=gnu11 -Werror -DKLD_MODULE -nostdinc -I.
-Idragonfly -I/usr/obj/root/df5011/v1/forwarder_x86_64/include -Idragonfly/../include
-I/usr/include -Wold-style-declaration -fno-common -ffreestanding
-fno-stack-protector -fno-strict-aliasing -fno-strict-overflow
-fno-asynchronous-unwind-tables -fno-omit-frame-pointer -mcmodel=kernel
-mno-red-zone -mno-mmx -mno-sse -msoft-float -mno-fp-ret-in-387
-mindirect-branch=thunk-inline -c /root/df5011/v1/drainpoc.c
cc -Wl,--build-id=sha1 -nostdlib -Wl,--hash-style=sysv -r -Wl,-d -o drainpoc.ko drainpoc.o
(v2/deppoc.ko and v3/pocfix.ko: identical command lines, KMOD name differs)
$ for f in drainpoc deppoc pocfix; do printf "%s: " $f; strings -a $f.ko | grep -xE "$f"; done
drainpoc: drainpoc
deppoc: deppoc
pocfix: pocfix
$ strings -a deppoc.ko | grep -xE dimm
dimm
<- MODULE_DEPEND metadata present in the control module
[build dimm-fixed.ko (dimm.c + fix.diff)]
$ (cd fixmod && make obj && cp /usr/obj/usr/src/sys/X86_64_GENERIC/*_if.h /usr/obj/root/df5011/fixmod/ && make)
cc -O2 -pipe -D_KERNEL ... -I/usr/obj/root/df5011/fixmod/forwarder_x86_64/include ...
-c /root/df5011/fixmod/dimm.c
cc -Wl,--build-id=sha1 -nostdlib -Wl,--hash-style=sysv -r -Wl,-d -o dimm.ko dimm.o
$ ls -la dimm-fixed.ko
-rw-r--r-- 1 root wheel 8728 Sep 25 22:08 /root/df5011/dimm-fixed.ko
NOTE (first-build failure, kept for honesty): compiling dimm.c as a kmod needs
the kernel-generated *_if.h headers (sys/bus.h:500 -> device_if.h); fixed by
copying /usr/obj/usr/src/sys/X86_64_GENERIC/*_if.h into the kmod obj dir.
Also: -D defines via Makefile CFLAGS+= do NOT reach kmod compiles (bsd.kmod.mk
rebuilds CFLAGS) — module-name variants are produced with sed, and MODULE_DEPEND
is enabled by deleting the #ifdef WANT_DEP/#endif guards with awk.