The branch main has been updated by jhb:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=57716e7361aea3fa578a0a8f2b5a65154d4819d4

commit 57716e7361aea3fa578a0a8f2b5a65154d4819d4
Author:     Nathaniel Wesley Filardo <[email protected]>
AuthorDate: 2023-03-01 18:32:08 +0000
Commit:     John Baldwin <[email protected]>
CommitDate: 2023-03-01 18:32:08 +0000

    sys/modules: fix bogus OPT_ACPI tests
    
    ACPI is not handled specially by sys/conf/kern.opts.mk (unlike a few
    options), so we should fall back on the generic behavior of
    sys/conf/config.mk, which pulls from all the generated opt*.h files,
    including opt_acpi.h, which will cause DEV_ACPI to be included in
    KERN_OPTS.  Then the generic machinery in sys/conf/kmod.mk will cause
    SRCS.DEV_ACPI to be included in SRCS when appropriate.
    
    Reviewed by:    jhb, imp
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D38737
---
 sys/modules/dpaa2/Makefile | 4 +---
 sys/modules/hwpmc/Makefile | 6 ++----
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/sys/modules/dpaa2/Makefile b/sys/modules/dpaa2/Makefile
index eeb9e7f340bf..72e8e46143c8 100644
--- a/sys/modules/dpaa2/Makefile
+++ b/sys/modules/dpaa2/Makefile
@@ -21,12 +21,10 @@ SRCS+=      bus_if.h device_if.h miibus_if.h
 SRCS+= pcib_if.h pci_if.h
 SRCS+= opt_acpi.h opt_platform.h
 
-.if !empty(OPT_ACPI)
-SRCS+= dpaa2_mc_acpi.c \
+SRCS.DEV_ACPI= dpaa2_mc_acpi.c \
        memac_mdio_acpi.c \
        acpi_if.h \
        acpi_bus_if.h
-.endif
 
 .if !empty(OPT_FDT)
 SRCS+= dpaa2_mc_fdt.c \
diff --git a/sys/modules/hwpmc/Makefile b/sys/modules/hwpmc/Makefile
index a72b3cf8d2fd..5e509c5499f3 100644
--- a/sys/modules/hwpmc/Makefile
+++ b/sys/modules/hwpmc/Makefile
@@ -12,10 +12,8 @@ SRCS+=       vnode_if.h
 
 .if ${MACHINE_CPUARCH} == "aarch64"
 SRCS+= hwpmc_arm64.c hwpmc_arm64_md.c
-.if !empty(OPT_ACPI)
-SRCS+= cmn600.c hwpmc_cmn600.c
-SRCS+= hwpmc_dmc620.c pmu_dmc620.c
-.endif
+SRCS.DEV_ACPI= cmn600.c hwpmc_cmn600.c
+SRCS.DEV_ACPI+=        hwpmc_dmc620.c pmu_dmc620.c
 .endif
 
 .if ${MACHINE_CPUARCH} == "amd64"

Reply via email to