CVS commit: src/sbin/raidctl

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Sep  6 05:31:46 UTC 2020

Modified Files:
src/sbin/raidctl: rf_configure.c

Log Message:
avoid trying to printf() a NULL as %s.  fixes likely bug.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sbin/raidctl/rf_configure.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/raidctl/rf_configure.c
diff -u src/sbin/raidctl/rf_configure.c:1.33 src/sbin/raidctl/rf_configure.c:1.34
--- src/sbin/raidctl/rf_configure.c:1.33	Thu Jan 18 00:32:49 2018
+++ src/sbin/raidctl/rf_configure.c	Sun Sep  6 05:31:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_configure.c,v 1.33 2018/01/18 00:32:49 mrg Exp $ */
+/*	$NetBSD: rf_configure.c,v 1.34 2020/09/06 05:31:46 mrg Exp $ */
 
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
@@ -49,7 +49,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: rf_configure.c,v 1.33 2018/01/18 00:32:49 mrg Exp $");
+__RCSID("$NetBSD: rf_configure.c,v 1.34 2020/09/06 05:31:46 mrg Exp $");
 #endif
 
 
@@ -286,7 +286,7 @@ rf_MakeConfig(char *configname, RF_Confi
 		b = getfsspecname(b1, sizeof(b1), buf);
 		if (b == NULL) {
 			warnx("Config file error: warning: unable to get "
-			"device file for spare disk %d: %s", c, b);
+			"device file for spare disk %d: %s", c, buf);
 			b = buf;
 		}
 



CVS commit: src/sbin/raidctl

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Sep  6 05:31:46 UTC 2020

Modified Files:
src/sbin/raidctl: rf_configure.c

Log Message:
avoid trying to printf() a NULL as %s.  fixes likely bug.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sbin/raidctl/rf_configure.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Sep  6 05:30:17 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_linux_libcdep.cc

Log Message:
fix merge botch: netbsd doesn't want any of this.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.13 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.14
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.13	Sat Sep  5 13:35:55 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc	Sun Sep  6 05:30:17 2020
@@ -543,13 +543,15 @@ void GetThreadStackAndTls(bool main, upt
 #endif
 }
 
-#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD
+#if !SANITIZER_NETBSD
+#if !SANITIZER_FREEBSD && !SANITIZER_OPENBSD
 typedef ElfW(Phdr) Elf_Phdr;
 #elif SANITIZER_WORDSIZE == 32 && __FreeBSD_version <= 902001 // v9.2
 #define Elf_Phdr XElf32_Phdr
 #define dl_phdr_info xdl_phdr_info
 #define dl_iterate_phdr(c, b) xdl_iterate_phdr((c), (b))
 #endif // !SANITIZER_FREEBSD && !SANITIZER_OPENBSD
+#endif // !SANITIZER_NETBSD
 
 struct DlIteratePhdrData {
   InternalMmapVectorNoCtor *modules;



CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Sep  6 05:30:17 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_linux_libcdep.cc

Log Message:
fix merge botch: netbsd doesn't want any of this.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make/unit-tests

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Sep  6 04:35:03 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: opt-debug-errors.exp opt-debug-errors.mk

Log Message:
make(1): add test for the -de option


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/opt-debug-errors.exp \
src/usr.bin/make/unit-tests/opt-debug-errors.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make/unit-tests

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Sep  6 04:35:03 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: opt-debug-errors.exp opt-debug-errors.mk

Log Message:
make(1): add test for the -de option


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/opt-debug-errors.exp \
src/usr.bin/make/unit-tests/opt-debug-errors.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/unit-tests/opt-debug-errors.exp
diff -u src/usr.bin/make/unit-tests/opt-debug-errors.exp:1.1 src/usr.bin/make/unit-tests/opt-debug-errors.exp:1.2
--- src/usr.bin/make/unit-tests/opt-debug-errors.exp:1.1	Sat Sep  5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-errors.exp	Sun Sep  6 04:35:03 2020
@@ -1 +1,34 @@
+echo '3   spaces'; false
+3   spaces
+
+*** Failed target:  fail-spaces
+*** Failed command: echo '3 spaces'; false
+*** Error code 1 (continuing)
+echo \  indented; false
+  indented
+
+*** Failed target:  fail-escaped-space
+*** Failed command: echo \ indented; false
+*** Error code 1 (continuing)
+echo 'line1
+line2'; false
+line1
+line2
+
+*** Failed target:  fail-newline
+*** Failed command: echo 'line1 line2'; false
+*** Error code 1 (continuing)
+echo 'line1 line2'; false
+line1 line2
+
+*** Failed target:  fail-multiline
+*** Failed command: echo 'line1 line2'; false
+*** Error code 1 (continuing)
+echo	'word1'			 'word2'; false
+word1 word2
+
+*** Failed target:  fail-multiline-intention
+*** Failed command: echo 'word1' 'word2'; false
+*** Error code 1 (continuing)
+`all' not remade because of errors.
 exit status 0
Index: src/usr.bin/make/unit-tests/opt-debug-errors.mk
diff -u src/usr.bin/make/unit-tests/opt-debug-errors.mk:1.1 src/usr.bin/make/unit-tests/opt-debug-errors.mk:1.2
--- src/usr.bin/make/unit-tests/opt-debug-errors.mk:1.1	Sat Sep  5 06:20:51 2020
+++ src/usr.bin/make/unit-tests/opt-debug-errors.mk	Sun Sep  6 04:35:03 2020
@@ -1,9 +1,42 @@
-# $NetBSD: opt-debug-errors.mk,v 1.1 2020/09/05 06:20:51 rillig Exp $
+# $NetBSD: opt-debug-errors.mk,v 1.2 2020/09/06 04:35:03 rillig Exp $
 #
 # Tests for the -de command line option, which adds debug logging for
 # failed commands and targets.
 
-# TODO: Implementation
+.MAKEFLAGS: -de
 
-all:
-	@:;
+all: fail-spaces
+all: fail-escaped-space
+all: fail-newline
+all: fail-multiline
+all: fail-multiline-intention
+
+# XXX: The debug output folds the spaces, showing '3 spaces' instead of
+# the correct '3   spaces'.
+fail-spaces:
+	echo '3   spaces'; false
+
+# XXX: The debug output folds the spaces, showing 'echo \ indented' instead
+# of the correct 'echo \  indented'.
+fail-escaped-space:
+	echo \  indented; false
+
+# XXX: A newline is turned into an ordinary space in the debug log.
+fail-newline:
+	echo 'line1${.newline}line2'; false
+
+# The line continuations in multiline commands are turned into an ordinary
+# space before the command is actually run.
+fail-multiline:
+	echo 'line1\
+		line2'; false
+
+# It is a common style to align the continuation backslashes at the right
+# of the lines, usually at column 73.  All spaces before the continuation
+# backslash are preserved and are usually outside a shell word and thus
+# irrelevant.  Having these spaces collapsed makes sense to show the command
+# in its condensed form.
+#
+fail-multiline-intention:
+	echo	'word1'			\
+		'word2'; false



CVS commit: src/sbin/ccdconfig

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Sep  6 02:34:30 UTC 2020

Modified Files:
src/sbin/ccdconfig: ccdconfig.c

Log Message:
rework error message to never call printf() %s with NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sbin/ccdconfig/ccdconfig.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/ccdconfig/ccdconfig.c
diff -u src/sbin/ccdconfig/ccdconfig.c:1.56 src/sbin/ccdconfig/ccdconfig.c:1.57
--- src/sbin/ccdconfig/ccdconfig.c:1.56	Sun Dec  7 10:44:34 2014
+++ src/sbin/ccdconfig/ccdconfig.c	Sun Sep  6 02:34:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ccdconfig.c,v 1.56 2014/12/07 10:44:34 mlelstv Exp $	*/
+/*	$NetBSD: ccdconfig.c,v 1.57 2020/09/06 02:34:30 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #ifndef lint
 __COPYRIGHT("@(#) Copyright (c) 1996, 1997\
  The NetBSD Foundation, Inc.  All rights reserved.");
-__RCSID("$NetBSD: ccdconfig.c,v 1.56 2014/12/07 10:44:34 mlelstv Exp $");
+__RCSID("$NetBSD: ccdconfig.c,v 1.57 2020/09/06 02:34:30 mrg Exp $");
 #endif
 
 #include 
@@ -245,7 +245,7 @@ do_single(int argc, char **argv, int act
 
 		cp = strdup(buf);
 		if (cp == NULL) {
-			warn("%s", cp);
+			warn("strdup failed");
 			goto error;
 		}
 



CVS commit: src/sbin/amrctl

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Sep  6 02:34:03 UTC 2020

Modified Files:
src/sbin/amrctl: amrctl.c

Log Message:
avoid calling printf() %s with NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sbin/amrctl/amrctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/amrctl/amrctl.c
diff -u src/sbin/amrctl/amrctl.c:1.11 src/sbin/amrctl/amrctl.c:1.12
--- src/sbin/amrctl/amrctl.c:1.11	Mon Aug 27 00:36:03 2018
+++ src/sbin/amrctl/amrctl.c	Sun Sep  6 02:34:02 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: amrctl.c,v 1.11 2018/08/27 00:36:03 sevan Exp $	*/
+/*	$NetBSD: amrctl.c,v 1.12 2020/09/06 02:34:02 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2002, Pierre David 
@@ -29,7 +29,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: amrctl.c,v 1.11 2018/08/27 00:36:03 sevan Exp $");
+__RCSID("$NetBSD: amrctl.c,v 1.12 2020/09/06 02:34:02 mrg Exp $");
 #endif
 
 #include 
@@ -453,7 +453,8 @@ describe_one_volume(int ldrv, int verbos
 
 	printf("Logical volume %d\t", ldrv);
 	statestr = describe_state(verbosity, state);
-	printf("%s ", statestr);
+	if (statestr)
+		printf("%s ", statestr);
 	printf("(%.2f GB, RAID%d", szgb, raid_level);
 	if (verbosity >= 1) {
 		describe_property(prop, propstr);



CVS commit: src/sbin/amrctl

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Sep  6 02:34:03 UTC 2020

Modified Files:
src/sbin/amrctl: amrctl.c

Log Message:
avoid calling printf() %s with NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sbin/amrctl/amrctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/ccdconfig

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Sep  6 02:34:30 UTC 2020

Modified Files:
src/sbin/ccdconfig: ccdconfig.c

Log Message:
rework error message to never call printf() %s with NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sbin/ccdconfig/ccdconfig.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Sep  6 02:25:17 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/earm: backtrace-supported.h
config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmeb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhf:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhfeb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libgcc/arch/earm: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmeb: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmhf: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmhfeb: defs.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earm: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmeb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhf: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhfeb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgomp/arch/earm: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmeb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmhf: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmhfeb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libiberty/arch/earm: config.h
src/external/gpl3/gcc/lib/libiberty/arch/earmeb: config.h
src/external/gpl3/gcc/lib/libiberty/arch/earmhf: config.h
src/external/gpl3/gcc/lib/libiberty/arch/earmhfeb: config.h
src/external/gpl3/gcc/lib/libobjc/arch/earm: config.h defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/earmeb: config.h defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/earmhf: config.h defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/earmhfeb: config.h defs.mk
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earm: c++config.h
cxxabi_tweaks.h defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb: c++config.h
cxxabi_tweaks.h defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf: c++config.h
cxxabi_tweaks.h defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb: c++config.h
cxxabi_tweaks.h defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/usr.bin/common-target/arch: earm.mk earmeb.mk
earmhf.mk earmhfeb.mk
src/external/gpl3/gcc/usr.bin/gcc/arch/earm: all-tree.def
arm-cpu-cdata.h arm-cpu-data.h arm-cpu.h arm-isa.h auto-host.h
bversion.h configargs.h defs.mk gtyp-input.list insn-modes.h
plugin-version.h tm.h
src/external/gpl3/gcc/usr.bin/gcc/arch/earmeb: all-tree.def
arm-cpu-cdata.h arm-cpu-data.h arm-cpu.h arm-isa.h auto-host.h
bversion.h configargs.h defs.mk gtyp-input.list insn-modes.h
plugin-version.h tm.h
src/external/gpl3/gcc/usr.bin/gcc/arch/earmhf: all-tree.def
arm-cpu-cdata.h arm-cpu-data.h arm-cpu.h arm-isa.h auto-host.h
bversion.h configargs.h defs.mk gtyp-input.list insn-modes.h
plugin-version.h tm.h
src/external/gpl3/gcc/usr.bin/gcc/arch/earmhfeb: all-tree.def
arm-cpu-cdata.h arm-cpu-data.h arm-cpu.h arm-isa.h auto-host.h
bversion.h configargs.h defs.mk gtyp-input.list insn-modes.h
plugin-version.h tm.h
src/external/gpl3/gcc/usr.bin/libcpp/arch/earm: config.h
src/external/gpl3/gcc/usr.bin/libcpp/arch/earmeb: config.h
src/external/gpl3/gcc/usr.bin/libcpp/arch/earmhf: config.h
src/external/gpl3/gcc/usr.bin/libcpp/arch/earmhfeb: config.h

Log Message:
mknative-gcc for gcc 9.3.0 and earmv5*.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gcc/lib/libbacktrace/arch/earm/backtrace-supported.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/lib/libbacktrace/arch/earm/config.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gcc/lib/libbacktrace/arch/earmeb/backtrace-supported.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/lib/libbacktrace/arch/earmeb/config.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhf/backtrace-supported.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhf/config.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhfeb/backtrace-supported.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhfeb/config.h
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc/lib/libgcc/arch/earm/defs.mk
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/lib/libgcc/arch/earmeb/defs.mk
cvs rdiff -u -r1.7 

CVS commit: src/tools/gcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Sep  6 02:24:38 UTC 2020

Modified Files:
src/tools/gcc: Makefile mknative-gcc mknative-gcc.old

Log Message:
pass down earm* not earmv5* to mknative-gcc.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/tools/gcc/Makefile
cvs rdiff -u -r1.108 -r1.109 src/tools/gcc/mknative-gcc
cvs rdiff -u -r1.8 -r1.9 src/tools/gcc/mknative-gcc.old

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.99 src/tools/gcc/Makefile:1.100
--- src/tools/gcc/Makefile:1.99	Sat Sep  5 10:58:08 2020
+++ src/tools/gcc/Makefile	Sun Sep  6 02:24:38 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.99 2020/09/05 10:58:08 mrg Exp $
+#	$NetBSD: Makefile,v 1.100 2020/09/06 02:24:38 mrg Exp $
 
 .include 
 
@@ -95,7 +95,6 @@ MKNATIVE_CONFIG_TARGET_LIBS=
 
 MKNATIVE_CONFIG_TARGET_LIBS+=	configure-target-libgcc
 MKNATIVE_CONFIG_TARGET_LIBS+=	configure-target-libgomp
-MKNATIVE_TARGET=	gcc
 
 MKNATIVE_CONFIG_TARGET_LIBS+= \
 	configure-target-libstdc++-v3 \
@@ -142,25 +141,27 @@ CCADDFLAGS=	--sysroot=${DESTDIR} -L${DES
 # in case the version being used is not.
 NEWCONFIGDIR?=	${.CURDIR}/../..
 
+GCC_MACHINE_ARCH=	${MACHINE_ARCH:S/earmv5/earm/}
+
 bootstrap-libgcc: .configure_done
 	@echo 'Creating files needed for libgcc by a native bootstrap build.'
 	(cd ${.OBJDIR}/build && ${BUILD_COMMAND} configure-target-libgcc)
-	@MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} lib${MKNATIVE_TARGET}-bootstrap \
+	@MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} libgcc-bootstrap \
 		${.OBJDIR}/build ${NEWCONFIGDIR} ${NETBSDSRCDIR} \
-		${MACHINE_GNU_PLATFORM} ${DESTDIR} ${TOOLDIR}
+		${MACHINE_GNU_PLATFORM} ${GCC_MACHINE_ARCH} ${DESTDIR} ${TOOLDIR}
 
 bootstrap-libstdc++: .configure_done
 	@echo 'Creating files needed for libstdc++ by a native bootstrap build.'
 	(cd ${.OBJDIR}/build && ${BUILD_COMMAND} configure-target-libstdc++-v3)
 	@MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} libstdc++-bootstrap \
 		${.OBJDIR}/build ${NEWCONFIGDIR} ${NETBSDSRCDIR} \
-		${MACHINE_GNU_PLATFORM} ${DESTDIR} ${TOOLDIR}
+		${MACHINE_GNU_PLATFORM} ${GCC_MACHINE_ARCH} ${DESTDIR} ${TOOLDIR}
 
 native-gcc: .native/.configure_done
 	@echo 'Extracting GNU GCC configury for a native toolchain.'
-	@MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} ${MKNATIVE_TARGET} \
+	@MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} gcc \
 		${.OBJDIR}/.native ${NEWCONFIGDIR} ${NETBSDSRCDIR} \
-		${MACHINE_GNU_PLATFORM} ${DESTDIR} ${TOOLDIR}
+		${MACHINE_GNU_PLATFORM} ${GCC_MACHINE_ARCH} ${DESTDIR} ${TOOLDIR}
 
 NATIVE_CONFIGURE_ARGS=	${COMMON_CONFIGURE_ARGS}
 MPC=		${NETBSDSRCDIR}/external/lgpl3/mpc

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.108 src/tools/gcc/mknative-gcc:1.109
--- src/tools/gcc/mknative-gcc:1.108	Sat Sep  5 10:58:08 2020
+++ src/tools/gcc/mknative-gcc	Sun Sep  6 02:24:38 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.108 2020/09/05 10:58:08 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.109 2020/09/06 02:24:38 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -12,8 +12,9 @@ _TMPDIR=$2
 _TOP=$3
 _SRC=$4
 _PLATFORM=$5
-_DESTDIR=$6
-_TOOLDIR=$7
+_MACHINE_ARCH=$6
+_DESTDIR=$7
+_TOOLDIR=$8
 _VPATH=`grep VPATH ${_TMPDIR}/Makefile | sed 's,^.*=[ 	]*,,'`
 _GNU_DIST=`cd ${_VPATH}; pwd`
 
@@ -47,10 +48,10 @@ sanitise_includes () {
 # lib/libg2c #
 
 get_libg2c () {
-	mkdir -p $_OUTDIR/lib/libg2c3/arch/$MACHINE_ARCH
+	mkdir -p $_OUTDIR/lib/libg2c3/arch/$_MACHINE_ARCH
 
-	write_c $_OUTDIRBASE/lib/libg2c3/arch/$MACHINE_ARCH/config.h <$_TMPDIR/$_PLATFORM/libf2c/libU77/config.h
-	write_c $_OUTDIRBASE/lib/libg2c3/arch/$MACHINE_ARCH/g2c.h <$_TMPDIR/$_PLATFORM/libf2c/g2c.h
+	write_c $_OUTDIRBASE/lib/libg2c3/arch/$_MACHINE_ARCH/config.h <$_TMPDIR/$_PLATFORM/libf2c/libU77/config.h
+	write_c $_OUTDIRBASE/lib/libg2c3/arch/$_MACHINE_ARCH/g2c.h <$_TMPDIR/$_PLATFORM/libf2c/g2c.h
 
 	{
 		getvars $_PLATFORM/libf2c/Makefile \
@@ -61,7 +62,7 @@ get_libg2c () {
 			ALL_CFLAGS OBJS | sed 's,=,+=,'
 		getvars $_PLATFORM/libf2c/libU77/Makefile \
 			ALL_CFLAGS OBJS | sed 's,=,+=,'
-	} | write_mk $_OUTDIRBASE/lib/libg2c3/arch/$MACHINE_ARCH/defs.mk
+	} | write_mk $_OUTDIRBASE/lib/libg2c3/arch/$_MACHINE_ARCH/defs.mk
 }
 
 # lib/libgcc #
@@ -74,7 +75,7 @@ get_libgcc () {
 	# XXX we should probably grab everything Just In Case for
 	# the future.
 
-	mkdir -p $_OUTDIR/lib/lib$_subdir/arch/$MACHINE_ARCH
+	mkdir -p $_OUTDIR/lib/lib$_subdir/arch/$_MACHINE_ARCH
 	cd $_TMPDIR/$_PLATFORM/libgcc
 	{
 		getvars $_PLATFORM/libgcc/Makefile \
@@ -90,7 +91,7 @@ get_libgcc () {
 		getvars gcc/Makefile \
 			NOEXCEPTION_FLAGS EXTRA_HEADERS
 	}	| sanitise_includes \
-		| write_mk $_OUTDIRBASE/lib/lib$_subdir/arch/$MACHINE_ARCH/defs.mk
+		| write_mk $_OUTDIRBASE/lib/lib$_subdir/arch/$_MACHINE_ARCH/defs.mk
 
 	cd 

CVS commit: src/tools/gcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Sep  6 02:24:38 UTC 2020

Modified Files:
src/tools/gcc: Makefile mknative-gcc mknative-gcc.old

Log Message:
pass down earm* not earmv5* to mknative-gcc.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/tools/gcc/Makefile
cvs rdiff -u -r1.108 -r1.109 src/tools/gcc/mknative-gcc
cvs rdiff -u -r1.8 -r1.9 src/tools/gcc/mknative-gcc.old

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2020-09-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Sep  6 02:18:53 UTC 2020

Modified Files:
src/sys/arch/x86/x86: pmap.c
src/sys/arch/xen/x86: x86_xpmap.c xen_pmap.c
src/sys/dev/nvmm: nvmm_internal.h
src/sys/dev/nvmm/x86: nvmm_x86.c nvmm_x86_svm.c nvmm_x86_vmx.c
src/sys/modules/examples/mapper: mapper.c

Log Message:
Fix fallout from previous uvm.h cleanup.

- pmap(9) needs uvm/uvm_extern.h.

- x86/pmap.h is not usable on its own; it is only usable if included
  via uvm/uvm_extern.h (-> uvm/uvm_pmap.h -> machine/pmap.h).

- Make nvmm.h and nvmm_internal.h standalone.


To generate a diff of this commit:
cvs rdiff -u -r1.406 -r1.407 src/sys/arch/x86/x86/pmap.c
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/xen/x86/x86_xpmap.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/xen/x86/xen_pmap.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/nvmm/nvmm_internal.h
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/nvmm/x86/nvmm_x86.c
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/nvmm/x86/nvmm_x86_svm.c
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/examples/mapper/mapper.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.406 src/sys/arch/x86/x86/pmap.c:1.407
--- src/sys/arch/x86/x86/pmap.c:1.406	Wed Sep  2 17:37:57 2020
+++ src/sys/arch/x86/x86/pmap.c	Sun Sep  6 02:18:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.406 2020/09/02 17:37:57 bouyer Exp $	*/
+/*	$NetBSD: pmap.c,v 1.407 2020/09/06 02:18:53 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2008, 2010, 2016, 2017, 2019, 2020 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.406 2020/09/02 17:37:57 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.407 2020/09/06 02:18:53 riastradh Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -167,7 +167,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.4
 #include 
 #include 
 
-#include 
 #include 
 
 #include 

Index: src/sys/arch/xen/x86/x86_xpmap.c
diff -u src/sys/arch/xen/x86/x86_xpmap.c:1.89 src/sys/arch/xen/x86/x86_xpmap.c:1.90
--- src/sys/arch/xen/x86/x86_xpmap.c:1.89	Tue May 26 10:10:32 2020
+++ src/sys/arch/xen/x86/x86_xpmap.c	Sun Sep  6 02:18:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_xpmap.c,v 1.89 2020/05/26 10:10:32 bouyer Exp $	*/
+/*	$NetBSD: x86_xpmap.c,v 1.90 2020/09/06 02:18:53 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -95,7 +95,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.89 2020/05/26 10:10:32 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.90 2020/09/06 02:18:53 riastradh Exp $");
 
 #include "opt_xen.h"
 #include "opt_ddb.h"
@@ -109,8 +109,8 @@ __KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,
 
 #include 
 
-#include 
 #include 
+
 #include 
 
 #include 

Index: src/sys/arch/xen/x86/xen_pmap.c
diff -u src/sys/arch/xen/x86/xen_pmap.c:1.38 src/sys/arch/xen/x86/xen_pmap.c:1.39
--- src/sys/arch/xen/x86/xen_pmap.c:1.38	Sun Jul 19 13:55:09 2020
+++ src/sys/arch/xen/x86/xen_pmap.c	Sun Sep  6 02:18:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: xen_pmap.c,v 1.38 2020/07/19 13:55:09 maxv Exp $	*/
+/*	$NetBSD: xen_pmap.c,v 1.39 2020/09/06 02:18:53 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2007 Manuel Bouyer.
@@ -101,7 +101,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v 1.38 2020/07/19 13:55:09 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v 1.39 2020/09/06 02:18:53 riastradh Exp $");
 
 #include "opt_lockdebug.h"
 #include "opt_multiprocessor.h"
@@ -125,7 +125,6 @@ __KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v
 #include 
 #include 
 
-#include 
 #include 
 
 #include 

Index: src/sys/dev/nvmm/nvmm_internal.h
diff -u src/sys/dev/nvmm/nvmm_internal.h:1.18 src/sys/dev/nvmm/nvmm_internal.h:1.19
--- src/sys/dev/nvmm/nvmm_internal.h:1.18	Sat Sep  5 07:22:25 2020
+++ src/sys/dev/nvmm/nvmm_internal.h	Sun Sep  6 02:18:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm_internal.h,v 1.18 2020/09/05 07:22:25 maxv Exp $	*/
+/*	$NetBSD: nvmm_internal.h,v 1.19 2020/09/06 02:18:53 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -31,6 +31,18 @@
 #ifndef _NVMM_INTERNAL_H_
 #define _NVMM_INTERNAL_H_
 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+struct uvm_object;
+struct vmspace;
+
 #define NVMM_MAX_MACHINES	128
 #define NVMM_MAX_VCPUS		256
 #define NVMM_MAX_HMAPPINGS	32

Index: src/sys/dev/nvmm/x86/nvmm_x86.c
diff -u src/sys/dev/nvmm/x86/nvmm_x86.c:1.19 src/sys/dev/nvmm/x86/nvmm_x86.c:1.20
--- src/sys/dev/nvmm/x86/nvmm_x86.c:1.19	Sat Sep  5 16:30:11 2020
+++ src/sys/dev/nvmm/x86/nvmm_x86.c	Sun Sep  6 02:18:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm_x86.c,v 1.19 2020/09/05 16:30:11 riastradh Exp $	*/
+/*	$NetBSD: nvmm_x86.c,v 1.20 2020/09/06 02:18:53 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2018-2020 

CVS commit: src/sys

2020-09-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Sep  6 02:18:53 UTC 2020

Modified Files:
src/sys/arch/x86/x86: pmap.c
src/sys/arch/xen/x86: x86_xpmap.c xen_pmap.c
src/sys/dev/nvmm: nvmm_internal.h
src/sys/dev/nvmm/x86: nvmm_x86.c nvmm_x86_svm.c nvmm_x86_vmx.c
src/sys/modules/examples/mapper: mapper.c

Log Message:
Fix fallout from previous uvm.h cleanup.

- pmap(9) needs uvm/uvm_extern.h.

- x86/pmap.h is not usable on its own; it is only usable if included
  via uvm/uvm_extern.h (-> uvm/uvm_pmap.h -> machine/pmap.h).

- Make nvmm.h and nvmm_internal.h standalone.


To generate a diff of this commit:
cvs rdiff -u -r1.406 -r1.407 src/sys/arch/x86/x86/pmap.c
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/xen/x86/x86_xpmap.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/xen/x86/xen_pmap.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/nvmm/nvmm_internal.h
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/nvmm/x86/nvmm_x86.c
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/nvmm/x86/nvmm_x86_svm.c
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/examples/mapper/mapper.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 23:18:49 UTC 2020

Modified Files:
src/external/gpl3/gcc: README.gcc9

Log Message:
update mknative-gcc status.  everything but earmv5 is done, though
few have been tested to actually build yet.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/README.gcc9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/README.gcc9
diff -u src/external/gpl3/gcc/README.gcc9:1.1 src/external/gpl3/gcc/README.gcc9:1.2
--- src/external/gpl3/gcc/README.gcc9:1.1	Sat Sep  5 22:16:57 2020
+++ src/external/gpl3/gcc/README.gcc9	Sat Sep  5 23:18:49 2020
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc9,v 1.1 2020/09/05 22:16:57 mrg Exp $
+$NetBSD: README.gcc9,v 1.2 2020/09/05 23:18:49 mrg Exp $
 
 new stuff:
 	cc1objcplus
@@ -29,41 +29,41 @@ switched:	has port switched?  y (yes), n
 
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf	switched
 	-	---	--	--			---	
-aarch64		y	n	y	n		n		n	n	n
-alpha		y	n	y	n		n		n	n	n
-earmv4		n	n	n	n		n		n	n	n
-earmv4eb	n	n	n	n		n		n	n	n
+aarch64		y	n	n	y		n		n	n	n
+alpha		y	n	n	y		n		n	n	n
+earmv4		y	n	n	y		n		n	n	n
+earmv4eb	y	n	n	y		n		n	n	n
 earm		n	n	n	n		n		n	n	n
 earmeb		n	n	n	n		n		n	n	n
 earmhf		n	n	n	n		n		n	n	n
 earmhfeb	n	n	n	n		n		n	n	n
-earmv6		n	n	n	n		n		n	n	n
-earmv6eb	n	n	n	n		n		n	n	n
-earmv6hf	n	n	n	n		n		n	n	n
-earmv6hfeb	n	n	n	n		n		n	n	n
-earmv7		n	n	n	n		n		n	n	n
-earmv7eb	n	n	n	n		n		n	n	n
-earmv7hf	n	n	n	n		n		n	n	n
-earmv7hfeb	n	n	n	n		n		n	n	n
-hppa		y	n	y	y		n		n	n	n
-i386		n	n	y	y		n		n	n	n
-ia64		y	n	y	y		n		n	n	n
-m68000		y	n	y	y		n		n	?	?
-m68k		y	n	y	y		n		n	?	?
-mipseb		y	n	y	y		n		n	n	n
-mipsel		n	n	n	n		n		n	n	n
-mips64eb	n	n	n	n		n		n	n	n
-mips64el	n	n	n	n		n		n	n	n
-powerpc		y	n	y	y		n		n	n	n
-powerpc64	n	n	n	y		n		?	n	n
-sh3eb		y	n	y	y		n		n	n	n
-sh3el		y	n	y	y		n		n	n	n
-sparc		y	n	y	y		n		n	n	n
-sparc64		y	n	y	y		n		n	n	n
-vax		y	n	y	y		n		n	n	n
+earmv6		y	n	n	y		n		n	n	n
+earmv6eb	y	n	n	y		n		n	n	n
+earmv6hf	y	n	n	y		n		n	n	n
+earmv6hfeb	y	n	n	y		n		n	n	n
+earmv7		y	n	n	y		n		n	n	n
+earmv7eb	y	n	n	y		n		n	n	n
+earmv7hf	y	n	n	y		n		n	n	n
+earmv7hfeb	y	n	n	y		n		n	n	n
+hppa		y	n	n	y		n		n	n	n
+i386		y	n	n	y		n		n	n	n
+ia64		y	n	n	y		n		n	n	n
+m68000		y	n	n	y		n		n	?	?
+m68k		y	n	n	y		n		n	?	?
+mipseb		y	n	n	y		n		n	n	n
+mipsel		y	n	n	y		n		n	n	n
+mips64eb	y	n	n	y		n		n	n	n
+mips64el	y	n	n	y		n		n	n	n
+powerpc		y	n	n	y		n		n	n	n
+powerpc64	y	n	n	y		n		?	n	n
+sh3eb		y	n	n	y		n		n	n	n
+sh3el		y	n	n	y		n		n	n	n
+sparc		y	n	n	y		n		n	n	n
+sparc64		y	n	n	y		n		n	n	n
+vax		y	n	n	y		n		n	n	n
 x86_64		y	n	y	y		n		n	y	n
-riscv32		y	?	y	y		n		?	?	n	
-riscv64		y	?	y	y		n		?	?	n
+riscv32		y	?	n	y		n		?	?	n	
+riscv64		y	?	n	y		n		?	?	n
 --
 coldfire	?	N/A	?	?		?		N/A	N/A
 	-	---	--	--			---



CVS commit: src/external/gpl3/gcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 23:18:49 UTC 2020

Modified Files:
src/external/gpl3/gcc: README.gcc9

Log Message:
update mknative-gcc status.  everything but earmv5 is done, though
few have been tested to actually build yet.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/README.gcc9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 23:13:31 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/arm: backtrace-supported.h
config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4eb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6eb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hf:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hfeb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7eb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7hf:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7hfeb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/i386: backtrace-supported.h
config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mips64eb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mips64el:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mipsel:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libgcc/arch/arm: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv4: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv4eb: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6eb: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6hf: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6hfeb: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7eb: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7hf: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7hfeb: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/i386: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mips64eb: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mips64el: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mipsel: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64: defs.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/arm: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4eb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6eb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6hf: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6hfeb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7eb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7hf: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7hfeb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/i386: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/mips64eb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/mips64el: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/mipsel: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgomp/arch/arm: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv4: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv4eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv6: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv6eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv6hf: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv6hfeb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv7: config.h libgomp_f.h

CVS commit: src/external/gpl3/gcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 23:13:31 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/arm: backtrace-supported.h
config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4eb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6eb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hf:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hfeb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7eb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7hf:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7hfeb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/i386: backtrace-supported.h
config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mips64eb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mips64el:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mipsel:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libgcc/arch/arm: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv4: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv4eb: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6eb: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6hf: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6hfeb: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7eb: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7hf: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7hfeb: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/i386: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mips64eb: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mips64el: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mipsel: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64: defs.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/arm: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4eb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6eb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6hf: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6hfeb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7eb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7hf: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7hfeb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/i386: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/mips64eb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/mips64el: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/mipsel: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgomp/arch/arm: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv4: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv4eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv6: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv6eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv6hf: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv6hfeb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv7: config.h libgomp_f.h

CVS commit: src/external/gpl3/gcc/dist/gcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 22:41:17 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/gcc: config.gcc

Log Message:
don't include vxworks-dummy.h twice


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/external/gpl3/gcc/dist/gcc/config.gcc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 22:41:17 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/gcc: config.gcc

Log Message:
don't include vxworks-dummy.h twice


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/external/gpl3/gcc/dist/gcc/config.gcc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config.gcc
diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.64 src/external/gpl3/gcc/dist/gcc/config.gcc:1.65
--- src/external/gpl3/gcc/dist/gcc/config.gcc:1.64	Sat Sep  5 09:12:23 2020
+++ src/external/gpl3/gcc/dist/gcc/config.gcc	Sat Sep  5 22:41:17 2020
@@ -1209,7 +1209,7 @@ arm*-*-netbsdelf*)
 	with_cpu=${with_cpu:-strongarm}
 	;;
 	esac
-	tm_file="${tm_file} vxworks-dummy.h arm/arm.h"
+	tm_file="${tm_file} arm/arm.h"
 	case ${target} in
 	arm*-*-netbsdelf-*eabihf*)
 	tm_defines="${tm_defines} TARGET_DEFAULT_FLOAT_ABI=ARM_FLOAT_ABI_HARD"



CVS commit: src/external/gpl3/gcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 22:17:13 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/aarch64:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/alpha:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/hppa: backtrace-supported.h
config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/ia64: backtrace-supported.h
config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/m68000:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/m68k: backtrace-supported.h
config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mipseb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/riscv32:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/riscv64:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sh3eb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sh3el:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sparc:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sparc64:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/vax: backtrace-supported.h
config.h
src/external/gpl3/gcc/lib/libgcc/arch/m68000: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mipseb: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/powerpc: defs.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/aarch64: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/alpha: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/hppa: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/ia64: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/m68000: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/m68k: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/mipseb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/riscv32: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/riscv64: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/sh3eb: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/sh3el: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/sparc: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/sparc64: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/vax: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgomp/arch/aarch64: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/alpha: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/hppa: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libgomp/arch/ia64: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libgomp/arch/m68000: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/m68k: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libgomp/arch/mipseb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/powerpc: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/riscv32: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/riscv64: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/sh3eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/sh3el: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/sparc: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/sparc64: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/vax: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libiberty: defs.mk
src/external/gpl3/gcc/lib/libiberty/arch/aarch64: config.h
src/external/gpl3/gcc/lib/libiberty/arch/alpha: config.h
src/external/gpl3/gcc/lib/libiberty/arch/hppa: config.h
src/external/gpl3/gcc/lib/libiberty/arch/ia64: config.h
src/external/gpl3/gcc/lib/libiberty/arch/m68000: config.h
src/external/gpl3/gcc/lib/libiberty/arch/m68k: config.h
src/external/gpl3/gcc/lib/libiberty/arch/mipseb: config.h

CVS commit: src/external/gpl3/gcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 22:17:13 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/aarch64:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/alpha:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/hppa: backtrace-supported.h
config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/ia64: backtrace-supported.h
config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/m68000:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/m68k: backtrace-supported.h
config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mipseb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/riscv32:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/riscv64:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sh3eb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sh3el:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sparc:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sparc64:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/vax: backtrace-supported.h
config.h
src/external/gpl3/gcc/lib/libgcc/arch/m68000: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mipseb: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/powerpc: defs.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/aarch64: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/alpha: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/hppa: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/ia64: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/m68000: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/m68k: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/mipseb: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/riscv32: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/riscv64: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/sh3eb: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/sh3el: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/sparc: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/sparc64: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/vax: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgomp/arch/aarch64: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/alpha: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/hppa: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libgomp/arch/ia64: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libgomp/arch/m68000: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/m68k: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libgomp/arch/mipseb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/powerpc: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/riscv32: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/riscv64: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/sh3eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/sh3el: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/sparc: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/sparc64: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/vax: config.h libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libiberty: defs.mk
src/external/gpl3/gcc/lib/libiberty/arch/aarch64: config.h
src/external/gpl3/gcc/lib/libiberty/arch/alpha: config.h
src/external/gpl3/gcc/lib/libiberty/arch/hppa: config.h
src/external/gpl3/gcc/lib/libiberty/arch/ia64: config.h
src/external/gpl3/gcc/lib/libiberty/arch/m68000: config.h
src/external/gpl3/gcc/lib/libiberty/arch/m68k: config.h
src/external/gpl3/gcc/lib/libiberty/arch/mipseb: config.h

CVS commit: src/common/lib/libc/arch/aarch64/string

2020-09-05 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Sep  5 20:24:43 UTC 2020

Modified Files:
src/common/lib/libc/arch/aarch64/string: strlen.S

Log Message:
Fix a broken corner case of strlen()/strnlen() on aarch64eb

Previously a string such as "\x1\x1\x1\x1\x1\x1\x1" would count as
0 instead of 7 on BE.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/aarch64/string/strlen.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/common/lib/libc/arch/aarch64/string

2020-09-05 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Sep  5 20:24:43 UTC 2020

Modified Files:
src/common/lib/libc/arch/aarch64/string: strlen.S

Log Message:
Fix a broken corner case of strlen()/strnlen() on aarch64eb

Previously a string such as "\x1\x1\x1\x1\x1\x1\x1" would count as
0 instead of 7 on BE.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/aarch64/string/strlen.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/common/lib/libc/arch/aarch64/string/strlen.S
diff -u src/common/lib/libc/arch/aarch64/string/strlen.S:1.3 src/common/lib/libc/arch/aarch64/string/strlen.S:1.4
--- src/common/lib/libc/arch/aarch64/string/strlen.S:1.3	Wed Aug  1 17:09:26 2018
+++ src/common/lib/libc/arch/aarch64/string/strlen.S	Sat Sep  5 20:24:43 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: strlen.S,v 1.3 2018/08/01 17:09:26 ryo Exp $ */
+/* $NetBSD: strlen.S,v 1.4 2020/09/05 20:24:43 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-RCSID("$NetBSD: strlen.S,v 1.3 2018/08/01 17:09:26 ryo Exp $")
+RCSID("$NetBSD: strlen.S,v 1.4 2020/09/05 20:24:43 jakllsch Exp $")
 
 #ifdef STRNLEN
 #define FUNCNAME	strnlen
@@ -96,9 +96,15 @@ ENTRY(FUNCNAME)
 	/*
 	 * We know there is a NUL in this dword.  Use clz to find it.
 	 */
-#ifdef __AARCH64EL__
-	rev	x6, x6			/* convert to BE */
+#ifdef __AARCH64EB__
+	/* avoid BE problem due to carry propagation if last non-NUL is \x01 */
+	ldr	x7, [x4, #-8]		/* reload dword */
+	rev	x7, x7			/* byte swap */
+	sub	x6, x7, x11		/* a = X - 1 */
+	orr	x7, x7, #MASK8_0x7f	/* b = X | 0x7f */
+	bic	x6, x6, x7		/* a & ~b */
 #endif
+	rev	x6, x6			/* convert to BE */
 	clz	x6, x6			/* find null byte */
 	add	x0, x0, x6, lsr #3	/* add offset to the length */
 



CVS commit: src/distrib/sets/lists/base

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 19:17:42 UTC 2020

Modified Files:
src/distrib/sets/lists/base: mi

Log Message:
lists/base/mi: fix lines with 4 fields

ok mrg


To generate a diff of this commit:
cvs rdiff -u -r1.1258 -r1.1259 src/distrib/sets/lists/base/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists/base

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 19:17:42 UTC 2020

Modified Files:
src/distrib/sets/lists/base: mi

Log Message:
lists/base/mi: fix lines with 4 fields

ok mrg


To generate a diff of this commit:
cvs rdiff -u -r1.1258 -r1.1259 src/distrib/sets/lists/base/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1258 src/distrib/sets/lists/base/mi:1.1259
--- src/distrib/sets/lists/base/mi:1.1258	Thu Aug 27 15:31:59 2020
+++ src/distrib/sets/lists/base/mi	Sat Sep  5 19:17:42 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1258 2020/08/27 15:31:59 riastradh Exp $
+# $NetBSD: mi,v 1.1259 2020/09/05 19:17:42 rillig Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -258,11 +258,11 @@
 ./libdata/firmware/if_urtwn/rtl8192cfwU.bin	base-firmware-root	firmware
 ./libdata/firmware/if_urtwn/rtl8192eefw.bin	base-firmware-root	firmware
 ./libdata/firmware/if_wpi			base-firmware-root
-./libdata/firmware/if_wpi/LICENSE.ipw3945-ucode	base-obsolete	obsolete	firmware
+./libdata/firmware/if_wpi/LICENSE.ipw3945-ucode	base-obsolete	obsolete,firmware
 ./libdata/firmware/if_wpi/LICENSE.iwlwifi-3945-ucode	base-firmware-root	firmware
-./libdata/firmware/if_wpi/README.ipw3945-ucode	base-obsolete	obsolete	firmware
+./libdata/firmware/if_wpi/README.ipw3945-ucode	base-obsolete	obsolete,firmware
 ./libdata/firmware/if_wpi/README.iwlwifi-3945-ucode	base-firmware-root	firmware
-./libdata/firmware/if_wpi/ipw3945.ucode		base-obsolete	obsolete	firmware
+./libdata/firmware/if_wpi/ipw3945.ucode		base-obsolete	obsolete,firmware
 ./libdata/firmware/if_wpi/iwlwifi-3945.ucode		base-firmware-root	firmware
 ./libdata/firmware/nouveau			base-firmware-usr
 ./libdata/firmware/nouveau/nvidia			base-firmware-usr
@@ -457,8 +457,8 @@
 ./libdata/firmware/rumbase-firmware-root
 ./libdata/firmware/rum/rum-license		base-firmware-root	firmware
 ./libdata/firmware/rum/rum-rt2573		base-firmware-root	firmware
-./libdata/firmware/rum/run-rt2870		base-obsolete	obsolete	firmware
-./libdata/firmware/rum/run-rt3071		base-obsolete	obsolete	firmware
+./libdata/firmware/rum/run-rt2870		base-obsolete	obsolete,firmware
+./libdata/firmware/rum/run-rt3071		base-obsolete	obsolete,firmware
 ./libdata/firmware/runbase-firmware-root
 ./libdata/firmware/run/run-license		base-firmware-root	firmware
 ./libdata/firmware/run/run-rt2870		base-firmware-root	firmware



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 19:11:16 UTC 2020

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make(1): replay the changes from v1.283

I accidentally reverted them in v1.284.


To generate a diff of this commit:
cvs rdiff -u -r1.284 -r1.285 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 19:11:16 UTC 2020

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make(1): replay the changes from v1.283

I accidentally reverted them in v1.284.


To generate a diff of this commit:
cvs rdiff -u -r1.284 -r1.285 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.284 src/usr.bin/make/parse.c:1.285
--- src/usr.bin/make/parse.c:1.284	Sat Sep  5 19:07:25 2020
+++ src/usr.bin/make/parse.c	Sat Sep  5 19:11:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.284 2020/09/05 19:07:25 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.285 2020/09/05 19:11:16 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.284 2020/09/05 19:07:25 rillig Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.285 2020/09/05 19:11:16 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)parse.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: parse.c,v 1.284 2020/09/05 19:07:25 rillig Exp $");
+__RCSID("$NetBSD: parse.c,v 1.285 2020/09/05 19:11:16 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -2312,8 +2312,7 @@ GetActuallyIncludingFile(void)
 return NULL;
 }
 
-/* Set .PARSEDIR/.PARSEFILE to the given filename, as well as
- * .INCLUDEDFROMDIR/.INCLUDEDFROMFILE. */
+/* Set .PARSEDIR, .PARSEFILE, .INCLUDEDFROMDIR and .INCLUDEDFROMFILE. */
 static void
 ParseSetParseFile(const char *filename)
 {
@@ -2605,7 +2604,6 @@ ParseEOF(void)
 	fprintf(debug_file, "ParseEOF: returning to file %s, line %d\n",
 	curFile->fname, curFile->lineno);
 
-/* Restore the PARSEDIR/PARSEFILE variables */
 ParseSetParseFile(curFile->fname);
 return CONTINUE;
 }



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 19:07:25 UTC 2020

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make(1): clean up comments about parsing


To generate a diff of this commit:
cvs rdiff -u -r1.283 -r1.284 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.283 src/usr.bin/make/parse.c:1.284
--- src/usr.bin/make/parse.c:1.283	Sat Sep  5 18:41:59 2020
+++ src/usr.bin/make/parse.c	Sat Sep  5 19:07:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.283 2020/09/05 18:41:59 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.284 2020/09/05 19:07:25 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.283 2020/09/05 18:41:59 rillig Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.284 2020/09/05 19:07:25 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)parse.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: parse.c,v 1.283 2020/09/05 18:41:59 rillig Exp $");
+__RCSID("$NetBSD: parse.c,v 1.284 2020/09/05 19:07:25 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -2084,25 +2084,9 @@ ParseAddCmd(void *gnp, void *cmd)
 return 0;
 }
 
-/*-
- *---
- * ParseHasCommands --
- *	Callback procedure for Parse_File when destroying the list of
- *	targets on the last dependency line. Marks a target as already
- *	having commands if it does, to keep from having shell commands
- *	on multiple dependency lines.
- *
- * Input:
- *	gnp		Node to examine
- *
- * Results:
- *	None
- *
- * Side Effects:
- *	OP_HAS_COMMANDS may be set for the target.
- *
- *---
- */
+/* Callback procedure for Parse_File when destroying the list of targets on
+ * the last dependency line. Marks a target as already having commands if it
+ * does, to keep from having shell commands on multiple dependency lines. */
 static void
 ParseHasCommands(void *gnp)
 {
@@ -2112,48 +2096,21 @@ ParseHasCommands(void *gnp)
 }
 }
 
-/*-
- *---
- * Parse_AddIncludeDir --
- *	Add a directory to the path searched for included makefiles
- *	bracketed by double-quotes. Used by functions in main.c
- *
- * Input:
- *	dir		The name of the directory to add
- *
- * Results:
- *	None.
- *
- * Side Effects:
- *	The directory is appended to the list.
- *
- *---
- */
+/* Add a directory to the path searched for included makefiles bracketed
+ * by double-quotes. */
 void
 Parse_AddIncludeDir(char *dir)
 {
 (void)Dir_AddDir(parseIncPath, dir);
 }
 
-/*-
- *-
- * ParseDoInclude  --
- *	Push to another file.
- *
- *	The input is the line minus the `.'. A file spec is a string
- *	enclosed in <> or "". The former is looked for only in sysIncPath.
- *	The latter in . and the directories specified by -I command line
- *	options
- *
- * Results:
- *	None
+/* Push to another file.
  *
- * Side Effects:
- *	A structure is added to the includes Lst and readProc, lineno,
- *	fname and curFILE are altered for the new file
- *-
+ * The input is the line minus the '.'. A file spec is a string enclosed in
+ * <> or "". The <> file is looked for only in sysIncPath. The "" file is
+ * first searched in the parsedir and then in the directories specified by
+ * the -I command line options.
  */
-
 static void
 Parse_include_file(char *file, Boolean isSystem, Boolean depinc, int silent)
 {
@@ -2348,14 +2305,15 @@ GetActuallyIncludingFile(void)
 /* XXX: Stack was supposed to be an opaque data structure. */
 for (i = includes.len; i > 0; i--) {
 	IFile *parent = includes.items[i - 1];
-	IFile *child = (i < includes.len) ? includes.items[i] : curFile;
+	IFile *child = i < includes.len ? includes.items[i] : curFile;
 	if (!child->fromForLoop)
 	return parent->fname;
 }
 return NULL;
 }
 
-/* Set .PARSEDIR, .PARSEFILE, .INCLUDEDFROMDIR and .INCLUDEDFROMFILE. */
+/* Set .PARSEDIR/.PARSEFILE to the given filename, as well as
+ * .INCLUDEDFROMDIR/.INCLUDEDFROMFILE. */
 static void
 ParseSetParseFile(const char *filename)
 {
@@ -2373,10 +2331,8 @@ ParseSetParseFile(const char *filename)
 }
 }
 
-/*
- * Track the makefiles we read - so makefiles can set dependencies on them.
- * Avoid adding anything more than once.
- */
+/* Track the makefiles we read - so makefiles can set dependencies on them.
+ * Avoid adding anything more than once. */
 static void
 ParseTrackInput(const char *name)
 {
@@ -2468,19 +2424,7 @@ 

CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 19:07:25 UTC 2020

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make(1): clean up comments about parsing


To generate a diff of this commit:
cvs rdiff -u -r1.283 -r1.284 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 18:41:59 UTC 2020

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make(1): fix comments about setting .PARSEDIR and .PARSEFILE


To generate a diff of this commit:
cvs rdiff -u -r1.282 -r1.283 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.282 src/usr.bin/make/parse.c:1.283
--- src/usr.bin/make/parse.c:1.282	Sat Sep  5 18:31:03 2020
+++ src/usr.bin/make/parse.c	Sat Sep  5 18:41:59 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.282 2020/09/05 18:31:03 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.283 2020/09/05 18:41:59 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.282 2020/09/05 18:31:03 rillig Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.283 2020/09/05 18:41:59 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)parse.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: parse.c,v 1.282 2020/09/05 18:31:03 rillig Exp $");
+__RCSID("$NetBSD: parse.c,v 1.283 2020/09/05 18:41:59 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -2355,8 +2355,7 @@ GetActuallyIncludingFile(void)
 return NULL;
 }
 
-/* Set .PARSEDIR/.PARSEFILE to the given filename, as well as
- * .INCLUDEDFROMDIR/.INCLUDEDFROMFILE. */
+/* Set .PARSEDIR, .PARSEFILE, .INCLUDEDFROMDIR and .INCLUDEDFROMFILE. */
 static void
 ParseSetParseFile(const char *filename)
 {
@@ -2375,11 +2374,9 @@ ParseSetParseFile(const char *filename)
 }
 
 /*
- * Track the makefiles we read - so makefiles can
- * set dependencies on them.
+ * Track the makefiles we read - so makefiles can set dependencies on them.
  * Avoid adding anything more than once.
  */
-
 static void
 ParseTrackInput(const char *name)
 {
@@ -2714,7 +2711,6 @@ ParseEOF(void)
 	fprintf(debug_file, "ParseEOF: returning to file %s, line %d\n",
 	curFile->fname, curFile->lineno);
 
-/* Restore the PARSEDIR/PARSEFILE variables */
 ParseSetParseFile(curFile->fname);
 return CONTINUE;
 }



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 18:41:59 UTC 2020

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make(1): fix comments about setting .PARSEDIR and .PARSEFILE


To generate a diff of this commit:
cvs rdiff -u -r1.282 -r1.283 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 18:31:03 UTC 2020

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make(1): make GetActuallyIncludingFile faster

In deeply nested includes, starting the search from the inner end is
faster since it needs fewer comparisons.


To generate a diff of this commit:
cvs rdiff -u -r1.281 -r1.282 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.281 src/usr.bin/make/parse.c:1.282
--- src/usr.bin/make/parse.c:1.281	Sat Sep  5 18:18:05 2020
+++ src/usr.bin/make/parse.c	Sat Sep  5 18:31:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.281 2020/09/05 18:18:05 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.282 2020/09/05 18:31:03 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.281 2020/09/05 18:18:05 rillig Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.282 2020/09/05 18:31:03 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)parse.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: parse.c,v 1.281 2020/09/05 18:18:05 rillig Exp $");
+__RCSID("$NetBSD: parse.c,v 1.282 2020/09/05 18:31:03 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -2343,17 +2343,16 @@ SetFilenameVars(const char *filename, co
 static const char *
 GetActuallyIncludingFile(void)
 {
-const char *filename = NULL;
 size_t i;
 
 /* XXX: Stack was supposed to be an opaque data structure. */
-for (i = 0; i < includes.len; i++) {
-	IFile *parent = includes.items[i];
-	IFile *child = (i + 1 < includes.len) ? includes.items[i + 1] : curFile;
+for (i = includes.len; i > 0; i--) {
+	IFile *parent = includes.items[i - 1];
+	IFile *child = (i < includes.len) ? includes.items[i] : curFile;
 	if (!child->fromForLoop)
-	filename = parent->fname;
+	return parent->fname;
 }
-return filename;
+return NULL;
 }
 
 /* Set .PARSEDIR/.PARSEFILE to the given filename, as well as



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 18:31:03 UTC 2020

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make(1): make GetActuallyIncludingFile faster

In deeply nested includes, starting the search from the inner end is
faster since it needs fewer comparisons.


To generate a diff of this commit:
cvs rdiff -u -r1.281 -r1.282 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 18:18:05 UTC 2020

Modified Files:
src/usr.bin/make: parse.c
src/usr.bin/make/unit-tests: include-main.exp include-main.mk

Log Message:
make(1): fix .INCLUDEDFROMDIR/.INCLUDEDFROMFILE


To generate a diff of this commit:
cvs rdiff -u -r1.280 -r1.281 src/usr.bin/make/parse.c
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/include-main.exp
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/include-main.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 18:18:05 UTC 2020

Modified Files:
src/usr.bin/make: parse.c
src/usr.bin/make/unit-tests: include-main.exp include-main.mk

Log Message:
make(1): fix .INCLUDEDFROMDIR/.INCLUDEDFROMFILE


To generate a diff of this commit:
cvs rdiff -u -r1.280 -r1.281 src/usr.bin/make/parse.c
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/include-main.exp
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/include-main.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.280 src/usr.bin/make/parse.c:1.281
--- src/usr.bin/make/parse.c:1.280	Sat Sep  5 15:12:03 2020
+++ src/usr.bin/make/parse.c	Sat Sep  5 18:18:05 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.280 2020/09/05 15:12:03 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.281 2020/09/05 18:18:05 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.280 2020/09/05 15:12:03 rillig Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.281 2020/09/05 18:18:05 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)parse.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: parse.c,v 1.280 2020/09/05 15:12:03 rillig Exp $");
+__RCSID("$NetBSD: parse.c,v 1.281 2020/09/05 18:18:05 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -150,6 +150,7 @@ __RCSID("$NetBSD: parse.c,v 1.280 2020/0
  */
 typedef struct IFile {
 char  	*fname; /* name of file */
+Boolean fromForLoop;/* simulated .include by the .for loop */
 int lineno; /* current line number in file */
 int first_lineno;   /* line number of start of text */
 int cond_depth; /* 'if' nesting when file opened */
@@ -269,7 +270,7 @@ static IFile *curFile;
 
 /* The current file from the command line (at the bottom of the stack) and
  * further up all the files that are currently being read due to nested
- * .include directives. */
+ * .include or .for directives. */
 static Stack /* of *IFile */ includes;
 
 /* include paths (lists of directories) */
@@ -337,10 +338,6 @@ static const struct {
 { ".WAIT",	  Wait, 	0 },
 };
 
-/* local functions */
-
-static void ParseSetIncludedFile(void);
-
 /* file loader */
 
 struct loadedfile {
@@ -2254,7 +2251,6 @@ Parse_include_file(char *file, Boolean i
 /* load it */
 lf = loadfile(fullname, fd);
 
-ParseSetIncludedFile();
 /* Start reading from this file next */
 Parse_SetInput(fullname, 0, -1, loadedfile_nextbuf, lf);
 curFile->lf = lf;
@@ -2313,74 +2309,70 @@ ParseDoInclude(char *line)
 free(file);
 }
 
-
-/*-
- *-
- * ParseSetIncludedFile  --
- *	Set the .INCLUDEDFROMFILE variable to the contents of .PARSEFILE
- *	and the .INCLUDEDFROMDIR variable to the contents of .PARSEDIR
- *
- * Results:
- *	None
- *
- * Side Effects:
- *	The .INCLUDEDFROMFILE variable is overwritten by the contents
- *	of .PARSEFILE and the .INCLUDEDFROMDIR variable is overwriten
- *	by the contents of .PARSEDIR
- *-
- */
+/* Split filename into dirname + basename, then assign these to the
+ * given variables. */
 static void
-ParseSetIncludedFile(void)
+SetFilenameVars(const char *filename, const char *dirvar, const char *filevar)
 {
-const char *pf, *pd;
-char *pf_freeIt, *pd_freeIt;
+const char *slash, *dirname, *basename;
+void *freeIt;
+
+slash = strrchr(filename, '/');
+if (slash == NULL) {
+	dirname = curdir;
+	basename = filename;
+	freeIt = NULL;
+} else {
+	dirname = freeIt = bmake_strsedup(filename, slash);
+	basename = slash + 1;
+}
 
-pf = Var_Value(".PARSEFILE", VAR_GLOBAL, _freeIt);
-Var_Set(".INCLUDEDFROMFILE", pf, VAR_GLOBAL);
-pd = Var_Value(".PARSEDIR", VAR_GLOBAL, _freeIt);
-Var_Set(".INCLUDEDFROMDIR", pd, VAR_GLOBAL);
+Var_Set(dirvar, dirname, VAR_GLOBAL);
+Var_Set(filevar, basename, VAR_GLOBAL);
 
 if (DEBUG(PARSE))
-	fprintf(debug_file, "%s: ${.INCLUDEDFROMDIR} = `%s' "
-	"${.INCLUDEDFROMFILE} = `%s'\n", __func__, pd, pf);
-
-bmake_free(pf_freeIt);
-bmake_free(pd_freeIt);
+	fprintf(debug_file, "%s: ${%s} = `%s' ${%s} = `%s'\n",
+		__func__, dirvar, dirname, filevar, basename);
+free(freeIt);
 }
-/*-
- *-
- * ParseSetParseFile  --
- *	Set the .PARSEDIR and .PARSEFILE variables to the dirname and
- *	basename of the given filename
- *
- * Results:
- *	None
+
+/* Return the immediately including file.
  *
- * Side Effects:
- *	The .PARSEDIR and .PARSEFILE variables are overwritten by the
- *	dirname and basename of the given 

CVS commit: src/usr.bin/make/unit-tests

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 18:13:47 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: include-main.exp include-main.mk
include-sub.mk include-subsub.mk

Log Message:
make(1): add test for .INCLUDEDFILE combined with .for loops

The .for loops are implemented as a special kind of .include, therefore
they affect the .INCLUDEDFROM variable.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/include-main.exp \
src/usr.bin/make/unit-tests/include-sub.mk \
src/usr.bin/make/unit-tests/include-subsub.mk
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/include-main.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/unit-tests/include-main.exp
diff -u src/usr.bin/make/unit-tests/include-main.exp:1.2 src/usr.bin/make/unit-tests/include-main.exp:1.3
--- src/usr.bin/make/unit-tests/include-main.exp:1.2	Sat Sep  5 16:59:19 2020
+++ src/usr.bin/make/unit-tests/include-main.exp	Sat Sep  5 18:13:47 2020
@@ -1,6 +1,10 @@
 make: "include-main.mk" line 12: main-before-ok
+make: "include-main.mk" line 19: main-before-for-ok
 make: "include-sub.mk" line 4: sub-before-ok
+make: "include-sub.mk" line 14: sub-before-for-ok
 make: "include-subsub.mk" line 4: subsub-ok
-make: "include-sub.mk" line 14: warning: sub-after-fail(include-sub.mk)
-make: "include-main.mk" line 22: warning: main-after-fail(include-sub.mk)
+make: "include-sub.mk" line 25: warning: sub-after-fail(include-sub.mk)
+make: "include-sub.mk" line 32: warning: sub-after-for-fail(include-sub.mk)
+make: "include-main.mk" line 30: warning: main-after-fail(include-sub.mk)
+make: "include-main.mk" line 35: main-after-for-ok
 exit status 0
Index: src/usr.bin/make/unit-tests/include-sub.mk
diff -u src/usr.bin/make/unit-tests/include-sub.mk:1.2 src/usr.bin/make/unit-tests/include-sub.mk:1.3
--- src/usr.bin/make/unit-tests/include-sub.mk:1.2	Sat Sep  5 16:59:19 2020
+++ src/usr.bin/make/unit-tests/include-sub.mk	Sat Sep  5 18:13:47 2020
@@ -1,11 +1,22 @@
-# $NetBSD: include-sub.mk,v 1.2 2020/09/05 16:59:19 rillig Exp $
+# $NetBSD: include-sub.mk,v 1.3 2020/09/05 18:13:47 rillig Exp $
 
 .if ${.INCLUDEDFROMFILE} == "include-main.mk"
 .  info sub-before-ok
 .else
-.  warning sub-before-fail
+.  warning sub-before-fail(${.INCLUDEDFROMFILE})
 .endif
 
+# As of 2020-09-05, the .for loop is implemented as "including a file"
+# with a custom buffer.  Therefore this loop has side effects on these
+# variables.
+.for i in once
+.  if ${.INCLUDEDFROMFILE} == "include-main.mk"
+.info sub-before-for-ok
+.  else
+.warning sub-before-for-fail(${.INCLUDEDFROMFILE})
+.  endif
+.endfor
+
 .include "include-subsub.mk"
 
 .if ${.INCLUDEDFROMFILE} == "include-main.mk"
@@ -13,3 +24,11 @@
 .else
 .  warning sub-after-fail(${.INCLUDEDFROMFILE})
 .endif
+
+.for i in once
+.  if ${.INCLUDEDFROMFILE} == "include-main.mk"
+.info sub-after-for-ok
+.  else
+.warning sub-after-for-fail(${.INCLUDEDFROMFILE})
+.  endif
+.endfor
Index: src/usr.bin/make/unit-tests/include-subsub.mk
diff -u src/usr.bin/make/unit-tests/include-subsub.mk:1.2 src/usr.bin/make/unit-tests/include-subsub.mk:1.3
--- src/usr.bin/make/unit-tests/include-subsub.mk:1.2	Sat Sep  5 16:59:19 2020
+++ src/usr.bin/make/unit-tests/include-subsub.mk	Sat Sep  5 18:13:47 2020
@@ -1,7 +1,7 @@
-# $NetBSD: include-subsub.mk,v 1.2 2020/09/05 16:59:19 rillig Exp $
+# $NetBSD: include-subsub.mk,v 1.3 2020/09/05 18:13:47 rillig Exp $
 
-.if ${.INCLUDEDFROMFILE:T} == "include-sub.mk"
+.if ${.INCLUDEDFROMFILE} == "include-sub.mk"
 .  info subsub-ok
 .else
-.  warning subsub-fail
+.  warning subsub-fail(${.INCLUDEDFROMFILE})
 .endif

Index: src/usr.bin/make/unit-tests/include-main.mk
diff -u src/usr.bin/make/unit-tests/include-main.mk:1.3 src/usr.bin/make/unit-tests/include-main.mk:1.4
--- src/usr.bin/make/unit-tests/include-main.mk:1.3	Sat Sep  5 16:59:19 2020
+++ src/usr.bin/make/unit-tests/include-main.mk	Sat Sep  5 18:13:47 2020
@@ -1,4 +1,4 @@
-# $NetBSD: include-main.mk,v 1.3 2020/09/05 16:59:19 rillig Exp $
+# $NetBSD: include-main.mk,v 1.4 2020/09/05 18:13:47 rillig Exp $
 #
 # Demonstrates that the .INCLUDEDFROMFILE magic variable does not behave
 # as described in the manual page.
@@ -14,6 +14,14 @@
 .  warning main-before-fail(${.INCLUDEDFROMFILE})
 .endif
 
+.for i in once
+.  if !defined(${.INCLUDEDFROMFILE})
+.info main-before-for-ok
+.  else
+.warning main-before-for-fail(${.INCLUDEDFROMFILE})
+.  endif
+.endfor
+
 .include "include-sub.mk"
 
 .if !defined(.INCLUDEDFROMFILE)
@@ -22,4 +30,12 @@
 .  warning main-after-fail(${.INCLUDEDFROMFILE})
 .endif
 
+.for i in once
+.  if !defined(${.INCLUDEDFROMFILE})
+.info main-after-for-ok
+.  else
+.warning main-after-for-fail(${.INCLUDEDFROMFILE})
+.  endif
+.endfor
+
 all:	# nothing



CVS commit: src/usr.bin/make/unit-tests

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 18:13:47 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: include-main.exp include-main.mk
include-sub.mk include-subsub.mk

Log Message:
make(1): add test for .INCLUDEDFILE combined with .for loops

The .for loops are implemented as a special kind of .include, therefore
they affect the .INCLUDEDFROM variable.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/include-main.exp \
src/usr.bin/make/unit-tests/include-sub.mk \
src/usr.bin/make/unit-tests/include-subsub.mk
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/include-main.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/alpha

2020-09-05 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Sep  5 18:01:42 UTC 2020

Modified Files:
src/sys/arch/alpha/alpha: genassym.cf interrupt.c locore.s
src/sys/arch/alpha/include: cpu.h intr.h

Log Message:
Track the SSIR per-cpu, rather than globally.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/alpha/alpha/genassym.cf
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/alpha/alpha/interrupt.c
cvs rdiff -u -r1.131 -r1.132 src/sys/arch/alpha/alpha/locore.s
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/alpha/include/cpu.h
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/alpha/include/intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/alpha/alpha/genassym.cf
diff -u src/sys/arch/alpha/alpha/genassym.cf:1.24 src/sys/arch/alpha/alpha/genassym.cf:1.25
--- src/sys/arch/alpha/alpha/genassym.cf:1.24	Sat Sep  5 16:29:07 2020
+++ src/sys/arch/alpha/alpha/genassym.cf	Sat Sep  5 18:01:42 2020
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.24 2020/09/05 16:29:07 thorpej Exp $
+# $NetBSD: genassym.cf,v 1.25 2020/09/05 18:01:42 thorpej Exp $
 
 #
 # Copyright (c) 1982, 1990, 1993
@@ -188,4 +188,5 @@ define	SYS_exit		SYS_exit
 # CPU info
 define	CPU_INFO_CURLWP		offsetof(struct cpu_info, ci_curlwp)
 define	CPU_INFO_IDLE_LWP	offsetof(struct cpu_info, ci_data.cpu_idlelwp)
+define	CPU_INFO_SSIR		offsetof(struct cpu_info, ci_ssir)
 define	CPU_INFO_SIZEOF		sizeof(struct cpu_info)

Index: src/sys/arch/alpha/alpha/interrupt.c
diff -u src/sys/arch/alpha/alpha/interrupt.c:1.83 src/sys/arch/alpha/alpha/interrupt.c:1.84
--- src/sys/arch/alpha/alpha/interrupt.c:1.83	Sat Sep  5 16:29:07 2020
+++ src/sys/arch/alpha/alpha/interrupt.c	Sat Sep  5 18:01:42 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: interrupt.c,v 1.83 2020/09/05 16:29:07 thorpej Exp $ */
+/* $NetBSD: interrupt.c,v 1.84 2020/09/05 18:01:42 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.83 2020/09/05 16:29:07 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.84 2020/09/05 18:01:42 thorpej Exp $");
 
 #include 
 #include 
@@ -450,24 +450,21 @@ badaddr_read(void *addr, size_t size, vo
 	return (rv);
 }
 
-volatile unsigned long ssir;
-
 /*
- * spl0:
+ * spllower:
  *
- *	Lower interrupt priority to IPL 0 -- must check for
- *	software interrupts.
+ *	Lower interrupt priority.  May need to check for software
+ *	interrupts.
  */
 void
-spl0(void)
+spllower(int ipl)
 {
 
-	if (ssir) {
+	if (ipl == ALPHA_PSL_IPL_0 && curcpu()->ci_ssir) {
 		(void) alpha_pal_swpipl(ALPHA_PSL_IPL_SOFT_LO);
 		softintr_dispatch();
 	}
-
-	(void) alpha_pal_swpipl(ALPHA_PSL_IPL_0);
+	(void) alpha_pal_swpipl(ipl);
 }
 
 /*
@@ -491,9 +488,7 @@ softintr_dispatch(void)
 void
 softint_trigger(uintptr_t machdep)
 {
-
-	/* XXX Needs to be per-CPU */
-	atomic_or_ulong(, 1 << (x))
+	atomic_or_ulong(()->ci_ssir, 1 << (x))
 }
 #endif
 

Index: src/sys/arch/alpha/alpha/locore.s
diff -u src/sys/arch/alpha/alpha/locore.s:1.131 src/sys/arch/alpha/alpha/locore.s:1.132
--- src/sys/arch/alpha/alpha/locore.s:1.131	Sat Sep  5 16:29:07 2020
+++ src/sys/arch/alpha/alpha/locore.s	Sat Sep  5 18:01:42 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.131 2020/09/05 16:29:07 thorpej Exp $ */
+/* $NetBSD: locore.s,v 1.132 2020/09/05 18:01:42 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2019 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.131 2020/09/05 16:29:07 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.132 2020/09/05 18:01:42 thorpej Exp $");
 
 #include "assym.h"
 
@@ -239,8 +239,6 @@ XNESTED(esigcode,0)
  * exception_return: return from trap, exception, or syscall
  */
 
-IMPORT(ssir, 8)
-
 LEAF(exception_return, 1)			/* XXX should be NESTED */
 	br	pv, 1f
 1:	LDGP(pv)
@@ -249,8 +247,13 @@ LEAF(exception_return, 1)			/* XXX shoul
 	and	s1, ALPHA_PSL_IPL_MASK, t0	/* look at the saved IPL */
 	bne	t0, 5f/* != 0: can't do AST or SIR */
 
-	/* see if we can do an SIR */
-2:	ldq	t1, ssir			/* SIR pending? */
+	/* GET_CURLWP clobbers v0, t0, t8...t11. */
+	GET_CURLWP
+	mov	v0, s0/* s0 = curlwp */
+
+	/* see if a soft interrupt is pending. */
+2:	ldq	t1, L_CPU(s0)			/* t1 = curlwp->l_cpu */
+	ldq	t1, CPU_INFO_SSIR(t1)		/* soft int pending? */
 	bne	t1, 6f/* yes */
 	/* no */
 
@@ -258,16 +261,13 @@ LEAF(exception_return, 1)			/* XXX shoul
 	beq	t0, 5f/* no: just return */
 	/* yes */
 
-	/* GET_CURLWP clobbers v0, t0, t8...t11. */
-3:	GET_CURLWP
-
 	/* check for AST */
-	ldl	t3, L_MD_ASTPENDING(v0)		/* AST pending? */
+3:	ldl	t3, L_MD_ASTPENDING(s0)		/* AST pending? */
 	bne	t3, 7f/* yes */
 	/* no: headed back to user space */
 
 	/* Enable the FPU based on whether MDLWP_FPACTIVE is set. */
-4:	ldq	t2, L_MD_FLAGS(v0)
+4:	ldq	t2, L_MD_FLAGS(s0)
 	

CVS commit: src/sys/arch/alpha

2020-09-05 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Sep  5 18:01:42 UTC 2020

Modified Files:
src/sys/arch/alpha/alpha: genassym.cf interrupt.c locore.s
src/sys/arch/alpha/include: cpu.h intr.h

Log Message:
Track the SSIR per-cpu, rather than globally.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/alpha/alpha/genassym.cf
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/alpha/alpha/interrupt.c
cvs rdiff -u -r1.131 -r1.132 src/sys/arch/alpha/alpha/locore.s
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/alpha/include/cpu.h
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/alpha/include/intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/aarch64/aarch64

2020-09-05 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Sep  5 17:49:26 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: locore_el2.S start.S

Log Message:
aarch64: switch CPU to the kernel's byte order during boot


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/aarch64/aarch64/locore_el2.S
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/aarch64/aarch64/start.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/aarch64/aarch64/locore_el2.S
diff -u src/sys/arch/aarch64/aarch64/locore_el2.S:1.4 src/sys/arch/aarch64/aarch64/locore_el2.S:1.5
--- src/sys/arch/aarch64/aarch64/locore_el2.S:1.4	Sat Aug 29 07:17:23 2020
+++ src/sys/arch/aarch64/aarch64/locore_el2.S	Sat Sep  5 17:49:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore_el2.S,v 1.4 2020/08/29 07:17:23 maxv Exp $	*/
+/*	$NetBSD: locore_el2.S,v 1.5 2020/09/05 17:49:26 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2012-2014 Andrew Turner
@@ -32,7 +32,7 @@
 #include 
 #include "assym.h"
 
-RCSID("$NetBSD: locore_el2.S,v 1.4 2020/08/29 07:17:23 maxv Exp $")
+RCSID("$NetBSD: locore_el2.S,v 1.5 2020/09/05 17:49:26 jakllsch Exp $")
 
 /*
  * For use in #include "locore_el2.S".
@@ -75,6 +75,9 @@ in_el2:
 
 	/* Set the bits that need to be 1 in SCTLR_EL1. */
 	ldr	x2, .Lsctlr_res1
+#ifdef __AARCH64EB__
+	orr	x2, x2, #SCTLR_EE
+#endif
 	msr	sctlr_el1, x2
 
 	/* Don't trap to EL2 on FP instructions. */

Index: src/sys/arch/aarch64/aarch64/start.S
diff -u src/sys/arch/aarch64/aarch64/start.S:1.8 src/sys/arch/aarch64/aarch64/start.S:1.9
--- src/sys/arch/aarch64/aarch64/start.S:1.8	Thu Jul 16 11:36:35 2020
+++ src/sys/arch/aarch64/aarch64/start.S	Sat Sep  5 17:49:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: start.S,v 1.8 2020/07/16 11:36:35 skrll Exp $	*/
+/*	$NetBSD: start.S,v 1.9 2020/09/05 17:49:26 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -31,8 +31,9 @@
 #include 
 
 #include 
+#include "assym.h"
 
-RCSID("$NetBSD: start.S,v 1.8 2020/07/16 11:36:35 skrll Exp $")
+RCSID("$NetBSD: start.S,v 1.9 2020/09/05 17:49:26 jakllsch Exp $")
 
 /*
  * Padding at start of kernel image to make room for 64-byte header
@@ -45,6 +46,32 @@ RCSID("$NetBSD: start.S,v 1.8 2020/07/16
  */
 	.global start
 start:
+	mrs	x8, CurrentEL
+	lsr	x8, x8, #2
+	cmp	x8, #0x2
+	b.lo	1f
+
+	mrs	x8, sctlr_el2
+#ifdef __AARCH64EB__
+	orr	x8, x8, #SCTLR_EE	/* set: Big Endian */
+#else
+	bic	x8, x8, #SCTLR_EE	/* clear: Little Endian */
+#endif
+	msr	sctlr_el2, x8
+	isb
+	b	2f
+
+1:
+	mrs	x8, sctlr_el1
+#ifdef __AARCH64EB__
+	orr	x8, x8, #SCTLR_EE	/* set: Big Endian */
+#else
+	bic	x8, x8, #SCTLR_EE	/* clear: Little Endian */
+#endif
+	msr	sctlr_el1, x8
+	isb
+
+2:
 	adr	x9, start
 	ldr	x10, =start
 



CVS commit: src/sys/arch/aarch64/aarch64

2020-09-05 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Sep  5 17:49:26 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: locore_el2.S start.S

Log Message:
aarch64: switch CPU to the kernel's byte order during boot


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/aarch64/aarch64/locore_el2.S
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/aarch64/aarch64/start.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2020-09-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Sep  5 17:33:11 UTC 2020

Modified Files:
src/sys/kern: subr_pool.c

Log Message:
Suppress pool redzone message unless booted with debug.


To generate a diff of this commit:
cvs rdiff -u -r1.273 -r1.274 src/sys/kern/subr_pool.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/subr_pool.c
diff -u src/sys/kern/subr_pool.c:1.273 src/sys/kern/subr_pool.c:1.274
--- src/sys/kern/subr_pool.c:1.273	Fri Jun 19 13:49:38 2020
+++ src/sys/kern/subr_pool.c	Sat Sep  5 17:33:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_pool.c,v 1.273 2020/06/19 13:49:38 jdolecek Exp $	*/
+/*	$NetBSD: subr_pool.c,v 1.274 2020/09/05 17:33:11 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015, 2018,
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.273 2020/06/19 13:49:38 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.274 2020/09/05 17:33:11 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -3087,7 +3087,7 @@ pool_redzone_init(struct pool *pp, size_
 	} else {
 		/* No space for a red zone... snif :'( */
 		pp->pr_redzone = false;
-		printf("pool redzone disabled for '%s'\n", pp->pr_wchan);
+		aprint_debug("pool redzone disabled for '%s'\n", pp->pr_wchan);
 	}
 }
 



CVS commit: src/sys/kern

2020-09-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Sep  5 17:33:11 UTC 2020

Modified Files:
src/sys/kern: subr_pool.c

Log Message:
Suppress pool redzone message unless booted with debug.


To generate a diff of this commit:
cvs rdiff -u -r1.273 -r1.274 src/sys/kern/subr_pool.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make/unit-tests

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 16:59:20 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: include-main.exp include-main.mk
include-sub.mk include-subsub.mk

Log Message:
make(1): make test for .INCLUDEDFROMDIR simpler

The .info and .warning directives provide exactly the early expansion
that this test needs.  No more .for for getting a snapshot of a
variable.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/include-main.exp \
src/usr.bin/make/unit-tests/include-sub.mk \
src/usr.bin/make/unit-tests/include-subsub.mk
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/include-main.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make/unit-tests

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 16:59:20 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: include-main.exp include-main.mk
include-sub.mk include-subsub.mk

Log Message:
make(1): make test for .INCLUDEDFROMDIR simpler

The .info and .warning directives provide exactly the early expansion
that this test needs.  No more .for for getting a snapshot of a
variable.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/include-main.exp \
src/usr.bin/make/unit-tests/include-sub.mk \
src/usr.bin/make/unit-tests/include-subsub.mk
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/include-main.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/unit-tests/include-main.exp
diff -u src/usr.bin/make/unit-tests/include-main.exp:1.1 src/usr.bin/make/unit-tests/include-main.exp:1.2
--- src/usr.bin/make/unit-tests/include-main.exp:1.1	Sun May 17 12:36:26 2020
+++ src/usr.bin/make/unit-tests/include-main.exp	Sat Sep  5 16:59:19 2020
@@ -1,6 +1,6 @@
-main-before-ok
-sub-before-ok
-subsub-ok
-sub-after-fail(include-sub.mk)
-main-after-fail(include-sub.mk)
+make: "include-main.mk" line 12: main-before-ok
+make: "include-sub.mk" line 4: sub-before-ok
+make: "include-subsub.mk" line 4: subsub-ok
+make: "include-sub.mk" line 14: warning: sub-after-fail(include-sub.mk)
+make: "include-main.mk" line 22: warning: main-after-fail(include-sub.mk)
 exit status 0
Index: src/usr.bin/make/unit-tests/include-sub.mk
diff -u src/usr.bin/make/unit-tests/include-sub.mk:1.1 src/usr.bin/make/unit-tests/include-sub.mk:1.2
--- src/usr.bin/make/unit-tests/include-sub.mk:1.1	Sun May 17 12:36:26 2020
+++ src/usr.bin/make/unit-tests/include-sub.mk	Sat Sep  5 16:59:19 2020
@@ -1,17 +1,15 @@
-# $NetBSD: include-sub.mk,v 1.1 2020/05/17 12:36:26 rillig Exp $
+# $NetBSD: include-sub.mk,v 1.2 2020/09/05 16:59:19 rillig Exp $
 
 .if ${.INCLUDEDFROMFILE} == "include-main.mk"
-LOG+=		sub-before-ok
+.  info sub-before-ok
 .else
-LOG+=		sub-before-fail
+.  warning sub-before-fail
 .endif
 
 .include "include-subsub.mk"
 
 .if ${.INCLUDEDFROMFILE} == "include-main.mk"
-LOG+=		sub-after-ok
+.  info sub-after-ok
 .else
-.  for f in ${.INCLUDEDFROMFILE}
-LOG+=		sub-after-fail\(${f:Q}\)
-.  endfor
+.  warning sub-after-fail(${.INCLUDEDFROMFILE})
 .endif
Index: src/usr.bin/make/unit-tests/include-subsub.mk
diff -u src/usr.bin/make/unit-tests/include-subsub.mk:1.1 src/usr.bin/make/unit-tests/include-subsub.mk:1.2
--- src/usr.bin/make/unit-tests/include-subsub.mk:1.1	Sun May 17 12:36:26 2020
+++ src/usr.bin/make/unit-tests/include-subsub.mk	Sat Sep  5 16:59:19 2020
@@ -1,7 +1,7 @@
-# $NetBSD: include-subsub.mk,v 1.1 2020/05/17 12:36:26 rillig Exp $
+# $NetBSD: include-subsub.mk,v 1.2 2020/09/05 16:59:19 rillig Exp $
 
 .if ${.INCLUDEDFROMFILE:T} == "include-sub.mk"
-LOG+=		subsub-ok
+.  info subsub-ok
 .else
-LOG+=		subsub-fail
+.  warning subsub-fail
 .endif

Index: src/usr.bin/make/unit-tests/include-main.mk
diff -u src/usr.bin/make/unit-tests/include-main.mk:1.2 src/usr.bin/make/unit-tests/include-main.mk:1.3
--- src/usr.bin/make/unit-tests/include-main.mk:1.2	Mon Jul 27 20:55:59 2020
+++ src/usr.bin/make/unit-tests/include-main.mk	Sat Sep  5 16:59:19 2020
@@ -1,4 +1,4 @@
-# $NetBSD: include-main.mk,v 1.2 2020/07/27 20:55:59 rillig Exp $
+# $NetBSD: include-main.mk,v 1.3 2020/09/05 16:59:19 rillig Exp $
 #
 # Demonstrates that the .INCLUDEDFROMFILE magic variable does not behave
 # as described in the manual page.
@@ -9,22 +9,17 @@
 #
 
 .if !defined(.INCLUDEDFROMFILE)
-LOG+=		main-before-ok
+.  info main-before-ok
 .else
-.  for f in ${.INCLUDEDFROMFILE}
-LOG+=		main-before-fail\(${f:Q}\)
-.  endfor
+.  warning main-before-fail(${.INCLUDEDFROMFILE})
 .endif
 
 .include "include-sub.mk"
 
 .if !defined(.INCLUDEDFROMFILE)
-LOG+=		main-after-ok
+.  info main-after-ok
 .else
-.  for f in ${.INCLUDEDFROMFILE}
-LOG+=		main-after-fail\(${f:Q}\)
-.  endfor
+.  warning main-after-fail(${.INCLUDEDFROMFILE})
 .endif
 
-all:
-	@printf '%s\n' ${LOG}
+all:	# nothing



CVS commit: src/sys/arch/aarch64/aarch64

2020-09-05 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Sep  5 16:44:54 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: bus_space.c

Log Message:
Adjust aarch64 bus_space tags to also work on aarch64eb


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/aarch64/bus_space.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/aarch64/aarch64

2020-09-05 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Sep  5 16:44:54 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: bus_space.c

Log Message:
Adjust aarch64 bus_space tags to also work on aarch64eb


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/aarch64/bus_space.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/aarch64/aarch64/bus_space.c
diff -u src/sys/arch/aarch64/aarch64/bus_space.c:1.9 src/sys/arch/aarch64/aarch64/bus_space.c:1.10
--- src/sys/arch/aarch64/aarch64/bus_space.c:1.9	Sat Dec 28 17:19:43 2019
+++ src/sys/arch/aarch64/aarch64/bus_space.c	Sat Sep  5 16:44:54 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_space.c,v 1.9 2019/12/28 17:19:43 jmcneill Exp $ */
+/* $NetBSD: bus_space.c,v 1.10 2020/09/05 16:44:54 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: bus_space.c,v 1.9 2019/12/28 17:19:43 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bus_space.c,v 1.10 2020/09/05 16:44:54 jakllsch Exp $");
 
 #include 
 #include 
@@ -43,6 +43,12 @@ __KERNEL_RCSID(1, "$NetBSD: bus_space.c,
 bs_protos(generic)
 bs_protos(generic_dsb)
 
+#if __AARCH64EB__
+#define NSWAP(n)	n ## _swap
+#else
+#define NSWAP(n)	n
+#endif
+
 struct bus_space arm_generic_bs_tag = {
 	.bs_cookie = _generic_bs_tag,
 
@@ -60,27 +66,27 @@ struct bus_space arm_generic_bs_tag = {
 
 	/* read */
 	.bs_r_1 = generic_bs_r_1,
-	.bs_r_2 = generic_bs_r_2,
-	.bs_r_4 = generic_bs_r_4,
-	.bs_r_8 = generic_bs_r_8,
+	.bs_r_2 = NSWAP(generic_bs_r_2),
+	.bs_r_4 = NSWAP(generic_bs_r_4),
+	.bs_r_8 = NSWAP(generic_bs_r_8),
 
 	/* write */
 	.bs_w_1 = generic_bs_w_1,
-	.bs_w_2 = generic_bs_w_2,
-	.bs_w_4 = generic_bs_w_4,
-	.bs_w_8 = generic_bs_w_8,
+	.bs_w_2 = NSWAP(generic_bs_w_2),
+	.bs_w_4 = NSWAP(generic_bs_w_4),
+	.bs_w_8 = NSWAP(generic_bs_w_8),
 
 	/* read region */
 	.bs_rr_1 = generic_bs_rr_1,
-	.bs_rr_2 = generic_bs_rr_2,
-	.bs_rr_4 = generic_bs_rr_4,
-	.bs_rr_8 = generic_bs_rr_8,
+	.bs_rr_2 = NSWAP(generic_bs_rr_2),
+	.bs_rr_4 = NSWAP(generic_bs_rr_4),
+	.bs_rr_8 = NSWAP(generic_bs_rr_8),
 
 	/* write region */
 	.bs_wr_1 = generic_bs_wr_1,
-	.bs_wr_2 = generic_bs_wr_2,
-	.bs_wr_4 = generic_bs_wr_4,
-	.bs_wr_8 = generic_bs_wr_8,
+	.bs_wr_2 = NSWAP(generic_bs_wr_2),
+	.bs_wr_4 = NSWAP(generic_bs_wr_4),
+	.bs_wr_8 = NSWAP(generic_bs_wr_8),
 
 	/* copy region */
 	.bs_c_1 = generic_bs_c_1,
@@ -90,27 +96,27 @@ struct bus_space arm_generic_bs_tag = {
 
 	/* set region */
 	.bs_sr_1 = generic_bs_sr_1,
-	.bs_sr_2 = generic_bs_sr_2,
-	.bs_sr_4 = generic_bs_sr_4,
-	.bs_sr_8 = generic_bs_sr_8,
+	.bs_sr_2 = NSWAP(generic_bs_sr_2),
+	.bs_sr_4 = NSWAP(generic_bs_sr_4),
+	.bs_sr_8 = NSWAP(generic_bs_sr_8),
 
 	/* read multi */
 	.bs_rm_1 = generic_bs_rm_1,
-	.bs_rm_2 = generic_bs_rm_2,
-	.bs_rm_4 = generic_bs_rm_4,
-	.bs_rm_8 = generic_bs_rm_8,
+	.bs_rm_2 = NSWAP(generic_bs_rm_2),
+	.bs_rm_4 = NSWAP(generic_bs_rm_4),
+	.bs_rm_8 = NSWAP(generic_bs_rm_8),
 
 	/* write multi */
 	.bs_wm_1 = generic_bs_wm_1,
-	.bs_wm_2 = generic_bs_wm_2,
-	.bs_wm_4 = generic_bs_wm_4,
-	.bs_wm_8 = generic_bs_wm_8,
+	.bs_wm_2 = NSWAP(generic_bs_wm_2),
+	.bs_wm_4 = NSWAP(generic_bs_wm_4),
+	.bs_wm_8 = NSWAP(generic_bs_wm_8),
 
 	/* set multi */
 	.bs_sm_1 = generic_bs_sm_1,
-	.bs_sm_2 = generic_bs_sm_2,
-	.bs_sm_4 = generic_bs_sm_4,
-	.bs_sm_8 = generic_bs_sm_8,
+	.bs_sm_2 = NSWAP(generic_bs_sm_2),
+	.bs_sm_4 = NSWAP(generic_bs_sm_4),
+	.bs_sm_8 = NSWAP(generic_bs_sm_8),
 
 #ifdef __BUS_SPACE_HAS_STREAM_METHODS
 	/* read stream */
@@ -182,27 +188,27 @@ struct bus_space aarch64_generic_dsb_bs_
 
 	/* read */
 	.bs_r_1 = generic_dsb_bs_r_1,
-	.bs_r_2 = generic_dsb_bs_r_2,
-	.bs_r_4 = generic_dsb_bs_r_4,
-	.bs_r_8 = generic_dsb_bs_r_8,
+	.bs_r_2 = NSWAP(generic_dsb_bs_r_2),
+	.bs_r_4 = NSWAP(generic_dsb_bs_r_4),
+	.bs_r_8 = NSWAP(generic_dsb_bs_r_8),
 
 	/* write */
 	.bs_w_1 = generic_dsb_bs_w_1,
-	.bs_w_2 = generic_dsb_bs_w_2,
-	.bs_w_4 = generic_dsb_bs_w_4,
-	.bs_w_8 = generic_dsb_bs_w_8,
+	.bs_w_2 = NSWAP(generic_dsb_bs_w_2),
+	.bs_w_4 = NSWAP(generic_dsb_bs_w_4),
+	.bs_w_8 = NSWAP(generic_dsb_bs_w_8),
 
 	/* read region */
 	.bs_rr_1 = generic_dsb_bs_rr_1,
-	.bs_rr_2 = generic_dsb_bs_rr_2,
-	.bs_rr_4 = generic_dsb_bs_rr_4,
-	.bs_rr_8 = generic_dsb_bs_rr_8,
+	.bs_rr_2 = NSWAP(generic_dsb_bs_rr_2),
+	.bs_rr_4 = NSWAP(generic_dsb_bs_rr_4),
+	.bs_rr_8 = NSWAP(generic_dsb_bs_rr_8),
 
 	/* write region */
 	.bs_wr_1 = generic_dsb_bs_wr_1,
-	.bs_wr_2 = generic_dsb_bs_wr_2,
-	.bs_wr_4 = generic_dsb_bs_wr_4,
-	.bs_wr_8 = generic_dsb_bs_wr_8,
+	.bs_wr_2 = NSWAP(generic_dsb_bs_wr_2),
+	.bs_wr_4 = NSWAP(generic_dsb_bs_wr_4),
+	.bs_wr_8 = NSWAP(generic_dsb_bs_wr_8),
 
 	/* copy region */
 	.bs_c_1 = generic_dsb_bs_c_1,
@@ -212,27 +218,27 @@ struct bus_space aarch64_generic_dsb_bs_
 
 	/* set region */
 	.bs_sr_1 = generic_dsb_bs_sr_1,
-	.bs_sr_2 = 

CVS commit: src/sys

2020-09-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Sep  5 16:30:13 UTC 2020

Modified Files:
src/sys/arch/aarch64/include: asan.h
src/sys/arch/amd64/include: asan.h
src/sys/arch/arm/include: asan.h
src/sys/compat/common: uvm_13.c uvm_50.c
src/sys/compat/linux/arch/amd64: linux_exec_machdep.c
src/sys/compat/linux/arch/i386: linux_exec_machdep.c
src/sys/compat/netbsd32: netbsd32_kern_proc.c
src/sys/dev: kloader.c
src/sys/dev/bus_dma: bus_dmamem_common.c
src/sys/dev/ic: ssdfb.c sti.c
src/sys/dev/marvell: if_gfe.c
src/sys/dev/nvmm: nvmm.c
src/sys/dev/nvmm/x86: nvmm_x86.c nvmm_x86_svm.c nvmm_x86_vmx.c
src/sys/dev/sbus: genfb_sbus.c
src/sys/dev/usb: udl.c
src/sys/external/bsd/sljit/dist/sljit_src: sljitExecAllocator.c
sljitUtils.c
src/sys/fs/tmpfs: tmpfs_subr.c tmpfs_vnops.c
src/sys/kern: kern_idle.c kern_proc.c subr_asan.c subr_msan.c
src/sys/miscfs/genfs: genfs_vnops.c
src/sys/miscfs/procfs: procfs_linux.c
src/sys/modules/examples/mapper: mapper.c
src/sys/nfs: nfs_bio.c nfs_kq.c nfs_serv.c nfs_subs.c nfs_vnops.c
src/sys/rump/dev/lib/libpci: rumpdev_bus_dma.c
src/sys/ufs/chfs: chfs_pool.c chfs_subr.c chfs_vfsops.c chfs_vnops.c
src/sys/ufs/ext2fs: ext2fs_balloc.c
src/sys/ufs/ffs: ffs_alloc.c ffs_balloc.c ffs_extattr.c ffs_vnops.c
src/sys/ufs/lfs: lfs_balloc.c lfs_bio.c lfs_pages.c lfs_rename.c
lfs_rfw.c lfs_segment.c lfs_subr.c lfs_vfsops.c lfs_vnops.c
ulfs_inode.c ulfs_snapshot.c ulfs_vnops.c
src/sys/ufs/ufs: ufs_inode.c ufs_vnops.c
src/sys/uvm: uvm_device.h uvm_pdaemon.h uvm_swap.h

Log Message:
Round of uvm.h cleanup.

The poorly named uvm.h is generally supposed to be for uvm-internal
users only.

- Narrow it to files that actually need it -- mostly files that need
  to query whether curlwp is the pagedaemon, which should maybe be
  exposed by an external header.

- Use uvm_extern.h where feasible and uvm_*.h for things not exposed
  by it.  We should split up uvm_extern.h but this will serve for now
  to reduce the uvm.h dependencies.

- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use
  UVMHIST(ubchist), since ubchist is declared in uvm.h but the
  reference evaporates if UVMHIST is not defined, so we reduce header
  file dependencies.

- Make uvm_device.h and uvm_swap.h independently includable while
  here.

ok chs@


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/include/asan.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amd64/include/asan.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/include/asan.h
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/common/uvm_13.c \
src/sys/compat/common/uvm_50.c
cvs rdiff -u -r1.23 -r1.24 \
src/sys/compat/linux/arch/amd64/linux_exec_machdep.c
cvs rdiff -u -r1.19 -r1.20 \
src/sys/compat/linux/arch/i386/linux_exec_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/compat/netbsd32/netbsd32_kern_proc.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/kloader.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/bus_dma/bus_dmamem_common.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ic/ssdfb.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/ic/sti.c
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/marvell/if_gfe.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/nvmm/nvmm.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/nvmm/x86/nvmm_x86.c
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/nvmm/x86/nvmm_x86_svm.c
cvs rdiff -u -r1.76 -r1.77 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/sbus/genfb_sbus.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/usb/udl.c
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c
cvs rdiff -u -r1.10 -r1.11 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitUtils.c
cvs rdiff -u -r1.112 -r1.113 src/sys/fs/tmpfs/tmpfs_subr.c
cvs rdiff -u -r1.143 -r1.144 src/sys/fs/tmpfs/tmpfs_vnops.c
cvs rdiff -u -r1.33 -r1.34 src/sys/kern/kern_idle.c
cvs rdiff -u -r1.259 -r1.260 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.24 -r1.25 src/sys/kern/subr_asan.c
cvs rdiff -u -r1.12 -r1.13 src/sys/kern/subr_msan.c
cvs rdiff -u -r1.209 -r1.210 src/sys/miscfs/genfs/genfs_vnops.c
cvs rdiff -u -r1.86 -r1.87 src/sys/miscfs/procfs/procfs_linux.c
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/examples/mapper/mapper.c
cvs rdiff -u -r1.198 -r1.199 src/sys/nfs/nfs_bio.c
cvs rdiff -u -r1.26 -r1.27 src/sys/nfs/nfs_kq.c
cvs rdiff -u -r1.180 -r1.181 src/sys/nfs/nfs_serv.c
cvs rdiff -u -r1.240 -r1.241 src/sys/nfs/nfs_subs.c
cvs rdiff -u -r1.316 -r1.317 src/sys/nfs/nfs_vnops.c
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/dev/lib/libpci/rumpdev_bus_dma.c
cvs rdiff -u -r1.4 -r1.5 src/sys/ufs/chfs/chfs_pool.c
cvs rdiff -u -r1.14 -r1.15 src/sys/ufs/chfs/chfs_subr.c
cvs rdiff -u -r1.21 -r1.22 src/sys/ufs/chfs/chfs_vfsops.c
cvs rdiff -u -r1.41 -r1.42 src/sys/ufs/chfs/chfs_vnops.c
cvs rdiff -u -r1.42 -r1.43 

CVS commit: src/sys

2020-09-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Sep  5 16:30:13 UTC 2020

Modified Files:
src/sys/arch/aarch64/include: asan.h
src/sys/arch/amd64/include: asan.h
src/sys/arch/arm/include: asan.h
src/sys/compat/common: uvm_13.c uvm_50.c
src/sys/compat/linux/arch/amd64: linux_exec_machdep.c
src/sys/compat/linux/arch/i386: linux_exec_machdep.c
src/sys/compat/netbsd32: netbsd32_kern_proc.c
src/sys/dev: kloader.c
src/sys/dev/bus_dma: bus_dmamem_common.c
src/sys/dev/ic: ssdfb.c sti.c
src/sys/dev/marvell: if_gfe.c
src/sys/dev/nvmm: nvmm.c
src/sys/dev/nvmm/x86: nvmm_x86.c nvmm_x86_svm.c nvmm_x86_vmx.c
src/sys/dev/sbus: genfb_sbus.c
src/sys/dev/usb: udl.c
src/sys/external/bsd/sljit/dist/sljit_src: sljitExecAllocator.c
sljitUtils.c
src/sys/fs/tmpfs: tmpfs_subr.c tmpfs_vnops.c
src/sys/kern: kern_idle.c kern_proc.c subr_asan.c subr_msan.c
src/sys/miscfs/genfs: genfs_vnops.c
src/sys/miscfs/procfs: procfs_linux.c
src/sys/modules/examples/mapper: mapper.c
src/sys/nfs: nfs_bio.c nfs_kq.c nfs_serv.c nfs_subs.c nfs_vnops.c
src/sys/rump/dev/lib/libpci: rumpdev_bus_dma.c
src/sys/ufs/chfs: chfs_pool.c chfs_subr.c chfs_vfsops.c chfs_vnops.c
src/sys/ufs/ext2fs: ext2fs_balloc.c
src/sys/ufs/ffs: ffs_alloc.c ffs_balloc.c ffs_extattr.c ffs_vnops.c
src/sys/ufs/lfs: lfs_balloc.c lfs_bio.c lfs_pages.c lfs_rename.c
lfs_rfw.c lfs_segment.c lfs_subr.c lfs_vfsops.c lfs_vnops.c
ulfs_inode.c ulfs_snapshot.c ulfs_vnops.c
src/sys/ufs/ufs: ufs_inode.c ufs_vnops.c
src/sys/uvm: uvm_device.h uvm_pdaemon.h uvm_swap.h

Log Message:
Round of uvm.h cleanup.

The poorly named uvm.h is generally supposed to be for uvm-internal
users only.

- Narrow it to files that actually need it -- mostly files that need
  to query whether curlwp is the pagedaemon, which should maybe be
  exposed by an external header.

- Use uvm_extern.h where feasible and uvm_*.h for things not exposed
  by it.  We should split up uvm_extern.h but this will serve for now
  to reduce the uvm.h dependencies.

- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use
  UVMHIST(ubchist), since ubchist is declared in uvm.h but the
  reference evaporates if UVMHIST is not defined, so we reduce header
  file dependencies.

- Make uvm_device.h and uvm_swap.h independently includable while
  here.

ok chs@


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/include/asan.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amd64/include/asan.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/include/asan.h
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/common/uvm_13.c \
src/sys/compat/common/uvm_50.c
cvs rdiff -u -r1.23 -r1.24 \
src/sys/compat/linux/arch/amd64/linux_exec_machdep.c
cvs rdiff -u -r1.19 -r1.20 \
src/sys/compat/linux/arch/i386/linux_exec_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/compat/netbsd32/netbsd32_kern_proc.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/kloader.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/bus_dma/bus_dmamem_common.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ic/ssdfb.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/ic/sti.c
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/marvell/if_gfe.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/nvmm/nvmm.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/nvmm/x86/nvmm_x86.c
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/nvmm/x86/nvmm_x86_svm.c
cvs rdiff -u -r1.76 -r1.77 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/sbus/genfb_sbus.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/usb/udl.c
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c
cvs rdiff -u -r1.10 -r1.11 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitUtils.c
cvs rdiff -u -r1.112 -r1.113 src/sys/fs/tmpfs/tmpfs_subr.c
cvs rdiff -u -r1.143 -r1.144 src/sys/fs/tmpfs/tmpfs_vnops.c
cvs rdiff -u -r1.33 -r1.34 src/sys/kern/kern_idle.c
cvs rdiff -u -r1.259 -r1.260 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.24 -r1.25 src/sys/kern/subr_asan.c
cvs rdiff -u -r1.12 -r1.13 src/sys/kern/subr_msan.c
cvs rdiff -u -r1.209 -r1.210 src/sys/miscfs/genfs/genfs_vnops.c
cvs rdiff -u -r1.86 -r1.87 src/sys/miscfs/procfs/procfs_linux.c
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/examples/mapper/mapper.c
cvs rdiff -u -r1.198 -r1.199 src/sys/nfs/nfs_bio.c
cvs rdiff -u -r1.26 -r1.27 src/sys/nfs/nfs_kq.c
cvs rdiff -u -r1.180 -r1.181 src/sys/nfs/nfs_serv.c
cvs rdiff -u -r1.240 -r1.241 src/sys/nfs/nfs_subs.c
cvs rdiff -u -r1.316 -r1.317 src/sys/nfs/nfs_vnops.c
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/dev/lib/libpci/rumpdev_bus_dma.c
cvs rdiff -u -r1.4 -r1.5 src/sys/ufs/chfs/chfs_pool.c
cvs rdiff -u -r1.14 -r1.15 src/sys/ufs/chfs/chfs_subr.c
cvs rdiff -u -r1.21 -r1.22 src/sys/ufs/chfs/chfs_vfsops.c
cvs rdiff -u -r1.41 -r1.42 src/sys/ufs/chfs/chfs_vnops.c
cvs rdiff -u -r1.42 -r1.43 

CVS commit: src/sys/arch/alpha

2020-09-05 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Sep  5 16:29:08 UTC 2020

Modified Files:
src/sys/arch/alpha/alpha: genassym.cf interrupt.c locore.s
src/sys/arch/alpha/include: alpha_cpu.h intr.h
src/sys/arch/alpha/tc: tc_3000_300.c tc_3000_500.c

Log Message:
- Document all of the various interrupt levels in the Processor Stataus
  register, and provide symbolic names for them as well.
- Use ALPHA_PSL_IPL_* values directly for IPL_*.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/alpha/alpha/genassym.cf
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/alpha/alpha/interrupt.c
cvs rdiff -u -r1.130 -r1.131 src/sys/arch/alpha/alpha/locore.s
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/alpha/include/alpha_cpu.h
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/alpha/include/intr.h
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/alpha/tc/tc_3000_300.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/alpha/tc/tc_3000_500.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/alpha/alpha/genassym.cf
diff -u src/sys/arch/alpha/alpha/genassym.cf:1.23 src/sys/arch/alpha/alpha/genassym.cf:1.24
--- src/sys/arch/alpha/alpha/genassym.cf:1.23	Thu Sep  3 04:18:30 2020
+++ src/sys/arch/alpha/alpha/genassym.cf	Sat Sep  5 16:29:07 2020
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.23 2020/09/03 04:18:30 thorpej Exp $
+# $NetBSD: genassym.cf,v 1.24 2020/09/05 16:29:07 thorpej Exp $
 
 #
 # Copyright (c) 1982, 1990, 1993
@@ -129,7 +129,7 @@ define	FRAME_SIZE		FRAME_SIZE
 define	ALPHA_PSL_USERMODE	ALPHA_PSL_USERMODE
 define	ALPHA_PSL_IPL_MASK	ALPHA_PSL_IPL_MASK
 define	ALPHA_PSL_IPL_0		ALPHA_PSL_IPL_0
-define	ALPHA_PSL_IPL_SOFT	ALPHA_PSL_IPL_SOFT
+define	ALPHA_PSL_IPL_SOFT_LO	ALPHA_PSL_IPL_SOFT_LO
 define	ALPHA_PSL_IPL_HIGH	ALPHA_PSL_IPL_HIGH
 
 # pte bits

Index: src/sys/arch/alpha/alpha/interrupt.c
diff -u src/sys/arch/alpha/alpha/interrupt.c:1.82 src/sys/arch/alpha/alpha/interrupt.c:1.83
--- src/sys/arch/alpha/alpha/interrupt.c:1.82	Sat Aug 29 15:29:30 2020
+++ src/sys/arch/alpha/alpha/interrupt.c	Sat Sep  5 16:29:07 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: interrupt.c,v 1.82 2020/08/29 15:29:30 thorpej Exp $ */
+/* $NetBSD: interrupt.c,v 1.83 2020/09/05 16:29:07 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.82 2020/08/29 15:29:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.83 2020/09/05 16:29:07 thorpej Exp $");
 
 #include 
 #include 
@@ -463,7 +463,7 @@ spl0(void)
 {
 
 	if (ssir) {
-		(void) alpha_pal_swpipl(ALPHA_PSL_IPL_SOFT);
+		(void) alpha_pal_swpipl(ALPHA_PSL_IPL_SOFT_LO);
 		softintr_dispatch();
 	}
 
@@ -525,18 +525,3 @@ rlprintf(struct timeval *t, const char *
 	vprintf(fmt, ap);
 	va_end(ap);
 }
-
-const static uint8_t ipl2psl_table[] = {
-	[IPL_NONE] = ALPHA_PSL_IPL_0,
-	[IPL_SOFTCLOCK] = ALPHA_PSL_IPL_SOFT,
-	[IPL_VM] = ALPHA_PSL_IPL_IO,
-	[IPL_SCHED] = ALPHA_PSL_IPL_CLOCK,	/* also IPIs */
-	[IPL_HIGH] = ALPHA_PSL_IPL_HIGH,
-};
-
-ipl_cookie_t
-makeiplcookie(ipl_t ipl)
-{
-
-	return (ipl_cookie_t){._psl = ipl2psl_table[ipl]};
-}

Index: src/sys/arch/alpha/alpha/locore.s
diff -u src/sys/arch/alpha/alpha/locore.s:1.130 src/sys/arch/alpha/alpha/locore.s:1.131
--- src/sys/arch/alpha/alpha/locore.s:1.130	Fri Sep  4 04:09:52 2020
+++ src/sys/arch/alpha/alpha/locore.s	Sat Sep  5 16:29:07 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.130 2020/09/04 04:09:52 thorpej Exp $ */
+/* $NetBSD: locore.s,v 1.131 2020/09/05 16:29:07 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2019 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.130 2020/09/04 04:09:52 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.131 2020/09/05 16:29:07 thorpej Exp $");
 
 #include "assym.h"
 
@@ -283,7 +283,7 @@ LEAF(exception_return, 1)			/* XXX shoul
 	/* NOTREACHED */
 
 	/* We've got a SIR */
-6:	ldiq	a0, ALPHA_PSL_IPL_SOFT
+6:	ldiq	a0, ALPHA_PSL_IPL_SOFT_LO
 	call_pal PAL_OSF1_swpipl
 	mov	v0, s2/* remember old IPL */
 	CALL(softintr_dispatch)

Index: src/sys/arch/alpha/include/alpha_cpu.h
diff -u src/sys/arch/alpha/include/alpha_cpu.h:1.50 src/sys/arch/alpha/include/alpha_cpu.h:1.51
--- src/sys/arch/alpha/include/alpha_cpu.h:1.50	Mon Feb  6 02:14:13 2012
+++ src/sys/arch/alpha/include/alpha_cpu.h	Sat Sep  5 16:29:08 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: alpha_cpu.h,v 1.50 2012/02/06 02:14:13 matt Exp $ */
+/* $NetBSD: alpha_cpu.h,v 1.51 2020/09/05 16:29:08 thorpej Exp $ */
 
 /*
  * Copyright (c) 1996 Carnegie-Mellon University.
@@ -94,16 +94,34 @@ struct alpha_pcb {
  * Processor Status Register [OSF/1 PALcode Specific]
  *
  * Includes user/kernel mode bit, interrupt priority levels, etc.
+ *
+ * Processor Status Summary
+ * 

CVS commit: src/sys/arch/alpha

2020-09-05 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Sep  5 16:29:08 UTC 2020

Modified Files:
src/sys/arch/alpha/alpha: genassym.cf interrupt.c locore.s
src/sys/arch/alpha/include: alpha_cpu.h intr.h
src/sys/arch/alpha/tc: tc_3000_300.c tc_3000_500.c

Log Message:
- Document all of the various interrupt levels in the Processor Stataus
  register, and provide symbolic names for them as well.
- Use ALPHA_PSL_IPL_* values directly for IPL_*.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/alpha/alpha/genassym.cf
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/alpha/alpha/interrupt.c
cvs rdiff -u -r1.130 -r1.131 src/sys/arch/alpha/alpha/locore.s
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/alpha/include/alpha_cpu.h
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/alpha/include/intr.h
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/alpha/tc/tc_3000_300.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/alpha/tc/tc_3000_500.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/include

2020-09-05 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Sep  5 16:04:31 UTC 2020

Modified Files:
src/sys/arch/arm/include: bus_funcs.h

Log Message:
Add missing prototypes for __bs_c(f,_bs_sm_?_swap)

(implementations of these already exist for aarch64)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/include/bus_funcs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/include

2020-09-05 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Sep  5 16:04:31 UTC 2020

Modified Files:
src/sys/arch/arm/include: bus_funcs.h

Log Message:
Add missing prototypes for __bs_c(f,_bs_sm_?_swap)

(implementations of these already exist for aarch64)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/include/bus_funcs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/include/bus_funcs.h
diff -u src/sys/arch/arm/include/bus_funcs.h:1.9 src/sys/arch/arm/include/bus_funcs.h:1.10
--- src/sys/arch/arm/include/bus_funcs.h:1.9	Mon Apr 13 07:09:51 2020
+++ src/sys/arch/arm/include/bus_funcs.h	Sat Sep  5 16:04:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_funcs.h,v 1.9 2020/04/13 07:09:51 maxv Exp $	*/
+/*	$NetBSD: bus_funcs.h,v 1.10 2020/09/05 16:04:31 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -493,14 +493,20 @@ void	__bs_c(f,_bs_sm_1)(void *t, bus_spa
 
 #define	bs_sm_2_proto(f)		\
 void	__bs_c(f,_bs_sm_2)(void *t, bus_space_handle_t bsh,		\
+	bus_size_t offset, uint16_t value, bus_size_t count);	\
+void	__bs_c(f,_bs_sm_2_swap)(void *t, bus_space_handle_t bsh,		\
 	bus_size_t offset, uint16_t value, bus_size_t count);
 
 #define	bs_sm_4_proto(f)		\
 void	__bs_c(f,_bs_sm_4)(void *t, bus_space_handle_t bsh,		\
+	bus_size_t offset, uint32_t value, bus_size_t count);	\
+void	__bs_c(f,_bs_sm_4_swap)(void *t, bus_space_handle_t bsh,	\
 	bus_size_t offset, uint32_t value, bus_size_t count);
 
 #define	bs_sm_8_proto(f)		\
 void	__bs_c(f,_bs_sm_8)(void *t, bus_space_handle_t bsh,		\
+	bus_size_t offset, uint64_t value, bus_size_t count);	\
+void	__bs_c(f,_bs_sm_8_swap)(void *t, bus_space_handle_t bsh,	\
 	bus_size_t offset, uint64_t value, bus_size_t count);
 
 #define	bs_sr_1_proto(f)		\



CVS commit: src/sys/arch/aarch64/aarch64

2020-09-05 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Sep  5 15:59:09 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: disasm.c

Log Message:
AArch64 instructions are always LE: swap if we're BE


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/aarch64/disasm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/aarch64/aarch64/disasm.c
diff -u src/sys/arch/aarch64/aarch64/disasm.c:1.9 src/sys/arch/aarch64/aarch64/disasm.c:1.10
--- src/sys/arch/aarch64/aarch64/disasm.c:1.9	Mon Aug  3 19:16:56 2020
+++ src/sys/arch/aarch64/aarch64/disasm.c	Sat Sep  5 15:59:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: disasm.c,v 1.9 2020/08/03 19:16:56 ryo Exp $	*/
+/*	$NetBSD: disasm.c,v 1.10 2020/09/05 15:59:09 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2018 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: disasm.c,v 1.9 2020/08/03 19:16:56 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disasm.c,v 1.10 2020/09/05 15:59:09 jakllsch Exp $");
 
 #include 
 #include 
@@ -4044,7 +4044,7 @@ disasm(const disasm_interface_t *di, uin
 {
 	uint32_t insn;
 
-	insn = di->di_readword(loc);
+	insn = le32toh(di->di_readword(loc));
 	disasm_insn(di, loc, insn);
 
 	/* return next address */



CVS commit: src/sys/arch/aarch64/aarch64

2020-09-05 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Sep  5 15:59:09 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: disasm.c

Log Message:
AArch64 instructions are always LE: swap if we're BE


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/aarch64/disasm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make/unit-tests

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 15:57:13 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: depsrc-exec.exp depsrc-exec.mk
depsrc-made.exp depsrc-made.mk depsrc-make.exp depsrc-make.mk
depsrc-notmain.exp depsrc-notmain.mk depsrc-optional.exp
depsrc-optional.mk depsrc-phony.exp depsrc-phony.mk
depsrc-recursive.exp depsrc-recursive.mk

Log Message:
make(1): add tests for some of the special sources


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/depsrc-exec.exp \
src/usr.bin/make/unit-tests/depsrc-made.exp \
src/usr.bin/make/unit-tests/depsrc-make.exp \
src/usr.bin/make/unit-tests/depsrc-notmain.exp \
src/usr.bin/make/unit-tests/depsrc-optional.exp \
src/usr.bin/make/unit-tests/depsrc-phony.exp \
src/usr.bin/make/unit-tests/depsrc-recursive.exp
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/depsrc-exec.mk \
src/usr.bin/make/unit-tests/depsrc-made.mk \
src/usr.bin/make/unit-tests/depsrc-make.mk \
src/usr.bin/make/unit-tests/depsrc-notmain.mk \
src/usr.bin/make/unit-tests/depsrc-optional.mk \
src/usr.bin/make/unit-tests/depsrc-phony.mk \
src/usr.bin/make/unit-tests/depsrc-recursive.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make/unit-tests

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 15:57:13 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: depsrc-exec.exp depsrc-exec.mk
depsrc-made.exp depsrc-made.mk depsrc-make.exp depsrc-make.mk
depsrc-notmain.exp depsrc-notmain.mk depsrc-optional.exp
depsrc-optional.mk depsrc-phony.exp depsrc-phony.mk
depsrc-recursive.exp depsrc-recursive.mk

Log Message:
make(1): add tests for some of the special sources


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/depsrc-exec.exp \
src/usr.bin/make/unit-tests/depsrc-made.exp \
src/usr.bin/make/unit-tests/depsrc-make.exp \
src/usr.bin/make/unit-tests/depsrc-notmain.exp \
src/usr.bin/make/unit-tests/depsrc-optional.exp \
src/usr.bin/make/unit-tests/depsrc-phony.exp \
src/usr.bin/make/unit-tests/depsrc-recursive.exp
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/depsrc-exec.mk \
src/usr.bin/make/unit-tests/depsrc-made.mk \
src/usr.bin/make/unit-tests/depsrc-make.mk \
src/usr.bin/make/unit-tests/depsrc-notmain.mk \
src/usr.bin/make/unit-tests/depsrc-optional.mk \
src/usr.bin/make/unit-tests/depsrc-phony.mk \
src/usr.bin/make/unit-tests/depsrc-recursive.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/unit-tests/depsrc-exec.exp
diff -u src/usr.bin/make/unit-tests/depsrc-exec.exp:1.1 src/usr.bin/make/unit-tests/depsrc-exec.exp:1.2
--- src/usr.bin/make/unit-tests/depsrc-exec.exp:1.1	Sun Aug 16 12:07:51 2020
+++ src/usr.bin/make/unit-tests/depsrc-exec.exp	Sat Sep  5 15:57:12 2020
@@ -1 +1,2 @@
+: depsrc-exec.mk: This is always executed.
 exit status 0
Index: src/usr.bin/make/unit-tests/depsrc-made.exp
diff -u src/usr.bin/make/unit-tests/depsrc-made.exp:1.1 src/usr.bin/make/unit-tests/depsrc-made.exp:1.2
--- src/usr.bin/make/unit-tests/depsrc-made.exp:1.1	Sun Aug 16 12:07:51 2020
+++ src/usr.bin/make/unit-tests/depsrc-made.exp	Sat Sep  5 15:57:12 2020
@@ -1 +1,3 @@
+: Making chapter21
+: Making chapter22
 exit status 0
Index: src/usr.bin/make/unit-tests/depsrc-make.exp
diff -u src/usr.bin/make/unit-tests/depsrc-make.exp:1.1 src/usr.bin/make/unit-tests/depsrc-make.exp:1.2
--- src/usr.bin/make/unit-tests/depsrc-make.exp:1.1	Sun Aug 16 12:07:51 2020
+++ src/usr.bin/make/unit-tests/depsrc-make.exp	Sat Sep  5 15:57:12 2020
@@ -1 +1,3 @@
+this-is-made is made.
+echo this-is-not-made is just echoed.
 exit status 0
Index: src/usr.bin/make/unit-tests/depsrc-notmain.exp
diff -u src/usr.bin/make/unit-tests/depsrc-notmain.exp:1.1 src/usr.bin/make/unit-tests/depsrc-notmain.exp:1.2
--- src/usr.bin/make/unit-tests/depsrc-notmain.exp:1.1	Sun Aug 16 12:07:51 2020
+++ src/usr.bin/make/unit-tests/depsrc-notmain.exp	Sat Sep  5 15:57:12 2020
@@ -1 +1,2 @@
+: all
 exit status 0
Index: src/usr.bin/make/unit-tests/depsrc-optional.exp
diff -u src/usr.bin/make/unit-tests/depsrc-optional.exp:1.1 src/usr.bin/make/unit-tests/depsrc-optional.exp:1.2
--- src/usr.bin/make/unit-tests/depsrc-optional.exp:1.1	Sun Aug 16 12:07:51 2020
+++ src/usr.bin/make/unit-tests/depsrc-optional.exp	Sat Sep  5 15:57:12 2020
@@ -1 +1,2 @@
+`all' is up to date.
 exit status 0
Index: src/usr.bin/make/unit-tests/depsrc-phony.exp
diff -u src/usr.bin/make/unit-tests/depsrc-phony.exp:1.1 src/usr.bin/make/unit-tests/depsrc-phony.exp:1.2
--- src/usr.bin/make/unit-tests/depsrc-phony.exp:1.1	Sun Aug 16 12:07:51 2020
+++ src/usr.bin/make/unit-tests/depsrc-phony.exp	Sat Sep  5 15:57:12 2020
@@ -1 +1,2 @@
+: depsrc-phony.mk is made.
 exit status 0
Index: src/usr.bin/make/unit-tests/depsrc-recursive.exp
diff -u src/usr.bin/make/unit-tests/depsrc-recursive.exp:1.1 src/usr.bin/make/unit-tests/depsrc-recursive.exp:1.2
--- src/usr.bin/make/unit-tests/depsrc-recursive.exp:1.1	Sun Aug 16 12:07:51 2020
+++ src/usr.bin/make/unit-tests/depsrc-recursive.exp	Sat Sep  5 15:57:12 2020
@@ -1 +1,3 @@
+this-is-made is made.
+echo this-is-not-made is just echoed.
 exit status 0

Index: src/usr.bin/make/unit-tests/depsrc-exec.mk
diff -u src/usr.bin/make/unit-tests/depsrc-exec.mk:1.2 src/usr.bin/make/unit-tests/depsrc-exec.mk:1.3
--- src/usr.bin/make/unit-tests/depsrc-exec.mk:1.2	Sun Aug 16 14:25:16 2020
+++ src/usr.bin/make/unit-tests/depsrc-exec.mk	Sat Sep  5 15:57:12 2020
@@ -1,8 +1,16 @@
-# $NetBSD: depsrc-exec.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: depsrc-exec.mk,v 1.3 2020/09/05 15:57:12 rillig Exp $
 #
-# Tests for the special source .EXEC in dependency declarations.
+# Tests for the special source .EXEC in dependency declarations,
+# which always executes the commands, even if the target is up to date.
+# The target itself is considered up to date.
+#
+# TODO: Describe possible use cases for .EXEC.
+
+all: ${MAKEFILE} ${MAKEFILE:H}/depsrc.mk
 
-# TODO: Implementation
+${MAKEFILE}: .EXEC
+	: ${.TARGET:T}: This is always executed.
 
-all:
-	@:;

CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 15:12:04 UTC 2020

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make(1): fix local variable type in ParseIsEscaped


To generate a diff of this commit:
cvs rdiff -u -r1.279 -r1.280 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.279 src/usr.bin/make/parse.c:1.280
--- src/usr.bin/make/parse.c:1.279	Sat Sep  5 15:05:08 2020
+++ src/usr.bin/make/parse.c	Sat Sep  5 15:12:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.279 2020/09/05 15:05:08 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.280 2020/09/05 15:12:03 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.279 2020/09/05 15:05:08 rillig Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.280 2020/09/05 15:12:03 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)parse.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: parse.c,v 1.279 2020/09/05 15:05:08 rillig Exp $");
+__RCSID("$NetBSD: parse.c,v 1.280 2020/09/05 15:12:03 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -351,9 +351,6 @@ struct loadedfile {
 	Boolean used;			/* XXX: have we used the data yet */
 };
 
-/*
- * Constructor/destructor for loadedfile
- */
 static struct loadedfile *
 loadedfile_create(const char *path)
 {
@@ -558,7 +555,7 @@ done:
 static Boolean
 ParseIsEscaped(const char *line, const char *c)
 {
-int active = 0;
+Boolean active = FALSE;
 for (;;) {
 	if (line == c)
 	return active;



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 15:12:04 UTC 2020

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make(1): fix local variable type in ParseIsEscaped


To generate a diff of this commit:
cvs rdiff -u -r1.279 -r1.280 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 15:05:08 UTC 2020

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make(1): fix return type of ParseIsEscaped


To generate a diff of this commit:
cvs rdiff -u -r1.278 -r1.279 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.278 src/usr.bin/make/parse.c:1.279
--- src/usr.bin/make/parse.c:1.278	Sat Sep  5 15:04:09 2020
+++ src/usr.bin/make/parse.c	Sat Sep  5 15:05:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.278 2020/09/05 15:04:09 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.279 2020/09/05 15:05:08 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.278 2020/09/05 15:04:09 rillig Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.279 2020/09/05 15:05:08 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)parse.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: parse.c,v 1.278 2020/09/05 15:04:09 rillig Exp $");
+__RCSID("$NetBSD: parse.c,v 1.279 2020/09/05 15:05:08 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -340,7 +340,6 @@ static const struct {
 /* local functions */
 
 static void ParseSetIncludedFile(void);
-static void ParseMark(GNode *);
 
 /* file loader */
 
@@ -555,19 +554,8 @@ done:
 
 /* old code */
 
-/*-
- *--
- * ParseIsEscaped --
- *	Check if the current character is escaped on the current line
- *
- * Results:
- *	0 if the character is not backslash escaped, 1 otherwise
- *
- * Side Effects:
- *	None
- *--
- */
-static int
+/* Check if the current character is escaped on the current line. */
+static Boolean
 ParseIsEscaped(const char *line, const char *c)
 {
 int active = 0;



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 15:05:08 UTC 2020

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make(1): fix return type of ParseIsEscaped


To generate a diff of this commit:
cvs rdiff -u -r1.278 -r1.279 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 15:04:09 UTC 2020

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make(1): remove redundant prototype for ParseMark


To generate a diff of this commit:
cvs rdiff -u -r1.277 -r1.278 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.277 src/usr.bin/make/parse.c:1.278
--- src/usr.bin/make/parse.c:1.277	Sat Sep  5 14:58:07 2020
+++ src/usr.bin/make/parse.c	Sat Sep  5 15:04:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.277 2020/09/05 14:58:07 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.278 2020/09/05 15:04:09 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.277 2020/09/05 14:58:07 rillig Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.278 2020/09/05 15:04:09 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)parse.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: parse.c,v 1.277 2020/09/05 14:58:07 rillig Exp $");
+__RCSID("$NetBSD: parse.c,v 1.278 2020/09/05 15:04:09 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -580,6 +580,15 @@ ParseIsEscaped(const char *line, const c
 }
 }
 
+/* Add the filename and lineno to the GNode so that we remember where it
+ * was first defined. */
+static void
+ParseMark(GNode *gn)
+{
+gn->fname = curFile->fname;
+gn->lineno = curFile->lineno;
+}
+
 /*-
  *--
  * ParseFindKeyword --
@@ -3311,21 +3320,3 @@ Parse_MainName(void)
 Var_Append(".TARGETS", mainNode->name, VAR_GLOBAL);
 return mainList;
 }
-
-/*-
- *---
- * ParseMark --
- *	Add the filename and lineno to the GNode so that we remember
- *	where it was first defined.
- *
- * Side Effects:
- *	None.
- *
- *---
- */
-static void
-ParseMark(GNode *gn)
-{
-gn->fname = curFile->fname;
-gn->lineno = curFile->lineno;
-}



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 15:04:09 UTC 2020

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make(1): remove redundant prototype for ParseMark


To generate a diff of this commit:
cvs rdiff -u -r1.277 -r1.278 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common

2020-09-05 Thread Kamil Rytarowski
On 05.09.2020 15:35, matthew green wrote:
> Module Name:  src
> Committed By: mrg
> Date: Sat Sep  5 13:35:55 UTC 2020
> 
> Modified Files:
>   src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
>   sanitizer_linux.cc sanitizer_linux.h sanitizer_linux_libcdep.cc
>   sanitizer_platform_limits_netbsd.cc sanitizer_syscall_generic.inc
> 
> Log Message:
> fix various merge botches; we may need to re-port the ThreadLister code.
> 


LSan was ported and upstreamed post GCC-9:

https://github.com/llvm/llvm-project/commit/1b58389428ed07a7322ba9c2bcaeec99807f9457

https://github.com/llvm/llvm-project/commit/5fe1e55d35413b1904cfcf16ec15495398921fe5

https://github.com/llvm/llvm-project/commit/8827047551570b7ed7088765c3de2a8cce6823b8

https://github.com/llvm/llvm-project/commit/983d7ddd0b278b45d815cbac9197205b39c4860a

https://github.com/llvm/llvm-project/commit/fc356dcc11c10003ff22acff667b0a9f5e6c1e0f

https://github.com/llvm/llvm-project/commit/3a189bac9bb111c9a59339015ab0d4e2fed735f4

https://github.com/llvm/llvm-project/commit/02519fc7a6f8c528f67975a9f78ce64dabf402b4

And possibly something else:

https://github.com/llvm/llvm-project/commits?author=krytarowski

> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.33 -r1.34 \
> 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc
> cvs rdiff -u -r1.9 -r1.10 \
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h
> cvs rdiff -u -r1.12 -r1.13 \
> 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc
> cvs rdiff -u -r1.1.1.2 -r1.2 \
> 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc
> cvs rdiff -u -r1.8 -r1.9 \
> 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 
> 
> Modified files:
> 
> Index: 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc
> diff -u 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.33
>  
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.34
> --- 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.33
>   Sat Sep  5 09:12:32 2020
> +++ 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc   
> Sat Sep  5 13:35:55 2020
> @@ -41,8 +41,6 @@
>  #undef stat
>  #endif
>  
> -#endif // SANITIZER_LINUX
> -
>  #if SANITIZER_NETBSD
>  #include 
>  #endif
> @@ -980,7 +978,6 @@ ThreadLister::ThreadLister(pid_t pid) : 
>if (internal_iserror(descriptor_)) {
>  Report("Can't open /proc/%d/task for reading.\n", pid);
>}
> -#endif
>  }
>  
>  ThreadLister::Result ThreadLister::ListThreads(
> @@ -1055,10 +1052,8 @@ bool ThreadLister::IsAlive(int tid) {
>  }
>  
>  ThreadLister::~ThreadLister() {
> -#ifndef SANITIZER_NETBSD
>if (!internal_iserror(descriptor_))
>  internal_close(descriptor_);
> -#endif
>  }
>  #endif
>  
> 
> Index: 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h
> diff -u 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h:1.9
>  
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h:1.10
> --- 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h:1.9
> Sat Sep  5 09:12:32 2020
> +++ 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h
> Sat Sep  5 13:35:55 2020
> @@ -69,6 +69,8 @@ uptr internal_clone(int (*fn)(void *), v
>  #endif
>  #elif SANITIZER_FREEBSD
>  void internal_sigdelset(__sanitizer_sigset_t *set, int signum);
> +#elif SANITIZER_NETBSD
> +uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5);
>  #endif  // SANITIZER_LINUX
>  
>  #ifdef SANITIZER_NETBSD
> 
> Index: 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc
> diff -u 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.12
>  
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.13
> --- 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.12
>   Sat Sep  5 09:12:32 2020
> +++ 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc
>Sat Sep  5 13:35:55 2020
> @@ -72,6 +72,10 @@ struct __sanitizer::linux_dirent {
>  #include 
>  #endif
>  
> +#if SANITIZER_NETBSD
> +#include 
> +#endif
> +
>  namespace __sanitizer {
>  
>  SANITIZER_WEAK_ATTRIBUTE int
> 
> Index: 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc
> diff -u 
> src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.1.1.2
>  
> 

CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 14:58:07 UTC 2020

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make(1): remove redundant prototypes for local functions from parse.c


To generate a diff of this commit:
cvs rdiff -u -r1.276 -r1.277 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 14:58:07 UTC 2020

Modified Files:
src/usr.bin/make: parse.c

Log Message:
make(1): remove redundant prototypes for local functions from parse.c


To generate a diff of this commit:
cvs rdiff -u -r1.276 -r1.277 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.276 src/usr.bin/make/parse.c:1.277
--- src/usr.bin/make/parse.c:1.276	Fri Sep  4 17:59:36 2020
+++ src/usr.bin/make/parse.c	Sat Sep  5 14:58:07 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.276 2020/09/04 17:59:36 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.277 2020/09/05 14:58:07 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.276 2020/09/04 17:59:36 rillig Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.277 2020/09/05 14:58:07 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)parse.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: parse.c,v 1.276 2020/09/04 17:59:36 rillig Exp $");
+__RCSID("$NetBSD: parse.c,v 1.277 2020/09/05 14:58:07 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -339,30 +339,7 @@ static const struct {
 
 /* local functions */
 
-static int ParseIsEscaped(const char *, const char *);
-static void ParseErrorInternal(const char *, size_t, int, const char *, ...)
-MAKE_ATTR_PRINTFLIKE(4,5);
-static void ParseVErrorInternal(FILE *, const char *, size_t, int, const char *, va_list)
-MAKE_ATTR_PRINTFLIKE(5, 0);
-static int ParseFindKeyword(const char *);
-static int ParseLinkSrc(void *, void *);
-static int ParseDoOp(void *, void *);
-static void ParseDoSrc(int, const char *);
-static int ParseFindMain(void *, void *);
-static int ParseAddDir(void *, void *);
-static int ParseClearPath(void *, void *);
-static void ParseDoDependency(char *);
-static int ParseAddCmd(void *, void *);
-static void ParseHasCommands(void *);
-static void ParseDoInclude(char *);
-static void ParseSetParseFile(const char *);
 static void ParseSetIncludedFile(void);
-#ifdef GMAKEEXPORT
-static void ParseGmakeExport(char *);
-#endif
-static int ParseEOF(void);
-static char *ParseReadLine(void);
-static void ParseFinishLine(void);
 static void ParseMark(GNode *);
 
 /* file loader */



CVS commit: src/external/gpl3/gcc/usr.bin

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 14:24:26 UTC 2020

Modified Files:
src/external/gpl3/gcc/usr.bin: Makefile.backend
src/external/gpl3/gcc/usr.bin/backend: Makefile
src/external/gpl3/gcc/usr.bin/cc1: Makefile
src/external/gpl3/gcc/usr.bin/cc1obj: Makefile
src/external/gpl3/gcc/usr.bin/cc1plus: Makefile
src/external/gpl3/gcc/usr.bin/common: Makefile
src/external/gpl3/gcc/usr.bin/gcov: Makefile
src/external/gpl3/gcc/usr.bin/lto1: Makefile

Log Message:
make GCC 9.3.0 build itself:
- common-target is needed before common now
- complete build-sort.o framework
- fix cyclic dep
- fix .c vs .cc issues


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc/usr.bin/Makefile.backend
cvs rdiff -u -r1.60 -r1.61 src/external/gpl3/gcc/usr.bin/backend/Makefile
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/usr.bin/cc1/Makefile
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gcc/usr.bin/cc1obj/Makefile
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/usr.bin/cc1plus/Makefile
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc/usr.bin/common/Makefile
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/usr.bin/gcov/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/usr.bin/lto1/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/usr.bin

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 14:24:26 UTC 2020

Modified Files:
src/external/gpl3/gcc/usr.bin: Makefile.backend
src/external/gpl3/gcc/usr.bin/backend: Makefile
src/external/gpl3/gcc/usr.bin/cc1: Makefile
src/external/gpl3/gcc/usr.bin/cc1obj: Makefile
src/external/gpl3/gcc/usr.bin/cc1plus: Makefile
src/external/gpl3/gcc/usr.bin/common: Makefile
src/external/gpl3/gcc/usr.bin/gcov: Makefile
src/external/gpl3/gcc/usr.bin/lto1: Makefile

Log Message:
make GCC 9.3.0 build itself:
- common-target is needed before common now
- complete build-sort.o framework
- fix cyclic dep
- fix .c vs .cc issues


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc/usr.bin/Makefile.backend
cvs rdiff -u -r1.60 -r1.61 src/external/gpl3/gcc/usr.bin/backend/Makefile
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/usr.bin/cc1/Makefile
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gcc/usr.bin/cc1obj/Makefile
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/usr.bin/cc1plus/Makefile
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc/usr.bin/common/Makefile
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/usr.bin/gcov/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/usr.bin/lto1/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/usr.bin/Makefile.backend
diff -u src/external/gpl3/gcc/usr.bin/Makefile.backend:1.8 src/external/gpl3/gcc/usr.bin/Makefile.backend:1.9
--- src/external/gpl3/gcc/usr.bin/Makefile.backend:1.8	Fri Feb  1 10:34:18 2019
+++ src/external/gpl3/gcc/usr.bin/Makefile.backend	Sat Sep  5 14:24:25 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.backend,v 1.8 2019/02/01 10:34:18 mrg Exp $
+#	$NetBSD: Makefile.backend,v 1.9 2020/09/05 14:24:25 mrg Exp $
 
 .ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_BACKEND_
 _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_BACKEND_=1
@@ -15,6 +15,7 @@ CPPFLAGS+=	-I${GCCARCH} -I${BACKENDOBJ} 
 DPADD+=			${BACKENDOBJ}/libbackend.a
 LDADD+=			${BACKENDOBJ}/libbackend.a
 
+.include "../Makefile.common-target"
 .include "../Makefile.common"
 .include "../Makefile.libiberty"
 .include "../Makefile.prog"

Index: src/external/gpl3/gcc/usr.bin/backend/Makefile
diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.60 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.61
--- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.60	Sat Sep  5 09:50:16 2020
+++ src/external/gpl3/gcc/usr.bin/backend/Makefile	Sat Sep  5 14:24:26 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.60 2020/09/05 09:50:16 mrg Exp $
+#	$NetBSD: Makefile,v 1.61 2020/09/05 14:24:26 mrg Exp $
 
 LIBISPRIVATE=	yes
 
@@ -312,6 +312,13 @@ build-vec.c: vec.c vec.h ${G_GGC_H}
 build-vec.lo: ${HH_NORTL}
 CLEANFILES+=	build-vec.c
 
+build-sort.cc: sort.cc sort.h ${G_GGC_H}
+	${_MKTARGET_CREATE}
+	rm -f build-sort.cc
+	cat ${GNUHOSTDIST}/gcc/sort.cc >${.TARGET}
+build-sort.lo: ${HH_NORTL}
+CLEANFILES+=	build-sort.cc
+
 build-genattrtab.o: ${G_GGC_H}
 
 #
@@ -334,15 +341,13 @@ GENPROG_RTL_DEPENDS=	${G_BUILD_RTL:.o=.l
 #
 # First we generate the rules for the generators.
 #
-GENDEPS.cfn-macros=	build-sort.lo
-
 .for f in attr attr-common attrtab automata codes conditions config emit \
 	  extract flags opinit output peep preds recog mddump condmd \
 	  target-def cfn-macros
-gen${f}.lo: ${HH} gen${f}.c ${G_RTL_BASE_H} ${GENDEPS.${f}}
+gen${f}.lo: ${HH} gen${f}.c ${G_RTL_BASE_H} build-sort.lo
 gen${f}: gen${f}.lo ${GENPROG_RTL_DEPENDS} 
 	${_MKTARGET_LINK}
-	${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}}
+	${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}} build-sort.lo
 CLEANFILES+=	gen${f} gen${f}.lo
 .endfor
 
@@ -489,7 +494,7 @@ gcov-io.h: gcov-iov.h
 df-scan.d df-scan.o: target-hooks-def.h
 read-md.d read-md.o read-md.lo: auto-build.h
 hash-table.d hash-table.o hash-table.lo: auto-build.h gtype-desc.h
-gencfn-macros.d gencfn-macros.o gencfn-macros.lo: gtype-desc.h case-cfn-macros.h
+gencfn-macros.d gencfn-macros.o gencfn-macros.lo: gtype-desc.h
 pass_manager.h passes.c: pass-instances.def
 context.d coverage.d lto-cgraph.d passes.d statistics.d toplev.d cgraphunit.d: pass_manager.h
 context.o coverage.o lto-cgraph.o passes.o statistics.o toplev.o cgraphunit.o: pass_manager.h

Index: src/external/gpl3/gcc/usr.bin/cc1/Makefile
diff -u src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.18 src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.19
--- src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.18	Mon Jun 29 08:34:17 2020
+++ src/external/gpl3/gcc/usr.bin/cc1/Makefile	Sat Sep  5 14:24:26 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.18 2020/06/29 08:34:17 lukem Exp $
+#	$NetBSD: Makefile,v 1.19 2020/09/05 14:24:26 mrg Exp $
 
 PROG=		cc1
 SRCS=		

CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 13:55:08 UTC 2020

Modified Files:
src/usr.bin/make: arch.c dir.c hash.c hash.h targ.c

Log Message:
make(1): remove initial size argument from Hash_InitTable

In all but one case this argument was set to auto-detect anyway.  The
one case where it was set was not worth keeping this complicated API.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/usr.bin/make/arch.c
cvs rdiff -u -r1.135 -r1.136 src/usr.bin/make/dir.c
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/make/hash.c
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/make/hash.h
cvs rdiff -u -r1.82 -r1.83 src/usr.bin/make/targ.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 13:55:08 UTC 2020

Modified Files:
src/usr.bin/make: arch.c dir.c hash.c hash.h targ.c

Log Message:
make(1): remove initial size argument from Hash_InitTable

In all but one case this argument was set to auto-detect anyway.  The
one case where it was set was not worth keeping this complicated API.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/usr.bin/make/arch.c
cvs rdiff -u -r1.135 -r1.136 src/usr.bin/make/dir.c
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/make/hash.c
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/make/hash.h
cvs rdiff -u -r1.82 -r1.83 src/usr.bin/make/targ.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/arch.c
diff -u src/usr.bin/make/arch.c:1.107 src/usr.bin/make/arch.c:1.108
--- src/usr.bin/make/arch.c:1.107	Sun Aug 30 11:15:05 2020
+++ src/usr.bin/make/arch.c	Sat Sep  5 13:55:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: arch.c,v 1.107 2020/08/30 11:15:05 rillig Exp $	*/
+/*	$NetBSD: arch.c,v 1.108 2020/09/05 13:55:08 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: arch.c,v 1.107 2020/08/30 11:15:05 rillig Exp $";
+static char rcsid[] = "$NetBSD: arch.c,v 1.108 2020/09/05 13:55:08 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)arch.c	8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: arch.c,v 1.107 2020/08/30 11:15:05 rillig Exp $");
+__RCSID("$NetBSD: arch.c,v 1.108 2020/09/05 13:55:08 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -572,7 +572,7 @@ ArchStatMember(const char *archive, cons
 ar->name = bmake_strdup(archive);
 ar->fnametab = NULL;
 ar->fnamesize = 0;
-Hash_InitTable(>members, -1);
+Hash_InitTable(>members);
 memName[AR_MAX_NAME_LEN] = '\0';
 
 while (fread((char *), sizeof(struct ar_hdr), 1, arch) == 1) {

Index: src/usr.bin/make/dir.c
diff -u src/usr.bin/make/dir.c:1.135 src/usr.bin/make/dir.c:1.136
--- src/usr.bin/make/dir.c:1.135	Wed Sep  2 04:32:13 2020
+++ src/usr.bin/make/dir.c	Sat Sep  5 13:55:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dir.c,v 1.135 2020/09/02 04:32:13 rillig Exp $	*/
+/*	$NetBSD: dir.c,v 1.136 2020/09/05 13:55:08 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: dir.c,v 1.135 2020/09/02 04:32:13 rillig Exp $";
+static char rcsid[] = "$NetBSD: dir.c,v 1.136 2020/09/05 13:55:08 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)dir.c	8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: dir.c,v 1.135 2020/09/02 04:32:13 rillig Exp $");
+__RCSID("$NetBSD: dir.c,v 1.136 2020/09/05 13:55:08 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -358,8 +358,8 @@ Dir_Init(void)
 {
 dirSearchPath = Lst_Init();
 openDirectories = Lst_Init();
-Hash_InitTable(, 0);
-Hash_InitTable(, 0);
+Hash_InitTable();
+Hash_InitTable();
 }
 
 void
@@ -371,7 +371,7 @@ Dir_InitDir(const char *cdname)
 dotLast->refCount = 1;
 dotLast->hits = 0;
 dotLast->name = bmake_strdup(".DOTLAST");
-Hash_InitTable(>files, -1);
+Hash_InitTable(>files);
 }
 
 /*
@@ -1547,7 +1547,7 @@ Dir_AddDir(Lst path, const char *name)
 	p->name = bmake_strdup(name);
 	p->hits = 0;
 	p->refCount = 1;
-	Hash_InitTable(>files, -1);
+	Hash_InitTable(>files);
 
 	while ((dp = readdir(d)) != NULL) {
 #if defined(sun) && defined(d_ino) /* d_ino is a sunos4 #define for d_fileno */

Index: src/usr.bin/make/hash.c
diff -u src/usr.bin/make/hash.c:1.30 src/usr.bin/make/hash.c:1.31
--- src/usr.bin/make/hash.c:1.30	Sat Sep  5 13:36:25 2020
+++ src/usr.bin/make/hash.c	Sat Sep  5 13:55:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: hash.c,v 1.30 2020/09/05 13:36:25 rillig Exp $	*/
+/*	$NetBSD: hash.c,v 1.31 2020/09/05 13:55:08 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: hash.c,v 1.30 2020/09/05 13:36:25 rillig Exp $";
+static char rcsid[] = "$NetBSD: hash.c,v 1.31 2020/09/05 13:55:08 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)hash.c	8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: hash.c,v 1.30 2020/09/05 13:36:25 rillig Exp $");
+__RCSID("$NetBSD: hash.c,v 1.31 2020/09/05 13:55:08 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -120,33 +120,20 @@ static void RebuildTable(Hash_Table *);
  *
  * Input:
  *	t		Structure to to hold the table.
- *	numBuckets	How many buckets to create for starters. This
- *			number is rounded up to a power of two.   If
- *			<= 0, a reasonable default is chosen. The
- *			table will grow in size later as needed.
  */
 void
-Hash_InitTable(Hash_Table *t, int 

CVS commit: src/external/gpl3/gcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 13:41:02 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/x86_64:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libgcc/arch/x86_64: defs.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/x86_64: defs.mk
gcov-iov.h
src/external/gpl3/gcc/lib/libgomp: defs.mk
src/external/gpl3/gcc/lib/libgomp/arch/x86_64: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libiberty/arch/x86_64: config.h
src/external/gpl3/gcc/lib/libobjc/arch/x86_64: config.h defs.mk
src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64: c++config.h
cxxabi_tweaks.h defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/usr.bin/common: defs.mk
src/external/gpl3/gcc/usr.bin/common-target/arch: x86_64.mk
src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64: all-tree.def auto-host.h
bversion.h configargs.h defs.mk gtyp-input.list
i386-builtin-types.inc insn-modes.h plugin-version.h
src/external/gpl3/gcc/usr.bin/include/arch: x86_64.mk
src/external/gpl3/gcc/usr.bin/libcpp/arch/x86_64: config.h

Log Message:
mknative-gcc for gcc 9.3.0 and amd64.

the tree has quite a number of issues to resolve before it builds.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gcc/lib/libbacktrace/arch/x86_64/backtrace-supported.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/lib/libbacktrace/arch/x86_64/config.h
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gcc/lib/libgcc/arch/x86_64/defs.mk
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/x86_64/defs.mk
cvs rdiff -u -r1.15 -r1.16 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/x86_64/gcov-iov.h
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/lib/libgomp/defs.mk
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gcc/lib/libgomp/arch/x86_64/config.h \
src/external/gpl3/gcc/lib/libgomp/arch/x86_64/libgomp_f.h
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/lib/libgomp/arch/x86_64/omp.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gcc/lib/libiberty/arch/x86_64/config.h
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/lib/libobjc/arch/x86_64/config.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gcc/lib/libobjc/arch/x86_64/defs.mk
cvs rdiff -u -r1.38 -r1.39 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/c++config.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/cxxabi_tweaks.h
cvs rdiff -u -r1.16 -r1.17 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/defs.mk
cvs rdiff -u -r1.24 -r1.25 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/gstdint.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/symver-config.h
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/usr.bin/common/defs.mk
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/usr.bin/common-target/arch/x86_64.mk
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/all-tree.def
cvs rdiff -u -r1.21 -r1.22 \
src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/auto-host.h \
src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/defs.mk
cvs rdiff -u -r1.13 -r1.14 \
src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/bversion.h
cvs rdiff -u -r1.50 -r1.51 \
src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/configargs.h
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/gtyp-input.list
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/i386-builtin-types.inc
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/insn-modes.h
cvs rdiff -u -r1.16 -r1.17 \
src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/plugin-version.h
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/usr.bin/include/arch/x86_64.mk
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gcc/usr.bin/libcpp/arch/x86_64/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/mk

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 13:38:43 UTC 2020

Modified Files:
src/share/mk: bsd.sys.mk

Log Message:
disable -Wabi for GCC 9.


To generate a diff of this commit:
cvs rdiff -u -r1.302 -r1.303 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/libexec/httpd

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 13:38:24 UTC 2020

Modified Files:
src/libexec/httpd: bozohttpd.c

Log Message:
avoid passing NULL pointers to printf() like functions and %s.


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/libexec/httpd/bozohttpd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.120 src/libexec/httpd/bozohttpd.c:1.121
--- src/libexec/httpd/bozohttpd.c:1.120	Thu Aug 20 07:57:01 2020
+++ src/libexec/httpd/bozohttpd.c	Sat Sep  5 13:38:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.120 2020/08/20 07:57:01 mrg Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.121 2020/09/05 13:38:24 mrg Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -317,7 +317,7 @@ parse_request(bozohttpd_t *httpd, char *
 
 	debug((httpd, DEBUG_FAT,
 		"url: method: \"%s\" file: \"%s\" query: \"%s\" proto: \"%s\"",
-		*method, *file, *query, *proto));
+		*method, *file, *query ? *query : "", *proto ? *proto : ""));
 }
 
 /*
@@ -771,7 +771,7 @@ bozo_read_request(bozohttpd_t *httpd)
 
 			val = bozostrnsep(, ":", );
 			debug((httpd, DEBUG_EXPLODING, "read_req2: after "
-			"bozostrnsep: str `%s' val `%s'", str, val));
+			"bozostrnsep: str `%s' val `%s'", str, val ? val : ""));
 			if (val == NULL || len == -1) {
 bozo_http_error(httpd, 404, request, "no header");
 goto cleanup;



CVS commit: src/libexec/httpd

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 13:38:24 UTC 2020

Modified Files:
src/libexec/httpd: bozohttpd.c

Log Message:
avoid passing NULL pointers to printf() like functions and %s.


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/libexec/httpd/bozohttpd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/mk

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 13:38:43 UTC 2020

Modified Files:
src/share/mk: bsd.sys.mk

Log Message:
disable -Wabi for GCC 9.


To generate a diff of this commit:
cvs rdiff -u -r1.302 -r1.303 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.302 src/share/mk/bsd.sys.mk:1.303
--- src/share/mk/bsd.sys.mk:1.302	Fri Jul  3 16:12:16 2020
+++ src/share/mk/bsd.sys.mk	Sat Sep  5 13:38:43 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.302 2020/07/03 16:12:16 maxv Exp $
+#	$NetBSD: bsd.sys.mk,v 1.303 2020/09/05 13:38:43 mrg Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -103,7 +103,7 @@ CFLAGS+=	-Wcast-qual -Wwrite-strings
 CFLAGS+=	-Wextra -Wno-unused-parameter
 # Readd -Wno-sign-compare to override -Wextra with clang
 CFLAGS+=	-Wno-sign-compare
-.if "${ACTIVE_CC}" == "gcc" && ${HAVE_GCC} != "8"
+.if "${ACTIVE_CC}" == "gcc" && ${HAVE_GCC} < 8
 #  XXX: Won't warn about anything.  -Wabi warns about differences from
 #  the most up-to-date ABI, which in g++ 8 is used by default.
 CXXFLAGS+=	-Wabi



CVS commit: src

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 13:37:59 UTC 2020

Modified Files:
src/include/ssp: string.h
src/lib/libc/ssp: memmove_chk.c

Log Message:
make the 2nd argument to __memmove_chk() const


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/include/ssp/string.h
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/ssp/memmove_chk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/include/ssp/string.h
diff -u src/include/ssp/string.h:1.13 src/include/ssp/string.h:1.14
--- src/include/ssp/string.h:1.13	Sat Nov 29 13:23:48 2014
+++ src/include/ssp/string.h	Sat Sep  5 13:37:59 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: string.h,v 1.13 2014/11/29 13:23:48 pooka Exp $	*/
+/*	$NetBSD: string.h,v 1.14 2020/09/05 13:37:59 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 
 __BEGIN_DECLS
 void *__memcpy_chk(void *, const void *, size_t, size_t);
-void *__memmove_chk(void *, void *, size_t, size_t);
+void *__memmove_chk(void *, const void *, size_t, size_t);
 void *__memset_chk(void *, int, size_t, size_t);
 char *__stpcpy_chk(char *, const char *, size_t);
 char *__strcat_chk(char *, const char *, size_t);

Index: src/lib/libc/ssp/memmove_chk.c
diff -u src/lib/libc/ssp/memmove_chk.c:1.5 src/lib/libc/ssp/memmove_chk.c:1.6
--- src/lib/libc/ssp/memmove_chk.c:1.5	Wed Sep 17 00:39:28 2014
+++ src/lib/libc/ssp/memmove_chk.c	Sat Sep  5 13:37:59 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: memmove_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $	*/
+/*	$NetBSD: memmove_chk.c,v 1.6 2020/09/05 13:37:59 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: memmove_chk.c,v 1.5 2014/09/17 00:39:28 joerg Exp $");
+__RCSID("$NetBSD: memmove_chk.c,v 1.6 2020/09/05 13:37:59 mrg Exp $");
 
 /*LINTLIBRARY*/
 
@@ -38,10 +38,10 @@ __RCSID("$NetBSD: memmove_chk.c,v 1.5 20
 
 #undef memmove
 
-void *__memmove_chk(void *, void *src, size_t, size_t);
+void *__memmove_chk(void *, const void *src, size_t, size_t);
 
 void *
-__memmove_chk(void *dst, void *src, size_t len,
+__memmove_chk(void *dst, const void *src, size_t len,
 size_t slen)
 {
 	if (len > slen)



CVS commit: src

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 13:37:59 UTC 2020

Modified Files:
src/include/ssp: string.h
src/lib/libc/ssp: memmove_chk.c

Log Message:
make the 2nd argument to __memmove_chk() const


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/include/ssp/string.h
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/ssp/memmove_chk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/lib

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 13:36:49 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib: Makefile.sanitizer

Log Message:
work around various headers not being fully open without some
special #define being present (ie, define them.)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/lib/Makefile.sanitizer

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/lib

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 13:36:49 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib: Makefile.sanitizer

Log Message:
work around various headers not being fully open without some
special #define being present (ie, define them.)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/lib/Makefile.sanitizer

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/lib/Makefile.sanitizer
diff -u src/external/gpl3/gcc/lib/Makefile.sanitizer:1.11 src/external/gpl3/gcc/lib/Makefile.sanitizer:1.12
--- src/external/gpl3/gcc/lib/Makefile.sanitizer:1.11	Sat Sep  5 09:50:15 2020
+++ src/external/gpl3/gcc/lib/Makefile.sanitizer	Sat Sep  5 13:36:49 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.sanitizer,v 1.11 2020/09/05 09:50:15 mrg Exp $
+#	$NetBSD: Makefile.sanitizer,v 1.12 2020/09/05 13:36:49 mrg Exp $
 
 SANITIZER=${GCCDIST}/libsanitizer
 .PATH: ${SANITIZER}/interception ${SANITIZER}/sanitizer_common
@@ -75,11 +75,17 @@ CSHLIBFLAGS+= -DPIC
 SRCS+=	${INTERCEPTION_SRCS} ${SANITIZER_SRCS}
 CPPFLAGS+=-I${SANITIZER}/include -I${SANITIZER}
 CPPFLAGS.sanitizer_netbsd.cc+=-I${GCCDIST}/gcc/ginclude
+# XXX __lwp_getprivate_fast() is hidden normally.
+CPPFLAGS.sanitizer_linux_libcdep.cc+= -D__LIBPTHREAD_SOURCE__
+# XXX wants old lwp info and power ioctl, npf wants nv.h
+CPPFLAGS.sanitizer_platform_limits_netbsd.cc+= -D__LEGACY_PT_LWPINFO -D_KMEMUSER \
+	-I${NETBSDSRCDIR}/sys/external/bsd/libnv/dist
 CPPFLAGS+=-D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
 CPPFLAGS+=-D__STDC_LIMIT_MACROS -DSANITIZER_HAS_EXCEPTIONS=1
 CPPFLAGS+=-DSANITIZER_NEEDS_SEGV=1
 #CPPFLAGS+=-DCAN_SANITIZE_UB=0
 
+
 LIBDPLIBS+=pthread ${.CURDIR}/../../../../../lib/libpthread
 COPTS+=-std=gnu++11 -fsized-deallocation -fvisibility=hidden
 COPTS+=-fno-builtin -fno-exceptions -fno-rtti -funwind-tables



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 13:36:25 UTC 2020

Modified Files:
src/usr.bin/make: hash.c

Log Message:
make(1): make Hash_Table independent from -funsigned-char

This only makes a difference for Hash_Table keys outside the ASCII
character set, and these are barely used in practice, if at all.

The effects of this change can only be seen in debug mode, when printing
the full contents of the variable namespaces.  In this output, the order
of the entries might change.

All other use cases stay the same as before.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/make/hash.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/hash.c
diff -u src/usr.bin/make/hash.c:1.29 src/usr.bin/make/hash.c:1.30
--- src/usr.bin/make/hash.c:1.29	Tue Sep  1 21:11:31 2020
+++ src/usr.bin/make/hash.c	Sat Sep  5 13:36:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: hash.c,v 1.29 2020/09/01 21:11:31 rillig Exp $	*/
+/*	$NetBSD: hash.c,v 1.30 2020/09/05 13:36:25 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: hash.c,v 1.29 2020/09/01 21:11:31 rillig Exp $";
+static char rcsid[] = "$NetBSD: hash.c,v 1.30 2020/09/05 13:36:25 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)hash.c	8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: hash.c,v 1.29 2020/09/01 21:11:31 rillig Exp $");
+__RCSID("$NetBSD: hash.c,v 1.30 2020/09/05 13:36:25 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -111,7 +111,7 @@ static void RebuildTable(Hash_Table *);
 /* The default: this one matches Gosling's emacs */
 #define HASH(h, key, p) do { \
 	for (h = 0, p = key; *p;) \
-		h = (h << 5) - h + *p++; \
+		h = (h << 5) - h + (unsigned char)*p++; \
 	} while (0)
 
 #endif



CVS commit: src/usr.bin/make

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 13:36:25 UTC 2020

Modified Files:
src/usr.bin/make: hash.c

Log Message:
make(1): make Hash_Table independent from -funsigned-char

This only makes a difference for Hash_Table keys outside the ASCII
character set, and these are barely used in practice, if at all.

The effects of this change can only be seen in debug mode, when printing
the full contents of the variable namespaces.  In this output, the order
of the entries might change.

All other use cases stay the same as before.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/make/hash.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 13:35:55 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_linux.cc sanitizer_linux.h sanitizer_linux_libcdep.cc
sanitizer_platform_limits_netbsd.cc sanitizer_syscall_generic.inc

Log Message:
fix various merge botches; we may need to re-port the ThreadLister code.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h
cvs rdiff -u -r1.12 -r1.13 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc
cvs rdiff -u -r1.1.1.2 -r1.2 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc
cvs rdiff -u -r1.8 -r1.9 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.33 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.34
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.33	Sat Sep  5 09:12:32 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc	Sat Sep  5 13:35:55 2020
@@ -41,8 +41,6 @@
 #undef stat
 #endif
 
-#endif // SANITIZER_LINUX
-
 #if SANITIZER_NETBSD
 #include 
 #endif
@@ -980,7 +978,6 @@ ThreadLister::ThreadLister(pid_t pid) : 
   if (internal_iserror(descriptor_)) {
 Report("Can't open /proc/%d/task for reading.\n", pid);
   }
-#endif
 }
 
 ThreadLister::Result ThreadLister::ListThreads(
@@ -1055,10 +1052,8 @@ bool ThreadLister::IsAlive(int tid) {
 }
 
 ThreadLister::~ThreadLister() {
-#ifndef SANITIZER_NETBSD
   if (!internal_iserror(descriptor_))
 internal_close(descriptor_);
-#endif
 }
 #endif
 

Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h:1.9 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h:1.10
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h:1.9	Sat Sep  5 09:12:32 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h	Sat Sep  5 13:35:55 2020
@@ -69,6 +69,8 @@ uptr internal_clone(int (*fn)(void *), v
 #endif
 #elif SANITIZER_FREEBSD
 void internal_sigdelset(__sanitizer_sigset_t *set, int signum);
+#elif SANITIZER_NETBSD
+uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5);
 #endif  // SANITIZER_LINUX
 
 #ifdef SANITIZER_NETBSD

Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.12 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.13
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.12	Sat Sep  5 09:12:32 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc	Sat Sep  5 13:35:55 2020
@@ -72,6 +72,10 @@ struct __sanitizer::linux_dirent {
 #include 
 #endif
 
+#if SANITIZER_NETBSD
+#include 
+#endif
+
 namespace __sanitizer {
 
 SANITIZER_WEAK_ATTRIBUTE int

Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.1.1.2 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.2
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.1.1.2	Sat Sep  5 07:52:57 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc	Sat Sep  5 13:35:55 2020
@@ -35,7 +35,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -48,7 +47,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -73,6 +71,7 @@
 #include 
 #include 
 #include 
+#undef INLINE
 #include 
 #include 
 #include 
@@ -106,7 +105,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -114,7 +112,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -122,6 +119,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -130,8 +128,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -347,8 +343,6 @@ unsigned struct_apm_power_info_sz = size
 unsigned struct_atabusiodetach_args_sz = 

CVS commit: src/external/bsd/libarchive/dist/libarchive

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 13:35:24 UTC 2020

Modified Files:
src/external/bsd/libarchive/dist/libarchive:
archive_read_open_filename.c

Log Message:
avoid always passing NULL to printf()-like functions


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c
diff -u src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c:1.1.1.4 src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c:1.2
--- src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c:1.1.1.4	Thu Apr 20 12:55:36 2017
+++ src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c	Sat Sep  5 13:35:24 2020
@@ -221,7 +221,9 @@ file_open(struct archive *a, void *clien
 	struct read_file_data *mine = (struct read_file_data *)client_data;
 	void *buffer;
 	const char *filename = NULL;
+#if defined(_WIN32) && !defined(__CYGWIN__)
 	const wchar_t *wfilename = NULL;
+#endif
 	int fd = -1;
 	int is_disk_like = 0;
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
@@ -281,10 +283,12 @@ file_open(struct archive *a, void *clien
 #endif
 	}
 	if (fstat(fd, ) != 0) {
+#if defined(_WIN32) && !defined(__CYGWIN__)
 		if (mine->filename_type == FNT_WCS)
 			archive_set_error(a, errno, "Can't stat '%S'",
 			wfilename);
 		else
+#endif
 			archive_set_error(a, errno, "Can't stat '%s'",
 			filename);
 		goto fail;



CVS commit: src/external/bsd/libarchive/dist/libarchive

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 13:35:24 UTC 2020

Modified Files:
src/external/bsd/libarchive/dist/libarchive:
archive_read_open_filename.c

Log Message:
avoid always passing NULL to printf()-like functions


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 13:35:55 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_linux.cc sanitizer_linux.h sanitizer_linux_libcdep.cc
sanitizer_platform_limits_netbsd.cc sanitizer_syscall_generic.inc

Log Message:
fix various merge botches; we may need to re-port the ThreadLister code.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h
cvs rdiff -u -r1.12 -r1.13 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc
cvs rdiff -u -r1.1.1.2 -r1.2 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc
cvs rdiff -u -r1.8 -r1.9 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make/unit-tests

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 13:34:19 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: varname.exp

Log Message:
make(1): add expected test result for hashing variable names


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/varname.exp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/unit-tests/varname.exp
diff -u src/usr.bin/make/unit-tests/varname.exp:1.1 src/usr.bin/make/unit-tests/varname.exp:1.2
--- src/usr.bin/make/unit-tests/varname.exp:1.1	Sun Aug 16 12:07:52 2020
+++ src/usr.bin/make/unit-tests/varname.exp	Sat Sep  5 13:34:19 2020
@@ -1 +1,19 @@
+MAGIC1B1B1B  = 1
+MAGIC1B1B0a  = 2
+MAGIC1B0a1B  = 3
+MAGIC1B0a0a  = 4
+MAGIC0a1B1B  = 5
+MAGIC0a1B0a  = 6
+MAGIC0a0a1B  = 7
+MAGIC0a0a0a  = 8
+ORDER_01 = yes
+MAGIC0a0a0a  = 1
+MAGIC0a0a1B  = 2
+MAGIC0a1B0a  = 3
+MAGIC0a1B1B  = 4
+MAGIC1B0a0a  = 5
+MAGIC1B0a1B  = 6
+MAGIC1B1B0a  = 7
+MAGIC1B1B1B  = 8
+ORDER_10 = yes
 exit status 0



CVS commit: src/usr.bin/make/unit-tests

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 13:34:19 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: varname.exp

Log Message:
make(1): add expected test result for hashing variable names


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/varname.exp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make/unit-tests

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 12:59:07 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: Makefile varname.mk

Log Message:
make(1): add test for intentional hash collision for variable names

Hash collisions may slow down make in certain special situations.  There
is no point though in maliciously triggering such a situation since
anyone who can inject values into makefiles can easily run shell
commands using the :!cmd! modifier or similar mechanisms.  Crafting
variable names just to slow down make is thus not an attack vector.


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/varname.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.135 src/usr.bin/make/unit-tests/Makefile:1.136
--- src/usr.bin/make/unit-tests/Makefile:1.135	Sat Sep  5 06:36:40 2020
+++ src/usr.bin/make/unit-tests/Makefile	Sat Sep  5 12:59:07 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.135 2020/09/05 06:36:40 rillig Exp $
+# $NetBSD: Makefile,v 1.136 2020/09/05 12:59:07 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -393,6 +393,7 @@ POSTPROC.deptgt-suffixes= \
 			${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p'
 POSTPROC.vardebug=	${TOOL_SED} -n -e '/:RELEVANT = yes/,/:RELEVANT = no/p'
 POSTPROC.varmod-match-escape= ${TOOL_SED} -n -e '/^Pattern/p'
+POSTPROC.varname=	${TOOL_SED} -n -e '/^MAGIC/p' -e '/^ORDER_/p'
 POSTPROC.varname-dot-shell= \
 			awk '/\.SHELL/ || /^ParseReadLine/'
 POSTPROC.varname-empty=	${TOOL_SED} -n -e '/^Var_Set/p' -e '/^out:/p'

Index: src/usr.bin/make/unit-tests/varname.mk
diff -u src/usr.bin/make/unit-tests/varname.mk:1.2 src/usr.bin/make/unit-tests/varname.mk:1.3
--- src/usr.bin/make/unit-tests/varname.mk:1.2	Sun Aug 16 14:25:16 2020
+++ src/usr.bin/make/unit-tests/varname.mk	Sat Sep  5 12:59:07 2020
@@ -1,8 +1,43 @@
-# $NetBSD: varname.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: varname.mk,v 1.3 2020/09/05 12:59:07 rillig Exp $
 #
 # Tests for special variables, such as .MAKE or .PARSEDIR.
 
-# TODO: Implementation
+# These following MAGIC variables have the same hash code, at least with
+# the default hashing algorithm, which is the same as in Java.  The order
+# in which these variables are defined determines the order in which they
+# appear in the Hash_Table.  New entries are prepended to the bucket lists,
+# therefore this test numbers the values in descending order.
+
+.if defined(ORDER_01)
+
+MAGIC0a0a0a=	8
+MAGIC0a0a1B=	7
+MAGIC0a1B0a=	6
+MAGIC0a1B1B=	5
+MAGIC1B0a0a=	4
+MAGIC1B0a1B=	3
+MAGIC1B1B0a=	2
+MAGIC1B1B1B=	1
+
+all: # nothing
+
+.elif defined(ORDER_10)
+
+MAGIC1B1B1B=	8
+MAGIC1B1B0a=	7
+MAGIC1B0a1B=	6
+MAGIC1B0a0a=	5
+MAGIC0a1B1B=	4
+MAGIC0a1B0a=	3
+MAGIC0a0a1B=	2
+MAGIC0a0a0a=	1
+
+all: # nothing
+
+.else
 
 all:
-	@:;
+	@${.MAKE} -f ${MAKEFILE} -dg1 ORDER_01=yes
+	@${.MAKE} -f ${MAKEFILE} -dg1 ORDER_10=yes
+
+.endif



CVS commit: src/usr.bin/make/unit-tests

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 12:59:07 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: Makefile varname.mk

Log Message:
make(1): add test for intentional hash collision for variable names

Hash collisions may slow down make in certain special situations.  There
is no point though in maliciously triggering such a situation since
anyone who can inject values into makefiles can easily run shell
commands using the :!cmd! modifier or similar mechanisms.  Crafting
variable names just to slow down make is thus not an attack vector.


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/varname.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 12:19:25 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/gcc/config: netbsd.h
src/external/gpl3/gcc/lib/libstdc++-v3: Makefile

Log Message:
find header files in /usr/include/gcc-9 and the gcc cpu dir.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/external/gpl3/gcc/dist/gcc/config/netbsd.h
cvs rdiff -u -r1.49 -r1.50 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.34 src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.35
--- src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.34	Sat Sep  5 09:12:24 2020
+++ src/external/gpl3/gcc/dist/gcc/config/netbsd.h	Sat Sep  5 12:19:25 2020
@@ -63,7 +63,7 @@ along with GCC; see the file COPYING3.  
  * XXX figure out a better way to do this
  */
 #undef GCC_INCLUDE_DIR
-#define GCC_INCLUDE_DIR "/usr/include/gcc-8"
+#define GCC_INCLUDE_DIR "/usr/include/gcc-9"
 
 /* Under NetBSD, the normal location of the various *crt*.o files is the
/usr/lib directory.  */

Index: src/external/gpl3/gcc/lib/libstdc++-v3/Makefile
diff -u src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.49 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.50
--- src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.49	Sat Sep  5 09:50:15 2020
+++ src/external/gpl3/gcc/lib/libstdc++-v3/Makefile	Sat Sep  5 12:19:25 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.49 2020/09/05 09:50:15 mrg Exp $
+#	$NetBSD: Makefile,v 1.50 2020/09/05 12:19:25 mrg Exp $
 
 REQUIRETOOLS=	yes
 NOLINT=		# defined
@@ -62,8 +62,11 @@ SUBDIR=		include
 
 SRCS=		${LIBSUPCXXSRCS} ${LIBSTDCXXSRCS}
 
+GCC_MACHINE_SUBDIR=${MACHINE_CPU:C/powerpc.*/rs6000/:C/x86_64/i386/}
+
 CXXFLAGS+=	-fno-implicit-templates
 CPPFLAGS+=	-I${DIST}/libstdc++-v3/include
+CPPFLAGS+=	-I${DIST}/gcc/config/${GCC_MACHINE_SUBDIR}
 CPPFLAGS+=	-I${.CURDIR}/arch/${LIBSTDCXX_MACHINE_ARCH}
 CPPFLAGS+=	-D_GLIBCXX_SHARED -DGTHREAD_USE_WEAK -DSUPPORTS_WEAK
 .if ${G_CLOCALE_CC:M*dragonfly*} != ""



CVS commit: src/external/gpl3/gcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 12:19:25 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/gcc/config: netbsd.h
src/external/gpl3/gcc/lib/libstdc++-v3: Makefile

Log Message:
find header files in /usr/include/gcc-9 and the gcc cpu dir.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/external/gpl3/gcc/dist/gcc/config/netbsd.h
cvs rdiff -u -r1.49 -r1.50 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/lib/libgcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 11:40:56 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib/libgcc: Makefile.inc

Log Message:
endfor not endif


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/external/gpl3/gcc/lib/libgcc/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/lib/libgcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 11:40:56 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib/libgcc: Makefile.inc

Log Message:
endfor not endif


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/external/gpl3/gcc/lib/libgcc/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/lib/libgcc/Makefile.inc
diff -u src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.45 src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.46
--- src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.45	Sat Sep  5 09:50:15 2020
+++ src/external/gpl3/gcc/lib/libgcc/Makefile.inc	Sat Sep  5 11:40:56 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.45 2020/09/05 09:50:15 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.46 2020/09/05 11:40:56 mrg Exp $
 
 LIBGCC_MACHINE_ARCH?=${MACHINE_ARCH:S/earmv5/earm/}
 GCC_MACHINE_SUBDIR=${MACHINE_CPU:C/powerpc.*/rs6000/:C/x86_64/i386/}
@@ -106,7 +106,7 @@ LIB2FUNCS=	${LIB2FUNCS_SHORT:=.c}
 _LIB2FUNCS=	${G_LIB2FUNCS_ST}
 .for _f in ${LIB2FUNCS_EXCLUDE}
 _LIB2FUNCS=	${_LIB2FUNCS:N${_f}}
-.endif
+.endfor
 LIB2FUNCS_ST=	${_LIB2FUNCS:=.c}
 LIB2DIVMOD=	${LIB2_DIVMOD_FUNCS:=.c}
 .if ${HAVE_LIBGCC_EH} == "no"



CVS commit: src/distrib/sets

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 11:13:07 UTC 2020

Added Files:
src/distrib/sets: fmt-list

Log Message:
add distrib/sets/fmt-list to format the file lists consistently

This program is much more complicated than sort-list in the same
directory.  It takes care of aligning the fields of the lines so that
lines from the same directory are aligned to each other.  This reduces
horizontal jumps for the category and flags fields.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/distrib/sets/fmt-list

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/distrib/sets/fmt-list
diff -u /dev/null src/distrib/sets/fmt-list:1.1
--- /dev/null	Sat Sep  5 11:13:07 2020
+++ src/distrib/sets/fmt-list	Sat Sep  5 11:13:07 2020
@@ -0,0 +1,424 @@
+#! /usr/bin/lua
+-- $NetBSD: fmt-list,v 1.1 2020/09/05 11:13:07 rillig Exp $
+
+--[[
+
+Align the lines of a file list so that all lines from the same directory
+have the other fields at the same indentation.
+
+Sort the lines and remove duplicate lines.
+
+usage: ./fmt-list */*/{mi,ad.*,md.*}
+
+]]
+
+local function test(func)
+  func()
+end
+
+local function assert_equals(got, expected)
+  if got ~= expected then
+assert(false, string.format("got %q, expected %q", got, expected))
+  end
+end
+
+
+-- Calculate the width of the given string on the screen, assuming that
+-- the tab width is 8 and that the string starts at a tabstop.
+local function tabwidth(str)
+  local width = 0
+  for i = 1, #str do
+if string.sub(str, i, i) == "\t" then
+  width = width // 8 * 8 + 8
+else
+  width = width + 1
+end
+  end
+  return width
+end
+
+test(function()
+  assert_equals(tabwidth(""), 0)
+  assert_equals(tabwidth("1234"), 4)
+  assert_equals(tabwidth("\t"), 8)
+  assert_equals(tabwidth("1234567\t"), 8)
+  assert_equals(tabwidth("\t1234\t"), 16)
+  assert_equals(tabwidth("\t1234\t1"), 17)
+end)
+
+
+-- Calculate the tab characters that are necessary to set the width
+-- of the string to the desired width.
+local function tabs(str, width)
+  local strwidth = tabwidth(str)
+  local tabs = string.rep("\t", (width - strwidth + 7) // 8)
+  if tabs == "" then
+error(string.format("%q\t%d\t%d", str, strwidth, width))
+  end
+  assert(tabs ~= "")
+  return tabs
+end
+
+test(function()
+  assert_equals(tabs("", 8), "\t")
+  assert_equals(tabs("1234567", 8), "\t")
+  assert_equals(tabs("", 64), "\t\t\t\t\t\t\t\t")
+end)
+
+
+-- Group the items by a key and then execute the action on each of the
+-- groups.
+local function foreach_group(items, get_key, action)
+  local key
+  local group = {}
+  for _, item in ipairs(items) do
+local item_key = assert(get_key(item))
+if item_key ~= key then
+  if #group > 0 then action(group, key) end
+  key = item_key
+  group = {}
+end
+table.insert(group, item)
+  end
+  if #group > 0 then action(group, key) end
+end
+
+test(function()
+  local items = {
+{"prime", 2},
+{"prime", 3},
+{"not prime", 4},
+{"prime", 5},
+{"prime", 7}
+  }
+  local result = ""
+  foreach_group(
+items,
+function(item) return item[1] end,
+function(group, key)
+  result = result .. string.format("%d %s\n", #group, key)
+end)
+  assert_equals(result, "2 prime\n1 not prime\n2 prime\n")
+end)
+
+
+-- Parse a line from a file list and split it into its meaningful parts.
+local function parse_entry(line)
+
+  local category_align, prefix, fullname, flags_align, category, flags =
+line:match("^((%-?)(%.%S*)%s+)((%S+)%s+)(%S+)$")
+  if fullname == nil then
+category_align, prefix, fullname, category =
+  line:match("^((%-?)(%.%S*)%s+)(%S+)$")
+  end
+  if fullname == nil then
+prefix, fullname = line:match("^(%-)(%.%S*)$")
+  end
+  if fullname == nil then
+return
+  end
+
+  local dirname, basename = fullname:match("^(.+)/([^/]+)$")
+  if dirname == nil then
+dirname, basename = "", fullname
+  end
+
+  local category_col, flags_col
+  if category_align ~= nil then
+category_col = tabwidth(category_align)
+  end
+  if flags_align ~= nil then
+flags_col = tabwidth(flags_align)
+  end
+
+  return {
+prefix = prefix,
+fullname = fullname,
+dirname = dirname,
+basename = basename,
+category_col = category_col,
+category = category,
+flags_col = flags_col,
+flags = flags
+  }
+end
+
+test(function()
+  local entry = parse_entry("./dirname/filename\t\t\tcategory\tflags")
+  assert_equals(entry.prefix, "")
+  assert_equals(entry.fullname, "./dirname/filename")
+  assert_equals(entry.dirname, "./dirname")
+  assert_equals(entry.basename, "filename")
+  assert_equals(entry.category_col, 40)
+  assert_equals(entry.category, "category")
+  assert_equals(entry.flags_col, 16)
+  assert_equals(entry.flags, "flags")
+end)
+
+
+-- Return the smaller of the given values, ignoring nil.
+local function min(curr, 

CVS commit: src/distrib/sets

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 11:13:07 UTC 2020

Added Files:
src/distrib/sets: fmt-list

Log Message:
add distrib/sets/fmt-list to format the file lists consistently

This program is much more complicated than sort-list in the same
directory.  It takes care of aligning the fields of the lines so that
lines from the same directory are aligned to each other.  This reduces
horizontal jumps for the category and flags fields.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/distrib/sets/fmt-list

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists/comp

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 11:00:18 UTC 2020

Modified Files:
src/distrib/sets/lists/comp: ad.sh3

Log Message:
fix alignment in ad.sh3


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/distrib/sets/lists/comp/ad.sh3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists/comp

2020-09-05 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep  5 11:00:18 UTC 2020

Modified Files:
src/distrib/sets/lists/comp: ad.sh3

Log Message:
fix alignment in ad.sh3


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/distrib/sets/lists/comp/ad.sh3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/comp/ad.sh3
diff -u src/distrib/sets/lists/comp/ad.sh3:1.43 src/distrib/sets/lists/comp/ad.sh3:1.44
--- src/distrib/sets/lists/comp/ad.sh3:1.43	Thu Oct  3 00:59:50 2019
+++ src/distrib/sets/lists/comp/ad.sh3	Sat Sep  5 11:00:18 2020
@@ -1,4 +1,4 @@
-# $NetBSD: ad.sh3,v 1.43 2019/10/03 00:59:50 mrg Exp $
+# $NetBSD: ad.sh3,v 1.44 2020/09/05 11:00:18 rillig Exp $
 ./usr/include/gcc-4.5/tgmath.h			comp-obsolete		obsolete
 ./usr/include/gcc-4.8/tgmath.h			comp-obsolete		obsolete
 ./usr/include/gcc-5/tgmath.h			comp-obsolete		obsolete
@@ -56,7 +56,7 @@
 ./usr/include/sh3/stdarg.h			comp-obsolete		obsolete
 ./usr/include/sh3/sysarch.h			comp-c-include
 ./usr/include/sh3/types.h			comp-c-include
-./usr/include/sh3/va-sh.h			comp-obsolete	obsolete
+./usr/include/sh3/va-sh.h			comp-obsolete		obsolete
 ./usr/include/sh3/varargs.h			comp-obsolete		obsolete
 ./usr/include/sh3/vmparam.h			comp-c-include
 ./usr/include/sh3/wchar_limits.h		comp-c-include



CVS commit: src/tools/gcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 10:58:08 UTC 2020

Modified Files:
src/tools/gcc: Makefile mknative-gcc

Log Message:
disable fetching stuff from libsanitizer for now.  it needs libstdc++
to build in mknative using gcc makefiles, and our locale changes break
the "normal" build of this.

make sure MKNATIVE_TARGET is always set.  since mknative-gcc doesn't
care about the version any more (we keep two versions for gcc/gcc.old)
simply set it to "gcc".


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/tools/gcc/Makefile
cvs rdiff -u -r1.107 -r1.108 src/tools/gcc/mknative-gcc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



  1   2   >