CVS commit: src/share/mk
Module Name:src Committed By: martin Date: Wed Apr 24 20:38:24 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Explicitly exclude VAX from new Mesa due to a gcc internal compiler error To generate a diff of this commit: cvs rdiff -u -r1.1371 -r1.1372 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1371 src/share/mk/bsd.own.mk:1.1372 --- src/share/mk/bsd.own.mk:1.1371 Wed Apr 24 19:14:39 2024 +++ src/share/mk/bsd.own.mk Wed Apr 24 20:38:24 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1371 2024/04/24 19:14:39 martin Exp $ +# $NetBSD: bsd.own.mk,v 1.1372 2024/04/24 20:38:24 martin Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -1331,7 +1331,8 @@ HAVE_XORG_SERVER_VER?=120 .endif # Newer Mesa does not build with old X server -.if ${HAVE_XORG_SERVER_VER} != "120" +# VAX build triggers a gcc internal error +.if ${HAVE_XORG_SERVER_VER} != "120" || ${MACHINE} == "vax" HAVE_MESA_VER=19 .endif
CVS commit: src/share/mk
Module Name:src Committed By: martin Date: Wed Apr 24 20:38:24 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Explicitly exclude VAX from new Mesa due to a gcc internal compiler error To generate a diff of this commit: cvs rdiff -u -r1.1371 -r1.1372 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.
CVS commit: src/share/mk
Module Name:src Committed By: martin Date: Wed Apr 24 19:14:39 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Force old Mesa for all old X server builds To generate a diff of this commit: cvs rdiff -u -r1.1370 -r1.1371 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.
CVS commit: src/share/mk
Module Name:src Committed By: martin Date: Wed Apr 24 19:14:39 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Force old Mesa for all old X server builds To generate a diff of this commit: cvs rdiff -u -r1.1370 -r1.1371 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1370 src/share/mk/bsd.own.mk:1.1371 --- src/share/mk/bsd.own.mk:1.1370 Wed Apr 24 07:54:53 2024 +++ src/share/mk/bsd.own.mk Wed Apr 24 19:14:39 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1370 2024/04/24 07:54:53 martin Exp $ +# $NetBSD: bsd.own.mk,v 1.1371 2024/04/24 19:14:39 martin Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -1320,10 +1320,18 @@ MKDTB.earmv7hfeb= yes MKDTB.riscv32= yes MKDTB.riscv64= yes -# alpha build fails due to missing X include files, -# vax build triggers a gcc bug and dies with an internal compiler error. -# XXX switch both to old Mesa for now. -.if ${MACHINE} == "alpha" || ${MACHINE} == "vax" +# During transition from xorg-server 1.10 to 1.20 +.if \ +${MACHINE} == "alpha" || \ +${MACHINE} == "netwinder" || \ +${MACHINE} == "sgimips" +HAVE_XORG_SERVER_VER?=110 +.else +HAVE_XORG_SERVER_VER?=120 +.endif + +# Newer Mesa does not build with old X server +.if ${HAVE_XORG_SERVER_VER} != "120" HAVE_MESA_VER=19 .endif @@ -1676,16 +1684,6 @@ X11SRCDIR.${_lib}?= ${X11SRCDIRMIT}/lib X11SRCDIR.${_proto}proto?= ${X11SRCDIRMIT}/${_proto}proto/dist .endfor -# During transition from xorg-server 1.10 to 1.20 -.if \ -${MACHINE} == "alpha" || \ -${MACHINE} == "netwinder" || \ -${MACHINE} == "sgimips" -HAVE_XORG_SERVER_VER?=110 -.else -HAVE_XORG_SERVER_VER?=120 -.endif - .if ${HAVE_XORG_SERVER_VER} == "120" XORG_SERVER_SUBDIR?=xorg-server . if ${MACHINE} == "amd64" || ${MACHINE} == "i386" || ${MACHINE} == "evbarm"
CVS commit: src/share/mk
Module Name:src Committed By: martin Date: Wed Apr 24 07:54:53 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Switch alpha and VAX back to old Mesa for now untill someone fixes those builds with newer Mesa. To generate a diff of this commit: cvs rdiff -u -r1.1369 -r1.1370 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1369 src/share/mk/bsd.own.mk:1.1370 --- src/share/mk/bsd.own.mk:1.1369 Wed Apr 24 05:20:35 2024 +++ src/share/mk/bsd.own.mk Wed Apr 24 07:54:53 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1369 2024/04/24 05:20:35 nia Exp $ +# $NetBSD: bsd.own.mk,v 1.1370 2024/04/24 07:54:53 martin Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -1320,6 +1320,13 @@ MKDTB.earmv7hfeb= yes MKDTB.riscv32= yes MKDTB.riscv64= yes +# alpha build fails due to missing X include files, +# vax build triggers a gcc bug and dies with an internal compiler error. +# XXX switch both to old Mesa for now. +.if ${MACHINE} == "alpha" || ${MACHINE} == "vax" +HAVE_MESA_VER=19 +.endif + HAVE_MESA_VER?= 21 .if ${HAVE_MESA_VER} == 19 EXTERNAL_MESALIB_DIR?= MesaLib.old
CVS commit: src/share/mk
Module Name:src Committed By: martin Date: Wed Apr 24 07:54:53 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Switch alpha and VAX back to old Mesa for now untill someone fixes those builds with newer Mesa. To generate a diff of this commit: cvs rdiff -u -r1.1369 -r1.1370 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.
CVS commit: src/share/mk
Module Name:src Committed By: nia Date: Wed Apr 24 05:20:35 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: USE_XZ_SETS is no longer needed for sparc64 to fit on a standard CD-ROM To generate a diff of this commit: cvs rdiff -u -r1.1368 -r1.1369 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.
CVS commit: src/share/mk
Module Name:src Committed By: nia Date: Wed Apr 24 05:20:35 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: USE_XZ_SETS is no longer needed for sparc64 to fit on a standard CD-ROM To generate a diff of this commit: cvs rdiff -u -r1.1368 -r1.1369 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1368 src/share/mk/bsd.own.mk:1.1369 --- src/share/mk/bsd.own.mk:1.1368 Tue Apr 23 03:25:39 2024 +++ src/share/mk/bsd.own.mk Wed Apr 24 05:20:35 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1368 2024/04/23 03:25:39 maya Exp $ +# $NetBSD: bsd.own.mk,v 1.1369 2024/04/24 05:20:35 nia Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -1607,7 +1607,6 @@ ${var}?= no # format if USE_PIGZGZIP is enabled. .if ${USE_PIGZGZIP} == "no" && \ (${MACHINE} == "amd64" || \ - ${MACHINE} == "sparc64" || \ ${MACHINE_ARCH:Maarch64*}) USE_XZ_SETS?= yes .else
CVS commit: src/share/mk
Module Name:src Committed By: jakllsch Date: Fri Apr 12 16:28:43 UTC 2024 Modified Files: src/share/mk: bsd.hostlib.mk Log Message: Filter out -Wp,-iremap,* from CPPFLAGS as is done in hostprog.mk Seems to fix build of libnbcompat in reproducible mode on host toolchains w/o -iremap To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/share/mk/bsd.hostlib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.hostlib.mk diff -u src/share/mk/bsd.hostlib.mk:1.20 src/share/mk/bsd.hostlib.mk:1.21 --- src/share/mk/bsd.hostlib.mk:1.20 Fri May 4 14:50:40 2018 +++ src/share/mk/bsd.hostlib.mk Fri Apr 12 16:28:43 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.hostlib.mk,v 1.20 2018/05/04 14:50:40 christos Exp $ +# $NetBSD: bsd.hostlib.mk,v 1.21 2024/04/12 16:28:43 jakllsch Exp $ .include .include @@ -47,7 +47,7 @@ CLEANFILES+= a.out [Ee]rrs mklog core *. beforedepend: CFLAGS:= ${HOST_CFLAGS} -CPPFLAGS:= ${HOST_CPPFLAGS} +CPPFLAGS:= ${HOST_CPPFLAGS:N-Wp,-iremap,*} # Pull in related .mk logic .include
CVS commit: src/share/mk
Module Name:src Committed By: jakllsch Date: Fri Apr 12 16:28:43 UTC 2024 Modified Files: src/share/mk: bsd.hostlib.mk Log Message: Filter out -Wp,-iremap,* from CPPFLAGS as is done in hostprog.mk Seems to fix build of libnbcompat in reproducible mode on host toolchains w/o -iremap To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/share/mk/bsd.hostlib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Thu Apr 11 19:12:11 UTC 2024 Modified Files: src/share/mk: bsd.lib.mk Log Message: fix previous. Doing assignmnents of conditionals does not work for being used as conditionals (thanks rillig@) To generate a diff of this commit: cvs rdiff -u -r1.401 -r1.402 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Thu Apr 11 19:12:11 UTC 2024 Modified Files: src/share/mk: bsd.lib.mk Log Message: fix previous. Doing assignmnents of conditionals does not work for being used as conditionals (thanks rillig@) To generate a diff of this commit: cvs rdiff -u -r1.401 -r1.402 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.401 src/share/mk/bsd.lib.mk:1.402 --- src/share/mk/bsd.lib.mk:1.401 Tue Apr 9 18:37:23 2024 +++ src/share/mk/bsd.lib.mk Thu Apr 11 15:12:11 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.401 2024/04/09 22:37:23 christos Exp $ +# $NetBSD: bsd.lib.mk,v 1.402 2024/04/11 19:12:11 christos Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -425,11 +425,15 @@ _DEST.LINT:=${DESTDIR}${LINTLIBDIR} _DEST.DEBUG:=${DESTDIR}${DEBUGDIR}${LIBDIR} _DEST.ODEBUG:=${DESTDIR}${DEBUGDIR}${_LIBSODIR} -_BUILDSTATICLIB= ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \ +.if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \ || ${MAKELINKLIB} != "no" || ${MAKESTATICLIB} != "no" +_BUILDSTATICLIB=yes +.else +_BUILDSTATICLIB=no +.endif .if defined(LIB) # { -.if ${_BUILDSTATICLIB} +.if ${_BUILDSTATICLIB} != "no" _LIBS=${_LIB.a} .else _LIBS= @@ -484,7 +488,7 @@ _LIBS+=${_LIB.ln} .endif ALLOBJS= -.if ${_BUILDSTATICLIB} +.if ${_BUILDSTATICLIB} != "no" ALLOBJS+=${STOBJS} .endif ALLOBJS+=${POBJS} ${SOBJS}
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Tue Apr 9 22:37:23 UTC 2024 Modified Files: src/share/mk: bsd.lib.mk Log Message: Merge two identical if's and fix a logic error in them ( && instead of ||) To generate a diff of this commit: cvs rdiff -u -r1.400 -r1.401 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.400 src/share/mk/bsd.lib.mk:1.401 --- src/share/mk/bsd.lib.mk:1.400 Thu Apr 4 21:16:00 2024 +++ src/share/mk/bsd.lib.mk Tue Apr 9 18:37:23 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.400 2024/04/05 01:16:00 christos Exp $ +# $NetBSD: bsd.lib.mk,v 1.401 2024/04/09 22:37:23 christos Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -425,9 +425,11 @@ _DEST.LINT:=${DESTDIR}${LINTLIBDIR} _DEST.DEBUG:=${DESTDIR}${DEBUGDIR}${LIBDIR} _DEST.ODEBUG:=${DESTDIR}${DEBUGDIR}${_LIBSODIR} +_BUILDSTATICLIB= ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \ +|| ${MAKELINKLIB} != "no" || ${MAKESTATICLIB} != "no" + .if defined(LIB) # { -.if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \ - || ${MAKELINKLIB} != "no") && ${MAKESTATICLIB} != "no" +.if ${_BUILDSTATICLIB} _LIBS=${_LIB.a} .else _LIBS= @@ -482,8 +484,7 @@ _LIBS+=${_LIB.ln} .endif ALLOBJS= -.if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \ - || ${MAKELINKLIB} != "no") && ${MAKESTATICLIB} != "no" +.if ${_BUILDSTATICLIB} ALLOBJS+=${STOBJS} .endif ALLOBJS+=${POBJS} ${SOBJS}
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Tue Apr 9 22:37:23 UTC 2024 Modified Files: src/share/mk: bsd.lib.mk Log Message: Merge two identical if's and fix a logic error in them ( && instead of ||) To generate a diff of this commit: cvs rdiff -u -r1.400 -r1.401 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: tsutsui Date: Sun Apr 7 14:40:34 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Switch vax to HAVE_XORG_SERVER_VER=120. Tested on my VAXstation 3100/m30 with smg(4). Ok'ed by mrg@ on tech-x11@: https://mail-index.netbsd.org/tech-x11/2024/04/thread1.html#002457 To generate a diff of this commit: cvs rdiff -u -r1.1366 -r1.1367 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1366 src/share/mk/bsd.own.mk:1.1367 --- src/share/mk/bsd.own.mk:1.1366 Tue Apr 2 22:41:48 2024 +++ src/share/mk/bsd.own.mk Sun Apr 7 14:40:34 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1366 2024/04/02 22:41:48 riastradh Exp $ +# $NetBSD: bsd.own.mk,v 1.1367 2024/04/07 14:40:34 tsutsui Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -1674,8 +1674,7 @@ X11SRCDIR.${_proto}proto?= ${X11SRCDIRM .if \ ${MACHINE} == "alpha" || \ ${MACHINE} == "netwinder" || \ -${MACHINE} == "sgimips" || \ -${MACHINE} == "vax" +${MACHINE} == "sgimips" HAVE_XORG_SERVER_VER?=110 .else HAVE_XORG_SERVER_VER?=120
CVS commit: src/share/mk
Module Name:src Committed By: tsutsui Date: Sun Apr 7 14:40:34 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Switch vax to HAVE_XORG_SERVER_VER=120. Tested on my VAXstation 3100/m30 with smg(4). Ok'ed by mrg@ on tech-x11@: https://mail-index.netbsd.org/tech-x11/2024/04/thread1.html#002457 To generate a diff of this commit: cvs rdiff -u -r1.1366 -r1.1367 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.
CVS commit: src/share/mk
Module Name:src Committed By: tsutsui Date: Sun Apr 7 14:36:23 UTC 2024 Modified Files: src/share/mk: bsd.x11.mk Log Message: Use default X11FLAGS to build Xorg servers on vax. It looks necessary on HAVE_XORG_SERVER_VER=120. To generate a diff of this commit: cvs rdiff -u -r1.152 -r1.153 src/share/mk/bsd.x11.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: tsutsui Date: Sun Apr 7 14:36:23 UTC 2024 Modified Files: src/share/mk: bsd.x11.mk Log Message: Use default X11FLAGS to build Xorg servers on vax. It looks necessary on HAVE_XORG_SERVER_VER=120. To generate a diff of this commit: cvs rdiff -u -r1.152 -r1.153 src/share/mk/bsd.x11.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.x11.mk diff -u src/share/mk/bsd.x11.mk:1.152 src/share/mk/bsd.x11.mk:1.153 --- src/share/mk/bsd.x11.mk:1.152 Tue Apr 2 16:17:29 2024 +++ src/share/mk/bsd.x11.mk Sun Apr 7 14:36:23 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.x11.mk,v 1.152 2024/04/02 16:17:29 christos Exp $ +# $NetBSD: bsd.x11.mk,v 1.153 2024/04/07 14:36:23 tsutsui Exp $ .include @@ -83,8 +83,7 @@ X11FLAGS.OS_DEFINES= -DDDXOSINIT -DSERVE .if !(${MACHINE} == "acorn32" || \ ${MACHINE} == "sun3" || \ -${MACHINE} == "x68k" || \ -${MACHINE} == "vax") +${MACHINE} == "x68k") # EXT_DEFINES X11FLAGS.EXTENSION+= -DXF86VIDMODE
CVS commit: src/share/mk
Module Name:src Committed By: riastradh Date: Tue Apr 2 22:41:48 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.1365 -r1.1366 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1365 src/share/mk/bsd.own.mk:1.1366 --- src/share/mk/bsd.own.mk:1.1365 Tue Apr 2 22:37:34 2024 +++ src/share/mk/bsd.own.mk Tue Apr 2 22:41:48 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1365 2024/04/02 22:37:34 riastradh Exp $ +# $NetBSD: bsd.own.mk,v 1.1366 2024/04/02 22:41:48 riastradh Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -1336,6 +1336,21 @@ MKLLVMRT.i386= yes MKLLVMRT.aarch64= yes .endif +# Just-in-time compiler for bpf, npf acceleration +MKSLJIT.aarch64= yes +MKSLJIT.i386= yes +MKSLJIT.sparc= yes +#MKSLJIT.sparc64= yes # not suppored in sljit (yet?) +MKSLJIT.x86_64= yes +#MKSLJIT.powerpc= yes # XXX +#MKSLJIT.powerpc64= yes # XXX +#MKSLJIT.mipsel= yes # XXX +#MKSLJIT.mipseb= yes # XXX +#MKSLJIT.mips64el= yes # XXX +#MKSLJIT.mips64eb= yes # XXX +#MKSLJIT.riscv32= yes # not until we update sljit +#MKSLJIT.riscv64= yes # not until we update sljit + # compat with old names MKDEBUGKERNEL?=${MKKDEBUG:Uno} MKDEBUGTOOLS?=${MKTOOLSDEBUG:Uno} @@ -1391,13 +1406,6 @@ _MKVARS.no= \ ${var}?= ${${var}.${MACHINE_ARCH}:U${${var}.${MACHINE}:Uno}} .endfor -.if ${MACHINE_ARCH} == "aarch64" || \ -${MACHINE_ARCH} == "i386"|| \ -${MACHINE_ARCH} == "sparc" || \ -${MACHINE_ARCH} == "x86_64" -MKSLJIT= yes -.endif - # # Which platforms build the xorg-server drivers (as opposed # to just Xnest and Xvfb.)
CVS commit: src/share/mk
Module Name:src Committed By: riastradh Date: Tue Apr 2 22:41:48 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.1365 -r1.1366 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.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Tue Apr 2 16:18:23 UTC 2024 Modified Files: src/share/mk: bsd.lib.mk Log Message: Back-out unintented commit. To generate a diff of this commit: cvs rdiff -u -r1.398 -r1.399 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.398 src/share/mk/bsd.lib.mk:1.399 --- src/share/mk/bsd.lib.mk:1.398 Tue Apr 2 12:17:29 2024 +++ src/share/mk/bsd.lib.mk Tue Apr 2 12:18:23 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.398 2024/04/02 16:17:29 christos Exp $ +# $NetBSD: bsd.lib.mk,v 1.399 2024/04/02 16:18:23 christos Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -16,13 +16,9 @@ LIBISCXX?= no .if ${LIBISMODULE} != "no" _LIB_PREFIX?= # empty MKDEBUGLIB:= no -MKPROFILE:= no -.if ${LIBISMODULE} != "pic" MKPICINSTALL:= no -MKLINKLIB:= no +MKPROFILE:= no MKSTATICLIB:= no -.endif -_LINKINSTALL?= no _LINTINSTALL?= no .else _LIB_PREFIX?= lib @@ -30,19 +26,17 @@ _LIB_PREFIX?= lib .if ${LIBISPRIVATE} != "no" MKDEBUGLIB:= no -MKPROFILE:= no MKPICINSTALL:= no . if defined(NOSTATICLIB) && ${MKPICLIB} != "no" MKSTATICLIB:= no . elif ${LIBISPRIVATE} != "pic" MKPIC:= no . endif -_LINKINSTALL?= no +MKPROFILE:= no _LINTINSTALL?= no .endif _LINTINSTALL?= ${MKLINT} -_LINKINSTALL?= ${MKLINKLIB} # Basic targets .PHONY: checkver libinstall @@ -737,7 +731,7 @@ LIBCLEANFILES5+= ${_LIB.ln} ${LOBJS} # Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no libinstall:: -.if ${MKLINKLIB} != "no" && ${MKSTATICLIB} != "no" && ${_LINKINSTALL} != "no" +.if ${MKLINKLIB} != "no" && ${MKSTATICLIB} != "no" libinstall:: ${_DEST.LIB}/${_LIB.a} .PRECIOUS: ${_DEST.LIB}/${_LIB.a} @@ -844,7 +838,7 @@ ${_DEST.OBJ}/${_LIB.so.full}: ${_LIB.so. ${_DEST.LIB}/${_LIB.so.major} .endif .endif -.if ${MKLINKLIB} != "no" && ${_LINKINSTALL} != "no" +.if ${MKLINKLIB} != "no" ${INSTALL_SYMLINK} ${_LIB.so.full} ${_DEST.OBJ}/${_LIB.so} .if ${_LIBSODIR} != ${LIBDIR} ${INSTALL_SYMLINK} -l r ${_DEST.OBJ}/${_LIB.so.full} \
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Tue Apr 2 16:18:23 UTC 2024 Modified Files: src/share/mk: bsd.lib.mk Log Message: Back-out unintented commit. To generate a diff of this commit: cvs rdiff -u -r1.398 -r1.399 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Tue Apr 2 16:17:29 UTC 2024 Modified Files: src/share/mk: bsd.lib.mk bsd.x11.mk Log Message: PR/58104: Kouichi Hashikawa: Use ${TOOL_AWK} To generate a diff of this commit: cvs rdiff -u -r1.397 -r1.398 src/share/mk/bsd.lib.mk cvs rdiff -u -r1.151 -r1.152 src/share/mk/bsd.x11.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.397 src/share/mk/bsd.lib.mk:1.398 --- src/share/mk/bsd.lib.mk:1.397 Tue Mar 26 14:38:52 2024 +++ src/share/mk/bsd.lib.mk Tue Apr 2 12:17:29 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.397 2024/03/26 18:38:52 riastradh Exp $ +# $NetBSD: bsd.lib.mk,v 1.398 2024/04/02 16:17:29 christos Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -16,9 +16,13 @@ LIBISCXX?= no .if ${LIBISMODULE} != "no" _LIB_PREFIX?= # empty MKDEBUGLIB:= no -MKPICINSTALL:= no MKPROFILE:= no +.if ${LIBISMODULE} != "pic" +MKPICINSTALL:= no +MKLINKLIB:= no MKSTATICLIB:= no +.endif +_LINKINSTALL?= no _LINTINSTALL?= no .else _LIB_PREFIX?= lib @@ -26,17 +30,19 @@ _LIB_PREFIX?= lib .if ${LIBISPRIVATE} != "no" MKDEBUGLIB:= no +MKPROFILE:= no MKPICINSTALL:= no . if defined(NOSTATICLIB) && ${MKPICLIB} != "no" MKSTATICLIB:= no . elif ${LIBISPRIVATE} != "pic" MKPIC:= no . endif -MKPROFILE:= no +_LINKINSTALL?= no _LINTINSTALL?= no .endif _LINTINSTALL?= ${MKLINT} +_LINKINSTALL?= ${MKLINKLIB} # Basic targets .PHONY: checkver libinstall @@ -731,7 +737,7 @@ LIBCLEANFILES5+= ${_LIB.ln} ${LOBJS} # Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no libinstall:: -.if ${MKLINKLIB} != "no" && ${MKSTATICLIB} != "no" +.if ${MKLINKLIB} != "no" && ${MKSTATICLIB} != "no" && ${_LINKINSTALL} != "no" libinstall:: ${_DEST.LIB}/${_LIB.a} .PRECIOUS: ${_DEST.LIB}/${_LIB.a} @@ -838,7 +844,7 @@ ${_DEST.OBJ}/${_LIB.so.full}: ${_LIB.so. ${_DEST.LIB}/${_LIB.so.major} .endif .endif -.if ${MKLINKLIB} != "no" +.if ${MKLINKLIB} != "no" && ${_LINKINSTALL} != "no" ${INSTALL_SYMLINK} ${_LIB.so.full} ${_DEST.OBJ}/${_LIB.so} .if ${_LIBSODIR} != ${LIBDIR} ${INSTALL_SYMLINK} -l r ${_DEST.OBJ}/${_LIB.so.full} \ Index: src/share/mk/bsd.x11.mk diff -u src/share/mk/bsd.x11.mk:1.151 src/share/mk/bsd.x11.mk:1.152 --- src/share/mk/bsd.x11.mk:1.151 Wed Oct 25 00:37:59 2023 +++ src/share/mk/bsd.x11.mk Tue Apr 2 12:17:29 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.x11.mk,v 1.151 2023/10/25 04:37:59 mrg Exp $ +# $NetBSD: bsd.x11.mk,v 1.152 2024/04/02 16:17:29 christos Exp $ .include @@ -145,7 +145,7 @@ __XKBDEFRULES__= '"xorg"' XLOCALE.DEFINES= -DXLOCALEDIR=\"${X11LIBDIR}/locale\" \ -DXLOCALELIBDIR=\"${X11LIBDIR}/locale\" -PRINT_PACKAGE_VERSION= awk '/^PACKAGE_VERSION=/ { \ +PRINT_PACKAGE_VERSION= ${TOOL_AWK} '/^PACKAGE_VERSION=/ { \ match($$1, "([0-9]+\\.)+[0-9]+"); \ version = substr($$1, RSTART, RLENGTH); \ } END { print version }'
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Tue Apr 2 16:17:29 UTC 2024 Modified Files: src/share/mk: bsd.lib.mk bsd.x11.mk Log Message: PR/58104: Kouichi Hashikawa: Use ${TOOL_AWK} To generate a diff of this commit: cvs rdiff -u -r1.397 -r1.398 src/share/mk/bsd.lib.mk cvs rdiff -u -r1.151 -r1.152 src/share/mk/bsd.x11.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Mon Apr 1 22:23:15 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Use the TOOL_GZIP we built as part of tools if available. To generate a diff of this commit: cvs rdiff -u -r1.1363 -r1.1364 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1363 src/share/mk/bsd.own.mk:1.1364 --- src/share/mk/bsd.own.mk:1.1363 Sat Jan 20 03:09:13 2024 +++ src/share/mk/bsd.own.mk Mon Apr 1 18:23:14 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1363 2024/01/20 08:09:13 skrll Exp $ +# $NetBSD: bsd.own.mk,v 1.1364 2024/04/01 22:23:14 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -1612,7 +1612,11 @@ USE_XZ_SETS?= no TOOL_GZIP= ${TOOL_PIGZ} GZIP_N_FLAG?= -nT .else +.if ${USETOOLS} == "yes" +TOOL_GZIP= ${TOOLDIR}/bin/${_TOOL_PREFIX}gzip +.else TOOL_GZIP= gzip +.endif GZIP_N_FLAG?= -n .endif TOOL_GZIP_N= ${TOOL_GZIP} ${GZIP_N_FLAG}
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Mon Apr 1 22:23:15 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Use the TOOL_GZIP we built as part of tools if available. To generate a diff of this commit: cvs rdiff -u -r1.1363 -r1.1364 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.
CVS commit: src/share/mk
Module Name:src Committed By: riastradh Date: Tue Mar 26 18:38:52 UTC 2024 Modified Files: src/share/mk: bsd.lib.mk Log Message: bsd.lib.mk: Avoid symbol check if we're not doing shared libraries. Otherwise this fails on non-shlib builds like sun2. To generate a diff of this commit: cvs rdiff -u -r1.396 -r1.397 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.396 src/share/mk/bsd.lib.mk:1.397 --- src/share/mk/bsd.lib.mk:1.396 Sat Mar 23 21:56:47 2024 +++ src/share/mk/bsd.lib.mk Tue Mar 26 18:38:52 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.396 2024/03/23 21:56:47 riastradh Exp $ +# $NetBSD: bsd.lib.mk,v 1.397 2024/03/26 18:38:52 riastradh Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -656,7 +656,7 @@ LIB_EXPSYM?= ${LIB}.${MACHINE_ARCH}.exps LIB_EXPSYM?= ${LIB}.expsym .endif -.if !empty(LIB_EXPSYM) +.if !empty(LIB_EXPSYM) && ${MKPIC} != "no" realall: ${_LIB.so.full}.diffsym ${_LIB.so.full}.diffsym: ${LIB_EXPSYM} ${_LIB.so.full}.actsym ${_MKTARGET_CREATE}
CVS commit: src/share/mk
Module Name:src Committed By: riastradh Date: Tue Mar 26 18:38:52 UTC 2024 Modified Files: src/share/mk: bsd.lib.mk Log Message: bsd.lib.mk: Avoid symbol check if we're not doing shared libraries. Otherwise this fails on non-shlib builds like sun2. To generate a diff of this commit: cvs rdiff -u -r1.396 -r1.397 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: riastradh Date: Sat Mar 23 21:56:47 UTC 2024 Modified Files: src/share/mk: bsd.README bsd.lib.mk Log Message: bsd.lib.mk: Tidy up expected symbols check a little. Add some documentation in bsd.README. To generate a diff of this commit: cvs rdiff -u -r1.445 -r1.446 src/share/mk/bsd.README cvs rdiff -u -r1.395 -r1.396 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.README diff -u src/share/mk/bsd.README:1.445 src/share/mk/bsd.README:1.446 --- src/share/mk/bsd.README:1.445 Sat Jul 22 18:50:31 2023 +++ src/share/mk/bsd.README Sat Mar 23 21:56:47 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.445 2023/07/22 18:50:31 lukem Exp $ +# $NetBSD: bsd.README,v 1.446 2024/03/23 21:56:47 riastradh Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the make "include" files for the NetBSD @@ -993,6 +993,20 @@ PROGDPLIBS A list of the tuples: as well as in parent directories to cache common libraries as a build-time optimization. +LIB_EXPSYM File listing all symbols expected to be defined by the + library. Each line has a single symbol. If the symbol + is versioned, it is followed by `@@', if it is the + default version, or `@', if not, and the symbol + version. The lines must be sorted in LANG=C. + + bsd.lib.mk checks to make sure exactly the set of + symbols in this file is defined when the library is + built; if not, the build will fail and print a diff + from the expected symbols to the actual symbols. + During development, you can update the expected symbols + from the actual ones with `make update-symbols'. + + The include file includes the file named "../Makefile.inc" if it exists, as well as the include file . Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.395 src/share/mk/bsd.lib.mk:1.396 --- src/share/mk/bsd.lib.mk:1.395 Wed Mar 20 13:50:37 2024 +++ src/share/mk/bsd.lib.mk Sat Mar 23 21:56:47 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.395 2024/03/20 13:50:37 riastradh Exp $ +# $NetBSD: bsd.lib.mk,v 1.396 2024/03/23 21:56:47 riastradh Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -672,7 +672,7 @@ ${_LIB.so.full}.diffsym: ${LIB_EXPSYM} $ ${_LIB.so.full}.actsym: ${_LIB.so.full} ${_MKTARGET_CREATE} ${NM} --dynamic --extern-only --defined-only --with-symbol-versions \ - ${_LIB.so.full} \ + ${.ALLSRC} \ | cut -d' ' -f3 | LANG=C sort -u >${.TARGET}.tmp ${MV} ${.TARGET}.tmp ${.TARGET} CLEANFILES+= ${_LIB.so.full}.actsym @@ -681,7 +681,7 @@ CLEANFILES+= ${_LIB.so.full}.diffsym CLEANFILES+= ${_LIB.so.full}.diffsym.tmp update-symbols: .PHONY update-symbols: ${_LIB.so.full}.actsym - cp ${_LIB.so.full}.actsym ${.CURDIR}/${LIB}.expsym + cp ${.ALLSRC} ${.CURDIR}/${LIB_EXPSYM} .endif .if !empty(LOBJS) # {
CVS commit: src/share/mk
Module Name:src Committed By: riastradh Date: Sat Mar 23 21:56:47 UTC 2024 Modified Files: src/share/mk: bsd.README bsd.lib.mk Log Message: bsd.lib.mk: Tidy up expected symbols check a little. Add some documentation in bsd.README. To generate a diff of this commit: cvs rdiff -u -r1.445 -r1.446 src/share/mk/bsd.README cvs rdiff -u -r1.395 -r1.396 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: riastradh Date: Wed Mar 20 13:50:37 UTC 2024 Modified Files: src/share/mk: bsd.lib.mk Log Message: bsd.lib.mk: Check expected vs actual symbols at build-time. If, for LIB=foo, you create a file foo.expsym, bsd.lib.mk will list the dynamic symbols and their versions with nm --dynamic --extern-only --defined-only --with-symbol-versions and compare the names (not addresses or types) to foo.expsym. If there are any differences, they will be printed and the build will fail. foo.expsym should be sorted with `LANG=C sort -u'. This way, you can verify changes don't inadvertently add or remove symbols. If you do want to add (or, if you're bumping the major, remove) symbols, you can verify the changes and edit the foo.expsym file accordingly. This will also help to enforce rules about symbol changes on pullups in release branches. Note that using a version map (-Wl,--version-script=...) doesn't catch symbol removal -- ld quietly ignores symbols in the version map that aren't actually defined by any object in the library. So this supplements the version map. Proposed on tech-userlevel: https://mail-index.NetBSD.org/tech-userlevel/2024/03/16/msg014264.html To generate a diff of this commit: cvs rdiff -u -r1.394 -r1.395 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: riastradh Date: Wed Mar 20 13:50:37 UTC 2024 Modified Files: src/share/mk: bsd.lib.mk Log Message: bsd.lib.mk: Check expected vs actual symbols at build-time. If, for LIB=foo, you create a file foo.expsym, bsd.lib.mk will list the dynamic symbols and their versions with nm --dynamic --extern-only --defined-only --with-symbol-versions and compare the names (not addresses or types) to foo.expsym. If there are any differences, they will be printed and the build will fail. foo.expsym should be sorted with `LANG=C sort -u'. This way, you can verify changes don't inadvertently add or remove symbols. If you do want to add (or, if you're bumping the major, remove) symbols, you can verify the changes and edit the foo.expsym file accordingly. This will also help to enforce rules about symbol changes on pullups in release branches. Note that using a version map (-Wl,--version-script=...) doesn't catch symbol removal -- ld quietly ignores symbols in the version map that aren't actually defined by any object in the library. So this supplements the version map. Proposed on tech-userlevel: https://mail-index.NetBSD.org/tech-userlevel/2024/03/16/msg014264.html To generate a diff of this commit: cvs rdiff -u -r1.394 -r1.395 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.394 src/share/mk/bsd.lib.mk:1.395 --- src/share/mk/bsd.lib.mk:1.394 Sat Jun 3 21:24:57 2023 +++ src/share/mk/bsd.lib.mk Wed Mar 20 13:50:37 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.394 2023/06/03 21:24:57 lukem Exp $ +# $NetBSD: bsd.lib.mk,v 1.395 2024/03/20 13:50:37 riastradh Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -648,6 +648,42 @@ ${_LIB.so.full}: ${_MAINLIBDEPS} ${HOST_LN} -sf ${_LIB.so.full} ${_LIB.so}.tmp ${MV} ${_LIB.so}.tmp ${_LIB.so} +# If there's a file listing expected symbols, fail if the diff from it +# to the actual symbols is nonempty, and show the diff in that case. +.if exists(${.CURDIR}/${LIB}.${MACHINE_ARCH}.expsym) +LIB_EXPSYM?= ${LIB}.${MACHINE_ARCH}.expsym +.elif exists(${.CURDIR}/${LIB}.expsym) +LIB_EXPSYM?= ${LIB}.expsym +.endif + +.if !empty(LIB_EXPSYM) +realall: ${_LIB.so.full}.diffsym +${_LIB.so.full}.diffsym: ${LIB_EXPSYM} ${_LIB.so.full}.actsym + ${_MKTARGET_CREATE} + if diff -u ${.ALLSRC} >${.TARGET}.tmp; then \ + ${MV} ${.TARGET}.tmp ${.TARGET}; \ + else \ + ret=$$?; \ + cat ${.TARGET}.tmp; \ + echo ${_LIB.so.full}: error: \ + actual symbols differ from expected symbols >&2; \ + exit $$ret; \ + fi +${_LIB.so.full}.actsym: ${_LIB.so.full} + ${_MKTARGET_CREATE} + ${NM} --dynamic --extern-only --defined-only --with-symbol-versions \ + ${_LIB.so.full} \ + | cut -d' ' -f3 | LANG=C sort -u >${.TARGET}.tmp + ${MV} ${.TARGET}.tmp ${.TARGET} +CLEANFILES+= ${_LIB.so.full}.actsym +CLEANFILES+= ${_LIB.so.full}.actsym.tmp +CLEANFILES+= ${_LIB.so.full}.diffsym +CLEANFILES+= ${_LIB.so.full}.diffsym.tmp +update-symbols: .PHONY +update-symbols: ${_LIB.so.full}.actsym + cp ${_LIB.so.full}.actsym ${.CURDIR}/${LIB}.expsym +.endif + .if !empty(LOBJS) # { LLIBS?= -lc ${_LIB.ln}: ${LOBJS}
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Mon Feb 19 20:39:38 UTC 2024 Modified Files: src/share/mk: bsd.prog.mk Log Message: Add a hook that adds more libraries after PROGDPLIBS To generate a diff of this commit: cvs rdiff -u -r1.347 -r1.348 src/share/mk/bsd.prog.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.prog.mk diff -u src/share/mk/bsd.prog.mk:1.347 src/share/mk/bsd.prog.mk:1.348 --- src/share/mk/bsd.prog.mk:1.347 Wed Oct 11 10:08:26 2023 +++ src/share/mk/bsd.prog.mk Mon Feb 19 15:39:38 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prog.mk,v 1.347 2023/10/11 14:08:26 riastradh Exp $ +# $NetBSD: bsd.prog.mk,v 1.348 2024/02/19 20:39:38 christos Exp $ # @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94 .ifndef HOSTPROG @@ -403,6 +403,10 @@ DPADD+= ${PROGDO.${_lib}}/lib${_lib}.a .endif .endfor .endif # } + +LDADD+=${LDADD_AFTER} +DPADD+=${DPADD_AFTER} + # # Per-program definitions and targets. #
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Mon Feb 19 20:39:38 UTC 2024 Modified Files: src/share/mk: bsd.prog.mk Log Message: Add a hook that adds more libraries after PROGDPLIBS To generate a diff of this commit: cvs rdiff -u -r1.347 -r1.348 src/share/mk/bsd.prog.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Tue Feb 13 16:15:59 UTC 2024 Modified Files: src/share/mk: bsd.sys.mk Log Message: Allow overriding the language standard to something newer. To generate a diff of this commit: cvs rdiff -u -r1.315 -r1.316 src/share/mk/bsd.sys.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Tue Feb 13 16:15:59 UTC 2024 Modified Files: src/share/mk: bsd.sys.mk Log Message: Allow overriding the language standard to something newer. To generate a diff of this commit: cvs rdiff -u -r1.315 -r1.316 src/share/mk/bsd.sys.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.sys.mk diff -u src/share/mk/bsd.sys.mk:1.315 src/share/mk/bsd.sys.mk:1.316 --- src/share/mk/bsd.sys.mk:1.315 Mon Nov 6 17:35:48 2023 +++ src/share/mk/bsd.sys.mk Tue Feb 13 11:15:59 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.sys.mk,v 1.315 2023/11/06 22:35:48 christos Exp $ +# $NetBSD: bsd.sys.mk,v 1.316 2024/02/13 16:15:59 christos Exp $ # # Build definitions used for NetBSD source tree builds. @@ -57,7 +57,7 @@ CXXFLAGS+= ${REPROFLAGS} # NetBSD sources use C99 style, with some GCC extensions. # Coverity does not like -std=gnu99 -.if !defined(COVERITY_TOP_CONFIG) +.if !defined(COVERITY_TOP_CONFIG) && empty(CFLAGS:M*-std=*) CFLAGS+= ${${ACTIVE_CC} == "clang":? -std=gnu99 :} CFLAGS+= ${${ACTIVE_CC} == "gcc":? -std=gnu99 :} CFLAGS+= ${${ACTIVE_CC} == "pcc":? -std=gnu99 :}
Re: CVS commit: src/share/mk
I would also prefer current general "virt68k", rather than specific emulators like qemu68k etc. because: - it's unlikely that someone will design and implement new virtual Ethernet/storage I/O devices for ancient architectures - we should avoid dumb copies of MD locore.s, pmap_bootstrap.c, headers, and src/distrib files etc. - even if we will support different VM implementation, we can still have multiple kernel config files in a single port, as we've merged sun3 (020 + Sun's MMU) and sun3x (030 MMU) into a single sun3 port in the past (atari and evbarm also have multiple GENERIC like config files for different archtectures) Thanks, --- Izumi Tsutsui
Re: CVS commit: src/share/mk
> On Jan 3, 2024, at 9:16 AM, Jason Thorpe wrote: > > There’s really nothing Qemu specific about it, other than Qemu version number > extraction. Let me elaborate, actually, now that I am not constrained by thumbs-only typing. It uses the generic Linux m68k “bootinfo”, which specify the machine type and address of the various devices, and provisions for how reset/halt are handled are also dealt with generically. Every Linux m68k platform uses this mechanism and I would be shocked (SHOCKED) if some hypothetical future non-Qemu m68k VirtIO platform did not support Linux natively. The Qemu version extraction is actually done with one of those “bootinfo” records. There are really only two assumptions that are made: - RAM starts at PA $., the kernel starts with the MMU disabled, and is loaded at its link address. - I/O devices start at PA $FF00., and that they can be mapped VA==PA with a TT register. The latter would be pretty easy to deal with dynamically if the situation arose. And the former would be possible to adapt to if that assumption were to suddenly not be valid. Heck, the hp300 kernel is linked at VA=$. and knows how to deal with the start of RAM varying based on how much memory is installed (whereas the end of RAM is always at the same location, at the top of the physical address space. Weirdos.) -- thorpej
Re: CVS commit: src/share/mk
There’s really nothing Qemu specific about it, other than Qemu version number extraction. -- thorpej Sent from my iPhone. > On Jan 2, 2024, at 11:03 PM, Valery Ushakov wrote: > > On Wed, Jan 03, 2024 at 02:48:06 +, Jason R Thorpe wrote: > >> Add virt68k to MACHINES.m68k. > > "virt" is too generic a name, if this is specifically a qemu version, > may be it should have been called qemu68k... Guess it's too late now. > > -uwe
Re: CVS commit: src/share/mk
On Wed, Jan 03, 2024 at 02:48:06 +, Jason R Thorpe wrote: > Add virt68k to MACHINES.m68k. "virt" is too generic a name, if this is specifically a qemu version, may be it should have been called qemu68k... Guess it's too late now. -uwe
CVS commit: src/share/mk
Module Name:src Committed By: thorpej Date: Wed Jan 3 02:59:00 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Add mvme68k to MACHINES.m68k. To generate a diff of this commit: cvs rdiff -u -r1.1361 -r1.1362 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.
CVS commit: src/share/mk
Module Name:src Committed By: thorpej Date: Wed Jan 3 02:59:00 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Add mvme68k to MACHINES.m68k. To generate a diff of this commit: cvs rdiff -u -r1.1361 -r1.1362 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1361 src/share/mk/bsd.own.mk:1.1362 --- src/share/mk/bsd.own.mk:1.1361 Wed Jan 3 02:48:05 2024 +++ src/share/mk/bsd.own.mk Wed Jan 3 02:59:00 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1361 2024/01/03 02:48:05 thorpej Exp $ +# $NetBSD: bsd.own.mk,v 1.1362 2024/01/03 02:59:00 thorpej Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -710,7 +710,7 @@ MACHINES.ia64= ia64 MACHINES.hppa= hppa MACHINES.m68000= sun2 MACHINES.m68k= amiga atari cesfic hp300 luna68k mac68k \ - news68k next68k sun3 virt68k x68k + mvme68k news68k next68k sun3 virt68k x68k MACHINES.mips= algor arc cobalt emips evbmips ews4800mips \ hpcmips mipsco newsmips pmax sbmips sgimips MACHINES.or1k= or1k
CVS commit: src/share/mk
Module Name:src Committed By: thorpej Date: Wed Jan 3 02:48:06 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Add virt68k to MACHINES.m68k. To generate a diff of this commit: cvs rdiff -u -r1.1360 -r1.1361 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1360 src/share/mk/bsd.own.mk:1.1361 --- src/share/mk/bsd.own.mk:1.1360 Sat Sep 2 12:09:10 2023 +++ src/share/mk/bsd.own.mk Wed Jan 3 02:48:05 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1360 2023/09/02 12:09:10 lukem Exp $ +# $NetBSD: bsd.own.mk,v 1.1361 2024/01/03 02:48:05 thorpej Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -710,7 +710,7 @@ MACHINES.ia64= ia64 MACHINES.hppa= hppa MACHINES.m68000= sun2 MACHINES.m68k= amiga atari cesfic hp300 luna68k mac68k \ - news68k next68k sun3 x68k + news68k next68k sun3 virt68k x68k MACHINES.mips= algor arc cobalt emips evbmips ews4800mips \ hpcmips mipsco newsmips pmax sbmips sgimips MACHINES.or1k= or1k
CVS commit: src/share/mk
Module Name:src Committed By: thorpej Date: Wed Jan 3 02:48:06 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Add virt68k to MACHINES.m68k. To generate a diff of this commit: cvs rdiff -u -r1.1360 -r1.1361 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.
CVS commit: src/share/mk
Module Name:src Committed By: wiz Date: Fri Dec 29 09:17:37 UTC 2023 Modified Files: src/share/mk: sys.mk Log Message: Update ARFLAGS for new binutils. In binutils 2.34, 'l' was a no-op. In binutils 2.39, it is used to specify library dependencies. Remove 'l' from ARFLAGS. >From Takahiro Kambe in PR 57565. To generate a diff of this commit: cvs rdiff -u -r1.148 -r1.149 src/share/mk/sys.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/sys.mk diff -u src/share/mk/sys.mk:1.148 src/share/mk/sys.mk:1.149 --- src/share/mk/sys.mk:1.148 Tue Dec 14 16:22:07 2021 +++ src/share/mk/sys.mk Fri Dec 29 09:17:37 2023 @@ -1,4 +1,4 @@ -# $NetBSD: sys.mk,v 1.148 2021/12/14 16:22:07 christos Exp $ +# $NetBSD: sys.mk,v 1.149 2023/12/29 09:17:37 wiz Exp $ # @(#)sys.mk 8.2 (Berkeley) 3/21/94 # # This file contains the basic rules for make(1) and is read first @@ -12,7 +12,7 @@ unix?= We run NetBSD. .LIBS: .a AR?= ar -ARFLAGS?= rl +ARFLAGS?= r RANLIB?= ranlib MV?= mv -f
CVS commit: src/share/mk
Module Name:src Committed By: wiz Date: Fri Dec 29 09:17:37 UTC 2023 Modified Files: src/share/mk: sys.mk Log Message: Update ARFLAGS for new binutils. In binutils 2.34, 'l' was a no-op. In binutils 2.39, it is used to specify library dependencies. Remove 'l' from ARFLAGS. >From Takahiro Kambe in PR 57565. To generate a diff of this commit: cvs rdiff -u -r1.148 -r1.149 src/share/mk/sys.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Mon Nov 6 22:35:48 UTC 2023 Modified Files: src/share/mk: bsd.sys.mk Log Message: Add -fmacro-prefix-map set like -fdebug-prefix-map (Jan-Benedict Glaw) See: https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html\ #index-fmacro-prefix-map https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html\ #index-fdebug-prefix-map To generate a diff of this commit: cvs rdiff -u -r1.314 -r1.315 src/share/mk/bsd.sys.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Mon Nov 6 22:35:48 UTC 2023 Modified Files: src/share/mk: bsd.sys.mk Log Message: Add -fmacro-prefix-map set like -fdebug-prefix-map (Jan-Benedict Glaw) See: https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html\ #index-fmacro-prefix-map https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html\ #index-fdebug-prefix-map To generate a diff of this commit: cvs rdiff -u -r1.314 -r1.315 src/share/mk/bsd.sys.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.sys.mk diff -u src/share/mk/bsd.sys.mk:1.314 src/share/mk/bsd.sys.mk:1.315 --- src/share/mk/bsd.sys.mk:1.314 Sat Jun 3 17:24:57 2023 +++ src/share/mk/bsd.sys.mk Mon Nov 6 17:35:48 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.sys.mk,v 1.314 2023/06/03 21:24:57 lukem Exp $ +# $NetBSD: bsd.sys.mk,v 1.315 2023/11/06 22:35:48 christos Exp $ # # Build definitions used for NetBSD source tree builds. @@ -21,6 +21,7 @@ error2: .if !empty(DESTDIR) CPPFLAGS+= -Wp,-iremap,${DESTDIR}: REPROFLAGS+= -fdebug-prefix-map=\$$DESTDIR= +REPROFLAGS+= -fmacro-prefix-map=\$$DESTDIR= .endif CPPFLAGS+= -Wp,-fno-canonical-system-headers @@ -28,7 +29,9 @@ CPPFLAGS+= -Wp,-iremap,${NETBSDSRCDIR}:/ CPPFLAGS+= -Wp,-iremap,${X11SRCDIR}:/usr/xsrc REPROFLAGS+= -fdebug-prefix-map=\$$NETBSDSRCDIR=/usr/src +REPROFLAGS+= -fmacro-prefix-map=\$$NETBSDSRCDIR=/usr/src REPROFLAGS+= -fdebug-prefix-map=\$$X11SRCDIR=/usr/xsrc +REPROFLAGS+= -fmacro-prefix-map=\$$X11SRCDIR=/usr/xsrc .if defined(MAKEOBJDIRPREFIX) NETBSDOBJDIR= ${MAKEOBJDIRPREFIX}${NETBSDSRCDIR} .endif @@ -36,6 +39,7 @@ NETBSDOBJDIR= ${MAKEOBJDIRPREFIX}${NETBS .if defined(NETBSDOBJDIR) .export NETBSDOBJDIR REPROFLAGS+= -fdebug-prefix-map=\$$NETBSDOBJDIR=/usr/obj +REPROFLAGS+= -fmacro-prefix-map=\$$NETBSDOBJDIR=/usr/obj .endif LINTFLAGS+= -R${NETBSDSRCDIR}=/usr/src -R${X11SRCDIR}=/usr/xsrc
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Wed Oct 25 04:37:59 UTC 2023 Modified Files: src/share/mk: bsd.x11.mk Log Message: bump xorg server version. To generate a diff of this commit: cvs rdiff -u -r1.150 -r1.151 src/share/mk/bsd.x11.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.x11.mk diff -u src/share/mk/bsd.x11.mk:1.150 src/share/mk/bsd.x11.mk:1.151 --- src/share/mk/bsd.x11.mk:1.150 Thu Mar 30 23:05:12 2023 +++ src/share/mk/bsd.x11.mk Wed Oct 25 04:37:59 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.x11.mk,v 1.150 2023/03/30 23:05:12 mrg Exp $ +# $NetBSD: bsd.x11.mk,v 1.151 2023/10/25 04:37:59 mrg Exp $ .include @@ -134,7 +134,7 @@ XORG_VERSION_CURRENT="(((${XORG_SERVER_M .else XORG_SERVER_MAJOR= 21 XORG_SERVER_MINOR= 1 -XORG_SERVER_TEENY= 8 +XORG_SERVER_TEENY= 9 XORG_VERSION_CURRENT="((1000) + ((${XORG_SERVER_MAJOR}) * 10) + ((${XORG_SERVER_MINOR}) * 1000) + ${XORG_SERVER_TEENY})" .endif
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Wed Oct 25 04:37:59 UTC 2023 Modified Files: src/share/mk: bsd.x11.mk Log Message: bump xorg server version. To generate a diff of this commit: cvs rdiff -u -r1.150 -r1.151 src/share/mk/bsd.x11.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: riastradh Date: Wed Oct 11 14:08:17 UTC 2023 Modified Files: src/share/mk: bsd.prog.mk Log Message: bsd.prog.mk: krb5 stuff no longer needs to link against sqlite3. (Why is this here? Seems like it should be a .mk fragment under crypto/external/bsd/heimdal -- that way I would have found it for the previous commit.) PR lib/57406 XXX pullup-10 To generate a diff of this commit: cvs rdiff -u -r1.345 -r1.346 src/share/mk/bsd.prog.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: riastradh Date: Wed Oct 11 14:08:17 UTC 2023 Modified Files: src/share/mk: bsd.prog.mk Log Message: bsd.prog.mk: krb5 stuff no longer needs to link against sqlite3. (Why is this here? Seems like it should be a .mk fragment under crypto/external/bsd/heimdal -- that way I would have found it for the previous commit.) PR lib/57406 XXX pullup-10 To generate a diff of this commit: cvs rdiff -u -r1.345 -r1.346 src/share/mk/bsd.prog.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.prog.mk diff -u src/share/mk/bsd.prog.mk:1.345 src/share/mk/bsd.prog.mk:1.346 --- src/share/mk/bsd.prog.mk:1.345 Sun May 28 10:33:13 2023 +++ src/share/mk/bsd.prog.mk Wed Oct 11 14:08:17 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prog.mk,v 1.345 2023/05/28 10:33:13 lukem Exp $ +# $NetBSD: bsd.prog.mk,v 1.346 2023/10/11 14:08:17 riastradh Exp $ # @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94 .ifndef HOSTPROG @@ -206,11 +206,11 @@ LIB${_lib:tu}= ${DESTDIR}/usr/lib/lib${_ LIBKRB5_LDADD+= -lkrb5 -lcom_err \ -lhx509 -lcrypto -lasn1 \ -lwind -lheimbase -lcom_err -lroken \ - -lsqlite3 -lm -lcrypt -lutil + -lm -lcrypt -lutil LIBKRB5_DPADD+= ${LIBKRB5} ${LIBCOM_ERR} \ ${LIBHX509} ${LIBCRYPTO} ${LIBASN1} \ ${LIBWIND} ${LIBHEIMBASE} ${LIBCOM_ERR} ${LIBROKEN} \ - ${LIBSQLITE3} ${LIBM} ${LIBCRYPT} ${LIBUTIL} + ${LIBM} ${LIBCRYPT} ${LIBUTIL} LIBGSSAPI_LDADD+= -lgssapi -lheimntlm ${LIBKRB5_LDADD} LIBGSSAPI_DPADD+= ${LIBGSSAPI} ${LIBHEIMNTLM} ${LIBKRB5_DPADD} .endif
CVS commit: src/share/mk
Module Name:src Committed By: lukem Date: Sat Sep 2 12:09:10 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: sort the CC_WNO variables To generate a diff of this commit: cvs rdiff -u -r1.1359 -r1.1360 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1359 src/share/mk/bsd.own.mk:1.1360 --- src/share/mk/bsd.own.mk:1.1359 Thu Aug 24 06:18:07 2023 +++ src/share/mk/bsd.own.mk Sat Sep 2 12:09:10 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1359 2023/08/24 06:18:07 rin Exp $ +# $NetBSD: bsd.own.mk,v 1.1360 2023/09/02 12:09:10 lukem Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -686,18 +686,18 @@ OBJC= ${TOOL_OBJC.${ACTIVE_OBJC}} CC_WNO_ADDRESS_OF_PACKED_MEMBER=${${ACTIVE_CC} == "clang" :? -Wno-error=address-of-packed-member :} \ ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-address-of-packed-member :} +CC_WNO_ARRAY_BOUNDS= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -Wno-array-bounds :} CC_WNO_CAST_FUNCTION_TYPE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-cast-function-type :} CC_WNO_FORMAT_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-overflow :} CC_WNO_FORMAT_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-truncation :} CC_WNO_IMPLICIT_FALLTHROUGH= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-implicit-fallthrough :} CC_WNO_MAYBE_UNINITIALIZED= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-maybe-uninitialized :} +CC_WNO_MISSING_TEMPLATE_KEYWORD=${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -Wno-missing-template-keyword :} +CC_WNO_REGISTER= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -Wno-register :} CC_WNO_RETURN_LOCAL_ADDR= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-return-local-addr :} CC_WNO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :} -CC_WNO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :} -CC_WNO_MISSING_TEMPLATE_KEYWORD=${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -Wno-missing-template-keyword :} CC_WNO_STRINGOP_OVERREAD= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -Wno-stringop-overread :} -CC_WNO_REGISTER= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -Wno-register :} -CC_WNO_ARRAY_BOUNDS= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -Wno-array-bounds :} +CC_WNO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :} # For each ${MACHINE_CPU}, list the ports that use it. MACHINES.aarch64= evbarm
CVS commit: src/share/mk
Module Name:src Committed By: lukem Date: Sat Sep 2 12:09:10 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: sort the CC_WNO variables To generate a diff of this commit: cvs rdiff -u -r1.1359 -r1.1360 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.
CVS commit: src/share/mk
Module Name:src Committed By: rin Date: Thu Aug 24 06:18:07 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: Switch mips64e[bl] to binutils 2.39 again Potential fix for PR toolchain/57241 has been committed. Let us see whether this works fine or not. To generate a diff of this commit: cvs rdiff -u -r1.1358 -r1.1359 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.
CVS commit: src/share/mk
Module Name:src Committed By: rin Date: Thu Aug 24 06:18:07 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: Switch mips64e[bl] to binutils 2.39 again Potential fix for PR toolchain/57241 has been committed. Let us see whether this works fine or not. To generate a diff of this commit: cvs rdiff -u -r1.1358 -r1.1359 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1358 src/share/mk/bsd.own.mk:1.1359 --- src/share/mk/bsd.own.mk:1.1358 Sun Aug 20 02:11:21 2023 +++ src/share/mk/bsd.own.mk Thu Aug 24 06:18:07 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1358 2023/08/20 02:11:21 rin Exp $ +# $NetBSD: bsd.own.mk,v 1.1359 2023/08/24 06:18:07 rin Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -102,11 +102,7 @@ MKGCCCMDS?= no # # What binutils is used? # -.if ${MACHINE_ARCH} != "mips64el" && ${MACHINE_ARCH} != "mips64eb" HAVE_BINUTILS?= 239 -.else -HAVE_BINUTILS?= 234 -.endif .if ${HAVE_BINUTILS} == 239 EXTERNAL_BINUTILS_SUBDIR= binutils
CVS commit: src/share/mk
Module Name:src Committed By: rin Date: Sun Aug 20 02:11:21 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: Put gdb back for m68000 However, unfortunately, it does not work even if MAXTSIZ is bumped. It seems to be too large for 24-bit address space. This is not a regression; gdb.old does not work also. To generate a diff of this commit: cvs rdiff -u -r1.1357 -r1.1358 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.
CVS commit: src/share/mk
Module Name:src Committed By: rin Date: Sun Aug 20 02:11:21 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: Put gdb back for m68000 However, unfortunately, it does not work even if MAXTSIZ is bumped. It seems to be too large for 24-bit address space. This is not a regression; gdb.old does not work also. To generate a diff of this commit: cvs rdiff -u -r1.1357 -r1.1358 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1357 src/share/mk/bsd.own.mk:1.1358 --- src/share/mk/bsd.own.mk:1.1357 Sat Aug 19 22:58:15 2023 +++ src/share/mk/bsd.own.mk Sun Aug 20 02:11:21 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1357 2023/08/19 22:58:15 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1358 2023/08/20 02:11:21 rin Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -81,7 +81,6 @@ HAVE_GCC?= 10 # Platforms that can't run a modern GCC natively .if ${MACHINE_ARCH} == "m68000" MKGCCCMDS?= no -MKGDB?= no .endif #
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sat Aug 19 22:58:15 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: Add elfedit (needed to tag binaries as linux) from GSoC 2023 (Theodore Preduta) To generate a diff of this commit: cvs rdiff -u -r1.1356 -r1.1357 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.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sat Aug 19 22:58:15 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: Add elfedit (needed to tag binaries as linux) from GSoC 2023 (Theodore Preduta) To generate a diff of this commit: cvs rdiff -u -r1.1356 -r1.1357 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1356 src/share/mk/bsd.own.mk:1.1357 --- src/share/mk/bsd.own.mk:1.1356 Sun Aug 13 17:52:32 2023 +++ src/share/mk/bsd.own.mk Sat Aug 19 18:58:15 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1356 2023/08/13 21:52:32 wiz Exp $ +# $NetBSD: bsd.own.mk,v 1.1357 2023/08/19 22:58:15 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -327,6 +327,7 @@ _TOOL_PREFIX?= nb .if defined(EXTERNAL_TOOLCHAIN) # { AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as +ELFEDIT= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-elfedit LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy @@ -352,6 +353,7 @@ TOOL_OBJC.clang= ${EXTERNAL_TOOLCHAIN}/b .if ${USETOOLS_BINUTILS:Uyes} == "yes" # { AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as +ELFEDIT= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-elfedit LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy
CVS commit: src/share/mk
Module Name:src Committed By: wiz Date: Sun Aug 13 21:52:33 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: fix typo in previous To generate a diff of this commit: cvs rdiff -u -r1.1355 -r1.1356 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1355 src/share/mk/bsd.own.mk:1.1356 --- src/share/mk/bsd.own.mk:1.1355 Sun Aug 13 21:17:05 2023 +++ src/share/mk/bsd.own.mk Sun Aug 13 21:52:32 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1355 2023/08/13 21:17:05 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1356 2023/08/13 21:52:32 wiz Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -81,7 +81,7 @@ HAVE_GCC?= 10 # Platforms that can't run a modern GCC natively .if ${MACHINE_ARCH} == "m68000" MKGCCCMDS?= no -MGGDB?= no +MKGDB?= no .endif #
CVS commit: src/share/mk
Module Name:src Committed By: wiz Date: Sun Aug 13 21:52:33 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: fix typo in previous To generate a diff of this commit: cvs rdiff -u -r1.1355 -r1.1356 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.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sun Aug 13 21:17:05 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: sun2 can't make gdb anymore. there is no gmp because no gcc. To generate a diff of this commit: cvs rdiff -u -r1.1354 -r1.1355 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1354 src/share/mk/bsd.own.mk:1.1355 --- src/share/mk/bsd.own.mk:1.1354 Fri Aug 11 16:29:17 2023 +++ src/share/mk/bsd.own.mk Sun Aug 13 17:17:05 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1354 2023/08/11 20:29:17 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1355 2023/08/13 21:17:05 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -81,6 +81,7 @@ HAVE_GCC?= 10 # Platforms that can't run a modern GCC natively .if ${MACHINE_ARCH} == "m68000" MKGCCCMDS?= no +MGGDB?= no .endif #
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sun Aug 13 21:17:05 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: sun2 can't make gdb anymore. there is no gmp because no gcc. To generate a diff of this commit: cvs rdiff -u -r1.1354 -r1.1355 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.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Fri Aug 11 20:29:17 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: switch everyone to gdb-13.2 To generate a diff of this commit: cvs rdiff -u -r1.1353 -r1.1354 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1353 src/share/mk/bsd.own.mk:1.1354 --- src/share/mk/bsd.own.mk:1.1353 Wed Aug 9 10:57:19 2023 +++ src/share/mk/bsd.own.mk Fri Aug 11 16:29:17 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1353 2023/08/09 14:57:19 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1354 2023/08/11 20:29:17 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -119,11 +119,7 @@ EXTERNAL_BINUTILS_SUBDIR= /does/not/exis # # What GDB is used? # -.if ${MACHINE_ARCH} == "x86_64" HAVE_GDB?= 1320 -.else -HAVE_GDB?= 1100 -.endif .if ${HAVE_GDB} == 1320 EXTERNAL_GDB_SUBDIR= gdb
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Fri Aug 11 20:29:17 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: switch everyone to gdb-13.2 To generate a diff of this commit: cvs rdiff -u -r1.1353 -r1.1354 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.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Wed Aug 9 14:57:19 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: put back the new gdb To generate a diff of this commit: cvs rdiff -u -r1.1352 -r1.1353 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1352 src/share/mk/bsd.own.mk:1.1353 --- src/share/mk/bsd.own.mk:1.1352 Tue Aug 8 02:27:32 2023 +++ src/share/mk/bsd.own.mk Wed Aug 9 10:57:19 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1352 2023/08/08 06:27:32 mrg Exp $ +# $NetBSD: bsd.own.mk,v 1.1353 2023/08/09 14:57:19 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -119,7 +119,7 @@ EXTERNAL_BINUTILS_SUBDIR= /does/not/exis # # What GDB is used? # -.if ${MACHINE_ARCH} == "x86_64" && 0 +.if ${MACHINE_ARCH} == "x86_64" HAVE_GDB?= 1320 .else HAVE_GDB?= 1100
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Wed Aug 9 14:57:19 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: put back the new gdb To generate a diff of this commit: cvs rdiff -u -r1.1352 -r1.1353 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.
re: CVS commit: src/share/mk
please review this. i'll try to figure out tests for everything, though it seems annoying :) https://www.netbsd.org/~mrg/gcc12-use-after-free.diff it should handle all the open use-after-free problems. .mrg. ps: you'll notice no new headers needed for ptrdiff_t usage ;)
re: CVS commit: src/share/mk
matthew green writes: > > > - used = dst - conv->wbuff; > > > + size_t sused = (uintptr_t)dst - (uintptr_t)conv->wbuff; > > > > Any particular reason why there is a cast to uintptr_t here? I don't > > think there is a guarantee that you can calculate an offset by > > subtracting uintptr_ts calculated from pointers. The description in the > > C Standard only guarantees that you can convert them back to a pointer > > which compares the same to the original, but that's it. I don't find any > > other promises about uintptr_t. > > in this case, they're not necessary it seems. probably left > over from my initial attempts at this workaround. uh, apparently i forgot to save the file before compiling, because simply removing them returns the sign-compare warning, but that's fixable by using ptrdiff_t. .mrg.
re: CVS commit: src/share/mk
> > - used = dst - conv->wbuff; > > + size_t sused = (uintptr_t)dst - (uintptr_t)conv->wbuff; > > Any particular reason why there is a cast to uintptr_t here? I don't > think there is a guarantee that you can calculate an offset by > subtracting uintptr_ts calculated from pointers. The description in the > C Standard only guarantees that you can convert them back to a pointer > which compares the same to the original, but that's it. I don't find any > other promises about uintptr_t. in this case, they're not necessary it seems. probably left over from my initial attempts at this workaround. .mrg.
Re: CVS commit: src/share/mk
On Tue 08 Aug 2023 at 14:10:41 +0200, Joerg Sonnenberger wrote: > On Tue, Aug 08, 2023 at 01:42:39PM +0200, Rhialto wrote: > > On Tue 08 Aug 2023 at 09:44:41 +1000, matthew green wrote: > > > Index: lib/libedit/chartype.c > > > === > > > RCS file: /cvsroot/src/lib/libedit/chartype.c,v > > > retrieving revision 1.36 > > > diff -p -u -r1.36 chartype.c > > > --- lib/libedit/chartype.c30 Oct 2022 19:11:31 - 1.36 > > > +++ lib/libedit/chartype.c7 Aug 2023 23:41:44 - > > > @@ -235,17 +235,17 @@ ct_visual_string(const wchar_t *s, ct_bu > > > } > > > > > > /* failed to encode, need more buffer space */ > > > - used = dst - conv->wbuff; > > > + size_t sused = (uintptr_t)dst - (uintptr_t)conv->wbuff; > > > > Any particular reason why there is a cast to uintptr_t here? I don't > > think there is a guarantee that you can calculate an offset by > > subtracting uintptr_ts calculated from pointers. The description in the > > C Standard only guarantees that you can convert them back to a pointer > > which compares the same to the original, but that's it. I don't find any > > other promises about uintptr_t. > > Given that we used to make this assumption for offsetof like most > systems, this seems to be portable naval gazing to me. It is one thing to hide such an assumption away in a macro (and with all compilers currently in use, offsetof() is mapped to __builtin_offsetof() (see ), which quite likely exists because of the unstandardness of the other version), but quite another to open-code it again and again in general code. Think of the PDP-10 port! I was expecting some sort of answer related to unsigned vs signed sizes and differences, or something like that, for which there is likely a cleaner solution. > Joerg -Olaf. -- ___ Olaf 'Rhialto' Seibert \X/ There is no AI. There is just someone else's work. --I. Rose signature.asc Description: PGP signature
Re: CVS commit: src/share/mk
On Tue, Aug 08, 2023 at 01:42:39PM +0200, Rhialto wrote: > On Tue 08 Aug 2023 at 09:44:41 +1000, matthew green wrote: > > Index: lib/libedit/chartype.c > > === > > RCS file: /cvsroot/src/lib/libedit/chartype.c,v > > retrieving revision 1.36 > > diff -p -u -r1.36 chartype.c > > --- lib/libedit/chartype.c 30 Oct 2022 19:11:31 - 1.36 > > +++ lib/libedit/chartype.c 7 Aug 2023 23:41:44 - > > @@ -235,17 +235,17 @@ ct_visual_string(const wchar_t *s, ct_bu > > } > > > > /* failed to encode, need more buffer space */ > > - used = dst - conv->wbuff; > > + size_t sused = (uintptr_t)dst - (uintptr_t)conv->wbuff; > > Any particular reason why there is a cast to uintptr_t here? I don't > think there is a guarantee that you can calculate an offset by > subtracting uintptr_ts calculated from pointers. The description in the > C Standard only guarantees that you can convert them back to a pointer > which compares the same to the original, but that's it. I don't find any > other promises about uintptr_t. Given that we used to make this assumption for offsetof like most systems, this seems to be portable naval gazing to me. Joerg
Re: CVS commit: src/share/mk
On Tue 08 Aug 2023 at 09:44:41 +1000, matthew green wrote: > Index: lib/libedit/chartype.c > === > RCS file: /cvsroot/src/lib/libedit/chartype.c,v > retrieving revision 1.36 > diff -p -u -r1.36 chartype.c > --- lib/libedit/chartype.c30 Oct 2022 19:11:31 - 1.36 > +++ lib/libedit/chartype.c7 Aug 2023 23:41:44 - > @@ -235,17 +235,17 @@ ct_visual_string(const wchar_t *s, ct_bu > } > > /* failed to encode, need more buffer space */ > - used = dst - conv->wbuff; > + size_t sused = (uintptr_t)dst - (uintptr_t)conv->wbuff; Any particular reason why there is a cast to uintptr_t here? I don't think there is a guarantee that you can calculate an offset by subtracting uintptr_ts calculated from pointers. The description in the C Standard only guarantees that you can convert them back to a pointer which compares the same to the original, but that's it. I don't find any other promises about uintptr_t. -Olaf. -- ___ Olaf 'Rhialto' Seibert \X/ There is no AI. There is just someone else's work. --I. Rose signature.asc Description: PGP signature
Re: CVS commit: src/share/mk
> Date: Mon, 7 Aug 2023 23:58:50 +0200 > From: Tobias Nygren > > Is this sort of fix acceptable for the above cases? > > + ptrdiff_t offset = pos - buf; > new_buf = realloc(buf, buf_size); > if (!new_buf) > err(2, "realloc of linebuf to %zu bytes failed", > buf_size); > - > + > end = new_buf + buf_size; > - pos = new_buf + (pos - buf); > + pos = new_buf + offset; > buf = new_buf; Yes, this is a good approach. Even if it's suboptimal in some cases, it is very easy to audit mechanical changes, which is important if there are a lot of them. Any further case-specific simplifications (like changing ptrdiff_t to size_t, since it will always be nonnegative here; just using `size_t offset = buf_size' before `buf_size *= 2', since since pos == end and end == buf + buf_size) can be done afterward in a separate commit.
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Tue Aug 8 03:44:12 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: put amd64 back to GDB 11. it doesn't build for me, or others. the first problem is that this rule: GDBvn.texi: ${DIST}/gdb/version.in echo "@set GDBVN $$(${TOOL_CAT} ${.ALLSRC})" > ${.TARGET} conflicts with the "GDBvn.texi" in the source tree and fail to write this file with r/o source trees. the second problem is that gdbserver fails to link because it compiles the wrong file to create target.o. this seems like a very bad make or bsd.*.mk bug -- "SRCS= .. target.cc ...", and yet, make manages to compile the file "target.c" to create target.o, and then the required symbols the rest of gdbserver needs are missing. the third problem is that when you make it build the right target.cc, it wants bfd.h, and gmp.h, and even after solving those issues, i'm still getting a fourth issue linking gdbserver and thus reverting. To generate a diff of this commit: cvs rdiff -u -r1.1350 -r1.1351 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1350 src/share/mk/bsd.own.mk:1.1351 --- src/share/mk/bsd.own.mk:1.1350 Sun Aug 6 20:44:49 2023 +++ src/share/mk/bsd.own.mk Tue Aug 8 03:44:12 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1350 2023/08/06 20:44:49 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1351 2023/08/08 03:44:12 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -119,7 +119,7 @@ EXTERNAL_BINUTILS_SUBDIR= /does/not/exis # # What GDB is used? # -.if ${MACHINE_ARCH} == "x86_64" +.if ${MACHINE_ARCH} == "x86_64" && 0 HAVE_GDB?= 1320 .else HAVE_GDB?= 1100
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Tue Aug 8 03:44:12 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: put amd64 back to GDB 11. it doesn't build for me, or others. the first problem is that this rule: GDBvn.texi: ${DIST}/gdb/version.in echo "@set GDBVN $$(${TOOL_CAT} ${.ALLSRC})" > ${.TARGET} conflicts with the "GDBvn.texi" in the source tree and fail to write this file with r/o source trees. the second problem is that gdbserver fails to link because it compiles the wrong file to create target.o. this seems like a very bad make or bsd.*.mk bug -- "SRCS= .. target.cc ...", and yet, make manages to compile the file "target.c" to create target.o, and then the required symbols the rest of gdbserver needs are missing. the third problem is that when you make it build the right target.cc, it wants bfd.h, and gmp.h, and even after solving those issues, i'm still getting a fourth issue linking gdbserver and thus reverting. To generate a diff of this commit: cvs rdiff -u -r1.1350 -r1.1351 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.
re: CVS commit: src/share/mk
Valery Ushakov writes: > On Mon, Aug 07, 2023 at 23:58:50 +0200, Tobias Nygren wrote: > > > Is this sort of fix acceptable for the above cases? > [...] > > + ptrdiff_t offset = pos - buf; > [...] > > - pos = new_buf + (pos - buf); > > + pos = new_buf + offset; > > I think so. But e.g. in this particular case I don't see why pos > pointer is needed at all. If pos is made into a size_t pos; index > into the buf instead of a separate pointer, one avoids the whole thing > and "end" can be g/c'ed too, b/c you can just compare the index to the > "buf_size". But the above kind of fix has the advantage of being more > or less mechanical. yup, i agree. if we can fix it better, please do, but i'm all for making it "less bad" if not properly fixed like the above. i've used this idiom in a couple of places, but didn't quite get it working in several others. these are the problematic files i've see: lib/libc/net/gethnamaddr.c lib/libedit/chartype.c lib/libkvm/kvm_proc.c usr.bin/find/misc.c usr.bin/mail/fio.c external/bsd/pdisk/dist/io.c usr.bin/rs/rs.c usr.bin/sort/files.c the first 3 i worked around, eg below, but i think i only tested the gethnamaddr.c portion so far. .mrg. Index: lib/libc/net/gethnamaddr.c === RCS file: /cvsroot/src/lib/libc/net/gethnamaddr.c,v retrieving revision 1.94 diff -p -u -r1.94 gethnamaddr.c --- lib/libc/net/gethnamaddr.c 19 Apr 2022 20:32:15 - 1.94 +++ lib/libc/net/gethnamaddr.c 7 Aug 2023 23:41:44 - @@ -110,10 +110,11 @@ __weak_alias(gethostent,_gethostent) #define addalias(d, s, arr, siz) do { \ if (d >= [siz]) { \ + size_t _off = d - arr; \ char **xptr = realloc(arr, (siz + 10) * sizeof(*arr)); \ if (xptr == NULL) \ goto nospc; \ - d = xptr + (d - arr); \ + d = xptr + _off;\ arr = xptr; \ siz += 10; \ } \ Index: lib/libedit/chartype.c === RCS file: /cvsroot/src/lib/libedit/chartype.c,v retrieving revision 1.36 diff -p -u -r1.36 chartype.c --- lib/libedit/chartype.c 30 Oct 2022 19:11:31 - 1.36 +++ lib/libedit/chartype.c 7 Aug 2023 23:41:44 - @@ -235,17 +235,17 @@ ct_visual_string(const wchar_t *s, ct_bu } /* failed to encode, need more buffer space */ - used = dst - conv->wbuff; + size_t sused = (uintptr_t)dst - (uintptr_t)conv->wbuff; if (ct_conv_wbuff_resize(conv, conv->wsize + CT_BUFSIZ) == -1) return NULL; - dst = conv->wbuff + used; + dst = conv->wbuff + sused; } if (dst >= (conv->wbuff + conv->wsize)) { /* sigh */ - used = dst - conv->wbuff; + size_t sused = (uintptr_t)dst - (uintptr_t)conv->wbuff; if (ct_conv_wbuff_resize(conv, conv->wsize + CT_BUFSIZ) == -1) return NULL; - dst = conv->wbuff + used; + dst = conv->wbuff + sused; } *dst = L'\0'; Index: lib/libkvm/kvm_proc.c === RCS file: /cvsroot/src/lib/libkvm/kvm_proc.c,v retrieving revision 1.98 diff -p -u -r1.98 kvm_proc.c --- lib/libkvm/kvm_proc.c 19 Apr 2022 20:32:16 - 1.98 +++ lib/libkvm/kvm_proc.c 7 Aug 2023 23:41:44 - @@ -980,7 +980,7 @@ kvm_argv(kvm_t *kd, const struct minipro if (len + cc > kd->argspc_len) { ptrdiff_t off; char **pp; - char *op = kd->argspc; + uintptr_t op = (uintptr_t)kd->argspc; kd->argspc_len *= 2; kd->argspc = _kvm_realloc(kd, kd->argspc, @@ -991,7 +991,7 @@ kvm_argv(kvm_t *kd, const struct minipro * Adjust argv pointers in case realloc moved * the string space. */ - off = kd->argspc - op; + off = (uintptr_t)kd->argspc - op; for (pp = kd->argv; pp < argv; pp++) *pp += off; ap += off;
Re: Restoring pointers after realloc (was: Re: CVS commit: src/share/mk)
On Tue, Aug 08, 2023 at 00:44:41 +0200, Roland Illig wrote: > Am 07.08.2023 um 23:58 schrieb Tobias Nygren: > > Is this sort of fix acceptable for the above cases? > > > > + ptrdiff_t offset = pos - buf; > > new_buf = realloc(buf, buf_size); > > - pos = new_buf + (pos - buf); > > + pos = new_buf + offset; > > Yes. > > Instead of ptrdiff_t, I prefer to use size_t to avoid having to include > , even if that means an additional type cast at WARNS=6 level: > > > + size_t offset = (size_t)(pos - buf); I just had a massive cognitive dissonance moment... :) -uwe
Re: CVS commit: src/share/mk
On Mon, Aug 07, 2023 at 23:58:50 +0200, Tobias Nygren wrote: > Is this sort of fix acceptable for the above cases? [...] > + ptrdiff_t offset = pos - buf; [...] > - pos = new_buf + (pos - buf); > + pos = new_buf + offset; I think so. But e.g. in this particular case I don't see why pos pointer is needed at all. If pos is made into a size_t pos; index into the buf instead of a separate pointer, one avoids the whole thing and "end" can be g/c'ed too, b/c you can just compare the index to the "buf_size". But the above kind of fix has the advantage of being more or less mechanical. -uwe
Restoring pointers after realloc (was: Re: CVS commit: src/share/mk)
Am 07.08.2023 um 23:58 schrieb Tobias Nygren: > Is this sort of fix acceptable for the above cases? > > + ptrdiff_t offset = pos - buf; > new_buf = realloc(buf, buf_size); > - pos = new_buf + (pos - buf); > + pos = new_buf + offset; Yes. Instead of ptrdiff_t, I prefer to use size_t to avoid having to include , even if that means an additional type cast at WARNS=6 level: > + size_t offset = (size_t)(pos - buf); Roland
Re: CVS commit: src/share/mk
On Thu, 3 Aug 2023 23:30:31 +0900 Rin Okuyama wrote: > On 2023/08/03 23:23, Valery Ushakov wrote: > > On Thu, Aug 03, 2023 at 13:33:27 +, Rin Okuyama wrote: > > > >> -Wuse-after-free for GCC 12 is premature. It fires on a common idiom: > >> > >>newbuf = realloc(buf, size); > >>p = newbuf + (p - buf); > >> > >> Let shut this up for GCC 12 (with hoping it gets improved for 13!). > > > > C99 says > > > > J.2 Undefined behavior > > > > [#1] The behavior is undefined in the following > > circumstances: > > [...] > > -- The value of a pointer to an object whose lifetime has > > ended is used (6.2.4). > > > > > > Yes, for the "obvious" implementation of pointers as addresses the > > above idiom happens to work, but it doesn't make that idiom any less > > UB. > > Ah, I only thought about "obvious" impl. Thank you for kind > explanation! I will revert them for now. Hi, Is this sort of fix acceptable for the above cases? -Tobias RCS file: /cvsroot/src/usr.bin/sort/files.c,v retrieving revision 1.42 diff -p -u -r1.42 files.c --- files.c 5 Aug 2015 07:10:03 - 1.42 +++ files.c 7 Aug 2023 21:53:45 - @@ -199,13 +199,14 @@ seq(FILE *fp, u_char **line) /* Long line - double size of buffer */ /* XXX: Check here for stupidly long lines */ buf_size *= 2; + ptrdiff_t offset = pos - buf; new_buf = realloc(buf, buf_size); if (!new_buf) err(2, "realloc of linebuf to %zu bytes failed", buf_size); - + end = new_buf + buf_size; - pos = new_buf + (pos - buf); + pos = new_buf + offset; buf = new_buf; } }
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sun Aug 6 20:44:49 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: switch gdb to 13.20 for x86_64 To generate a diff of this commit: cvs rdiff -u -r1.1349 -r1.1350 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1349 src/share/mk/bsd.own.mk:1.1350 --- src/share/mk/bsd.own.mk:1.1349 Thu Aug 3 10:55:54 2023 +++ src/share/mk/bsd.own.mk Sun Aug 6 16:44:49 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1349 2023/08/03 14:55:54 rin Exp $ +# $NetBSD: bsd.own.mk,v 1.1350 2023/08/06 20:44:49 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -119,7 +119,11 @@ EXTERNAL_BINUTILS_SUBDIR= /does/not/exis # # What GDB is used? # +.if ${MACHINE_ARCH} == "x86_64" +HAVE_GDB?= 1320 +.else HAVE_GDB?= 1100 +.endif .if ${HAVE_GDB} == 1320 EXTERNAL_GDB_SUBDIR= gdb
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sun Aug 6 20:44:49 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: switch gdb to 13.20 for x86_64 To generate a diff of this commit: cvs rdiff -u -r1.1349 -r1.1350 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.
re: CVS commit: src/share/mk
> > Ah, I only thought about "obvious" impl. Thank you for kind > > explanation! I will revert them for now. > > We should fix those cases that gcc12 found. i was able to fix some of them with some code to apply offsets generated before realloc() or free(), but not in all case. a couple of them were pretty difficult because the alloc and the re-align were not close together. i was going to post about this soon, this is about 10% of the remaining files i have in my tree... i actually don't think the ${CC_..} change was worth reverting, as long as it was using the "-Wno-error=..." method -- ie, the warnings are still displayed, but not as errors (vs, the "-Wno-..." method which elides the warning entirely.) ie, i agree we should fix all these, i'm just not against using the error disable as a temporary measure. thanks. .mrg.
Re: CVS commit: src/share/mk
On Thu, Aug 03, 2023 at 23:30:31 +0900, Rin Okuyama wrote: > On 2023/08/03 23:23, Valery Ushakov wrote: > > On Thu, Aug 03, 2023 at 13:33:27 +, Rin Okuyama wrote: > > > > > -Wuse-after-free for GCC 12 is premature. It fires on a common idiom: > > > > > > newbuf = realloc(buf, size); > > > p = newbuf + (p - buf); > > > > > > Let shut this up for GCC 12 (with hoping it gets improved for 13!). > > > > C99 says > > > > J.2 Undefined behavior > > > > [#1] The behavior is undefined in the following > > circumstances: > > [...] > > -- The value of a pointer to an object whose lifetime has > > ended is used (6.2.4). > > > > > > Yes, for the "obvious" implementation of pointers as addresses the > > above idiom happens to work, but it doesn't make that idiom any less > > UB. > > Ah, I only thought about "obvious" impl. Thank you for kind > explanation! I will revert them for now. We should fix those cases that gcc12 found. While it may seem like a stretch of imagination (e.g. compiling C to JVM or something like that, where the pointer is actually a nontrivial object), "fat" function pointers on itanium were a mundane thing and caused their fair share of problems for code that naively assumed trivial "address-only" pointers. I would imagine UB sanitizers will trip up on that idiom too... Thanks! -uwe
CVS commit: src/share/mk
Module Name:src Committed By: rin Date: Thu Aug 3 14:55:54 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: Revert CC_WNO_USE_AFTER_FREE This is an undefined behavior in general. Implementation details of pointer are not defined in C standards; it is not necessarily address of memory objects. Pointed out by uwe@. Thanks!! To generate a diff of this commit: cvs rdiff -u -r1.1348 -r1.1349 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1348 src/share/mk/bsd.own.mk:1.1349 --- src/share/mk/bsd.own.mk:1.1348 Thu Aug 3 13:33:26 2023 +++ src/share/mk/bsd.own.mk Thu Aug 3 14:55:54 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1348 2023/08/03 13:33:26 rin Exp $ +# $NetBSD: bsd.own.mk,v 1.1349 2023/08/03 14:55:54 rin Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -697,11 +697,6 @@ CC_WNO_RETURN_LOCAL_ADDR= ${${ACTIVE_CC} CC_WNO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :} CC_WNO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :} -# -Wuse-after-free for GCC 12 is premature. It fires on a common idiom: -# newbuf = realloc(buf, size); p = newbuf + (p - buf); -# Let shut this up for GCC 12 (with hoping it gets improved for 13!). -CC_WNO_USE_AFTER_FREE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 12:? -Wno-use-after-free :} - # For each ${MACHINE_CPU}, list the ports that use it. MACHINES.aarch64= evbarm MACHINES.alpha= alpha
CVS commit: src/share/mk
Module Name:src Committed By: rin Date: Thu Aug 3 14:55:54 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: Revert CC_WNO_USE_AFTER_FREE This is an undefined behavior in general. Implementation details of pointer are not defined in C standards; it is not necessarily address of memory objects. Pointed out by uwe@. Thanks!! To generate a diff of this commit: cvs rdiff -u -r1.1348 -r1.1349 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.
Re: CVS commit: src/share/mk
On 2023/08/03 23:23, Valery Ushakov wrote: On Thu, Aug 03, 2023 at 13:33:27 +, Rin Okuyama wrote: -Wuse-after-free for GCC 12 is premature. It fires on a common idiom: newbuf = realloc(buf, size); p = newbuf + (p - buf); Let shut this up for GCC 12 (with hoping it gets improved for 13!). C99 says J.2 Undefined behavior [#1] The behavior is undefined in the following circumstances: [...] -- The value of a pointer to an object whose lifetime has ended is used (6.2.4). Yes, for the "obvious" implementation of pointers as addresses the above idiom happens to work, but it doesn't make that idiom any less UB. Ah, I only thought about "obvious" impl. Thank you for kind explanation! I will revert them for now. Thanks, rin
Re: CVS commit: src/share/mk
On Thu, Aug 03, 2023 at 13:33:27 +, Rin Okuyama wrote: > -Wuse-after-free for GCC 12 is premature. It fires on a common idiom: > > newbuf = realloc(buf, size); > p = newbuf + (p - buf); > > Let shut this up for GCC 12 (with hoping it gets improved for 13!). C99 says J.2 Undefined behavior [#1] The behavior is undefined in the following circumstances: [...] -- The value of a pointer to an object whose lifetime has ended is used (6.2.4). Yes, for the "obvious" implementation of pointers as addresses the above idiom happens to work, but it doesn't make that idiom any less UB. -uwe
CVS commit: src/share/mk
Module Name:src Committed By: rin Date: Thu Aug 3 13:33:27 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: Introduce CC_WNO_USE_AFTER_FREE for GCC12 -Wuse-after-free for GCC 12 is premature. It fires on a common idiom: newbuf = realloc(buf, size); p = newbuf + (p - buf); Let shut this up for GCC 12 (with hoping it gets improved for 13!). To generate a diff of this commit: cvs rdiff -u -r1.1347 -r1.1348 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1347 src/share/mk/bsd.own.mk:1.1348 --- src/share/mk/bsd.own.mk:1.1347 Tue Aug 1 06:52:06 2023 +++ src/share/mk/bsd.own.mk Thu Aug 3 13:33:26 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1347 2023/08/01 06:52:06 mrg Exp $ +# $NetBSD: bsd.own.mk,v 1.1348 2023/08/03 13:33:26 rin Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -697,6 +697,11 @@ CC_WNO_RETURN_LOCAL_ADDR= ${${ACTIVE_CC} CC_WNO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :} CC_WNO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :} +# -Wuse-after-free for GCC 12 is premature. It fires on a common idiom: +# newbuf = realloc(buf, size); p = newbuf + (p - buf); +# Let shut this up for GCC 12 (with hoping it gets improved for 13!). +CC_WNO_USE_AFTER_FREE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 12:? -Wno-use-after-free :} + # For each ${MACHINE_CPU}, list the ports that use it. MACHINES.aarch64= evbarm MACHINES.alpha= alpha
CVS commit: src/share/mk
Module Name:src Committed By: rin Date: Thu Aug 3 13:33:27 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: Introduce CC_WNO_USE_AFTER_FREE for GCC12 -Wuse-after-free for GCC 12 is premature. It fires on a common idiom: newbuf = realloc(buf, size); p = newbuf + (p - buf); Let shut this up for GCC 12 (with hoping it gets improved for 13!). To generate a diff of this commit: cvs rdiff -u -r1.1347 -r1.1348 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.
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Tue Aug 1 06:52:06 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: we skipped GCC 11, so change the test to GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.1346 -r1.1347 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1346 src/share/mk/bsd.own.mk:1.1347 --- src/share/mk/bsd.own.mk:1.1346 Mon Jul 31 17:35:31 2023 +++ src/share/mk/bsd.own.mk Tue Aug 1 06:52:06 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1346 2023/07/31 17:35:31 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1347 2023/08/01 06:52:06 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -89,7 +89,7 @@ MKGCCCMDS?= no # .if ${HAVE_GCC} == 10 EXTERNAL_GCC_SUBDIR?= gcc.old -.elif ${HAVE_GCC} == 11 +.elif ${HAVE_GCC} == 12 EXTERNAL_GCC_SUBDIR?= gcc .else EXTERNAL_GCC_SUBDIR?= /does/not/exist
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Tue Aug 1 06:52:06 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: we skipped GCC 11, so change the test to GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.1346 -r1.1347 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.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Mon Jul 31 17:35:31 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: we ended up importing 13.2 To generate a diff of this commit: cvs rdiff -u -r1.1345 -r1.1346 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1345 src/share/mk/bsd.own.mk:1.1346 --- src/share/mk/bsd.own.mk:1.1345 Sun Jul 23 12:52:37 2023 +++ src/share/mk/bsd.own.mk Mon Jul 31 13:35:31 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1345 2023/07/23 16:52:37 lukem Exp $ +# $NetBSD: bsd.own.mk,v 1.1346 2023/07/31 17:35:31 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -121,7 +121,7 @@ EXTERNAL_BINUTILS_SUBDIR= /does/not/exis # HAVE_GDB?= 1100 -.if ${HAVE_GDB} == 1310 +.if ${HAVE_GDB} == 1320 EXTERNAL_GDB_SUBDIR= gdb .elif ${HAVE_GDB} == 1100 EXTERNAL_GDB_SUBDIR= gdb.old
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Mon Jul 31 17:35:31 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: we ended up importing 13.2 To generate a diff of this commit: cvs rdiff -u -r1.1345 -r1.1346 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.
CVS commit: src/share/mk
Module Name:src Committed By: lukem Date: Sun Jul 23 16:49:29 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: style: block comments, move CC_flag vars Add #{ .. #} block comments to a long conditional. Move the CC_flag variables closer to other compiler-related variables instead of being in the middle of some arch-specific overrides. To generate a diff of this commit: cvs rdiff -u -r1.1343 -r1.1344 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/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1343 src/share/mk/bsd.own.mk:1.1344 --- src/share/mk/bsd.own.mk:1.1343 Fri Jul 21 20:03:13 2023 +++ src/share/mk/bsd.own.mk Sun Jul 23 16:49:29 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1343 2023/07/21 20:03:13 riastradh Exp $ +# $NetBSD: bsd.own.mk,v 1.1344 2023/07/23 16:49:29 lukem Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -70,7 +70,7 @@ TOOLCHAIN_MISSING?= no # # GCC Using platforms. # -.if ${MKGCC:Uyes} != "no" +.if ${MKGCC:Uyes} != "no" # { # # What GCC is used? @@ -94,9 +94,10 @@ EXTERNAL_GCC_SUBDIR?= gcc .else EXTERNAL_GCC_SUBDIR?= /does/not/exist .endif -.else + +.else # MKGCC == no # } { MKGCCCMDS?= no -.endif +.endif # MKGCC == no # } # # What binutils is used? @@ -670,6 +671,32 @@ CXX= ${TOOL_CXX.${ACTIVE_CXX}} FC= ${TOOL_FC.${ACTIVE_FC}} OBJC= ${TOOL_OBJC.${ACTIVE_OBJC}} +# +# Clang and GCC compiler-specific options, usually to disable warnings. +# The naming convention is "CC" + the compiler flag converted +# to upper case, with '-' and '=' changed to '_' a la `tr -=a-z __A-Z`. +# For variable naming purposes, treat -Werror=FLAG as -WFLAG, +# and -Wno-error=FLAG as -Wno-FLAG (usually from Clang). +# +# E.g., CC_WNO_ADDRESS_OF_PACKED_MEMBER contains +# both -Wno-error=address-of-packed-member for Clang, +# and -Wno-address-of-packed-member for GCC 9+. +# +# Use these with e.g. +# COPTS.foo.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} +# +CC_WNO_ADDRESS_OF_PACKED_MEMBER=${${ACTIVE_CC} == "clang" :? -Wno-error=address-of-packed-member :} \ +${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-address-of-packed-member :} + +CC_WNO_CAST_FUNCTION_TYPE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-cast-function-type :} +CC_WNO_FORMAT_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-overflow :} +CC_WNO_FORMAT_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-truncation :} +CC_WNO_IMPLICIT_FALLTHROUGH= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-implicit-fallthrough :} +CC_WNO_MAYBE_UNINITIALIZED= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-maybe-uninitialized :} +CC_WNO_RETURN_LOCAL_ADDR= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-return-local-addr :} +CC_WNO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :} +CC_WNO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :} + # For each ${MACHINE_CPU}, list the ports that use it. MACHINES.aarch64= evbarm MACHINES.alpha= alpha @@ -872,32 +899,6 @@ NOPROFILE= # defined .endif # -# Clang and GCC compiler-specific options, usually to disable warnings. -# The naming convention is "CC" + the compiler flag converted -# to upper case, with '-' and '=' changed to '_' a la `tr -=a-z __A-Z`. -# For variable naming purposes, treat -Werror=FLAG as -WFLAG, -# and -Wno-error=FLAG as -Wno-FLAG (usually from Clang). -# -# E.g., CC_WNO_ADDRESS_OF_PACKED_MEMBER contains -# both -Wno-error=address-of-packed-member for Clang, -# and -Wno-address-of-packed-member for GCC 9+. -# -# Use these with e.g. -# COPTS.foo.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} -# -CC_WNO_ADDRESS_OF_PACKED_MEMBER=${${ACTIVE_CC} == "clang" :? -Wno-error=address-of-packed-member :} \ -${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-address-of-packed-member :} - -CC_WNO_CAST_FUNCTION_TYPE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-cast-function-type :} -CC_WNO_FORMAT_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-overflow :} -CC_WNO_FORMAT_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-truncation :} -CC_WNO_IMPLICIT_FALLTHROUGH= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-implicit-fallthrough :} -CC_WNO_MAYBE_UNINITIALIZED= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-maybe-uninitialized :} -CC_WNO_RETURN_LOCAL_ADDR= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-return-local-addr :} -CC_WNO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :} -CC_WNO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :} - -# # The ia64 port is incomplete. # MKGDB.ia64= no
CVS commit: src/share/mk
Module Name:src Committed By: lukem Date: Sun Jul 23 16:49:29 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: style: block comments, move CC_flag vars Add #{ .. #} block comments to a long conditional. Move the CC_flag variables closer to other compiler-related variables instead of being in the middle of some arch-specific overrides. To generate a diff of this commit: cvs rdiff -u -r1.1343 -r1.1344 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.
CVS commit: src/share/mk
Module Name:src Committed By: lukem Date: Sat Jul 22 18:50:31 UTC 2023 Modified Files: src/share/mk: bsd.README Log Message: bsd.README: sync with mk.conf(5), deduping entries Remove most duplication of variables already documented in mk.conf(5). Add lists of supported and obsolete mk.conf(5) variables so that searches in this document at least find them (as per BUILDING). Sync text from mk.conf(5) for entries that remain. Explicitly document DESTDIR and RELEASEDIR. Replace MKMAN=no antipattern with NOMAN=. Consistently use "option" versus "flag"; option is more generic, and may include a flag with an argument. To generate a diff of this commit: cvs rdiff -u -r1.444 -r1.445 src/share/mk/bsd.README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: lukem Date: Sat Jul 22 18:50:31 UTC 2023 Modified Files: src/share/mk: bsd.README Log Message: bsd.README: sync with mk.conf(5), deduping entries Remove most duplication of variables already documented in mk.conf(5). Add lists of supported and obsolete mk.conf(5) variables so that searches in this document at least find them (as per BUILDING). Sync text from mk.conf(5) for entries that remain. Explicitly document DESTDIR and RELEASEDIR. Replace MKMAN=no antipattern with NOMAN=. Consistently use "option" versus "flag"; option is more generic, and may include a flag with an argument. To generate a diff of this commit: cvs rdiff -u -r1.444 -r1.445 src/share/mk/bsd.README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.README diff -u src/share/mk/bsd.README:1.444 src/share/mk/bsd.README:1.445 --- src/share/mk/bsd.README:1.444 Mon Jun 5 22:36:58 2023 +++ src/share/mk/bsd.README Sat Jul 22 18:50:31 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.444 2023/06/05 22:36:58 lukem Exp $ +# $NetBSD: bsd.README,v 1.445 2023/07/22 18:50:31 lukem Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the make "include" files for the NetBSD @@ -71,7 +71,7 @@ The basic rule for the variable naming s HOST_ A command that runs on the host machine regardless of whether or not the system is being cross compiled, or - flags for such a command. + options for such a command. MK Can be set to "no" to disable feature , or "yes" to enable feature . @@ -100,1100 +100,77 @@ TOOL_ A tool that is provided as p TOOL_ variables should refer to tools that are already installed on the host system. -The following variables control how things are made/installed that -are not set by default. These should not be set by Makefiles; they're for -the user to define in MAKECONF (see , below, or mk.conf(5)) -or on the make(1) command line: - -BUILD If defined, 'make install' checks that the targets in the - source directories are up-to-date and re-makes them if - they are out of date, instead of blindly trying to - install out of date or non-existent targets. +Various mk.conf(5) variables control the NetBSD system build. +These should not be set by Makefiles; they're for the user to define +in MAKECONF (see mk.conf(5) or documented below) or on +the make(1) command line. + +The supported mk.conf(5) make variables are: + + BSDOBJDIR, BSDSRCDIR, BUILD, BUILDID, BUILDINFO, BUILDSEED, + CDEXTRA, CONFIGOPTS, COPTS, CPUFLAGS, DESTDIR, EXTERNAL_TOOLCHAIN, + INSTALLBOOT_BOARDS, INSTALLWORLDDIR, KERNARCHDIR, KERNCONFDIR, + KERNEL_DIR, KERNOBJDIR, KERNSRCDIR, LOCALTIME, MAKEVERBOSE, + MKAMDGPUFIRMWARE, MKARGON2, MKARZERO, MKATF, MKBINUTILS, MKBSDGREP, + MKBSDTAR, MKCATPAGES, MKCLEANSRC, MKCLEANVERIFY, MKCOMPAT, + MKCOMPATMODULES, MKCOMPATTESTS, MKCOMPATX11, MKCOMPLEX, MKCROSSGDB, + MKCTF, MKCVS, MKCXX, MKDEBUG, MKDEBUGKERNEL, MKDEBUGLIB, + MKDEBUGTOOLS, MKDEPINCLUDES, MKDOC, MKDTB, MKDTC, MKDTRACE, + MKDYNAMICROOT, MKFIRMWARE, MKGCC, MKGCCCMDS, MKGDB, MKGROFF, + MKGROFFHTMLDOC, MKHESIOD, MKHOSTOBJ, MKHTML, MKIEEEFP, MKINET6, + MKINFO, MKIPFILTER, MKISCSI, MKKERBEROS, MKKMOD, MKKYUA, MKLDAP, + MKLIBCSANITIZER, MKLIBCXX, MKLIBSTDCXX, MKLINKLIB, MKLINT, MKLLVM, + MKLLVMRT, MKLVM, MKMAKEMANDB, MKMAN, MKMANDOC, MKMANZ, MKMDNS, + MKNLS, MKNOUVEAUFIRMWARE, MKNPF, MKNSD, MKOBJ, MKOBJDIRS, MKPAM, + MKPCC, MKPF, MKPIC, MKPICINSTALL, MKPICLIB, MKPIE, MKPIGZGZIP, + MKPOSTFIX, MKPROFILE, MKRADEONFIRMWARE, MKRELRO, MKREPRO, + MKREPRO_TIMESTAMP, MKRUMP, MKSANITIZER, MKSHARE, MKSKEY, MKSLJIT, + MKSOFTFLOAT, MKSTATICLIB, MKSTATICPIE, MKSTRIPIDENT, MKSTRIPSYM, + MKTEGRAFIRMWARE, MKTPM, MKUNBOUND, MKUNPRIVED, MKUPDATE, MKX11, + MKX11FONTS, MKX11MOTIF, MKXORG_SERVER, MKYP, MKZFS, NETBSDSRCDIR, + NETBSD_OFFICIAL_RELEASE, NOCLEANDIR, NODISTRIBDIRS, NOINCLUDES, + OBJMACHINE, RELEASEDIR, RUMPUSER_THREADS, RUMP_CURLWP, RUMP_DEBUG, + RUMP_DIAGNOSTIC, RUMP_KTRACE, RUMP_LOCKDEBUG, RUMP_LOCKS_UP, + RUMP_NBCOMPAT, RUMP_VIRTIF, RUMP_VNODE_LOCKDEBUG, + TOOLCHAIN_MISSING, TOOLDIR, USETOOLS, USE_FORT, USE_HESIOD, + USE_INET6, USE_JEMALLOC, USE_KERBEROS, USE_LDAP, USE_LIBCSANITIZER, + USE_PAM, USE_PIGZGZIP, USE_SANITIZER, USE_SKEY, USE_SSP, + USE_XZ_SETS, USE_YP, X11MOTIFPATH, X11SRCDIR. + +The obsolete mk.conf(5) make variables are: + + EXTSRCSRCDIR, MKBFD, MKCRYPTO, MKEXTSRC, MKKDEBUG, MKKERBEROS4, + MKLLD, MKLLDB, MKMCLINKER, MKPERFUSE, MKTOOLSDEBUG, NBUILDJOBS, + SHAREDSTRINGS, USE_COMBINE, USE_NEW_TOOLCHAIN. + +Notable variables documented in mk.conf(5) and duplicated here: + +DESTDIR Directory to contain the built NetBSD system. If set, + special options are passed to the compilation tools to + prevent their default use of the host system's + /usr/include, /usr/lib, and so forth. This pathname must + be an absolute path, and should not end with a slash (/) +