git: 2754373f9ac8 - main - Use ${MACHINE} for the kernel modeule ldscript

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Tue, 11 Jan 2022 17:00:55 UTC
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=2754373f9ac8e73f8fdbba9df26ac03e4864576e

commit 2754373f9ac8e73f8fdbba9df26ac03e4864576e
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-01-11 11:55:32 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-01-11 16:58:31 +0000

    Use ${MACHINE} for the kernel modeule ldscript
    
    For consistancy with the kernel linker script also use ${MACHINE} for
    finding the kernel module linker script. As we currently only use this
    for amd64 and i386 this is a no-op, but I'm planning on using this with
    arm64 where ${MACHINE} != ${MACHINE_ARCH}.
    
    Reviewed by:    markj, kib, imp
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D33841
---
 sys/conf/kmod.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index ee6aaa8aba0b..cf39de5e87cf 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -234,8 +234,8 @@ EXPORT_SYMS?=	NO
 CLEANFILES+=	export_syms
 .endif
 
-.if exists(${SYSDIR}/conf/ldscript.kmod.${MACHINE_ARCH})
-LDSCRIPT_FLAGS?= -T ${SYSDIR}/conf/ldscript.kmod.${MACHINE_ARCH}
+.if exists(${SYSDIR}/conf/ldscript.kmod.${MACHINE})
+LDSCRIPT_FLAGS?= -T ${SYSDIR}/conf/ldscript.kmod.${MACHINE}
 .endif
 
 .if ${__KLD_SHARED} == yes