Date: Wed, 29 Jan 2020 18:50:56 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357265 - head/sys/conf Message-ID: <202001291850.00TIounu097712@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Wed Jan 29 18:50:55 2020 New Revision: 357265 URL: https://svnweb.freebsd.org/changeset/base/357265 Log: kmod build: start generating opt_global.h, include it For untied module builds, we'll generate opt_foo headers if they're included in SRCS. However, options that would normally be represented in opt_global.h aren't properly represented. Start generating opt_global.h with #define VIMAGE for !mips since it's almost universally a project default and right now kmods must hack it in themselves in order to be properly compiled for the default kernel. For example, ^/sys/modules/pf/Makefile Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D23345 Modified: head/sys/conf/config.mk head/sys/conf/kmod.mk Modified: head/sys/conf/config.mk ============================================================================== --- head/sys/conf/config.mk Wed Jan 29 18:47:08 2020 (r357264) +++ head/sys/conf/config.mk Wed Jan 29 18:50:55 2020 (r357265) @@ -8,6 +8,10 @@ # the code here when they all produce identical results # (or should) .if !defined(KERNBUILDDIR) +opt_global.h: +.if ${MACHINE} != "mips" + @echo "#define VIMAGE 1" > ${.TARGET} +.endif opt_bpf.h: echo "#define DEV_BPF 1" > ${.TARGET} .if ${MK_INET_SUPPORT} != "no" Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Wed Jan 29 18:47:08 2020 (r357264) +++ head/sys/conf/kmod.mk Wed Jan 29 18:50:55 2020 (r357265) @@ -106,6 +106,9 @@ NOSTDINC= -nostdinc CFLAGS:= ${CFLAGS:N-I*} ${NOSTDINC} ${INCLMAGIC} ${CFLAGS:M-I*} .if defined(KERNBUILDDIR) CFLAGS+= -DHAVE_KERNEL_OPTION_HEADERS -include ${KERNBUILDDIR}/opt_global.h +.else +SRCS+= opt_global.h +CFLAGS+= -include ${.OBJDIR}/opt_global.h .endif # Add -I paths for system headers. Individual module makefiles don't
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001291850.00TIounu097712>