cvs commit: src/sys/conf options src/sys/i386/acpica Makefile acpi_wakecode.S src/sys/i386/conf NOTES

M. Warner Losh imp at bsdimp.com
Wed Oct 29 22:23:15 PST 2003


In message: <3FA0A683.40108 at freebsd.org>
            Scott Long <scottl at freebsd.org> writes:
: Getting this working is a big deal.  PAE and MAC desperately need it,
: not to mention the general silliness of how we compile all modules now
: with SMP behavior.  Please point out were the patches are that you
: alluded to and give some more details on what you see as the problems
: so that someone can pick up this task and run with it.

They were posted to current and were fairly trivial (I think to just
kmod.mk).  I already said what the major problem with the patches: no
way to deal sanely when building outside of a compile/FOO directory.
The other problem is that many of the Makefiles create these things
unconditionally.  These patches also were more of a 'make due' sort of
level of integration rather than a comprehensively thought plan.
Another kludge on top of the kludged up kernel system.  It would be
barely acceptible, even if the 'out of tree' kernel module problem
could be solved.

The "general silliness of compiling SMP for all modules" was a design
decision for SMPng made a long time ago.  That's why there's no longer
a SMP kernel option.

Warner

P.S.  Something like the following would be a good start, but these
assume that KERNCONF is defined and a singleton.  It starts to make it
at least possible to compile 'outside the tree' and might be
influenced by what I've seen and forgotten.

Explicit rules for opt_foo might need to be changes.

Index: kmod.mk
===================================================================
RCS file: /home/ncvs/src/sys/conf/kmod.mk,v
retrieving revision 1.143
diff -u -r1.143 kmod.mk
--- kmod.mk	3 Oct 2003 22:00:06 -0000	1.143
+++ kmod.mk	30 Oct 2003 06:20:20 -0000
@@ -241,6 +241,17 @@
 	${KMODUNLOAD} -v ${KMOD}
 .endif
 
+.if defined(KERNCONF)
+.PATH: ${.CURDIR}/@/${MACHINE_ARCH}/compile/${KERNCONF}
+CFLAGS += -I${.CURDIR}/@/${MACHINE_ARCH}/compile/${KERNCONF}
+.for _src in ${SRCS:Mopt_*.h}
+CLEANFILES+=	${_src}
+.if !target(${_src})
+${_src}:
+	ln -s ${.OBJDIR}/@/${MACHINE_ARCH}/compile/${KERNCONF}/${_src} ${.TARGET}
+.endif
+.endfor
+.else
 .for _src in ${SRCS:Mopt_*.h}
 CLEANFILES+=	${_src}
 .if !target(${_src})
@@ -248,6 +259,7 @@
 	touch ${.TARGET}
 .endif
 .endfor
+.endif
 
 MFILES?= kern/bus_if.m kern/device_if.m dev/iicbus/iicbb_if.m \
     dev/iicbus/iicbus_if.m isa/isa_if.m \


More information about the cvs-src mailing list