Module Name:    src
Committed By:   martin
Date:           Mon Feb 24 17:49:38 UTC 2025

Modified Files:
        src/sbin: Makefile
        src/share/mk: bsd.own.mk

Log Message:
Centralize the test for platforms that HAVE_EFI_RT


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sbin/Makefile
cvs rdiff -u -r1.1411 -r1.1412 src/share/mk/bsd.own.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/Makefile
diff -u src/sbin/Makefile:1.141 src/sbin/Makefile:1.142
--- src/sbin/Makefile:1.141	Mon Feb 24 15:59:04 2025
+++ src/sbin/Makefile	Mon Feb 24 17:49:37 2025
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.141 2025/02/24 15:59:04 martin Exp $
+#	$NetBSD: Makefile,v 1.142 2025/02/24 17:49:37 martin Exp $
 #	@(#)Makefile	8.5 (Berkeley) 3/31/94
 
 # Not ported: XNSrouted enpload scsiformat startslip
@@ -16,12 +16,7 @@ SUBDIR=	amrctl apmlabel atactl badsect b
 	savecore scan_ffs scsictl shutdown slattach svhlabel swapctl sysctl \
 	ttyflags umbctl umount veriexecctl wdogctl wsconsctl
 
-# efi runtime support is currently only available on x86 and little endian
-# ARM and riscv platforms
-.if (${MACHINE} == "amd64" || \
-    ${MACHINE} == "i386" || \
-    ((${MACHINE_CPU} == "riscv" ||  ${MACHINE_CPU} == "arm") && \
-      ${MACHINE_ARCH:M*eb} == ""))
+.if ${HAVE_EFI_RT} == "yes"
 SUBDIR+= efi
 .endif
 

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1411 src/share/mk/bsd.own.mk:1.1412
--- src/share/mk/bsd.own.mk:1.1411	Sat Feb 15 11:10:25 2025
+++ src/share/mk/bsd.own.mk	Mon Feb 24 17:49:38 2025
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1411 2025/02/15 11:10:25 skrll Exp $
+#	$NetBSD: bsd.own.mk,v 1.1412 2025/02/24 17:49:38 martin Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -195,6 +195,15 @@ HAVE_UEFI=	no
 .endif
 
 #
+# Does the platform support EFI RT services?
+#
+.if ${HAVE_UEFI} == "yes" && ${MACHINE_ARCH:M*eb} == ""
+HAVE_EFI_RT=	yes
+.else
+HAVE_EFI_RT=	no
+.endif
+
+#
 # Does the platform support NVMM?
 #
 .if ${MACHINE_ARCH} == "x86_64"

Reply via email to