From f051d72314f8eb174fe69e62a997c9ed23ff84a1 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 1 Feb 2023 10:21:24 -0700 Subject: [PATCH] hyperv: Build and install where supported Remove the hard-coded dependency on HYPERV being only x86. Instead, 100% rely on MK_HYPERV. It's always right (since it's marked BROKEN (so set to "no") on architectures we don't support). Sponsored by: Netflix Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D38306 --- lib/libc/x86/sys/Makefile.inc | 1 + libexec/Makefile | 5 +++++ libexec/Makefile.amd64 | 5 ----- libexec/Makefile.i386 | 5 ----- usr.sbin/Makefile | 1 + usr.sbin/Makefile.amd64 | 3 --- usr.sbin/Makefile.i386 | 3 --- 7 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 libexec/Makefile.amd64 delete mode 100644 libexec/Makefile.i386 diff --git a/lib/libc/x86/sys/Makefile.inc b/lib/libc/x86/sys/Makefile.inc index 382b52dd9065..571e01441a1b 100644 --- a/lib/libc/x86/sys/Makefile.inc +++ b/lib/libc/x86/sys/Makefile.inc @@ -10,6 +10,7 @@ SRCS+= \ MAN+= \ pkru.3 +# Note: vdso support for hyperv only on amd64 .if ${MACHINE_CPUARCH} == "amd64" && ${MK_HYPERV} != "no" CFLAGS+= -DWANT_HYPERV .endif diff --git a/libexec/Makefile b/libexec/Makefile index 8d7565fe3ee5..057bad07de5b 100644 --- a/libexec/Makefile +++ b/libexec/Makefile @@ -10,6 +10,7 @@ SUBDIR= ${_atf} \ ${_dma} \ flua \ getty \ + ${_hyperv} \ ${_mail.local} \ ${_makewhatis.local} \ ${_mknetid} \ @@ -64,6 +65,10 @@ _comsat= comsat _dma= dma .endif +.if ${MK_HYPERV} != "no" +_hyperv+= hyperv +.endif + .if ${MK_NIS} != "no" _mknetid= mknetid _ypxfr= ypxfr diff --git a/libexec/Makefile.amd64 b/libexec/Makefile.amd64 deleted file mode 100644 index 1092a29a2a33..000000000000 --- a/libexec/Makefile.amd64 +++ /dev/null @@ -1,5 +0,0 @@ -# $FreeBSD$ - -.if ${MK_HYPERV} != "no" -SUBDIR+= hyperv -.endif diff --git a/libexec/Makefile.i386 b/libexec/Makefile.i386 deleted file mode 100644 index 1092a29a2a33..000000000000 --- a/libexec/Makefile.i386 +++ /dev/null @@ -1,5 +0,0 @@ -# $FreeBSD$ - -.if ${MK_HYPERV} != "no" -SUBDIR+= hyperv -.endif diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 603733db9664..e2f382303d6e 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -140,6 +140,7 @@ SUBDIR.${MK_FLOPPY}+= fdwrite SUBDIR.${MK_FREEBSD_UPDATE}+= freebsd-update SUBDIR.${MK_GSSAPI}+= gssd SUBDIR.${MK_GPIO}+= gpioctl +SUBDIR.${MK_HYPERV}+= hyperv SUBDIR.${MK_INET6}+= ip6addrctl SUBDIR.${MK_INET6}+= mld6query SUBDIR.${MK_INET6}+= ndp diff --git a/usr.sbin/Makefile.amd64 b/usr.sbin/Makefile.amd64 index 1f15259eb1ac..1191b5d6814e 100644 --- a/usr.sbin/Makefile.amd64 +++ b/usr.sbin/Makefile.amd64 @@ -23,9 +23,6 @@ SUBDIR+= boot0cfg SUBDIR+= btxld .endif SUBDIR+= cpucontrol -.if ${MK_HYPERV} != "no" -SUBDIR+= hyperv -.endif SUBDIR+= lptcontrol SUBDIR+= mptable SUBDIR+= spkrtest diff --git a/usr.sbin/Makefile.i386 b/usr.sbin/Makefile.i386 index 4705fcadb36f..2941eb514900 100644 --- a/usr.sbin/Makefile.i386 +++ b/usr.sbin/Makefile.i386 @@ -12,9 +12,6 @@ SUBDIR+= boot0cfg SUBDIR+= btxld .endif SUBDIR+= cpucontrol -.if ${MK_HYPERV} != "no" -SUBDIR+= hyperv -.endif SUBDIR+= lptcontrol SUBDIR+= mptable SUBDIR+= pnpinfo