Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Feb 2020 15:43:28 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r358002 - head/sys/modules
Message-ID:  <202002161543.01GFhSTa023311@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Feb 16 15:43:28 2020
New Revision: 358002
URL: https://svnweb.freebsd.org/changeset/base/358002

Log:
  Fix build of some modules for some kernel configs.
  
  Namely, vmm.ko cannot be compiled without 'option SMP', the code uses
  IPIs and LAPIC.
  Recently systrace was forced over any configs, check for KDTRACE_HOOK
  before compiling the dtrace/ modules.
  
  Reviewed by:	markj
  Discussed with:	mjg
  Tested by:	se (previous version)
  Sponsored by:	The FreeBSD Foundation (kib)
  Differential revision:	https://reviews.freebsd.org/D23699

Modified:
  head/sys/modules/Makefile

Modified: head/sys/modules/Makefile
==============================================================================
--- head/sys/modules/Makefile	Sun Feb 16 14:33:55 2020	(r358001)
+++ head/sys/modules/Makefile	Sun Feb 16 15:43:28 2020	(r358002)
@@ -8,6 +8,8 @@ SUBDIR_PARALLEL=
 # Modules that include binary-only blobs of microcode should be selectable by
 # MK_SOURCELESS_UCODE option (see below).
 
+.include "${SYSDIR}/conf/config.mk"
+
 .if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES)
 SUBDIR=${MODULES_OVERRIDE}
 .else
@@ -396,8 +398,10 @@ _autofs=	autofs
 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
 .if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv[67]*} != "") && \
 	${MACHINE_CPUARCH} != "mips"
+.if ${KERN_OPTS:MKDTRACE_HOOKS}
 SUBDIR+=	dtrace
 .endif
+.endif
 SUBDIR+=	opensolaris
 .endif
 
@@ -712,9 +716,11 @@ _sgx_linux=	sgx_linux
 _smartpqi=	smartpqi
 
 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
+.if ${KERN_OPTS:MSMP}
 _vmm=		vmm
 .endif
 .endif
+.endif
 
 .if ${MACHINE_CPUARCH} == "i386"
 # XXX some of these can move to the general case when de-i386'ed
@@ -798,8 +804,6 @@ afterinstall: .PHONY
 		${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \
 	fi
 .endif
-
-.include "${SYSDIR}/conf/config.mk"
 
 SUBDIR:= ${SUBDIR:u:O}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002161543.01GFhSTa023311>