Tue Apr 2 22:41:48 2024 UTC (60d)
bsd.own.mk: No need for MKSLJIT to be set differently from others.

- Use ?=, not =, so mk.conf setting wins.
- Write out per-architecture tabular settings, not a conditional.
- Add comments for the architectures that look like they should have
  sljit but don't.  (XXX Missing comments about powerpc and mips --
  not sure why, is this because modules don't yet work on those
  architectures, or what?)

Tidying for PR 58103: bpfjit.kmod is not built on aarch64.


(riastradh)
diff -r1.1365 -r1.1366 src/share/mk/bsd.own.mk

cvs diff -r1.1365 -r1.1366 src/share/mk/bsd.own.mk (expand / switch to unified diff)

--- src/share/mk/bsd.own.mk 2024/04/02 22:37:34 1.1365
+++ src/share/mk/bsd.own.mk 2024/04/02 22:41:48 1.1366
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: bsd.own.mk,v 1.1365 2024/04/02 22:37:34 riastradh Exp $ 1# $NetBSD: bsd.own.mk,v 1.1366 2024/04/02 22:41:48 riastradh Exp $
2 2
3# This needs to be before bsd.init.mk 3# This needs to be before bsd.init.mk
4.if defined(BSD_MK_COMPAT_FILE) 4.if defined(BSD_MK_COMPAT_FILE)
5.include <${BSD_MK_COMPAT_FILE}> 5.include <${BSD_MK_COMPAT_FILE}>
6.endif 6.endif
7 7
8.if !defined(_BSD_OWN_MK_) 8.if !defined(_BSD_OWN_MK_)
9_BSD_OWN_MK_=1 9_BSD_OWN_MK_=1
10 10
11MAKECONF?= /etc/mk.conf 11MAKECONF?= /etc/mk.conf
12.-include "${MAKECONF}" 12.-include "${MAKECONF}"
13 13
14# 14#
@@ -1326,26 +1326,41 @@ EXTERNAL_MESALIB_DIR?= MesaLib.old @@ -1326,26 +1326,41 @@ EXTERNAL_MESALIB_DIR?= MesaLib.old
1326.elif ${HAVE_MESA_VER} == 21 1326.elif ${HAVE_MESA_VER} == 21
1327EXTERNAL_MESALIB_DIR?= MesaLib 1327EXTERNAL_MESALIB_DIR?= MesaLib
1328.endif 1328.endif
1329 1329
1330# Default to LLVM run-time if x86 or aarch64 and X11 and Mesa 18 or newer 1330# Default to LLVM run-time if x86 or aarch64 and X11 and Mesa 18 or newer
1331# XXX This knows that MKX11=no is default below, but would 1331# XXX This knows that MKX11=no is default below, but would
1332# require splitting the below loop in two parts. 1332# require splitting the below loop in two parts.
1333.if ${MKX11:Uno} != "no" && ${HAVE_MESA_VER} >= 19 1333.if ${MKX11:Uno} != "no" && ${HAVE_MESA_VER} >= 19
1334MKLLVMRT.amd64= yes 1334MKLLVMRT.amd64= yes
1335MKLLVMRT.i386= yes 1335MKLLVMRT.i386= yes
1336MKLLVMRT.aarch64= yes 1336MKLLVMRT.aarch64= yes
1337.endif 1337.endif
1338 1338
 1339# Just-in-time compiler for bpf, npf acceleration
 1340MKSLJIT.aarch64= yes
 1341MKSLJIT.i386= yes
 1342MKSLJIT.sparc= yes
 1343#MKSLJIT.sparc64= yes # not suppored in sljit (yet?)
 1344MKSLJIT.x86_64= yes
 1345#MKSLJIT.powerpc= yes # XXX
 1346#MKSLJIT.powerpc64= yes # XXX
 1347#MKSLJIT.mipsel= yes # XXX
 1348#MKSLJIT.mipseb= yes # XXX
 1349#MKSLJIT.mips64el= yes # XXX
 1350#MKSLJIT.mips64eb= yes # XXX
 1351#MKSLJIT.riscv32= yes # not until we update sljit
 1352#MKSLJIT.riscv64= yes # not until we update sljit
 1353
1339# compat with old names 1354# compat with old names
1340MKDEBUGKERNEL?=${MKKDEBUG:Uno} 1355MKDEBUGKERNEL?=${MKKDEBUG:Uno}
1341MKDEBUGTOOLS?=${MKTOOLSDEBUG:Uno} 1356MKDEBUGTOOLS?=${MKTOOLSDEBUG:Uno}
1342 1357
1343# 1358#
1344# MK* options which default to "no". 1359# MK* options which default to "no".
1345# Note that MKZFS has a different default for some platforms, see above. 1360# Note that MKZFS has a different default for some platforms, see above.
1346# Please keep alphabetically sorted with one entry per line. 1361# Please keep alphabetically sorted with one entry per line.
1347# 1362#
1348_MKVARS.no= \ 1363_MKVARS.no= \
1349 MKAMDGPUFIRMWARE \ 1364 MKAMDGPUFIRMWARE \
1350 MKARZERO \ 1365 MKARZERO \
1351 MKBSDGREP \ 1366 MKBSDGREP \
@@ -1381,33 +1396,26 @@ _MKVARS.no= \ @@ -1381,33 +1396,26 @@ _MKVARS.no= \
1381 MKTEGRAFIRMWARE \ 1396 MKTEGRAFIRMWARE \
1382 MKTPM \ 1397 MKTPM \
1383 MKUNPRIVED \ 1398 MKUNPRIVED \
1384 MKUPDATE \ 1399 MKUPDATE \
1385 MKX11 \ 1400 MKX11 \
1386 MKX11MOTIF \ 1401 MKX11MOTIF \
1387 MKXORG_SERVER \ 1402 MKXORG_SERVER \
1388 MKZFS 1403 MKZFS
1389 1404
1390.for var in ${_MKVARS.no} 1405.for var in ${_MKVARS.no}
1391${var}?= ${${var}.${MACHINE_ARCH}:U${${var}.${MACHINE}:Uno}} 1406${var}?= ${${var}.${MACHINE_ARCH}:U${${var}.${MACHINE}:Uno}}
1392.endfor 1407.endfor
1393 1408
1394.if ${MACHINE_ARCH} == "aarch64" || \ 
1395 ${MACHINE_ARCH} == "i386" || \ 
1396 ${MACHINE_ARCH} == "sparc" || \ 
1397 ${MACHINE_ARCH} == "x86_64" 
1398MKSLJIT= yes 
1399.endif 
1400 
1401# 1409#
1402# Which platforms build the xorg-server drivers (as opposed 1410# Which platforms build the xorg-server drivers (as opposed
1403# to just Xnest and Xvfb.) 1411# to just Xnest and Xvfb.)
1404# 1412#
1405.if ${MACHINE} == "alpha" || \ 1413.if ${MACHINE} == "alpha" || \
1406 ${MACHINE} == "amd64" || \ 1414 ${MACHINE} == "amd64" || \
1407 ${MACHINE} == "amiga" || \ 1415 ${MACHINE} == "amiga" || \
1408 ${MACHINE} == "bebox" || \ 1416 ${MACHINE} == "bebox" || \
1409 ${MACHINE} == "cats" || \ 1417 ${MACHINE} == "cats" || \
1410 ${MACHINE} == "dreamcast" || \ 1418 ${MACHINE} == "dreamcast" || \
1411 ${MACHINE} == "ews4800mips" || \ 1419 ${MACHINE} == "ews4800mips" || \
1412 ${MACHINE} == "evbarm" || \ 1420 ${MACHINE} == "evbarm" || \
1413 ${MACHINE} == "evbmips" || \ 1421 ${MACHINE} == "evbmips" || \