Hi,

The latest version of x11/nvidia-driver contains a call to a syscons
function which is only available if the kernel config contains device
sc (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216050).  The call
doesn't seem to be critical so I'd like to patch it like this:

+#include "opt_syscons.h"
 ...
+#ifdef DEV_SC
 syscons stuff here
+#endif

And add opt_syscons.h to SRCS in the module Makefile.

This doesn't work however because sys/conf/kmod.mk creates empty opt_*.h
files in the module build directory.  Only when KERNBUILDDIR is set does
it create opt_*.h files as symlinks to the same file in KERNBUILDDIR.
This means that to build this port correctly users would have to have a
kernel build directory (even if they just need the nvidia driver and
don't otherwise build kernels) and the ports tree would need some way to
find it (using KERNCONF etc.).

It would be better if these opt_*.h files were installed along with the
kernel.  Somewhere in /usr/include or /boot/kernel(.old)?  Perhaps
concatenated into one file?  Then kmod.mk could create symlinks to this
file if KERNBUILDDIR is undefined.  Building a module directly from
sys/modules would then also just work without .if !defined(KERNBUILDDIR)
magic that several Makefiles contain.
_______________________________________________
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to