diff --git a/lib/Makefile b/lib/Makefile index 0d757c0ce3c3..c794d89777a8 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -173,10 +173,6 @@ _libngatm= libngatm _libauditd= libauditd .endif -.if ${MK_BHYVE} != "no" -_libvmmapi= libvmmapi -.endif - .if ${MK_BLUETOOTH} != "no" _libbluetooth= libbluetooth _libsdp= libsdp @@ -261,28 +257,6 @@ _libypclnt= libypclnt _libevent= libevent .endif -.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" -_libsmb= libsmb -_libvgl= libvgl -_libproc= libproc -_librtld_db= librtld_db -.endif - -.if ${MACHINE_CPUARCH} == "mips" -_libproc= libproc -_librtld_db= librtld_db -.endif - -.if ${MACHINE_CPUARCH} == "powerpc" -_libproc= libproc -_librtld_db= librtld_db -_libsmb= libsmb -.endif - -.if ${MACHINE_CPUARCH} == "sparc64" -_libsmb= libsmb -.endif - .if ${MK_OPENSSL} != "no" _libmp= libmp .endif @@ -326,6 +300,34 @@ _libusbhid= libusbhid _libusb= libusb .endif +.if ${MACHINE_CPUARCH} == "amd64" +.if ${MK_BHYVE} != "no" +_libvmmapi= libvmmapi +.endif +.endif + +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +_libsmb= libsmb +_libvgl= libvgl +_libproc= libproc +_librtld_db= librtld_db +.endif + +.if ${MACHINE_CPUARCH} == "mips" +_libproc= libproc +_librtld_db= librtld_db +.endif + +.if ${MACHINE_CPUARCH} == "powerpc" +_libproc= libproc +_librtld_db= librtld_db +_libsmb= libsmb +.endif + +.if ${MACHINE_CPUARCH} == "sparc64" +_libsmb= libsmb +.endif + .if !defined(LIBRARIES_ONLY) afterinstall: ${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include diff --git a/share/examples/Makefile b/share/examples/Makefile index a0bd647c19ea..bf5b955a7a14 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -184,11 +184,6 @@ NO_OBJ= # in environments where it's not possible to keep /sys publicly readable) SHARED?= copies -.if ${MK_BHYVE} != "no" -LDIRS+= bhyve -XFILES+= bhyve/vmrun.sh -.endif - .if ${MK_HAST} != "no" LDIRS+= hast XFILES+= hast/ucarp.sh \ @@ -219,6 +214,13 @@ XFILES+= libusb20/Makefile \ libusb20/control.c .endif +.if ${MACHINE_CPUARCH} == "amd64" +.if ${MK_BHYVE} != "no" +LDIRS+= bhyve +XFILES+= bhyve/vmrun.sh +.endif +.endif + beforeinstall: ${SHARED} etc-examples .ORDER: ${SHARED} etc-examples diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 5fd160852eba..d14c111cf298 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -729,6 +729,10 @@ MLINKS+=qlxge.4 if_qlxge.4 MLINKS+=qlxgb.4 if_qlxgb.4 MLINKS+=qlxgbe.4 if_qlxgbe.4 MLINKS+=sfxge.4 if_sfxge.4 + +.if ${MK_BHYVE} != "no" +_bhyve.4= bhyve.4 +.endif .endif .if ${MACHINE_CPUARCH} == "mips" @@ -739,10 +743,6 @@ _nvram2env.4= nvram2env.4 SUBDIR= man4.${MACHINE_CPUARCH} .endif -.if ${MK_BHYVE} != "no" -_bhyve.4= bhyve.4 -.endif - .if ${MK_CCD} != "no" _ccd.4= ccd.4 .endif diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index cf4ff002bc39..a87e48902073 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -53,6 +53,7 @@ __DEFAULT_YES_OPTIONS = \ AUDIT \ AUTHPF \ AUTOFS \ + BHYVE \ BINUTILS \ BINUTILS_BOOTSTRAP \ BLUETOOTH \ @@ -101,6 +102,7 @@ __DEFAULT_YES_OPTIONS = \ GROFF \ HAST \ HTML \ + HYPERV \ ICONV \ INET \ INET6 \ @@ -234,20 +236,6 @@ __DEFAULT_NO_OPTIONS+=CLANG_IS_CC CLANG CLANG_BOOTSTRAP __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX .endif -# bhyve is only supported on amd64 -.if ${__T} == "amd64" -__DEFAULT_YES_OPTIONS+=BHYVE -.else -MK_BHYVE:= no -.endif - -# hyperv is only supported on amd64 and i386/i386 -.if ${__T} == "amd64" || (${__T} == "i386" && ${__TT} == "i386") -__DEFAULT_YES_OPTIONS+=HYPERV -.else -MK_HYPERV:= no -.endif - .include # diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk index eeb79f74c152..0fac2199684b 100644 --- a/sys/conf/kern.opts.mk +++ b/sys/conf/kern.opts.mk @@ -24,11 +24,13 @@ __DEFAULT_YES_OPTIONS = \ AUTOFS \ + BHYVE \ BLUETOOTH \ CCD \ CDDL \ CRYPT \ FORMAT_EXTENSIONS \ + HYPERV \ ISCSI \ INET \ INET6 \ @@ -69,20 +71,6 @@ __TT=${TARGET} __TT=${MACHINE} .endif -# bhyve is only supported on amd64 -.if ${__T} == "amd64" -__DEFAULT_YES_OPTIONS+=BHYVE -.else -MK_BHYVE:= no -.endif - -# hyperv is only supported on amd64 and i386/i386 -.if ${__T} == "amd64" || (${__T} == "i386" && ${__TT} == "i386") -__DEFAULT_YES_OPTIONS+=HYPERV -.else -MK_HYPERV:= no -.endif - # expanded inline from bsd.mkopt.mk to avoid share/mk dependency # Those that default to yes diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 479f86bbf760..aa8e6bf0a4cd 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -388,10 +388,6 @@ SUBDIR= \ _autofs= autofs .endif -.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) -_vmm= vmm -.endif - .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) .if exists(${.CURDIR}/../opencrypto) _crypto= crypto @@ -402,10 +398,6 @@ _random= random .endif .endif -.if ${MK_HYPERV} != "no" || defined(ALL_MODULES) -_hyperv= hyperv -.endif - .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ defined(ALL_MODULES) _carp= carp @@ -505,6 +497,9 @@ _et= et _exca= exca _ext2fs= ext2fs _filemon= filemon +.if ${MK_HYPERV} != "no" || defined(ALL_MODULES) +_hyperv= hyperv +.endif _i2c= i2c .if ${MK_OFED} != "no" || defined(ALL_MODULES) _ibcore= ibcore @@ -625,6 +620,10 @@ _qlxge= qlxge _qlxgb= qlxgb _qlxgbe= qlxgbe _sfxge= sfxge + +.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) +_vmm= vmm +.endif .endif .if ${MACHINE_CPUARCH} == "i386" diff --git a/tools/build/options/WITHOUT_BHYVE b/tools/build/options/WITHOUT_BHYVE index f60fd17ddba7..99420b60485b 100644 --- a/tools/build/options/WITHOUT_BHYVE +++ b/tools/build/options/WITHOUT_BHYVE @@ -2,3 +2,5 @@ Set to not build or install .Xr bhyve 8 , associated utilities, and examples. +.Pp +This option only affects amd64/amd64 diff --git a/tools/build/options/WITH_HYPERV b/tools/build/options/WITH_HYPERV index a6bdf72ff3e3..75753c48bb86 100644 --- a/tools/build/options/WITH_HYPERV +++ b/tools/build/options/WITH_HYPERV @@ -1,2 +1,4 @@ .\" $FreeBSD$ Set to build and install HyperV utilities. +.Pp +This option only affects amd64/amd64 and i386/i386