Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jul 2023 15:39:01 GMT
From:      Christos Margiolis <christos@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 2e28f8cc3929 - main - kinst: accommodate other architectures in Makefile
Message-ID:  <202307041539.364Fd1UT032655@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=2e28f8cc39299223fe398b81676f06c419b804bc

commit 2e28f8cc39299223fe398b81676f06c419b804bc
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2023-07-04 15:37:44 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2023-07-04 15:37:44 +0000

    kinst: accommodate other architectures in Makefile
    
    Reviewed by:    markj
    Approved by:    markj (mentor)
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D40871
---
 sys/modules/dtrace/kinst/Makefile | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/sys/modules/dtrace/kinst/Makefile b/sys/modules/dtrace/kinst/Makefile
index 76304a430cd6..1cbfe5e72ff1 100644
--- a/sys/modules/dtrace/kinst/Makefile
+++ b/sys/modules/dtrace/kinst/Makefile
@@ -1,16 +1,23 @@
 SYSDIR?=	${SRCTOP}/sys
 
-.PATH:		${SYSDIR}/cddl/dev/kinst \
-		${SYSDIR}/cddl/dev/kinst/${MACHINE_CPUARCH}
-
 KMOD=		kinst
 SRCS=		kinst.c kinst_isa.c trampoline.c
 
 CFLAGS+=	${OPENZFS_CFLAGS} \
 		-I${SYSDIR}/cddl/dev/kinst \
-		-I${SYSDIR}/cddl/dev/dtrace/x86 \
 		-I${SYSDIR}/cddl/dev/kinst/${MACHINE_CPUARCH}
 
+.PATH:		${SYSDIR}/cddl/dev/kinst \
+		${SYSDIR}/cddl/dev/kinst/${MACHINE_CPUARCH}
+
+.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
+CFLAGS+=	-I${SYSDIR}/cddl/dev/dtrace/x86
+.PATH:		${SYSDIR}/cddl/dev/dtrace/x86
+.else
+CFLAGS+=	-I${SYSDIR}/cddl/dev/dtrace/${MACHINE_CPUARCH}
+.PATH:		${SYSDIR}/cddl/dev/dtrace/${MACHINE_CPUARCH}
+.endif
+
 .include <bsd.kmod.mk>
 
 CFLAGS+=	-include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307041539.364Fd1UT032655>