CVS commit: src/external/gpl3/gcc

2021-08-16 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Aug 16 18:43:09 UTC 2021

Removed Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/arm: backtrace-supported.h
config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/armeb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libgcc/arch/arm: auto-target.h defs.mk
gthr-defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/armeb: auto-target.h defs.mk
gthr-defs.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/arm: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/armeb: defs.mk gcov-iov.h
src/external/gpl3/gcc/lib/libgomp/arch/arm: config.h libgomp.spec
libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libgomp/arch/armeb: config.h libgomp.spec
libgomp_f.h omp.h
src/external/gpl3/gcc/lib/libiberty/arch/arm: config.h
src/external/gpl3/gcc/lib/libiberty/arch/armeb: config.h
src/external/gpl3/gcc/lib/libobjc/arch/arm: config.h defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/armeb: config.h defs.mk
src/external/gpl3/gcc/lib/libstdc++-v3/arch/arm: c++config.h
cxxabi_tweaks.h defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/armeb: c++config.h
cxxabi_tweaks.h defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/aarch64:
Makefile
src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/arm: Makefile
src/external/gpl3/gcc/usr.bin/gcc/arch/arm: all-tree.def
arm-cpu-cdata.h arm-cpu-data.h arm-cpu.h arm-isa.h auto-host.h
bconfig.h bversion.h config.h configargs.h defs.mk gthr-default.h
gtyp-input.list insn-modes.h multilib.h plugin-version.h tm.h
src/external/gpl3/gcc/usr.bin/gcc/arch/armeb: all-tree.def
arm-cpu-cdata.h arm-cpu-data.h arm-cpu.h arm-isa.h auto-host.h
bconfig.h bversion.h config.h configargs.h defs.mk gthr-default.h
gtyp-input.list insn-modes.h multilib.h plugin-version.h tm.h
src/external/gpl3/gcc/usr.bin/libcpp/arch/arm: config.h
src/external/gpl3/gcc/usr.bin/libcpp/arch/armeb: config.h
src/external/gpl3/gcc/usr.bin/libdecnumber/arch/arm: config.h
src/external/gpl3/gcc/usr.bin/libdecnumber/arch/armeb: config.h

Log Message:
remove unused oabi mknative output.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r0 \
src/external/gpl3/gcc/lib/libbacktrace/arch/arm/backtrace-supported.h
cvs rdiff -u -r1.6 -r0 \
src/external/gpl3/gcc/lib/libbacktrace/arch/arm/config.h
cvs rdiff -u -r1.7 -r0 \
src/external/gpl3/gcc/lib/libbacktrace/arch/armeb/backtrace-supported.h
cvs rdiff -u -r1.5 -r0 \
src/external/gpl3/gcc/lib/libbacktrace/arch/armeb/config.h
cvs rdiff -u -r1.6 -r0 \
src/external/gpl3/gcc/lib/libgcc/arch/arm/auto-target.h \
src/external/gpl3/gcc/lib/libgcc/arch/arm/defs.mk
cvs rdiff -u -r1.1 -r0 src/external/gpl3/gcc/lib/libgcc/arch/arm/gthr-defs.mk
cvs rdiff -u -r1.6 -r0 \
src/external/gpl3/gcc/lib/libgcc/arch/armeb/auto-target.h
cvs rdiff -u -r1.5 -r0 src/external/gpl3/gcc/lib/libgcc/arch/armeb/defs.mk
cvs rdiff -u -r1.1 -r0 \
src/external/gpl3/gcc/lib/libgcc/arch/armeb/gthr-defs.mk
cvs rdiff -u -r1.5 -r0 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/arm/defs.mk
cvs rdiff -u -r1.16 -r0 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/arm/gcov-iov.h
cvs rdiff -u -r1.4 -r0 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/armeb/defs.mk
cvs rdiff -u -r1.15 -r0 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/armeb/gcov-iov.h
cvs rdiff -u -r1.9 -r0 src/external/gpl3/gcc/lib/libgomp/arch/arm/config.h
cvs rdiff -u -r1.3 -r0 \
src/external/gpl3/gcc/lib/libgomp/arch/arm/libgomp.spec
cvs rdiff -u -r1.7 -r0 src/external/gpl3/gcc/lib/libgomp/arch/arm/libgomp_f.h
cvs rdiff -u -r1.8 -r0 src/external/gpl3/gcc/lib/libgomp/arch/arm/omp.h
cvs rdiff -u -r1.8 -r0 src/external/gpl3/gcc/lib/libgomp/arch/armeb/config.h
cvs rdiff -u -r1.3 -r0 \
src/external/gpl3/gcc/lib/libgomp/arch/armeb/libgomp.spec
cvs rdiff -u -r1.6 -r0 \
src/external/gpl3/gcc/lib/libgomp/arch/armeb/libgomp_f.h
cvs rdiff -u -r1.7 -r0 src/external/gpl3/gcc/lib/libgomp/arch/armeb/omp.h
cvs rdiff -u -r1.8 -r0 src/external/gpl3/gcc/lib/libiberty/arch/arm/config.h
cvs rdiff -u -r1.9 -r0 \
src/external/gpl3/gcc/lib/libiberty/arch/armeb/config.h
cvs rdiff -u -r1.4 -r0 src/external/gpl3/gcc/lib/libobjc/arch/arm/config.h
cvs rdiff -u -r1.6 -r0 src/external/gpl3/gcc/lib/libobjc/arch/arm/defs.mk
cvs rdiff -u -r1.3 -r0 src/external/gpl3/gcc/lib/libobjc/arch/armeb/config.h
cvs rdiff -u -r1.5 -r0 src/external/gpl3/gcc/lib/libobjc/arch/armeb/defs.mk
cvs rdiff -u -r1.36 -r0 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/arm/c++config.h
cvs rdiff -u -r1.7 -r0 \

CVS commit: src/external/gpl3/gcc

2021-08-16 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Aug 16 17:42:06 UTC 2021

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

Log Message:
note sh3 switched.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/external/gpl3/gcc/README.gcc10

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.23 src/external/gpl3/gcc/README.gcc10:1.24
--- src/external/gpl3/gcc/README.gcc10:1.23	Sat Jun 19 06:19:35 2021
+++ src/external/gpl3/gcc/README.gcc10	Mon Aug 16 17:42:05 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.23 2021/06/19 06:19:35 mrg Exp $
+$NetBSD: README.gcc10,v 1.24 2021/08/16 17:42:05 mrg Exp $
 
 
 new stuff:
@@ -58,8 +58,8 @@ mips64eb	y	y	y	y		y		y	y	y
 mips64el	y	b	y	y		y		y	?	y
 powerpc		y	b	y	y		y		y	y	y
 powerpc64	y	b	y	y		y		N/A	N/A	y
-sh3eb		y	b	y	y		y		?	?	?
-sh3el		y	y	y	y		y		y	y[7]	n
+sh3eb		y	b	y	y		y		?[2]	?	y
+sh3el		y	y	y	y		y		y	y[7]	y
 sparc		y	y	y	y		y		y	y	y
 sparc64		y	y	y	y		y		y	y	y
 vax		y	y	y	y		y		y	n[6]	y
@@ -72,6 +72,7 @@ coldfire	?	N/A	?	?		?		N/A	N/A
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 
 [1] - kernel may be too large, does not boot.  GCC 9 is the same, though.
+[2] - failed to find any sh3-eb systems to test.
 [6] - vax vs c++ exceptions issue, same as it ever was
 [7] - fails just as poorly in gxemul/landisk as GCC 9
 [8] - i386 seems to have a signal delivery issue.  pthread tests hang and then



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

2021-07-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jul 17 16:31:51 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/ginclude: stddef.h

Log Message:
provide an equivalent alignment for __float128 for clang and i386 that
does not have it. Idea from mrg@


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/dist/gcc/ginclude/stddef.h

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/ginclude/stddef.h
diff -u src/external/gpl3/gcc/dist/gcc/ginclude/stddef.h:1.10 src/external/gpl3/gcc/dist/gcc/ginclude/stddef.h:1.11
--- src/external/gpl3/gcc/dist/gcc/ginclude/stddef.h:1.10	Wed Jul 14 09:24:58 2021
+++ src/external/gpl3/gcc/dist/gcc/ginclude/stddef.h	Sat Jul 17 12:31:51 2021
@@ -420,9 +420,14 @@ typedef struct {
  use __float128 here; that is only available on some
  architectures, but only on i386 is extra alignment needed for
  __float128.  */
-#if defined(__i386__) && !defined(__clang__)
+#if defined(__i386__)
+#ifdef __clang__
+  // 16 is the gcc alignment for __float128
+  long long __max_align_128 __attribute__((__aligned__(16)));
+#else
   __float128 __max_align_f128 __attribute__((__aligned__(__alignof(__float128;
 #endif
+#endif
 } max_align_t;
 #endif
 #endif /* C11 or C++11.  */



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

2021-07-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 14 13:24:59 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/ginclude: stddef.h

Log Message:
clang does not support __float128 in our configuration and i386


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc/dist/gcc/ginclude/stddef.h

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/ginclude/stddef.h
diff -u src/external/gpl3/gcc/dist/gcc/ginclude/stddef.h:1.9 src/external/gpl3/gcc/dist/gcc/ginclude/stddef.h:1.10
--- src/external/gpl3/gcc/dist/gcc/ginclude/stddef.h:1.9	Sat Apr 10 20:02:17 2021
+++ src/external/gpl3/gcc/dist/gcc/ginclude/stddef.h	Wed Jul 14 09:24:58 2021
@@ -420,7 +420,7 @@ typedef struct {
  use __float128 here; that is only available on some
  architectures, but only on i386 is extra alignment needed for
  __float128.  */
-#ifdef __i386__
+#if defined(__i386__) && !defined(__clang__)
   __float128 __max_align_f128 __attribute__((__aligned__(__alignof(__float128;
 #endif
 } max_align_t;



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

2021-07-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jul 13 06:56:24 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/aarch64: aarch64-netbsd.h

Log Message:
Fix a comment


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h

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/aarch64/aarch64-netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h:1.5 src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h:1.6
--- src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h:1.5	Sat Apr 24 06:44:24 2021
+++ src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h	Tue Jul 13 06:56:24 2021
@@ -20,7 +20,7 @@
 #ifndef GCC_AARCH64_NETBSD_H
 #define GCC_AARCH64_NETBSD_H
 
-/* NetBSD malloc(3) does 64, not 128 bytes. */
+/* NetBSD malloc(3) does 64, not 128 bits. */
 #undef MALLOC_ABI_ALIGNMENT
 #define MALLOC_ABI_ALIGNMENT  64
 



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

2021-07-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jul 13 06:56:09 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/pa: pa-netbsd.h

Log Message:
Fix a comment


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h

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/pa/pa-netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h:1.6 src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h:1.7
--- src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h:1.6	Sun Nov  3 01:03:30 2019
+++ src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h	Tue Jul 13 06:56:09 2021
@@ -131,7 +131,7 @@ along with GCC; see the file COPYING3.  
 #undef PTRDIFF_TYPE
 #define PTRDIFF_TYPE "long int"
 
-/* NetBSD always uses 128 byte alignment.  */
+/* NetBSD always uses 128 bits / 16 byte alignment.  */
 #undef MALLOC_ABI_ALIGNMENT
 #define MALLOC_ABI_ALIGNMENT 128
 



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

2021-07-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jul 11 22:41:39 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/i386: i386.c i386.h netbsd-elf.h
netbsd64.h

Log Message:
define a X86_32_ASAN_BIT_OFFSET macro that defaults differently on
netbsd/i386 than other x86-32 targets.

fixes PR#56280.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/external/gpl3/gcc/dist/gcc/config/i386/i386.c
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/dist/gcc/config/i386/i386.h \
src/external/gpl3/gcc/dist/gcc/config/i386/netbsd-elf.h \
src/external/gpl3/gcc/dist/gcc/config/i386/netbsd64.h

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/i386/i386.c
diff -u src/external/gpl3/gcc/dist/gcc/config/i386/i386.c:1.24 src/external/gpl3/gcc/dist/gcc/config/i386/i386.c:1.25
--- src/external/gpl3/gcc/dist/gcc/config/i386/i386.c:1.24	Sun Apr 11 00:02:13 2021
+++ src/external/gpl3/gcc/dist/gcc/config/i386/i386.c	Sun Jul 11 22:41:38 2021
@@ -1399,7 +1399,7 @@ ix86_asan_shadow_offset (void)
 {
   return TARGET_LP64 ? (TARGET_MACHO ? (HOST_WIDE_INT_1 << 44)
  : HOST_WIDE_INT_C (0x7fff8000))
-		 : (HOST_WIDE_INT_1 << 29);
+		 : (HOST_WIDE_INT_1 << X86_32_ASAN_BIT_OFFSET);
 }
 
 /* Argument support functions.  */

Index: src/external/gpl3/gcc/dist/gcc/config/i386/i386.h
diff -u src/external/gpl3/gcc/dist/gcc/config/i386/i386.h:1.14 src/external/gpl3/gcc/dist/gcc/config/i386/i386.h:1.15
--- src/external/gpl3/gcc/dist/gcc/config/i386/i386.h:1.14	Sun Apr 11 00:02:14 2021
+++ src/external/gpl3/gcc/dist/gcc/config/i386/i386.h	Sun Jul 11 22:41:39 2021
@@ -2975,6 +2975,9 @@ extern enum attr_cpu ix86_schedule;
 #define NUM_X86_64_MS_CLOBBERED_REGS 12
 #endif
 
+/* Standard location for 32-bit ASAN shadow map.  */
+#define X86_32_ASAN_BIT_OFFSET 29
+
 /*
 Local variables:
 version-control: t
Index: src/external/gpl3/gcc/dist/gcc/config/i386/netbsd-elf.h
diff -u src/external/gpl3/gcc/dist/gcc/config/i386/netbsd-elf.h:1.14 src/external/gpl3/gcc/dist/gcc/config/i386/netbsd-elf.h:1.15
--- src/external/gpl3/gcc/dist/gcc/config/i386/netbsd-elf.h:1.14	Sun Apr 11 00:02:14 2021
+++ src/external/gpl3/gcc/dist/gcc/config/i386/netbsd-elf.h	Sun Jul 11 22:41:39 2021
@@ -129,3 +129,7 @@ along with GCC; see the file COPYING3.  
 /* Preserve i386 psABI  */
 #undef PREFERRED_STACK_BOUNDARY_DEFAULT
 #define PREFERRED_STACK_BOUNDARY_DEFAULT MIN_STACK_BOUNDARY
+
+/* NetBSD/x86 on 32-bit places the ASAN shadow map at 0x4000.  */
+#undef X86_32_ASAN_BIT_OFFSET
+#define X86_32_ASAN_BIT_OFFSET 30
Index: src/external/gpl3/gcc/dist/gcc/config/i386/netbsd64.h
diff -u src/external/gpl3/gcc/dist/gcc/config/i386/netbsd64.h:1.14 src/external/gpl3/gcc/dist/gcc/config/i386/netbsd64.h:1.15
--- src/external/gpl3/gcc/dist/gcc/config/i386/netbsd64.h:1.14	Sun Apr 11 00:02:14 2021
+++ src/external/gpl3/gcc/dist/gcc/config/i386/netbsd64.h	Sun Jul 11 22:41:39 2021
@@ -73,3 +73,7 @@ along with GCC; see the file COPYING3.  
   ((TARGET_64BIT || TARGET_SSE) ? 128 : 32)
 
 #define HAVE_ENABLE_EXECUTE_STACK
+
+/* NetBSD/x86 on 32-bit places the ASAN shadow map at 0x4000.  */
+#undef X86_32_ASAN_BIT_OFFSET
+#define X86_32_ASAN_BIT_OFFSET 30



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

2021-07-10 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Jul 10 22:39:56 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/asan: asan_linux.cc

Log Message:
remove an old #if 0'd section.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.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/asan/asan_linux.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc:1.15 src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc:1.16
--- src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc:1.15	Sun Apr 11 23:54:25 2021
+++ src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc	Sat Jul 10 22:39:56 2021
@@ -234,139 +234,6 @@ void AsanCheckIncompatibleRT() {
 }
 #endif // SANITIZER_ANDROID
 
-#if 0 // was in old netbsd / gcc 5 sanitizer stuff
-void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {
-#ifdef __NetBSD__
-# define __UC_MACHINE_FP(ucontext, r) \
-(ucontext)->uc_mcontext.__gregs[(r)]
-/*
- * Unfortunately we don't have a portable frame pointer (yet)
- */
-# if defined(__alpha__)
-#  define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_S6)
-# elif defined(__arm__)
-#  define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_FP)
-# elif defined(__x86_64__)
-#  define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_RBP)
-# elif defined(__i386__)
-#  define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_EBP)
-# elif defined(__m68k__)
-#  define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_A6)
-# elif defined(__mips__)
-#  define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_S8)
-# elif defined(__powerpc__) || defined(__powerpc64__)
-#  define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_R1)
-# elif defined(__riscv__)
-#  define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_S0)
-# elif defined(__sparc__)
-#  define _UC_MACHINE_FP(ucontext) sp[15]
-# elif defined(__sh3__)
-#  define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_R14)
-# elif defined(__vax__)
-#  define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_FP)
-# else
-#  define _UC_MACHINE_FP(ucontext) 0
-# endif
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = _UC_MACHINE_PC(ucontext);
-  *sp = _UC_MACHINE_SP(ucontext);
-  *bp = _UC_MACHINE_FP(ucontext);
-#elif ASAN_ANDROID
-  *pc = *sp = *bp = 0;
-#elif defined(__arm__)
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.arm_pc;
-  *bp = ucontext->uc_mcontext.arm_fp;
-  *sp = ucontext->uc_mcontext.arm_sp;
-#elif defined(__aarch64__)
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.pc;
-  *bp = ucontext->uc_mcontext.regs[29];
-  *sp = ucontext->uc_mcontext.sp;
-#elif defined(__hppa__)
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.sc_iaoq[0];
-  /* GCC uses %r3 whenever a frame pointer is needed.  */
-  *bp = ucontext->uc_mcontext.sc_gr[3];
-  *sp = ucontext->uc_mcontext.sc_gr[30];
-#elif defined(__x86_64__)
-# if SANITIZER_FREEBSD
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.mc_rip;
-  *bp = ucontext->uc_mcontext.mc_rbp;
-  *sp = ucontext->uc_mcontext.mc_rsp;
-# elif SANITIZER_NETBSD
-  *pc = ucontext->uc_mcontext.__gregs[_REG_RIP];
-  *bp = ucontext->uc_mcontext.__gregs[_REG_RBP];
-  *sp = ucontext->uc_mcontext.__gregs[_REG_RSP];
-# else
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.gregs[REG_RIP];
-  *bp = ucontext->uc_mcontext.gregs[REG_RBP];
-  *sp = ucontext->uc_mcontext.gregs[REG_RSP];
-# endif
-#elif defined(__i386__)
-# if SANITIZER_FREEBSD
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.mc_eip;
-  *bp = ucontext->uc_mcontext.mc_ebp;
-  *sp = ucontext->uc_mcontext.mc_esp;
-# elif SANITIZER_FREEBSD
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.__gregs[_REG_EIP];
-  *bp = ucontext->uc_mcontext.__gregs[_REG_EBP];
-  *sp = ucontext->uc_mcontext.__gregs[_REG_ESP];
-# else
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.gregs[REG_EIP];
-  *bp = ucontext->uc_mcontext.gregs[REG_EBP];
-  *sp = ucontext->uc_mcontext.gregs[REG_ESP];
-# endif
-#elif defined(__powerpc__) || defined(__powerpc64__)
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.regs->nip;
-  *sp = ucontext->uc_mcontext.regs->gpr[PT_R1];
-  // The powerpc{,64}-linux ABIs do not specify r31 as the frame
-  // pointer, but GCC always uses r31 when we need a frame pointer.
-  *bp = ucontext->uc_mcontext.regs->gpr[PT_R31];
-#elif defined(__riscv__)
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.gregs[REG_PC];
-  *bp = ucontext->uc_mcontext.gregs[REG_S0];
-  *sp = 

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

2021-06-28 Thread Chris Pinnock
Module Name:src
Committed By:   cjep
Date:   Mon Jun 28 09:13:11 UTC 2021

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

Log Message:
PR toolchain/56180. Add configuration so that gcc can find the LTO
plugin when cross-building NetBSD from OpenBSD hosts. Discussed with mrg.


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

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.host
diff -u src/external/gpl3/gcc/dist/gcc/config.host:1.10 src/external/gpl3/gcc/dist/gcc/config.host:1.11
--- src/external/gpl3/gcc/dist/gcc/config.host:1.10	Sun Apr 11 00:02:11 2021
+++ src/external/gpl3/gcc/dist/gcc/config.host	Mon Jun 28 09:13:10 2021
@@ -277,6 +277,7 @@ case ${host} in
   *-*-openbsd*)
 out_host_hook_obj=host-openbsd.o
 host_xmake_file="${host_xmake_file} x-openbsd"
+host_lto_plugin_soname=liblto_plugin.so.0.0
 ;;
   *-*-netbsd*)
 out_host_hook_obj=host-netbsd.o



CVS commit: src/external/gpl3/gcc

2021-06-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jun 16 00:56:16 UTC 2021

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

Log Message:
Update earmv[67]{,hf}{,eb}: hazard has gone, just working fine!

Note that kernel texts for soft-float variants are just same as that for
hard-float counterparts.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/gpl3/gcc/README.gcc10

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.21 src/external/gpl3/gcc/README.gcc10:1.22
--- src/external/gpl3/gcc/README.gcc10:1.21	Thu May 27 06:58:27 2021
+++ src/external/gpl3/gcc/README.gcc10	Wed Jun 16 00:56:16 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.21 2021/05/27 06:58:27 mrg Exp $
+$NetBSD: README.gcc10,v 1.22 2021/06/16 00:56:16 rin Exp $
 
 
 new stuff:
@@ -39,14 +39,14 @@ earmv5		y	b	y	y		y		y	y	n
 earmv5eb	y	b	y	y		y		?	?	?
 earmv5hf	y	y	y	y		y		?	?	?
 earmv5hfeb	y	b	y	y		y		?	?	?
-earmv6		y	b	y	y		y		y	?	?
-earmv6eb	y	b	y	y		y		y	?	?
-earmv6hf	y	y	y	y		y		y[2]	?	?
-earmv6hfeb	y	b	y	y		y		y[2]	?	?
-earmv7		y	b	y	y		y		?	?	?
-earmv7eb	y	b	y	y		y		?	?	?
+earmv6		y	b	y	y		y		y	y	n
+earmv6eb	y	b	y	y		y		y	y	n
+earmv6hf	y	y	y	y		y		y	y	n
+earmv6hfeb	y	y	y	y		y		y	y	n
+earmv7		y	b	y	y		y		y	y	n
+earmv7eb	y	b	y	y		y		y	y	n
 earmv7hf	y	y	y	y		y		y	y	n
-earmv7hfeb	y	b	y	y		y		y	y	n
+earmv7hfeb	y	y	y	y		y		y	y	n
 hppa		y	y	y	y		y		y	y	y
 i386		y	y	y	y		y		y	n[8]	y
 ia64		y	y	y	y		y		?	N/A	y
@@ -72,14 +72,6 @@ coldfire	?	N/A	?	?		?		N/A	N/A
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 
 [1] - ramdisk.fs is too large, needs fixing.
-[2] - armv6hf (both little and big endian) has new problems:
-  rpi# cat bar.s
-  .cfi_startproc
-  .cfi_endproc
-  rpi# as bar.s
-  bar.s: Assembler messages:
-  bar.s: Internal error (Illegal instruction).
-  Please report this bug.
 [6] - vax vs c++ exceptions issue, same as it ever was
 [7] - fails just as poorly in gxemul/landisk as GCC 9
 [8] - i386 seems to have a signal delivery issue.  pthread tests hang and then



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

2021-06-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jun 15 08:22:23 UTC 2021

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

Log Message:
Fix GCC10 for arm.

Include order of bpapi.h and netbsd-elf.h was swapped when official
support for arm*--netbsdelf-eabi{,hf} was added to GCC10. This seems to
cause critical inconsistencies, which results in SIGSEGV for as(1) on
earmv6hf{,eb} and some other regressions for many arm variants.

With this fix, everything work just fine as far as I can see.

Thanks skrll and mrg for discussion!


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 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.69 src/external/gpl3/gcc/dist/gcc/config.gcc:1.70
--- src/external/gpl3/gcc/dist/gcc/config.gcc:1.69	Sun Apr 25 23:12:53 2021
+++ src/external/gpl3/gcc/dist/gcc/config.gcc	Tue Jun 15 08:22:23 2021
@@ -1280,7 +1280,7 @@ arm*-*-netbsdelf*)
 	esac
 	case ${target} in
 	arm*-*-netbsdelf-*eabi*)
-	tm_file="${tm_file} arm/bpabi.h arm/netbsd-elf.h arm/netbsd-eabi.h"
+	tm_file="${tm_file} arm/netbsd-elf.h arm/bpabi.h arm/netbsd-eabi.h"
 	# GCC 7 vs NetBSD/eabi -> avoid arm unwinder
 	#tmake_file="$tmake_file arm/t-bpabi"
 	tmake_file="$tmake_file arm/t-netbsdeabi"
@@ -1288,7 +1288,7 @@ arm*-*-netbsdelf*)
 	default_use_cxa_atexit=yes
 	;;
 	*)
-	tm_file="$tm_file arm/bpabi.h arm/netbsd-elf.h"
+	tm_file="$tm_file arm/netbsd-elf.h arm/bpabi.h"
 	#tmake_file="$tmake_file arm/t-bpabi arm/t-netbsdeabi"
 	tmake_file="$tmake_file arm/t-netbsd"
 	;;



CVS commit: src/external/gpl3/gcc

2021-06-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun  6 01:09:08 UTC 2021

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/mipsn64el: config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el: c++config.h
symver-config.h
src/external/gpl3/gcc/usr.bin/gcc/arch/mipsn64el: auto-host.h
configargs.h
src/external/gpl3/gcc/usr.bin/libcpp/arch/mipsn64el: config.h

Log Message:
regen mipsn64el


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/lib/libbacktrace/arch/mipsn64el/config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el/c++config.h \
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el/symver-config.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/usr.bin/gcc/arch/mipsn64el/auto-host.h \
src/external/gpl3/gcc/usr.bin/gcc/arch/mipsn64el/configargs.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/usr.bin/libcpp/arch/mipsn64el/config.h

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/libbacktrace/arch/mipsn64el/config.h
diff -u src/external/gpl3/gcc/lib/libbacktrace/arch/mipsn64el/config.h:1.1 src/external/gpl3/gcc/lib/libbacktrace/arch/mipsn64el/config.h:1.2
--- src/external/gpl3/gcc/lib/libbacktrace/arch/mipsn64el/config.h:1.1	Mon Apr 26 13:29:25 2021
+++ src/external/gpl3/gcc/lib/libbacktrace/arch/mipsn64el/config.h	Sat Jun  5 21:09:08 2021
@@ -85,7 +85,7 @@
 #define HAVE_UNISTD_H 1
 
 /* Define if -lz is available. */
-/* #undef HAVE_ZLIB */
+#define HAVE_ZLIB 1
 
 /* Define to the sub-directory in which libtool stores uninstalled libraries.
*/

Index: src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el/c++config.h
diff -u src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el/c++config.h:1.1 src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el/c++config.h:1.2
--- src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el/c++config.h:1.1	Mon Apr 26 13:29:26 2021
+++ src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el/c++config.h	Sat Jun  5 21:09:08 2021
@@ -702,10 +702,10 @@ namespace std
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
 /* Define to 1 if you have the `acosf' function. */
-/* #undef _GLIBCXX_HAVE_ACOSF */
+#define _GLIBCXX_HAVE_ACOSF 1
 
 /* Define to 1 if you have the `acosl' function. */
-/* #undef _GLIBCXX_HAVE_ACOSL */
+#define _GLIBCXX_HAVE_ACOSL 1
 
 /* Define to 1 if you have the `aligned_alloc' function. */
 #define _GLIBCXX_HAVE_ALIGNED_ALLOC 1
@@ -714,25 +714,25 @@ namespace std
 #define _GLIBCXX_HAVE_ARPA_INET_H 1
 
 /* Define to 1 if you have the `asinf' function. */
-/* #undef _GLIBCXX_HAVE_ASINF */
+#define _GLIBCXX_HAVE_ASINF 1
 
 /* Define to 1 if you have the `asinl' function. */
-/* #undef _GLIBCXX_HAVE_ASINL */
+#define _GLIBCXX_HAVE_ASINL 1
 
 /* Define to 1 if the target assembler supports .symver directive. */
 #define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1
 
 /* Define to 1 if you have the `atan2f' function. */
-/* #undef _GLIBCXX_HAVE_ATAN2F */
+#define _GLIBCXX_HAVE_ATAN2F 1
 
 /* Define to 1 if you have the `atan2l' function. */
-/* #undef _GLIBCXX_HAVE_ATAN2L */
+#define _GLIBCXX_HAVE_ATAN2L 1
 
 /* Define to 1 if you have the `atanf' function. */
-/* #undef _GLIBCXX_HAVE_ATANF */
+#define _GLIBCXX_HAVE_ATANF 1
 
 /* Define to 1 if you have the `atanl' function. */
-/* #undef _GLIBCXX_HAVE_ATANL */
+#define _GLIBCXX_HAVE_ATANL 1
 
 /* Defined if shared_ptr reference counting should use atomic operations. */
 #define _GLIBCXX_HAVE_ATOMIC_LOCK_POLICY 1
@@ -744,25 +744,25 @@ namespace std
 /* #undef _GLIBCXX_HAVE_CC_TLS */
 
 /* Define to 1 if you have the `ceilf' function. */
-/* #undef _GLIBCXX_HAVE_CEILF */
+#define _GLIBCXX_HAVE_CEILF 1
 
 /* Define to 1 if you have the `ceill' function. */
-/* #undef _GLIBCXX_HAVE_CEILL */
+#define _GLIBCXX_HAVE_CEILL 1
 
 /* Define to 1 if you have the  header file. */
 #define _GLIBCXX_HAVE_COMPLEX_H 1
 
 /* Define to 1 if you have the `cosf' function. */
-/* #undef _GLIBCXX_HAVE_COSF */
+#define _GLIBCXX_HAVE_COSF 1
 
 /* Define to 1 if you have the `coshf' function. */
-/* #undef _GLIBCXX_HAVE_COSHF */
+#define _GLIBCXX_HAVE_COSHF 1
 
 /* Define to 1 if you have the `coshl' function. */
-/* #undef _GLIBCXX_HAVE_COSHL */
+#define _GLIBCXX_HAVE_COSHL 1
 
 /* Define to 1 if you have the `cosl' function. */
-/* #undef _GLIBCXX_HAVE_COSL */
+#define _GLIBCXX_HAVE_COSL 1
 
 /* Define to 1 if you have the  header file. */
 #define _GLIBCXX_HAVE_DIRENT_H 1
@@ -780,16 +780,16 @@ namespace std
 #define _GLIBCXX_HAVE_EXECINFO_H 1
 
 /* Define to 1 if you have the `expf' function. */
-/* #undef _GLIBCXX_HAVE_EXPF */
+#define _GLIBCXX_HAVE_EXPF 1
 
 /* Define to 1 if you have the `expl' function. */
-/* #undef _GLIBCXX_HAVE_EXPL */
+#define _GLIBCXX_HAVE_EXPL 1
 
 /* Define to 1 if you have the `fabsf' function. */
-/* 

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

2021-05-10 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue May 11 01:47:21 UTC 2021

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

Log Message:
Cherry-pick upstream fix for GCC10 regression to -misel option.

Assembler codes generated by GCC are identical with that of our local
fix in rev 1.26 for 32-bit processors, and no significant changes for
64-bit processors also.

master: https://gcc.gnu.org/g:6156df483fa50a08f561b6c248819f2992aa380d
gcc-10: https://gcc.gnu.org/g:5f665c1ca452673e9812cd92b07bd31441c0ac5b
(diffs are same)

commit r12-9-g6156df483fa50a08f561b6c248819f2992aa380d
Author: Segher Boessenkool 
Date:   Tue Apr 20 12:00:50 2021 +

rs6000: Fix cpu selection w/ isel (PR100108)

There are various non-IBM CPUs with isel as well, so it is easiest if we
just don't consider that flag here (it is not needed).

2021-04-20  Segher Boessenkool  

PR target/100108
* config/rs6000/rs6000.c (rs6000_machine_from_flags): Do not 
consider
OPTION_MASK_ISEL.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.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/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c
diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.28 src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.29
--- src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.28	Tue May 11 01:39:09 2021
+++ src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c	Tue May 11 01:47:20 2021
@@ -5550,7 +5550,7 @@ rs6000_machine_from_flags (void)
   HOST_WIDE_INT flags = rs6000_isa_flags;
 
   /* Disable the flags that should never influence the .machine selection.  */
-  flags &= ~(OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT);
+  flags &= ~(OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT | OPTION_MASK_ISEL);
 
   if ((flags & (ISA_3_1_MASKS_SERVER & ~ISA_3_0_MASKS_SERVER)) != 0)
 return "power10";



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

2021-05-10 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue May 11 01:39:09 UTC 2021

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

Log Message:
In preparation to import upstream fix, revert our local fix in rev 1.26:

http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c#rev1.26

> Fix regression introduced to GCC10, where it wrongly recognizes 32-bit
> processors as POWER9 if -misel flag is specified.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.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/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c
diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.27 src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.28
--- src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.27	Fri Apr 16 02:33:28 2021
+++ src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c	Tue May 11 01:39:09 2021
@@ -5552,8 +5552,6 @@ rs6000_machine_from_flags (void)
   /* Disable the flags that should never influence the .machine selection.  */
   flags &= ~(OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT);
 
-  if ((flags & OPTION_MASK_POWERPC64) == 0)
-return "ppc";
   if ((flags & (ISA_3_1_MASKS_SERVER & ~ISA_3_0_MASKS_SERVER)) != 0)
 return "power10";
   if ((flags & (ISA_3_0_MASKS_SERVER & ~ISA_2_7_MASKS_SERVER)) != 0)
@@ -5568,7 +5566,9 @@ rs6000_machine_from_flags (void)
 return "power5";
   if ((flags & ISA_2_1_MASKS) != 0)
 return "power4";
-  return "ppc64";
+  if ((flags & OPTION_MASK_POWERPC64) != 0)
+return "ppc64";
+  return "ppc";
 }
 
 void



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

2021-04-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Apr 29 01:51:40 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/arm: arm.h bpabi.h netbsd-eabi.h
netbsd-elf.h

Log Message:
netbsd-eabi.h was never merged from the now present upstream version.
reduce diffs to upstream here and in other files in this subdir.

remove unused ARM_EABI_UNWIND_TABLES and __UNWIND_TABLES__.

clang defines __UNWIND_TABLES__, but doing this in GCC triggers the
need for more libgcc / libc unwind functionality to be added, and this
code has never been enabled for netbsd/earm.  (could potentially clean
up unused code in libc now, or, revive this once the full support has
been implemented..)


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/gpl3/gcc/dist/gcc/config/arm/arm.h
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h
cvs rdiff -u -r1.16 -r1.17 \
src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h
cvs rdiff -u -r1.17 -r1.18 \
src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-elf.h

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/arm/arm.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.22 src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.23
--- src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.22	Sun Apr 11 00:02:13 2021
+++ src/external/gpl3/gcc/dist/gcc/config/arm/arm.h	Thu Apr 29 01:51:39 2021
@@ -963,8 +963,8 @@ extern const int arm_arch_cde_coproc_bit
 /* ttype entries (the only interesting data references used)
use TARGET2 relocations.  */
 #define ASM_PREFERRED_EH_DATA_FORMAT(code, data) \
-(((code) == 0 && (data) == 1 && ARM_UNWIND_INFO) ? ARM_TARGET2_DWARF_FORMAT \
- : DW_EH_PE_absptr)
+  (((code) == 0 && (data) == 1 && ARM_UNWIND_INFO) ? ARM_TARGET2_DWARF_FORMAT \
+			   : DW_EH_PE_absptr)
 #endif
 
 /* The native (Norcroft) Pascal compiler for the ARM passes the static chain

Index: src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h:1.12 src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h:1.13
--- src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h:1.12	Sun Apr 11 00:02:13 2021
+++ src/external/gpl3/gcc/dist/gcc/config/arm/bpabi.h	Thu Apr 29 01:51:39 2021
@@ -28,12 +28,9 @@
 #define ARM_DEFAULT_ABI ARM_ABI_AAPCS
 
 /* Assume that AAPCS ABIs should adhere to the full BPABI.  */
-//#undef TARGET_BPABI
 #define TARGET_BPABI (TARGET_AAPCS_BASED)
 
 /* BPABI targets use EABI frame unwinding tables.  */
-#undef ARM_EABI_UNWIND_TABLES
-#define ARM_EABI_UNWIND_TABLES 1
 #undef ARM_UNWIND_INFO
 #define ARM_UNWIND_INFO 1
 

Index: src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.16 src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.17
--- src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.16	Tue Dec  1 02:39:08 2020
+++ src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h	Thu Apr 29 01:51:39 2021
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler, NetBSD/arm ELF version.
-   Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2002-2020 Free Software Foundation, Inc.
Contributed by Wasabi Systems, Inc.
 
This file is part of GCC.
@@ -22,10 +22,16 @@
 #undef MULTILIB_DEFAULTS
 #define MULTILIB_DEFAULTS { "mabi=aapcs-linux" }
 
-#define TARGET_LINKER_EABI_SUFFIX \
-(TARGET_DEFAULT_FLOAT_ABI == ARM_FLOAT_ABI_SOFT \
- ? "%{!mabi=apcs-gnu:%{!mabi=atpcs:%{mfloat-abi=hard:_eabihf;:_eabi}}}" \
- : "%{!mabi=apcs-gnu:%{!mabi=atpcs:%{mfloat-abi=soft:_eabi;:_eabihf}}}")
+#define TARGET_LINKER_EABI_SUFFIX_SOFT \
+  "%{!mabi=apcs-gnu:%{!mabi=atpcs:%{mfloat-abi=hard:_eabihf;:_eabi}}}"
+#define TARGET_LINKER_EABI_SUFFIX_HARD \
+  "%{!mabi=apcs-gnu:%{!mabi=atpcs:%{mfloat-abi=soft:_eabi;:_eabihf}}}"
+
+#define TARGET_LINKER_EABI_SUFFIX			\
+  (TARGET_DEFAULT_FLOAT_ABI == ARM_FLOAT_ABI_SOFT	\
+   ? TARGET_LINKER_EABI_SUFFIX_SOFT			\
+   : TARGET_LINKER_EABI_SUFFIX_HARD)
+
 #define TARGET_LINKER_BIG_EMULATION "armelfb_nbsd%(linker_eabi_suffix)"
 #define TARGET_LINKER_LITTLE_EMULATION "armelf_nbsd%(linker_eabi_suffix)"
 
@@ -41,8 +47,6 @@
 #undef ARM_DEFAULT_ABI
 #define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX
 
-#undef ARM_EABI_UNWIND_TABLES
-#define ARM_EABI_UNWIND_TABLES 0
 #undef ARM_UNWIND_INFO
 #define ARM_UNWIND_INFO 0
 #undef ARM_DWARF_UNWIND_TABLES
@@ -57,8 +61,6 @@
   NETBSD_OS_CPP_BUILTINS_ELF();		\
   if (ARM_DWARF_UNWIND_TABLES)		\
 	builtin_define ("__ARM_DWARF_EH__");	\
-  if (ARM_EABI_UNWIND_TABLES)		\
-	builtin_define ("__UNWIND_TABLES__");	\
 }		\
   while (0)
 
@@ -73,13 +75,15 @@
 
 #undef SIZE_TYPE
 #define SIZE_TYPE "long unsigned int"
- 
+
 #undef PTRDIFF_TYPE
 #define PTRDIFF_TYPE "long int"
 
 #undef SUBTARGET_EXTRA_ASM_SPEC
-#define 

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

2021-04-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 27 14:18:25 UTC 2021

Modified Files:
src/external/gpl3/gcc/usr.bin/cc1objplus: Makefile
src/external/gpl3/gcc/usr.bin/cc1plus: Makefile

Log Message:
Revert the change for the c-common.c hack. It is meant to be only for 32
bit mips. (Thanks Rin)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/usr.bin/cc1objplus/Makefile
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gcc/usr.bin/cc1plus/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/cc1objplus/Makefile
diff -u src/external/gpl3/gcc/usr.bin/cc1objplus/Makefile:1.2 src/external/gpl3/gcc/usr.bin/cc1objplus/Makefile:1.3
--- src/external/gpl3/gcc/usr.bin/cc1objplus/Makefile:1.2	Sun Apr 25 18:25:00 2021
+++ src/external/gpl3/gcc/usr.bin/cc1objplus/Makefile	Tue Apr 27 10:18:25 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2021/04/25 22:25:00 christos Exp $
+#	$NetBSD: Makefile,v 1.3 2021/04/27 14:18:25 christos Exp $
 
 # XXX: Pull this (G_OBJCXX_OBJS) out with mknative-gcc.  Needs some
 # minor re-org of cc1plus and perhaps cc1obj.  G_CXX_AND_OBJCXX_OBJS
@@ -81,7 +81,7 @@ COPTS.cc1obj-checksum.c+=-O0
 COPTS.decl.c+=-O0
 .endif
 
-.if ${MACHINE_MIPS64}
+.if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
 COPTS.c-common.c+=-O3
 .endif
 

Index: src/external/gpl3/gcc/usr.bin/cc1plus/Makefile
diff -u src/external/gpl3/gcc/usr.bin/cc1plus/Makefile:1.16 src/external/gpl3/gcc/usr.bin/cc1plus/Makefile:1.17
--- src/external/gpl3/gcc/usr.bin/cc1plus/Makefile:1.16	Sun Apr 25 18:25:55 2021
+++ src/external/gpl3/gcc/usr.bin/cc1plus/Makefile	Tue Apr 27 10:18:25 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.16 2021/04/25 22:25:55 christos Exp $
+#	$NetBSD: Makefile,v 1.17 2021/04/27 14:18:25 christos Exp $
 
 PROG=		cc1plus
 SRCS=		${G_CXX_OBJS:S,c-family/,,:S,cp/,,:S,constraint.o,constraint.cc,:S,logic.o,logic.cc,:S,known-headers.o,known-headers.cc,:S,c-spellcheck.o,c-spellcheck.cc,:S,coroutines.o,coroutines.cc,:Nlibcpp.a:.o=.c}
@@ -48,7 +48,7 @@ COPTS.c-ubsan.c+=-O0
 COPTS.cc1plus-checksum.c+=-O0
 .endif
 
-.if ${MACHINE_MIPS64}
+.if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
 COPTS.c-common.c+=-O3
 .endif
 



CVS commit: src/external/gpl3/gcc

2021-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 25 23:12:54 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist: config.sub
src/external/gpl3/gcc/dist/gcc: config.gcc
src/external/gpl3/gcc/dist/gcc/config/mips: netbsd64.h t-netbsd64
src/external/gpl3/gcc/dist/libgcc: config.host
src/external/gpl3/gcc/lib/crtstuff: Makefile
src/external/gpl3/gcc/lib/libgcc: Makefile.inc
src/external/gpl3/gcc/lib/libgcc/libgcc_s: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/mipso32:
Makefile
src/external/gpl3/gcc/lib/libtsan: Makefile

Log Message:
Add support for mipsn64 targets which build 64 bit binaries by default
on instead of n32


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gcc/dist/config.sub
cvs rdiff -u -r1.68 -r1.69 src/external/gpl3/gcc/dist/gcc/config.gcc
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/dist/gcc/config/mips/t-netbsd64
cvs rdiff -u -r1.30 -r1.31 src/external/gpl3/gcc/dist/libgcc/config.host
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/lib/crtstuff/Makefile
cvs rdiff -u -r1.50 -r1.51 src/external/gpl3/gcc/lib/libgcc/Makefile.inc
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/mipso32/Makefile
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc/lib/libtsan/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/config.sub
diff -u src/external/gpl3/gcc/dist/config.sub:1.16 src/external/gpl3/gcc/dist/config.sub:1.17
--- src/external/gpl3/gcc/dist/config.sub:1.16	Sat Apr 10 20:02:10 2021
+++ src/external/gpl3/gcc/dist/config.sub	Sun Apr 25 19:12:53 2021
@@ -1191,6 +1191,7 @@ case $cpu-$vendor in
 			| mips | mipsbe | mipseb | mipsel | mipsle \
 			| mips16 \
 			| mips64 | mips64eb | mips64el \
+			| mipsn64 | mipsn64eb | mipsn64el \
 			| mips64octeon | mips64octeonel \
 			| mips64orion | mips64orionel \
 			| mips64r5900 | mips64r5900el \

Index: src/external/gpl3/gcc/dist/gcc/config.gcc
diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.68 src/external/gpl3/gcc/dist/gcc/config.gcc:1.69
--- src/external/gpl3/gcc/dist/gcc/config.gcc:1.68	Mon Apr 12 05:03:39 2021
+++ src/external/gpl3/gcc/dist/gcc/config.gcc	Sun Apr 25 19:12:53 2021
@@ -2570,6 +2570,13 @@ riscv*-*-netbsd*)			# NetBSD RISC-V
 	gas=yes
 	gcc_cv_initfini_array=yes
 	;;
+mipsn64*-*-netbsd*)			# NetBSD/mips64, either endian.
+	target_cpu_default="MASK_ABICALLS|MASK_FLOAT64|MASK_SOFT_FLOAT_ABI"
+	tm_file="elfos.h ${tm_file} mips/elf.h ${nbsd_tm_file} mips/netbsd.h mips/netbsd64.h"
+	tmake_file="${tmake_file} mips/t-netbsd64"
+	tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_64"
+	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+	;;
 mips64*-*-netbsd*)			# NetBSD/mips64, either endian.
 	target_cpu_default="MASK_ABICALLS|MASK_FLOAT64|MASK_SOFT_FLOAT_ABI"
 	tm_file="elfos.h ${tm_file} mips/elf.h ${nbsd_tm_file} mips/netbsd.h mips/netbsd64.h"

Index: src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h
diff -u src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h:1.5 src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h:1.6
--- src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h:1.5	Sun Mar 28 21:33:12 2021
+++ src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h	Sun Apr 25 19:12:54 2021
@@ -22,11 +22,19 @@ Boston, MA 02110-1301, USA.  */
 /* Force the default endianness and ABI flags onto the command line
in order to make the other specs easier to write.  */
 
+#if MIPS_ABI_DEFAULT == ABI_N32
+# define MIPS64_ABI "%{!mabi=*: -mabi=n32}"
+# elif MIPS_ABI_DEFAULT == ABI_64
+# define MIPS64_ABI "%{!mabi=*: -mabi=64}"
+#else
+# error "Missing MIPS_ABI_DEFAULT " # MIPS_ABI_DEFAULT
+#endif
+
 #undef DRIVER_SELF_SPECS
 #define DRIVER_SELF_SPECS \
   BASE_DRIVER_SELF_SPECS \
   "%{!EB:%{!EL:%(endian_spec)}}", \
-  "%{!mabi=*: -mabi=n32}"
+  MIPS64_ABI
 
 /* Define default target values.  */
 

Index: src/external/gpl3/gcc/dist/gcc/config/mips/t-netbsd64
diff -u src/external/gpl3/gcc/dist/gcc/config/mips/t-netbsd64:1.1 src/external/gpl3/gcc/dist/gcc/config/mips/t-netbsd64:1.2
--- src/external/gpl3/gcc/dist/gcc/config/mips/t-netbsd64:1.1	Wed Jun 29 00:59:10 2011
+++ src/external/gpl3/gcc/dist/gcc/config/mips/t-netbsd64	Sun Apr 25 19:12:54 2021
@@ -1,9 +1,17 @@
 # NetBSD has (will have) "non-native" libraries in /usr/lib/.
-# For NetBSD/mips64 we thus have /usr/lib (n32), /usr/lib/o32 and /usr/lib/64.
 
 MULTILIB_OPTIONS = mabi=n32/mabi=64/mabi=32
 MULTILIB_DIRNAMES = n32 n64 o32
+
+# For NetBSD/mips64 we thus have /usr/lib (n32), /usr/lib/o32 and /usr/lib/64.
+ifneq ($(filter MIPS_ABI_DEFAULT=ABI_N32,$(tm_defines)),)
 MULTILIB_OSDIRNAMES = . ../lib/64 

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

2021-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 25 22:25:55 UTC 2021

Modified Files:
src/external/gpl3/gcc/usr.bin/cc1plus: Makefile

Log Message:
Limit no-error to stack-protector


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc/usr.bin/cc1plus/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/cc1plus/Makefile
diff -u src/external/gpl3/gcc/usr.bin/cc1plus/Makefile:1.15 src/external/gpl3/gcc/usr.bin/cc1plus/Makefile:1.16
--- src/external/gpl3/gcc/usr.bin/cc1plus/Makefile:1.15	Sun Apr 11 20:05:56 2021
+++ src/external/gpl3/gcc/usr.bin/cc1plus/Makefile	Sun Apr 25 18:25:55 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2021/04/12 00:05:56 mrg Exp $
+#	$NetBSD: Makefile,v 1.16 2021/04/25 22:25:55 christos Exp $
 
 PROG=		cc1plus
 SRCS=		${G_CXX_OBJS:S,c-family/,,:S,cp/,,:S,constraint.o,constraint.cc,:S,logic.o,logic.cc,:S,known-headers.o,known-headers.cc,:S,c-spellcheck.o,c-spellcheck.cc,:S,coroutines.o,coroutines.cc,:Nlibcpp.a:.o=.c}
@@ -29,9 +29,7 @@ CHECKSUM_OBJS= ${LIBBACKTRACEOBJ}/libbac
 # XXX check this out
 # LDFLAGS+=   -rdynamic
 
-# YUCK.  but see timevar.h:POP_TIMEVAR_AND_RETURN
-CFLAGS+=	-Wno-error # not good enough: -Wno-return-type
-COPTS+=		-Wno-stack-protector
+CFLAGS+=	-Wno-error=stack-protector
 
 .if ${MACHINE_ARCH} == "vax"
 COPTS.call.c+=-O0
@@ -50,7 +48,7 @@ COPTS.c-ubsan.c+=-O0
 COPTS.cc1plus-checksum.c+=-O0
 .endif
 
-.if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
+.if ${MACHINE_MIPS64}
 COPTS.c-common.c+=-O3
 .endif
 



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

2021-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 25 22:25:00 UTC 2021

Modified Files:
src/external/gpl3/gcc/usr.bin/cc1objplus: Makefile

Log Message:
- Disable stack-protector errors like we did for cc1plus
- use ${MACHINE_MIPS64}


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/usr.bin/cc1objplus/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/cc1objplus/Makefile
diff -u src/external/gpl3/gcc/usr.bin/cc1objplus/Makefile:1.1 src/external/gpl3/gcc/usr.bin/cc1objplus/Makefile:1.2
--- src/external/gpl3/gcc/usr.bin/cc1objplus/Makefile:1.1	Fri Apr 23 18:50:06 2021
+++ src/external/gpl3/gcc/usr.bin/cc1objplus/Makefile	Sun Apr 25 18:25:00 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2021/04/23 22:50:06 mrg Exp $
+#	$NetBSD: Makefile,v 1.2 2021/04/25 22:25:00 christos Exp $
 
 # XXX: Pull this (G_OBJCXX_OBJS) out with mknative-gcc.  Needs some
 # minor re-org of cc1plus and perhaps cc1obj.  G_CXX_AND_OBJCXX_OBJS
@@ -51,6 +51,9 @@ CHECKSUM_OBJS=	${BACKENDOBJ}/libbackend.
 
 .include "../Makefile.checksum"
 
+# XXX: like cc1plus
+CFLAGS+=-Wno-error=stack-protector
+
 COPTS.c-ada-spec.c+=			-Wno-stack-protector
 COPTS.c-attribs.c+=			-Wno-stack-protector
 COPTS.c-aux-info.c+=			-Wno-stack-protector
@@ -78,7 +81,7 @@ COPTS.cc1obj-checksum.c+=-O0
 COPTS.decl.c+=-O0
 .endif
 
-.if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
+.if ${MACHINE_MIPS64}
 COPTS.c-common.c+=-O3
 .endif
 



CVS commit: src/external/gpl3/gcc

2021-04-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Apr 25 15:32:25 UTC 2021

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

Log Message:
Update as(1) failure on armv6; it occurs also for earmv6hfeb, whereas it
does not for earmv6{,eb}.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/gpl3/gcc/README.gcc10

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.19 src/external/gpl3/gcc/README.gcc10:1.20
--- src/external/gpl3/gcc/README.gcc10:1.19	Sun Apr 25 10:08:25 2021
+++ src/external/gpl3/gcc/README.gcc10	Sun Apr 25 15:32:24 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.19 2021/04/25 10:08:25 mrg Exp $
+$NetBSD: README.gcc10,v 1.20 2021/04/25 15:32:24 rin Exp $
 
 
 new stuff:
@@ -39,10 +39,10 @@ earmv5		y	b	y	y		y		y	y	n
 earmv5eb	y	b	y	y		y		?	?	?
 earmv5hf	y	y	y	y		y		?	?	?
 earmv5hfeb	y	b	y	y		y		?	?	?
-earmv6		y	b	y	y		y		y[2]	?	?
+earmv6		y	b	y	y		y		y	?	?
 earmv6eb	y	b	y	y		y		y	?	?
 earmv6hf	y	y	y	y		y		y[2]	?	?
-earmv6hfeb	y	b	y	y		y		y	?	?
+earmv6hfeb	y	b	y	y		y		y[2]	?	?
 earmv7		y	b	y	y		y		?	?	?
 earmv7eb	y	b	y	y		y		?	?	?
 earmv7hf	y	y	y	y		y		y	y	n
@@ -72,7 +72,7 @@ coldfire	?	N/A	?	?		?		N/A	N/A
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 
 [1] - ramdisk.fs is too large, needs fixing.
-[2] - armv6 little endian has new problems:
+[2] - armv6hf (both little and big endian) has new problems:
   rpi# cat bar.s
   .cfi_startproc
   .cfi_endproc



CVS commit: src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/riscv64

2021-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 25 15:09:08 UTC 2021

Modified Files:
src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/riscv64:
Makefile

Log Message:
fix cargo-cult


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/riscv64/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/lib/libstdc++-v3/include/bits/arch/riscv64/Makefile
diff -u src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/riscv64/Makefile:1.1 src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/riscv64/Makefile:1.2
--- src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/riscv64/Makefile:1.1	Fri Sep 19 13:23:24 2014
+++ src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/riscv64/Makefile	Sun Apr 25 11:09:08 2021
@@ -1,7 +1,7 @@
-#	$NetBSD: Makefile,v 1.1 2014/09/19 17:23:24 matt Exp $
+#	$NetBSD: Makefile,v 1.2 2021/04/25 15:09:08 christos Exp $
 
 GCC_MACHINE_ARCH=riscv64
 .include "../Makefile.arch_bits"
 
-# mips64 files are in mips64e[lb] subdirs.
+# riscv64 files are in riscv64 subdirs.
 .PATH: ${.CURDIR}/../../../../arch/${MACHINE_ARCH}



CVS commit: src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch

2021-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 25 15:08:28 UTC 2021

Modified Files:
src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch: Makefile

Log Message:
- include 
- use MACHINE_MIPS64


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/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/lib/libstdc++-v3/include/bits/arch/Makefile
diff -u src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/Makefile:1.5 src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/Makefile:1.6
--- src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/Makefile:1.5	Fri Feb  8 21:36:56 2019
+++ src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/Makefile	Sun Apr 25 11:08:28 2021
@@ -1,6 +1,7 @@
-#	$NetBSD: Makefile,v 1.5 2019/02/09 02:36:56 mrg Exp $
+#	$NetBSD: Makefile,v 1.6 2021/04/25 15:08:28 christos Exp $
 
 # install multilib c++config.h files
+.include 
 
 .if ${MACHINE_ARCH} == "sparc64"
 SUBDIR=		sparc sparc64
@@ -12,7 +13,7 @@ SUBDIR=		i386 x86_64
 CXXCONFIGARGS=	x86_64 _LP64 i386
 .endif
 
-.if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el"
+.if ${MACHINE_MIPS64}
 SUBDIR=		mips64 mips32 mipso32
 CXXCONFIGARGS=	mips64 _ABI64 mipso32 _ABIO32 mips32
 .endif



CVS commit: src/external/gpl3/gcc

2021-04-25 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 25 10:08:25 UTC 2021

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

Log Message:
armv6 little endian has problems with GCC 10.

rpi# cat bar.s
.cfi_startproc
.cfi_endproc
rpi# as bar.s
bar.s: Assembler messages:
bar.s: Internal error (Illegal instruction).
Please report this bug.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/README.gcc10

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.18 src/external/gpl3/gcc/README.gcc10:1.19
--- src/external/gpl3/gcc/README.gcc10:1.18	Sun Apr 25 08:01:54 2021
+++ src/external/gpl3/gcc/README.gcc10	Sun Apr 25 10:08:25 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.18 2021/04/25 08:01:54 mrg Exp $
+$NetBSD: README.gcc10,v 1.19 2021/04/25 10:08:25 mrg Exp $
 
 
 new stuff:
@@ -39,9 +39,9 @@ earmv5		y	b	y	y		y		y	y	n
 earmv5eb	y	b	y	y		y		?	?	?
 earmv5hf	y	y	y	y		y		?	?	?
 earmv5hfeb	y	b	y	y		y		?	?	?
-earmv6		y	b	y	y		y		y	?	?
+earmv6		y	b	y	y		y		y[2]	?	?
 earmv6eb	y	b	y	y		y		y	?	?
-earmv6hf	y	y	y	y		y		y	?	?
+earmv6hf	y	y	y	y		y		y[2]	?	?
 earmv6hfeb	y	b	y	y		y		y	?	?
 earmv7		y	b	y	y		y		?	?	?
 earmv7eb	y	b	y	y		y		?	?	?
@@ -72,6 +72,14 @@ coldfire	?	N/A	?	?		?		N/A	N/A
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 
 [1] - ramdisk.fs is too large, needs fixing.
+[2] - armv6 little endian has new problems:
+  rpi# cat bar.s
+  .cfi_startproc
+  .cfi_endproc
+  rpi# as bar.s
+  bar.s: Assembler messages:
+  bar.s: Internal error (Illegal instruction).
+  Please report this bug.
 [6] - vax vs c++ exceptions issue, same as it ever was
 [7] - fails just as poorly in gxemul/landisk as GCC 9
 [8] - i386 seems to have a signal delivery issue.  pthread tests hang and then



CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/dragonfly

2021-04-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Apr 24 21:17:40 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/dragonfly:
c_locale.cc c_locale.h

Log Message:
move the NetBSD version of:

   __convert_from_v(const __c_locale& __cloc, char* __out,
const int __size __attribute__ ((__unused__)),
const char* __fmt, ...)

from the .h file into the .cc file.

NetBSD version relies upon vasprintf_l() being defined and compile
contexts such as _XOPEN_SOURCE=600 or _POSIX_C_SOURCE < 200809 may
not provide the definition of it, cause compile time issues for
3rdparty applications in c++locale.h.  This ensure that all the
required definitions are present when this code is compiled.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/dragonfly/c_locale.cc 
\
src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/dragonfly/c_locale.h

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/libstdc++-v3/config/locale/dragonfly/c_locale.cc
diff -u src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/dragonfly/c_locale.cc:1.5 src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/dragonfly/c_locale.cc:1.6
--- src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/dragonfly/c_locale.cc:1.5	Sun Apr 11 00:02:24 2021
+++ src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/dragonfly/c_locale.cc	Sat Apr 24 21:17:40 2021
@@ -28,6 +28,8 @@
 
 // Written by Benjamin Kosnik 
 // Modified for DragonFly by John Marino 
+// Modified for NetBSD by Christos Zoulas  and
+// matthew green 
 
 #include 
 #include 
@@ -191,6 +193,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   const char* const* const locale::_S_categories = __gnu_cxx::category_names;
 
+#ifdef __NetBSD__
+  int
+  __convert_from_v(const __c_locale& __cloc, char* __out,
+		   const int __size __attribute__ ((__unused__)),
+		   const char* __fmt, ...)
+  {
+__builtin_va_list __args;
+__builtin_va_start(__args, __fmt);
+
+const int __ret = vsnprintf_l(__out, __size, (struct _locale *)__cloc,
+  __fmt, __args);
+
+__builtin_va_end(__args);
+
+return __ret;
+  }
+#endif
+
 _GLIBCXX_END_NAMESPACE_VERSION
 } // namespace
 
Index: src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/dragonfly/c_locale.h
diff -u src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/dragonfly/c_locale.h:1.5 src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/dragonfly/c_locale.h:1.6
--- src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/dragonfly/c_locale.h:1.5	Sun Apr 11 00:02:24 2021
+++ src/external/gpl3/gcc/dist/libstdc++-v3/config/locale/dragonfly/c_locale.h	Sat Apr 24 21:17:40 2021
@@ -33,6 +33,8 @@
 
 // Written by Benjamin Kosnik 
 // Modified for DragonFly by John Marino 
+// Modified for NetBSD by Christos Zoulas  and
+// matthew green 
 
 #ifndef _GLIBCXX_CXX_LOCALE_H
 #define _GLIBCXX_CXX_LOCALE_H 1
@@ -54,6 +56,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   typedef int*			__c_locale;
 
+#ifndef __NetBSD__
   // Convert numeric value of type double and long double to string and
   // return length of string.  If vsnprintf is available use it, otherwise
   // fall back to the unsafe vsprintf which, in general, can be dangerous
@@ -63,30 +66,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 		   const int __size __attribute__ ((__unused__)),
 		   const char* __fmt, ...)
   {
-#ifndef __NetBSD__
 __c_locale __old = (__c_locale)uselocale((locale_t)__cloc);
-#endif
 
 __builtin_va_list __args;
 __builtin_va_start(__args, __fmt);
 
-#ifndef __NetBSD__
 #if _GLIBCXX_USE_C99_STDIO
 const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
 #else
 const int __ret = __builtin_vsprintf(__out, __fmt, __args);
 #endif
 
-uselocale((locale_t)__old);
-#else
-const int __ret = vsnprintf_l(__out, __size, (locale_t)__cloc, __fmt,
-	__args);
-#endif
-
 __builtin_va_end(__args);
 
+uselocale((locale_t)__old);
 return __ret;
   }
+#else
+  // NetBSD backend requires vasprintf_l() which may not be visible in
+  // all complation environments (eg, _XOPEN_SOURCE=600) so the backend
+  // lives in the library code, instead of this header.
+  int
+  __convert_from_v(const __c_locale& __cloc, char* __out,
+		   const int __size __attribute__ ((__unused__)),
+		   const char* __fmt, ...);
+#endif
 
 _GLIBCXX_END_NAMESPACE_VERSION
 } // namespace



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

2021-04-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Apr 24 06:45:56 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/aarch64: t-aarch64-netbsd

Log Message:
remove diff to upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64-netbsd

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/aarch64/t-aarch64-netbsd
diff -u src/external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64-netbsd:1.1 src/external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64-netbsd:1.2
--- src/external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64-netbsd:1.1	Sat Jul 14 23:47:32 2018
+++ src/external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64-netbsd	Sat Apr 24 06:45:56 2021
@@ -1,5 +1,5 @@
 # Machine description for AArch64 architecture.
-#  Copyright (C) 2016-2017 Free Software Foundation, Inc.
+#  Copyright (C) 2016-2020 Free Software Foundation, Inc.
 #
 #  This file is part of GCC.
 #



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

2021-04-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Apr 24 06:44:24 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/aarch64: aarch64-netbsd.h

Log Message:
reduce diffs to upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h

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/aarch64/aarch64-netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h:1.4 src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h:1.5
--- src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h:1.4	Fri Oct  4 08:51:32 2019
+++ src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h	Sat Apr 24 06:44:24 2021
@@ -1,5 +1,5 @@
 /* Definitions for AArch64 running NetBSD
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2020 Free Software Foundation, Inc.
 
This file is part of GCC.
 
@@ -38,32 +38,15 @@
 
 #define NETBSD_ENTRY_POINT "__start"
 
-#define NETBSD_TARGET_LINK_SPEC  "%{h*}			\
-   -X %{mbig-endian:-EB -m " TARGET_LINKER_BIG_EMULATION "} \
-   %{mlittle-endian:-EL -m " TARGET_LINKER_LITTLE_EMULATION "} \
-   %(netbsd_link_spec)"
-
-#if TARGET_FIX_ERR_A53_835769_DEFAULT
-#define CA53_ERR_835769_SPEC \
-  " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
-#else
-#define CA53_ERR_835769_SPEC \
-  " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
-#endif
-
-#ifdef TARGET_FIX_ERR_A53_843419_DEFAULT
-#define CA53_ERR_843419_SPEC \
-  " %{!mno-fix-cortex-a53-843419:--fix-cortex-a53-843419}"
-#else
-#define CA53_ERR_843419_SPEC \
-  " %{mfix-cortex-a53-843419:--fix-cortex-a53-843419}"
-#endif
+#define NETBSD_TARGET_LINK_SPEC  "%{h*} "\
+  "-X %{mbig-endian:-EB -m " TARGET_LINKER_BIG_EMULATION "} "		\
+  "%{mlittle-endian:-EL -m " TARGET_LINKER_LITTLE_EMULATION "} "	\
+  "%(netbsd_link_spec)"
 
 #undef  LINK_SPEC
-#define LINK_SPEC NETBSD_LINK_SPEC_ELF 		\
+#define LINK_SPEC NETBSD_LINK_SPEC_ELF		\
 		  NETBSD_TARGET_LINK_SPEC	\
-  CA53_ERR_835769_SPEC		\
-  CA53_ERR_843419_SPEC
+		  AARCH64_ERRATA_LINK_SPEC
 
 #undef TARGET_OS_CPP_BUILTINS
 #define TARGET_OS_CPP_BUILTINS()		\
@@ -76,23 +59,6 @@
 #undef SUBTARGET_CPP_SPEC
 #define SUBTARGET_CPP_SPEC NETBSD_CPP_SPEC
 
-#if 0
-#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
-#endif
-
-#if 0
-/* Uninitialized common symbols in non-PIE executables, even with
-   strong definitions in dependent shared libraries, will resolve
-   to COPY relocated symbol in the executable.  See PR65780.  */
-#undef TARGET_BINDS_LOCAL_P
-#define TARGET_BINDS_LOCAL_P default_binds_local_p_2
-#endif
-
-#if 0
-#undef MCOUNT_NAME
-#define MCOUNT_NAME ".mcount"
-#endif
-
 #undef EXTRA_SPECS
 #define EXTRA_SPECS \
   { "asm_cpu_spec", ASM_CPU_SPEC }, \



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

2021-04-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Apr 24 06:44:01 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/aarch64: driver-aarch64.c

Log Message:
make netbsd section more GNU-style.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.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/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c
diff -u src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.12 src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.13
--- src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.12	Sat Apr 17 10:19:09 2021
+++ src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c	Sat Apr 24 06:44:01 2021
@@ -246,7 +246,7 @@ contains_core_p (unsigned *arr, unsigned
in the spec.  */
 
 #ifdef __NetBSD__
-/* The NetBSD/arm64 platform does not export linux-style cpuinfo,
+/* The NetBSD/arm64 platform may not export linux-style /proc/cpuinfo,
but the data is available via a sysctl(3) interface.  */
 #include 
 #include 
@@ -440,78 +440,44 @@ host_detect_local_cpu (int argc, const c
 
 	  /* These are all the extensions from aarch64-option-extensions.def.  */
   if (__SHIFTOUT(id.ac_aa64pfr0, ID_AA64PFR0_EL1_FP) == ID_AA64PFR0_EL1_FP_IMPL)
-	{
-	  exts += "fp ";
-	}
+	exts += "fp ";
   if (__SHIFTOUT(id.ac_aa64pfr0, ID_AA64PFR0_EL1_ADVSIMD) == ID_AA64PFR0_EL1_ADV_SIMD_IMPL)
-	{
-	  exts += "asimd ";
-	}
+	exts += "asimd ";
 #ifdef ID_AA64ISAR0_EL1_RDM
   if (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_RDM) == ID_AA64ISAR0_EL1_RDM_SQRDML)
-	{
-	  exts += "asimdrdm ";
-	}
+	exts += "asimdrdm ";
   if (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_DP) == ID_AA64ISAR0_EL1_DP_UDOT)
-	{
-	  exts += "asimddp ";
-	}
+	exts += "asimddp ";
   if (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_FHM) == ID_AA64ISAR0_EL1_FHM_FMLAL)
-	{
-	  exts += "asimdfml ";
-	}
+	exts += "asimdfml ";
 #endif
   if (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_AES) == ID_AA64ISAR0_EL1_AES_AES)
-	{
-	  exts += "aes ";
-	}
+	exts += "aes ";
   if (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_AES) == ID_AA64ISAR0_EL1_AES_PMUL)
-	{
-	  exts += "aes pmull ";
-	}
+	exts += "aes pmull ";
   if (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_CRC32) == ID_AA64ISAR0_EL1_CRC32_CRC32X)
-	{
-	  exts += "crc32 ";
-	}
+	exts += "crc32 ";
 #ifdef ID_AA64ISAR0_EL1_ATOMIC
   if (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_ATOMIC) == ID_AA64ISAR0_EL1_ATOMIC_SWP)
-	{
-	  exts += "atomics ";
-	}
+	exts += "atomics ";
 #endif
   if ((__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_SHA1) & ID_AA64ISAR0_EL1_SHA1_SHA1CPMHSU) != 0)
-	{
-	  exts += "sha1 ";
-	}
+	exts += "sha1 ";
   if ((__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_SHA2) & ID_AA64ISAR0_EL1_SHA2_SHA256HSU) != 0)
-	{
-	  exts += "sha2 ";
-	}
+	exts += "sha2 ";
 #ifdef ID_AA64ISAR0_EL1_SHA2_SHA512HSU
   if ((__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_SHA2) & ID_AA64ISAR0_EL1_SHA2_SHA512HSU) != 0)
-	{
-	  exts += "sha512 ";
-	}
+	exts += "sha512 ";
   if ((__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_SHA3) & ID_AA64ISAR0_EL1_SHA3_EOR3) != 0)
-	{
-	  exts += "sha3 ";
-	}
+	exts += "sha3 ";
   if (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_SM3) == ID_AA64ISAR0_EL1_SM3_SM3)
-	{
-	  exts += "sm3 ";
-	}
+	exts += "sm3 ";
   if (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_SM4) == ID_AA64ISAR0_EL1_SM4_SM4)
-	{
-	  exts += "sm4 ";
-	}
+	exts += "sm4 ";
   if (__SHIFTOUT(id.ac_aa64pfr0, ID_AA64PFR0_EL1_SVE) == ID_AA64PFR0_EL1_SVE_IMPL)
-	{
-	  exts += "sve ";
-	}
+	exts += "sve ";
   if (__SHIFTOUT(id.ac_aa64isar1, ID_AA64ISAR1_EL1_LRCPC) == ID_AA64ISAR1_EL1_LRCPC_PR)
-	{
-	  exts += "lrcpc ";
-	}
+	exts += "lrcpc ";
 #endif
 
   for (i = 0; i < num_exts; i++)



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

2021-04-24 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Apr 24 06:34:53 UTC 2021

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

Log Message:
Fix build with MKDEBUG=yes for aarch64.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 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.49 src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.50
--- src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.49	Sat Apr 17 22:01:02 2021
+++ src/external/gpl3/gcc/lib/libgcc/Makefile.inc	Sat Apr 24 06:34:52 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.49 2021/04/17 22:01:02 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.50 2021/04/24 06:34:52 rin Exp $
 
 LIBGCC_MACHINE_ARCH?=${MACHINE_ARCH:S/earmv5/earm/}
 GCC_MACHINE_SUBDIR=${MACHINE_CPU:C/powerpc.*/rs6000/:C/x86_64/i386/}
@@ -197,6 +197,11 @@ ${LSE_NAMES:=.o}: ${LSE_SRC} Makefile
 	${_MKTARGET_COMPILE}
 	${COMPILE.S} ${CPPFLAGS.${.TARGET:T:.o=}} -o ${.TARGET} ${LSE_SRC}
 
+${LSE_NAMES:=.go}: ${LSE_SRC} Makefile
+	${_MKTARGET_COMPILE}
+	${COMPILE.S} ${DEBUGFLAGS} ${CPPFLAGS.${.TARGET:T:.go=}} -o ${.TARGET} \
+		${LSE_SRC}
+
 # lse-init.c currently compiles to nothing for us
 G_LIB2ADD+=	${GNUHOSTDIST}/libgcc/config/aarch64/lse-init.c
 



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

2021-04-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Apr 24 06:32:09 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/config: host-netbsd.c

Log Message:
reduce diffs to upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/dist/gcc/config/host-netbsd.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/gpl3/gcc/dist/gcc/config/host-netbsd.c
diff -u src/external/gpl3/gcc/dist/gcc/config/host-netbsd.c:1.3 src/external/gpl3/gcc/dist/gcc/config/host-netbsd.c:1.4
--- src/external/gpl3/gcc/dist/gcc/config/host-netbsd.c:1.3	Sun Apr 11 00:02:12 2021
+++ src/external/gpl3/gcc/dist/gcc/config/host-netbsd.c	Sat Apr 24 06:32:09 2021
@@ -81,5 +81,5 @@ netbsd_gt_pch_use_address (void *base, s
   return addr == base ? 1 : -1;
 }
 
-
+
 const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;



CVS commit: src/external/gpl3/gcc

2021-04-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Apr 23 22:53:03 UTC 2021

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

Log Message:
cc1objplus and lto-dump are now enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gcc/README.gcc10

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.16 src/external/gpl3/gcc/README.gcc10:1.17
--- src/external/gpl3/gcc/README.gcc10:1.16	Thu Apr 22 20:45:00 2021
+++ src/external/gpl3/gcc/README.gcc10	Fri Apr 23 22:53:03 2021
@@ -1,8 +1,7 @@
-$NetBSD: README.gcc10,v 1.16 2021/04/22 20:45:00 mrg Exp $
+$NetBSD: README.gcc10,v 1.17 2021/04/23 22:53:03 mrg Exp $
 
 
 new stuff:
-	cc1objcplus
 	libmpx
 	liboffloadmic
 	libvtv
@@ -10,7 +9,6 @@ new stuff:
 	libphobos
 	d
 	gfortran
-	lto-dump
 	libbacktrace: +dwarf5_CFLAGS = $(libbacktrace_TEST_CFLAGS) -gdwarf-5
 
 



CVS commit: src/external/gpl3/gcc

2021-04-22 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Apr 22 20:45:00 UTC 2021

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

Log Message:
arm64eb works.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc/README.gcc10

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.15 src/external/gpl3/gcc/README.gcc10:1.16
--- src/external/gpl3/gcc/README.gcc10:1.15	Thu Apr 22 05:00:35 2021
+++ src/external/gpl3/gcc/README.gcc10	Thu Apr 22 20:45:00 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.15 2021/04/22 05:00:35 mrg Exp $
+$NetBSD: README.gcc10,v 1.16 2021/04/22 20:45:00 mrg Exp $
 
 
 new stuff:
@@ -33,7 +33,7 @@ switched:	has port switched?  y (yes), n
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf	switched
 	-	---	--	--			---	
 aarch64		y	y	y	y		y		y	y	n
-aarch64eb	y	y	y	y		y		y	?	?
+aarch64eb	y	y	y	y		y		y	y	n
 alpha		y	y	y	y		y		y	y	y
 earmv4		y	y	y	y		y		y	?	n
 earmv4eb	y	b	y	y		y		?	?	?



CVS commit: src/external/gpl3/gcc

2021-04-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Apr 22 05:00:36 UTC 2021

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

Log Message:
arm64* now works.  (thanks skrll.)
evbarmv5 and evbarmv7hfeb works.  (thanks martin.)


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/README.gcc10

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.14 src/external/gpl3/gcc/README.gcc10:1.15
--- src/external/gpl3/gcc/README.gcc10:1.14	Mon Apr 19 08:40:15 2021
+++ src/external/gpl3/gcc/README.gcc10	Thu Apr 22 05:00:35 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.14 2021/04/19 08:40:15 mrg Exp $
+$NetBSD: README.gcc10,v 1.15 2021/04/22 05:00:35 mrg Exp $
 
 
 new stuff:
@@ -32,12 +32,12 @@ switched:	has port switched?  y (yes), n
 
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf	switched
 	-	---	--	--			---	
-aarch64		y	n[3]	y	y		n		?	y	?
-aarch64eb	y	n[3]	y	y		n		?	?	?
+aarch64		y	y	y	y		y		y	y	n
+aarch64eb	y	y	y	y		y		y	?	?
 alpha		y	y	y	y		y		y	y	y
 earmv4		y	y	y	y		y		y	?	n
 earmv4eb	y	b	y	y		y		?	?	?
-earmv5		y	b	y	y		y		?	?	?
+earmv5		y	b	y	y		y		y	y	n
 earmv5eb	y	b	y	y		y		?	?	?
 earmv5hf	y	b	y	y		y		?	?	?
 earmv5hfeb	y	b	y	y		y		?	?	?
@@ -48,7 +48,7 @@ earmv6hfeb	y	b	y	y		y		?	?	?
 earmv7		y	b	y	y		y		?	?	?
 earmv7eb	y	b	y	y		y		?	?	?
 earmv7hf	y	y	y	y		y		y	y	n
-earmv7hfeb	y	b	y	y		y		?	?	?
+earmv7hfeb	y	b	y	y		y		y	y	n
 hppa		y	y	y	y		y		y	y	y
 i386		y	y	y	y		y		y	n[8]	?
 ia64		y	y	y	y		y		?	N/A	y
@@ -74,7 +74,6 @@ coldfire	?	N/A	?	?		?		N/A	N/A
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 
 [1] - ramdisk.fs is too large, needs fixing.
-[3] - missing __aarch64_swp1_acq in kernels.
 [6] - vax vs c++ exceptions issue, same as it ever was
 [7] - fails just as poorly in gxemul/landisk as GCC 9
 [8] - i386 seems to have a signal delivery issue.  pthread tests hang and then



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

2021-04-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 20 10:39:59 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/aarch64: aarch64-builtins.c

Log Message:
give a structure a name.

it makes GCC 10 less unhappy about building arm64 GCC 10.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.10 -r1.2 \
src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-builtins.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/gpl3/gcc/dist/gcc/config/aarch64/aarch64-builtins.c
diff -u src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-builtins.c:1.1.1.10 src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-builtins.c:1.2
--- src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-builtins.c:1.1.1.10	Sat Apr 10 22:09:46 2021
+++ src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-builtins.c	Tue Apr 20 10:39:58 2021
@@ -1206,7 +1206,7 @@ aarch64_init_rng_builtins (void)
 }
 
 /* Initialize the memory tagging extension (MTE) builtins.  */
-struct
+struct aarch64_mte
 {
   tree ftype;
   enum insn_code icode;



CVS commit: src/external/gpl3/gcc

2021-04-19 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 19 08:40:15 UTC 2021

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

Log Message:
hppa switched.  sh3el seems ready.  m68k atf wasn't fail..


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/README.gcc10

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.13 src/external/gpl3/gcc/README.gcc10:1.14
--- src/external/gpl3/gcc/README.gcc10:1.13	Sat Apr 17 22:03:57 2021
+++ src/external/gpl3/gcc/README.gcc10	Mon Apr 19 08:40:15 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.13 2021/04/17 22:03:57 mrg Exp $
+$NetBSD: README.gcc10,v 1.14 2021/04/19 08:40:15 mrg Exp $
 
 
 new stuff:
@@ -49,11 +49,11 @@ earmv7		y	b	y	y		y		?	?	?
 earmv7eb	y	b	y	y		y		?	?	?
 earmv7hf	y	y	y	y		y		y	y	n
 earmv7hfeb	y	b	y	y		y		?	?	?
-hppa		y	y	y	y		y		y	?	?
+hppa		y	y	y	y		y		y	y	y
 i386		y	y	y	y		y		y	n[8]	?
 ia64		y	y	y	y		y		?	N/A	y
 m68000		y	b	y	y		n[1]		?	?	?
-m68k		y	y	y	y		y[9]		y	n	n
+m68k		y	y	y	y		y[9]		y	?	n
 mipseb		y	y	y	y		y		y	?	?
 mipsel		y	y	y	y		y		y	?	?
 mips64eb	y	y	y	y		y		y	?	?
@@ -61,7 +61,7 @@ mips64el	y	b	y	y		y		y	?	?
 powerpc		y	b	y	y		y		y	?	n
 powerpc64	y	b	y	y		y		N/A	N/A	n
 sh3eb		y	b	y	y		y		?	?	?
-sh3el		y	y	y	y		y		y	y[7]	?
+sh3el		y	y	y	y		y		y	y[7]	n
 sparc		y	y	y	y		y		y	y	y
 sparc64		y	y	y	y		y		y	y	y
 vax		y	y	y	y		y		y	n[6]	y



CVS commit: src/external/gpl3/gcc

2021-04-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Apr 17 22:03:58 UTC 2021

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

Log Message:
arm64-gcc10 can run atf fine (with a GCC 9 kernel.)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gcc/README.gcc10

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.12 src/external/gpl3/gcc/README.gcc10:1.13
--- src/external/gpl3/gcc/README.gcc10:1.12	Sat Apr 17 22:01:02 2021
+++ src/external/gpl3/gcc/README.gcc10	Sat Apr 17 22:03:57 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.12 2021/04/17 22:01:02 mrg Exp $
+$NetBSD: README.gcc10,v 1.13 2021/04/17 22:03:57 mrg Exp $
 
 
 new stuff:
@@ -32,7 +32,7 @@ switched:	has port switched?  y (yes), n
 
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf	switched
 	-	---	--	--			---	
-aarch64		y	n[3]	y	y		n		?	?	?
+aarch64		y	n[3]	y	y		n		?	y	?
 aarch64eb	y	n[3]	y	y		n		?	?	?
 alpha		y	y	y	y		y		y	y	y
 earmv4		y	y	y	y		y		y	?	n



CVS commit: src/external/gpl3/gcc

2021-04-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Apr 17 22:01:02 UTC 2021

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

Log Message:
it's spelled aarch64eb.  now aarch64eb userland builds, too.
update arm64 status (kernels still need new libkern help.)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/README.gcc10
cvs rdiff -u -r1.48 -r1.49 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/README.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.11 src/external/gpl3/gcc/README.gcc10:1.12
--- src/external/gpl3/gcc/README.gcc10:1.11	Sat Apr 17 04:07:16 2021
+++ src/external/gpl3/gcc/README.gcc10	Sat Apr 17 22:01:02 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.11 2021/04/17 04:07:16 mrg Exp $
+$NetBSD: README.gcc10,v 1.12 2021/04/17 22:01:02 mrg Exp $
 
 
 new stuff:
@@ -32,8 +32,8 @@ switched:	has port switched?  y (yes), n
 
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf	switched
 	-	---	--	--			---	
-aarch64		y	n[3]	n[3]	y		n		?	?	?
-aarch64be	y	n[3]	n[3]	y		n		?	?	?
+aarch64		y	n[3]	y	y		n		?	?	?
+aarch64eb	y	n[3]	y	y		n		?	?	?
 alpha		y	y	y	y		y		y	y	y
 earmv4		y	y	y	y		y		y	?	n
 earmv4eb	y	b	y	y		y		?	?	?
@@ -74,7 +74,7 @@ coldfire	?	N/A	?	?		?		N/A	N/A
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 
 [1] - ramdisk.fs is too large, needs fixing.
-[3] - missing __aarch64_swp1_acq in kernels.  missing lse.S in libgcc.
+[3] - missing __aarch64_swp1_acq in kernels.
 [6] - vax vs c++ exceptions issue, same as it ever was
 [7] - fails just as poorly in gxemul/landisk as GCC 9
 [8] - i386 seems to have a signal delivery issue.  pthread tests hang and then

Index: src/external/gpl3/gcc/lib/libgcc/Makefile.inc
diff -u src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.48 src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.49
--- src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.48	Sat Apr 17 10:54:46 2021
+++ src/external/gpl3/gcc/lib/libgcc/Makefile.inc	Sat Apr 17 22:01:02 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.48 2021/04/17 10:54:46 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.49 2021/04/17 22:01:02 mrg Exp $
 
 LIBGCC_MACHINE_ARCH?=${MACHINE_ARCH:S/earmv5/earm/}
 GCC_MACHINE_SUBDIR=${MACHINE_CPU:C/powerpc.*/rs6000/:C/x86_64/i386/}
@@ -170,7 +170,7 @@ ${LIB1ASMFUNCS}: ${.CURDIR}/Makefile
 
 .if ${LIB} == "gcc" && \
 (${LIBGCC_MACHINE_ARCH} == "aarch64" || \
- ${LIBGCC_MACHINE_ARCH} == "aarch64be") # {
+ ${LIBGCC_MACHINE_ARCH} == "aarch64eb") # {
 # XXX lse.S objects are placed directly into "libgcc-objects" for GCC, and
 # are not pulled out by mknative-gcc easily.
 . for s in 1 2 4 8 16



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

2021-04-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Apr 17 10:54:47 UTC 2021

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

Log Message:
add support for arm64 lse.S.

arm64 userland much happier now.  /usr/bin/gcc as gcc 10 on arm64
is fine, build is complete, though i did not test xsrc yet.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/external/gpl3/gcc/lib/libgcc/Makefile.inc
cvs rdiff -u -r1.29 -r1.30 src/external/gpl3/gcc/lib/libgcc/libgcc/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/lib/libgcc/Makefile.inc
diff -u src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.47 src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.48
--- src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.47	Mon Apr 12 00:05:55 2021
+++ src/external/gpl3/gcc/lib/libgcc/Makefile.inc	Sat Apr 17 10:54:46 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.47 2021/04/12 00:05:55 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.48 2021/04/17 10:54:46 mrg Exp $
 
 LIBGCC_MACHINE_ARCH?=${MACHINE_ARCH:S/earmv5/earm/}
 GCC_MACHINE_SUBDIR=${MACHINE_CPU:C/powerpc.*/rs6000/:C/x86_64/i386/}
@@ -30,9 +30,11 @@ CPPFLAGS+=	${G_INTERNAL_CFLAGS:M-DHAVE_C
 .if ${LIBGCC_MACHINE_ARCH} == "powerpc" || \
 ${LIBGCC_MACHINE_ARCH} == "sh3el" || \
 ${LIBGCC_MACHINE_ARCH} == "sh3eb" || \
-${LIBGCC_MACHINE_ARCH} == "m68000"
+${LIBGCC_MACHINE_ARCH} == "m68000" || \
+${LIBGCC_MACHINE_ARCH} == "aarch64" || \
+${LIBGCC_MACHINE_ARCH} == "aarch64eb"
 _TRADITIONAL_CPP=
-COMPILE.S=	${CC} ${AFLAGS} ${CPPFLAGS} -c
+COMPILE.S=	${CC} ${AFLAGS} ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} -c 
 .endif
 
 .if ${LIBGCC_MACHINE_ARCH} == "powerpc"
@@ -166,6 +168,40 @@ ${LIB1ASMFUNCS}: ${.CURDIR}/Makefile
 	printf '#define L${.PREFIX}\n#include <${G_LIB1ASMSRC}>\n' >${.TARGET}
 .endif
 
+.if ${LIB} == "gcc" && \
+(${LIBGCC_MACHINE_ARCH} == "aarch64" || \
+ ${LIBGCC_MACHINE_ARCH} == "aarch64be") # {
+# XXX lse.S objects are placed directly into "libgcc-objects" for GCC, and
+# are not pulled out by mknative-gcc easily.
+. for s in 1 2 4 8 16
+.  for m in 1 2 3 4
+.   for n in cas
+LSE_NAMES+=			${n}_${s}_${m}
+CPPFLAGS.${n}_${s}_${m}+=	-DL_${n} -DSIZE=${s} -DMODEL=${m}
+.   endfor
+.  endfor
+. endfor
+
+. for s in 1 2 4 8
+.  for m in 1 2 3 4
+.   for n in swp ldadd ldclr ldeor ldset
+LSE_NAMES+=			${n}_${s}_${m}
+CPPFLAGS.${n}_${s}_${m}+=	-DL_${n} -DSIZE=${s} -DMODEL=${m}
+.   endfor
+.  endfor
+. endfor
+
+LSE_SRC=	${GNUHOSTDIST}/libgcc/config/aarch64/lse.S
+
+${LSE_NAMES:=.o}: ${LSE_SRC} Makefile
+	${_MKTARGET_COMPILE}
+	${COMPILE.S} ${CPPFLAGS.${.TARGET:T:.o=}} -o ${.TARGET} ${LSE_SRC}
+
+# lse-init.c currently compiles to nothing for us
+G_LIB2ADD+=	${GNUHOSTDIST}/libgcc/config/aarch64/lse-init.c
+
+.endif # } arm64
+
 # Use dynamic sources to arrange for the C file to be the first dependency
 # so ${.IMPSRC} will work.
 

Index: src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile
diff -u src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.29 src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.30
--- src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.29	Mon Apr 12 00:05:55 2021
+++ src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile	Sat Apr 17 10:54:46 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.29 2021/04/12 00:05:55 mrg Exp $
+#	$NetBSD: Makefile,v 1.30 2021/04/17 10:54:46 mrg Exp $
 
 REQUIRETOOLS=	yes
 NOLINT=		# defined
@@ -32,7 +32,8 @@ LIB2ADD_EDITED=	${G_LIB2ADD:T:S/.asm/.S/
 SRCS+=		${LIB2FUNCS} ${LIB2FUNCS_ST} ${LIB2DIVMOD} \
 		${LIB2ADD_EDITED} \
 		${LIB2ADD_HACK:T:S/.asm/.S/} \
-		${G_LIB2ADD_ST:T} ${LIB1ASMFUNCS}
+		${G_LIB2ADD_ST:T} ${LIB1ASMFUNCS} \
+		${LSE_NAMES:=.o}
 .if ${MKPIC} == "no"
 .if empty(LIBGCC_MACHINE_ARCH:Mearm*)
 SRCS+=		${LIB2_EH} ${LIB2_EHASM}



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

2021-04-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Apr 17 10:53:18 UTC 2021

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

Log Message:
remove double arm64 netbsd target.  add t-lse, though we don't
pull this out with mknative currently.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/external/gpl3/gcc/dist/libgcc/config.host

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/libgcc/config.host
diff -u src/external/gpl3/gcc/dist/libgcc/config.host:1.29 src/external/gpl3/gcc/dist/libgcc/config.host:1.30
--- src/external/gpl3/gcc/dist/libgcc/config.host:1.29	Sun Apr 11 00:02:18 2021
+++ src/external/gpl3/gcc/dist/libgcc/config.host	Sat Apr 17 10:53:18 2021
@@ -377,6 +377,7 @@ aarch64*-*-freebsd*)
 aarch64*-*-netbsd*)
 	extra_parts="$extra_parts crtfastmath.o"
 	tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
+	tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
 	tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
 	md_unwind_header=aarch64/aarch64-unwind.h
 	;;
@@ -385,12 +386,6 @@ aarch64*-*-fuchsia*)
 	tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
 	tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp"
 	;;
-aarch64*-*-netbsd*)
-	extra_parts="$extra_parts crtfastmath.o"
-	tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
-	tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
-	md_unwind_header=aarch64/aarch64-unwind.h
-	;;
 aarch64*-*-linux*)
 	extra_parts="$extra_parts crtfastmath.o"
 	md_unwind_header=aarch64/linux-unwind.h



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

2021-04-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Apr 17 10:19:09 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/aarch64: driver-aarch64.c

Log Message:
port the -mnative support in GCC 10 to netbsd.  (much simpler than 8->9!)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.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/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c
diff -u src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.11 src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.12
--- src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.11	Sun Apr 11 00:02:13 2021
+++ src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c	Sat Apr 17 10:19:09 2021
@@ -514,9 +514,6 @@ host_detect_local_cpu (int argc, const c
 	}
 #endif
 
-	  strncpy(buf, exts.c_str(), sizeof(buf) - 1);
-	  buf[sizeof(buf) - 1] = '\0';
-
   for (i = 0; i < num_exts; i++)
 {
 	  const char *p = aarch64_extensions[i].feat_string;
@@ -530,13 +527,13 @@ host_detect_local_cpu (int argc, const c
 
 	  /* This may be a multi-token feature string.  We need
 		 to match all parts, which could be in any order.  */
-	  size_t len = strlen (buf);
+	  size_t len = strlen (exts.c_str());
 	  do
 		{
 		  const char *end = strchr (p, ' ');
 		  if (end == NULL)
 		end = strchr (p, '\0');
-		  if (memmem (buf, len, p, end - p) == NULL)
+		  if (memmem (exts.c_str(), len, p, end - p) == NULL)
 		{
 		  /* Failed to match this token.  Turn off the
 			 features we'd otherwise enable.  */



CVS commit: src/external/gpl3/gcc

2021-04-16 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Apr 17 01:59:41 UTC 2021

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

Log Message:
various updates, thanks to those who provided feedback.

- powerpc ports work
- m68k ports work, x68k has a new caveat
- hppa works
- mips64eb vs UVMHIST has been fix
- i386 reboot problem fixed (cardbus issue, not GCC related)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc/README.gcc10

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.9 src/external/gpl3/gcc/README.gcc10:1.10
--- src/external/gpl3/gcc/README.gcc10:1.9	Thu Apr 15 05:12:57 2021
+++ src/external/gpl3/gcc/README.gcc10	Sat Apr 17 01:59:41 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.9 2021/04/15 05:12:57 mrg Exp $
+$NetBSD: README.gcc10,v 1.10 2021/04/17 01:59:41 mrg Exp $
 
 
 new stuff:
@@ -49,17 +49,17 @@ earmv7		y	b	y	y		y		?	?	?
 earmv7eb	y	b	y	y		y		?	?	?
 earmv7hf	y	y	y	y		y		y	y	n
 earmv7hfeb	y	b	y	y		y		?	?	?
-hppa		y	b	y	y		y		?	?	?
+hppa		y	y	y	y		y		y	?	?
 i386		y	y	y	y		y		y	n[8]	?
 ia64		y	y	y	y		y		?	N/A	n
 m68000		y	b	y	y		n[1]		?	?	?
-m68k		y	y	y	y		y[9]		y	?	?
+m68k		y	y	y	y		y[9]		y	n	n
 mipseb		y	y	y	y		y		y	?	?
 mipsel		y	y	y	y		y		y	?	?
-mips64eb	y	y	y	y		y		n[4]	?	?
+mips64eb	y	y	y	y		y		y	?	?
 mips64el	y	b	y	y		y		y	?	?
-powerpc		y	b	y	y		y		n[2]	?	?
-powerpc64	y	b	y	y		y		N/A	N/A	?
+powerpc		y	b	y	y		y		y	?	n
+powerpc64	y	b	y	y		y		N/A	N/A	n
 sh3eb		y	b	y	y		y		?	?	?
 sh3el		y	y	y	y		y		y	y[7]	?
 sparc		y	y	y	y		y		y	y	n
@@ -74,36 +74,22 @@ coldfire	?	N/A	?	?		?		N/A	N/A
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 
 [1] - ramdisk.fs is too large, needs fixing.
-[2] - powerpc ports have regressions; fixes incoming from rin@
 [3] - missing __aarch64_swp1_acq in kernels.  missing lse.S in libgcc.
-[4] - edgerouter lite3 crashes early in boot:
-  [   1.000] u-boot bootmem desc @ 0x24108 version 3.0
-  [   1.000] phys segment: 0xfc000 @ 0x102000
-  [   1.000] adding 0xfc000 @ 0x102000 to freelist 3
-  [   1.000] phys segment: 0x7276000 @ 0xe8a000
-  [   1.000] adding 0x7276000 @ 0xe8a000 to freelist 3
-  [   1.000] phys segment: 0x7efa000 @ 0x8102000
-  [   1.000] adding 0x7efa000 @ 0x8102000 to freelist 3
-  [   1.000] phys segment: 0xff0 @ 0x41000
-  [   1.000] adding 0xff0 @ 0x41000 to freelist 0
-  [   1.000] pid 0(system): trap: cpu0, TLB miss (load or instr. fetch) in kernel mode
-  [   1.000] status=0xa3, cause=0x8, epc=0x802564d4, vaddr=0
-  [   1.000] tf=0x98165bb0 ksp=0x98165cf0 ra=0x80256470 ppl=0
-  [   1.000] kernel: TLB miss (load or instr. fetch) trap
-  Stopped in pid 0.0 (system) at  802564d4:   sw  zero,16(s0)
-  0x98165cf0: 0x802563+0xd8 (0x8000,0,0,0xc800) ra 0x803edd18 sz 0
-  0x98165cf0: 0x803edc+0x84 (0x8000,0,0,0xc800) ra 0 sz 0
-- OCTEON kernel seems OK, something in my private configuration?
 [6] - vax vs c++ exceptions issue, same as it ever was
 [7] - fails just as poorly in gxemul/landisk as GCC 9
-[8] - i386 seems to have a signal delivery issue.  GCC 9 or 10 kernels are
-  unable to reboot properly, and GCC 10 atf runs hang in signal delivery.
-  bisection so far has reduced bug introduction between 2020-05-08 and
-  2020-05-15.  possibly pthread or condvar changes in this period.
+[8] - i386 seems to have a signal delivery issue.  pthread tests hang and then
+  complain with eg:
+	  threads_and_exec: q[ 627.6700846] sorry, pid 3154 was killed: orphaned traced process
+  this problem occurs with GCC 9 as well.
 [9] - x68k/stand fails with:
   link  loadbsd/loadbsd.x
   loadbsd1: program header #1 is not loadable
-  may be due to it pulling in libc sources that get TLS marked?
+  problem is understood (thanks tsutsui@): previously loadbsd was linked
+  against normal userland libc components for m68k, which allows it to
+  detect running on m68000 CPU and sanely fail, instead of an barf error.
+  new gcc built libc includes TLS support, that isn't compatible with this
+  and the conversion process fails.  can be fixed by using libkern instead,
+  and accepting the poor error on m68000.
 
 
 
@@ -114,7 +100,7 @@ CPU		platform list
 ---		 
 		acorn32		cats	epoc32	evbarm-eb	evbarm-el	hpcarm		iyonix		netwinder	shark 		zaurus
 earmv4:		y		y	y	y		y		y		 		y		y		 
-earm:		 		 	 	r		y		 		y		 		 		y
+earm:		 		 	 	y		y		 		y		 		 		y
 earmhf:		 		 	 	y		y		 		 		 		 		 
 earmv6:		 		 	 	y		y
 earmv6hf:	 		 	 	y		y



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

2021-04-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Apr 16 02:33:28 UTC 2021

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

Log Message:
Restore our local change to remove GNU_STACK program header:


http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c#rev1.13

This was removed accidentally when merging GCC10 into our tree.

Note that some firmwares, e.g., Explora, refuse to execute ELF
kernel image if this program header is present.

Now, GCC10 becomes just fine for all three powerpc sub-archs, i.e.,
oea, booke, and ibm4xx, as far as I can see. No regressions are
observed for ATF.

OK mrg


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.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/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c
diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.26 src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.27
--- src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.26	Fri Apr 16 02:26:43 2021
+++ src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c	Fri Apr 16 02:33:28 2021
@@ -20284,7 +20284,7 @@ rs6000_elf_file_end (void)
 		 aix_struct_return ? 2 : 1);
 }
 #endif
-#if defined (POWERPC_LINUX) || defined (POWERPC_FREEBSD) || defined(POWERPC_NETBSD)
+#if defined (POWERPC_LINUX) || defined (POWERPC_FREEBSD)
   if (TARGET_32BIT || DEFAULT_ABI == ABI_ELFv2)
 file_end_indicate_exec_stack ();
 #endif



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

2021-04-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Apr 16 02:26:43 UTC 2021

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

Log Message:
Fix regression introduced to GCC10, where it wrongly recognizes 32-bit
processors as POWER9 if -misel flag is specified.

rs6000_machine_from_flags() assumes ISEL instructions are supported only
for POWER9 and successors. However, ISEL is also implemented for 32-bit
booke processors.

Since our kernel for booke is compiled with -misel, this regression
completely breaks it.

As a fix, check whether CPU is 64-bit capable or not, before checking
-misel flag.

The problem has been reported as 100108 to upstream:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100108

OK mrg


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.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/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c
diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.25 src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.26
--- src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.25	Fri Apr 16 02:18:04 2021
+++ src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c	Fri Apr 16 02:26:43 2021
@@ -5552,6 +5552,8 @@ rs6000_machine_from_flags (void)
   /* Disable the flags that should never influence the .machine selection.  */
   flags &= ~(OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT);
 
+  if ((flags & OPTION_MASK_POWERPC64) == 0)
+return "ppc";
   if ((flags & (ISA_3_1_MASKS_SERVER & ~ISA_3_0_MASKS_SERVER)) != 0)
 return "power10";
   if ((flags & (ISA_3_0_MASKS_SERVER & ~ISA_2_7_MASKS_SERVER)) != 0)
@@ -5566,9 +5568,7 @@ rs6000_machine_from_flags (void)
 return "power5";
   if ((flags & ISA_2_1_MASKS) != 0)
 return "power4";
-  if ((flags & OPTION_MASK_POWERPC64) != 0)
-return "ppc64";
-  return "ppc";
+  return "ppc64";
 }
 
 void



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

2021-04-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Apr 16 02:18:04 UTC 2021

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

Log Message:
Fix regression introduced to GCC10, by which inline assembler codes for
403/405 are miscompiled.

Redundant .machine directive introduced by upstream commit
2d94f7dea9c73ef3c116a0ddc722724578a860fe:


https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=2d94f7dea9c73ef3c116a0ddc722724578a860fe

clobbers CPU flags passed to assembler. This results in miscompile for
inline assembler codes specific to 403/405 processors, at least.

Therefore, revert this commit locally.

The problem has been reported as 100107 to upstream:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100107

OK mrg


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.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/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c
diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.24 src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.25
--- src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.24	Mon Apr 12 07:23:06 2021
+++ src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c	Fri Apr 16 02:18:04 2021
@@ -5644,7 +5644,9 @@ rs6000_file_start (void)
 
 #ifdef USING_ELFOS_H
   rs6000_machine = rs6000_machine_from_flags ();
-  emit_asm_machine ();
+  if (!(rs6000_default_cpu && rs6000_default_cpu[0])
+	&& !global_options_set.x_rs6000_cpu_index)
+emit_asm_machine ();
 #endif
 
   if (DEFAULT_ABI == ABI_ELFv2)



CVS commit: src/external/gpl3/gcc

2021-04-14 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Apr 15 05:15:04 UTC 2021

Added Files:
src/external/gpl3/gcc: README.warnings

Log Message:
document various gcc warnings that occur frequently enough to
inspire the GCC_NO_* series of variables, and explain some
about what the issues may be for each, hopefully providing some
direction on how to fix new warnings in this space.

christos asked me for this last year, and it's finally complete
enough to commit.  :-)


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

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

Added files:

Index: src/external/gpl3/gcc/README.warnings
diff -u /dev/null src/external/gpl3/gcc/README.warnings:1.1
--- /dev/null	Thu Apr 15 05:15:04 2021
+++ src/external/gpl3/gcc/README.warnings	Thu Apr 15 05:15:04 2021
@@ -0,0 +1,132 @@
+$NetBSD: README.warnings,v 1.1 2021/04/15 05:15:04 mrg Exp $
+
+What to do about GCC warnings and NetBSD.
+
+
+New GCC releases always come with a host of new warnings and
+each new warning can find real bugs, find odd code, or simply
+be a pain of new useless warnings, or all three and more.
+
+As each warning has its own set of issues they each have their
+own section and it is expected that this document will be
+modified for updates to warnings and new warnings.
+
+
+ provides several variables for use in Makefiles:
+   COPTS.foo.c += ${GCC_NO_FORMAT_TRUNCATION}
+   COPTS.foo.c += ${GCC_NO_FORMAT_OVERFLOW}
+   COPTS.foo.c += ${GCC_NO_STRINGOP_OVERFLOW}
+   COPTS.foo.c += ${GCC_NO_STRINGOP_TRUNCATION}
+   COPTS.foo.c += ${GCC_NO_CAST_FUNCTION_TYPE}
+   COPTS.foo.c += ${GCC_NO_IMPLICIT_FALLTHRU}
+   COPTS.foo.c += ${GCC_NO_ADDR_OF_PACKED_MEMBER}
+   COPTS.foo.c += ${GCC_NO_MAYBE_UNINITIALIZED}
+   COPTS.foo.c += ${GCC_NO_RETURN_LOCAL_ADDR}
+
+
+new GCC 10 warnings:
+
+  GCC 10 switched the default from "-fcommon" to "-fno-common",
+  which can cause multiply defined symbol issues.  Ideally we
+  fix all of these, but "-fcommon" can be used otherwise.
+
+  -Wno-maybe-uninitialized
+
+  This warning was introduced in an ancient GCC but was
+  significantly enhanced in GCC 10, unfortunately, many of
+  the new instances are incorrect.
+
+  bsd.own.mk variable: ${GCC_NO_MAYBE_UNINITIALIZED}
+
+  -Wno-return-local-addr
+
+  This warning was introduced in GCC 5 and was enhanced in GCC
+  10.  Unfortunately, the new instances are failing to correctly
+  analyze code flow and miss that most of the are handled.
+
+  bsd.own.mk variable: ${GCC_NO_RETURN_LOCAL_ADDR}
+
+
+new GCC 9 warnings:
+
+  -Wno-address-of-packed-member
+
+  This warning was introduced in GCC 8.
+  This warning is similar to -Wformat-truncation, but for the
+  general family of string functions (str*(), etc.), and has
+  similar issues of false positives.
+
+  bsd.own.mk variable: ${GCC_NO_ADDR_OF_PACKED_MEMBER}
+
+
+new GCC 8 warnings:
+
+  -Wstringop-truncation
+
+  This warning was introduced in GCC 8.
+  This warning is similar to -Wformat-truncation, but for the
+  general family of string functions (str*(), etc.), and has
+  similar issues of false positives.
+
+  bsd.own.mk variable: ${GCC_NO_STRINGOP_TRUNCATION}
+
+
+  -Wcast-function-type
+
+  This warning was introduced in GCC 8.
+  This warning can find real problems.  Most instances are
+  false positives, and hopefully this warning will become
+  more useful in the future.  See __FPTRCAST().
+
+  bsd.own.mk variable: ${GCC_NO_CAST_FUNCTION_TYPE}
+
+
+new GCC 7 warnings:
+
+  -Wstringop-overflow
+
+  This warning was introduced in GCC 7.
+  This warning can find issues where source length is
+  passed as destination length (eg, strncpy() where the
+  length is strlen(src)) that are potential buffer overflow
+  cases and should always be inspected, but false positives
+  are also seen.
+
+  bsd.own.mk variable: ${GCC_NO_STRINGOP_OVERFLOW}
+
+
+  -Wformat-truncation
+
+This warning was introduced in GCC 7.
+This warning has many false positives where truncation is
+either expected or unavoidable, but also finds several real
+code bugs.
+
+Code should always be manually inspected for this warning
+as it does pick up real issues.
+
+bsd.own.mk variable: ${GCC_NO_FORMAT_TRUNCATION}
+
+
+  -Wformat-overflow
+
+This warning was introduced in GCC 7.
+This warning typically identifies a real problem, but it may
+fail to notice the code handles this case.
+
+Code should always be manually inspected for this warning
+as it does pick up real issues.
+
+bsd.own.mk variable: ${GCC_NO_FORMAT_OVERFLOW}
+
+
+  -Wimplicit-fallthrough
+
+This warning was introduced in GCC 7.
+This warning has many false positives in GCC 7, and many are
+fixed in newer GCC 10.  Old uses should be checked 

CVS commit: src/external/gpl3/gcc

2021-04-14 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Apr 15 05:12:57 UTC 2021

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

Log Message:
feedback from rin@: alpha and m68k work well, powerpc not so much
but fixes are known.

thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc/README.gcc10

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.8 src/external/gpl3/gcc/README.gcc10:1.9
--- src/external/gpl3/gcc/README.gcc10:1.8	Thu Apr 15 01:59:51 2021
+++ src/external/gpl3/gcc/README.gcc10	Thu Apr 15 05:12:57 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.8 2021/04/15 01:59:51 mrg Exp $
+$NetBSD: README.gcc10,v 1.9 2021/04/15 05:12:57 mrg Exp $
 
 
 new stuff:
@@ -34,7 +34,7 @@ architecture	tools	kernels	libgcc	native
 	-	---	--	--			---	
 aarch64		y	n[3]	n[3]	y		n		?	?	?
 aarch64be	y	n[3]	n[3]	y		n		?	?	?
-alpha		y	b	y	y		y		?	?	?
+alpha		y	y	y	y		y		y	y	n
 earmv4		y	y	y	y		y		y	?	n
 earmv4eb	y	b	y	y		y		?	?	?
 earmv5		y	b	y	y		y		?	?	?
@@ -53,12 +53,12 @@ hppa		y	b	y	y		y		?	?	?
 i386		y	y	y	y		y		y	n[8]	?
 ia64		y	y	y	y		y		?	N/A	n
 m68000		y	b	y	y		n[1]		?	?	?
-m68k		y	y	y	y		y[9]		?	?	?
+m68k		y	y	y	y		y[9]		y	?	?
 mipseb		y	y	y	y		y		y	?	?
 mipsel		y	y	y	y		y		y	?	?
 mips64eb	y	y	y	y		y		n[4]	?	?
 mips64el	y	b	y	y		y		y	?	?
-powerpc		y	b	y	y		y		?	?	?
+powerpc		y	b	y	y		y		n[2]	?	?
 powerpc64	y	b	y	y		y		N/A	N/A	?
 sh3eb		y	b	y	y		y		?	?	?
 sh3el		y	y	y	y		y		y	y[7]	?
@@ -74,6 +74,7 @@ coldfire	?	N/A	?	?		?		N/A	N/A
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 
 [1] - ramdisk.fs is too large, needs fixing.
+[2] - powerpc ports have regressions; fixes incoming from rin@
 [3] - missing __aarch64_swp1_acq in kernels.  missing lse.S in libgcc.
 [4] - edgerouter lite3 crashes early in boot:
   [   1.000] u-boot bootmem desc @ 0x24108 version 3.0



CVS commit: src/external/gpl3/gcc

2021-04-14 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Apr 15 01:59:51 UTC 2021

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

Log Message:
i've test-built all platforms.  everything except arm64, x68k and sun2
builds.  many of them work as well.  most mips are (minimally) tested.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/README.gcc10

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.7 src/external/gpl3/gcc/README.gcc10:1.8
--- src/external/gpl3/gcc/README.gcc10:1.7	Wed Apr 14 01:19:13 2021
+++ src/external/gpl3/gcc/README.gcc10	Thu Apr 15 01:59:51 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.7 2021/04/14 01:19:13 mrg Exp $
+$NetBSD: README.gcc10,v 1.8 2021/04/15 01:59:51 mrg Exp $
 
 
 new stuff:
@@ -32,36 +32,36 @@ switched:	has port switched?  y (yes), n
 
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf	switched
 	-	---	--	--			---	
-aarch64		y	n[3]	y	y		n		?	?	?
-aarch64be	y	n	n	y		n		?	?	?
+aarch64		y	n[3]	n[3]	y		n		?	?	?
+aarch64be	y	n[3]	n[3]	y		n		?	?	?
 alpha		y	b	y	y		y		?	?	?
 earmv4		y	y	y	y		y		y	?	n
-earmv4eb	y	b	y	y		n		?	?	?
-earmv5		y	b	y	y		n		?	?	?
-earmv5eb	y	b	y	y		n		?	?	?
-earmv5hf	y	b	y	y		n		?	?	?
-earmv5hfeb	y	b	y	y		n		?	?	?
-earmv6		y	b	y	y		n		?	?	?
-earmv6eb	y	b	y	y		n		?	?	?
-earmv6hf	y	b	y	y		n		?	?	?
-earmv6hfeb	y	b	y	y		n		?	?	?
-earmv7		y	b	y	y		n		?	?	?
-earmv7eb	y	b	y	y		n		?	?	?
+earmv4eb	y	b	y	y		y		?	?	?
+earmv5		y	b	y	y		y		?	?	?
+earmv5eb	y	b	y	y		y		?	?	?
+earmv5hf	y	b	y	y		y		?	?	?
+earmv5hfeb	y	b	y	y		y		?	?	?
+earmv6		y	b	y	y		y		?	?	?
+earmv6eb	y	b	y	y		y		?	?	?
+earmv6hf	y	b	y	y		y		?	?	?
+earmv6hfeb	y	b	y	y		y		?	?	?
+earmv7		y	b	y	y		y		?	?	?
+earmv7eb	y	b	y	y		y		?	?	?
 earmv7hf	y	y	y	y		y		y	y	n
 earmv7hfeb	y	b	y	y		y		?	?	?
 hppa		y	b	y	y		y		?	?	?
 i386		y	y	y	y		y		y	n[8]	?
-ia64		y	y	y	y		n[2]		?	N/A	n
+ia64		y	y	y	y		y		?	N/A	n
 m68000		y	b	y	y		n[1]		?	?	?
-m68k		y	y	y	y		y		?	?	?
-mipseb		y	b	y	y		y		?	?	?
-mipsel		y	b	y	y		y		?	?	?
-mips64eb	y	y	y	y		y		n[4,5]	?	?
-mips64el	y	b	y	y		y		?	?	?
+m68k		y	y	y	y		y[9]		?	?	?
+mipseb		y	y	y	y		y		y	?	?
+mipsel		y	y	y	y		y		y	?	?
+mips64eb	y	y	y	y		y		n[4]	?	?
+mips64el	y	b	y	y		y		y	?	?
 powerpc		y	b	y	y		y		?	?	?
 powerpc64	y	b	y	y		y		N/A	N/A	?
 sh3eb		y	b	y	y		y		?	?	?
-sh3el		y	y	y	y		y		y	?	?
+sh3el		y	y	y	y		y		y	y[7]	?
 sparc		y	y	y	y		y		y	y	n
 sparc64		y	y	y	y		y		y	y	n
 vax		y	y	y	y		y		y	n[6]	n
@@ -74,12 +74,7 @@ coldfire	?	N/A	?	?		?		N/A	N/A
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 
 [1] - ramdisk.fs is too large, needs fixing.
-[2] - rescue fails to build:
-  /tmp//ccnNTCsS.s: Assembler messages:
-  /tmp//ccnNTCsS.s:610: Warning: .label_state outside of body region
-  /tmp//ccnNTCsS.s:611: Warning: .restore outside of body region
-  /tmp//ccnNTCsS.s: Error: 2 warnings, treating warnings as errors
-[3] - missing __aarch64_swp1_acq in kernels.
+[3] - missing __aarch64_swp1_acq in kernels.  missing lse.S in libgcc.
 [4] - edgerouter lite3 crashes early in boot:
   [   1.000] u-boot bootmem desc @ 0x24108 version 3.0
   [   1.000] phys segment: 0xfc000 @ 0x102000
@@ -98,13 +93,16 @@ architecture	tools	kernels	libgcc	native
   0x98165cf0: 0x802563+0xd8 (0x8000,0,0,0xc800) ra 0x803edd18 sz 0
   0x98165cf0: 0x803edc+0x84 (0x8000,0,0,0xc800) ra 0 sz 0
 - OCTEON kernel seems OK, something in my private configuration?
-[5] - userland is broken.  some dynamic apps run on old install (ie, old
-  ld.elf_so & shlibs) but nothing in chroot runs (static or dynamic).
-  memset.c compiles wrongly, wants -ffreestanding.  oddness.
-[6] - vax vs c++ exceptions issue
+[6] - vax vs c++ exceptions issue, same as it ever was
+[7] - fails just as poorly in gxemul/landisk as GCC 9
 [8] - i386 seems to have a signal delivery issue.  GCC 9 or 10 kernels are
   unable to reboot properly, and GCC 10 atf runs hang in signal delivery.
-
+  bisection so far has reduced bug introduction between 2020-05-08 and
+  2020-05-15.  possibly pthread or condvar changes in this period.
+[9] - x68k/stand fails with:
+  link  loadbsd/loadbsd.x
+  loadbsd1: program header #1 is not loadable
+  may be due to it pulling in libc sources that get TLS marked?
 
 
 
@@ -114,33 +112,33 @@ values:		y (yes), k (kernels only), n (f
 CPU		platform list
 ---		 
 		acorn32		cats	epoc32	evbarm-eb	evbarm-el	hpcarm		iyonix		netwinder	shark 		zaurus
-earmv4:		k		k	k	k		k		k		 		k		y		 
-earm:		 		 	 	k		k		 		k		 		 		k
-earmhf:		 		 	 	k		k		 		 		 		 		 
-earmv6:		 		 	 	k		k
-earmv6hf:	 		 	 	k		k
-earmv7:		 		 	 	k		y
-earmv7hf:	 		 	 	y		k

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

2021-04-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 14 12:20:59 UTC 2021

Modified Files:
src/external/gpl3/gcc/usr.bin/lto1: Makefile

Log Message:
lto-common.c needs the stack protector treatment


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 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/lto1/Makefile
diff -u src/external/gpl3/gcc/usr.bin/lto1/Makefile:1.6 src/external/gpl3/gcc/usr.bin/lto1/Makefile:1.7
--- src/external/gpl3/gcc/usr.bin/lto1/Makefile:1.6	Sun Apr 11 20:05:56 2021
+++ src/external/gpl3/gcc/usr.bin/lto1/Makefile	Wed Apr 14 08:20:59 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2021/04/12 00:05:56 mrg Exp $
+#	$NetBSD: Makefile,v 1.7 2021/04/14 12:20:59 christos Exp $
 
 PROG=		lto1
 SRCS=		attribs.c \
@@ -14,6 +14,7 @@ CPPFLAGS+=	-DPREFIX=\"/usr\"
 
 COPTS.lto.c+=		-Wno-stack-protector
 COPTS.lto-lang.c+=	-Wno-stack-protector
+COPTS.lto-common.c+=	-Wno-stack-protector
 
 .include "../Makefile.backend"
 .include "../Makefile.backtrace"



CVS commit: src/external/gpl3/gcc

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Apr 14 01:19:13 UTC 2021

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

Log Message:
dtrace systrace.c issue fixed by christos (thanks!)

mips issue is related to memset.c miscompiling and does not
appear with -ffreestanding (thanks joerg & simonb.)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/README.gcc10

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.6 src/external/gpl3/gcc/README.gcc10:1.7
--- src/external/gpl3/gcc/README.gcc10:1.6	Tue Apr 13 22:24:56 2021
+++ src/external/gpl3/gcc/README.gcc10	Wed Apr 14 01:19:13 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.6 2021/04/13 22:24:56 mrg Exp $
+$NetBSD: README.gcc10,v 1.7 2021/04/14 01:19:13 mrg Exp $
 
 
 new stuff:
@@ -65,7 +65,7 @@ sh3el		y	y	y	y		y		y	?	?
 sparc		y	y	y	y		y		y	y	n
 sparc64		y	y	y	y		y		y	y	n
 vax		y	y	y	y		y		y	n[6]	n
-x86_64		y	y	y	y		y[7]		y	y	?
+x86_64		y	y	y	y		y		y	y	n
 riscv32		y	N/A	y	y		y		N/A	N/A	n
 riscv64		y	N/A	y	y		y		N/A	N/A	n
 --
@@ -100,13 +100,8 @@ architecture	tools	kernels	libgcc	native
 - OCTEON kernel seems OK, something in my private configuration?
 [5] - userland is broken.  some dynamic apps run on old install (ie, old
   ld.elf_so & shlibs) but nothing in chroot runs (static or dynamic).
+  memset.c compiles wrongly, wants -ffreestanding.  oddness.
 [6] - vax vs c++ exceptions issue
-[7] - with ctf/dtrace enabled, this happens:
-  /usr/src2/sys/kern/systrace_args.c:19:13: error: array subscript 8 is above array bounds of 'const union [8]' [-Werror=array-bounds]
- 19 |   iarg[1] = SCARG(p, args[SYS_MAXSYSARGS]); /* register_t */
-| ^
-  which makes sense as args[8] is out of bounds.
-  -- this issue has been -Wno-'d but should be investigated.
 [8] - i386 seems to have a signal delivery issue.  GCC 9 or 10 kernels are
   unable to reboot properly, and GCC 10 atf runs hang in signal delivery.
 



CVS commit: src/external/gpl3/gcc

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 22:24:56 UTC 2021

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

Log Message:
note amd64 dtrace issue is only warning for now.
note that i386 has problems in -current.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/README.gcc10

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.5 src/external/gpl3/gcc/README.gcc10:1.6
--- src/external/gpl3/gcc/README.gcc10:1.5	Tue Apr 13 10:10:25 2021
+++ src/external/gpl3/gcc/README.gcc10	Tue Apr 13 22:24:56 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.5 2021/04/13 10:10:25 mrg Exp $
+$NetBSD: README.gcc10,v 1.6 2021/04/13 22:24:56 mrg Exp $
 
 
 new stuff:
@@ -50,7 +50,7 @@ earmv7eb	y	b	y	y		n		?	?	?
 earmv7hf	y	y	y	y		y		y	y	n
 earmv7hfeb	y	b	y	y		y		?	?	?
 hppa		y	b	y	y		y		?	?	?
-i386		y	y	y	y		y		y	?	?
+i386		y	y	y	y		y		y	n[8]	?
 ia64		y	y	y	y		n[2]		?	N/A	n
 m68000		y	b	y	y		n[1]		?	?	?
 m68k		y	y	y	y		y		?	?	?
@@ -106,6 +106,9 @@ architecture	tools	kernels	libgcc	native
  19 |   iarg[1] = SCARG(p, args[SYS_MAXSYSARGS]); /* register_t */
 | ^
   which makes sense as args[8] is out of bounds.
+  -- this issue has been -Wno-'d but should be investigated.
+[8] - i386 seems to have a signal delivery issue.  GCC 9 or 10 kernels are
+  unable to reboot properly, and GCC 10 atf runs hang in signal delivery.
 
 
 



CVS commit: src/external/gpl3/gcc

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 10:10:25 UTC 2021

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

Log Message:
with dtrace enabled, there is at least one remaining issue for amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/README.gcc10

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.4 src/external/gpl3/gcc/README.gcc10:1.5
--- src/external/gpl3/gcc/README.gcc10:1.4	Tue Apr 13 08:57:39 2021
+++ src/external/gpl3/gcc/README.gcc10	Tue Apr 13 10:10:25 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.4 2021/04/13 08:57:39 mrg Exp $
+$NetBSD: README.gcc10,v 1.5 2021/04/13 10:10:25 mrg Exp $
 
 
 new stuff:
@@ -65,7 +65,7 @@ sh3el		y	y	y	y		y		y	?	?
 sparc		y	y	y	y		y		y	y	n
 sparc64		y	y	y	y		y		y	y	n
 vax		y	y	y	y		y		y	n[6]	n
-x86_64		y	y	y	y		y		y	y	n
+x86_64		y	y	y	y		y[7]		y	y	?
 riscv32		y	N/A	y	y		y		N/A	N/A	n
 riscv64		y	N/A	y	y		y		N/A	N/A	n
 --
@@ -101,6 +101,12 @@ architecture	tools	kernels	libgcc	native
 [5] - userland is broken.  some dynamic apps run on old install (ie, old
   ld.elf_so & shlibs) but nothing in chroot runs (static or dynamic).
 [6] - vax vs c++ exceptions issue
+[7] - with ctf/dtrace enabled, this happens:
+  /usr/src2/sys/kern/systrace_args.c:19:13: error: array subscript 8 is above array bounds of 'const union [8]' [-Werror=array-bounds]
+ 19 |   iarg[1] = SCARG(p, args[SYS_MAXSYSARGS]); /* register_t */
+| ^
+  which makes sense as args[8] is out of bounds.
+
 
 
 



CVS commit: src/external/gpl3/gcc

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 08:57:39 UTC 2021

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

Log Message:
sparc and amd64 successfully finished their atf runs.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/README.gcc10

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.3 src/external/gpl3/gcc/README.gcc10:1.4
--- src/external/gpl3/gcc/README.gcc10:1.3	Tue Apr 13 08:22:40 2021
+++ src/external/gpl3/gcc/README.gcc10	Tue Apr 13 08:57:39 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.3 2021/04/13 08:22:40 mrg Exp $
+$NetBSD: README.gcc10,v 1.4 2021/04/13 08:57:39 mrg Exp $
 
 
 new stuff:
@@ -62,10 +62,10 @@ powerpc		y	b	y	y		y		?	?	?
 powerpc64	y	b	y	y		y		N/A	N/A	?
 sh3eb		y	b	y	y		y		?	?	?
 sh3el		y	y	y	y		y		y	?	?
-sparc		y	y	y	y		y		y	?	?
+sparc		y	y	y	y		y		y	y	n
 sparc64		y	y	y	y		y		y	y	n
 vax		y	y	y	y		y		y	n[6]	n
-x86_64		y	y	y	y		y		y	?	?
+x86_64		y	y	y	y		y		y	y	n
 riscv32		y	N/A	y	y		y		N/A	N/A	n
 riscv64		y	N/A	y	y		y		N/A	N/A	n
 --



CVS commit: src/external/gpl3/gcc

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 08:22:40 UTC 2021

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

Log Message:
update the status of GCC.  summary:  mostly looking good.

- all targets build or can be attempted
- arm64 needs __aarch64_swp1_acq in both libgcc and libkern
- earmv4 works, earmv7hf works, all arm32 builds, rest untested
- hppa, most/all m68k, alpha, and most ppc builds, none tested
- ia64 kernel runs as well as before, userland fails to build
- i386 runs, seems mostly fine except lib/libc/sys/t_ptrace_wait
  resume test is hung, and cpu-spinning in a zombie
- sun2 grew again, too large but builds besides RAMDISK not fitting
- mips seems problematic.  some kernels fail some work, userland
  has problems with both static and dynamic n32 and n64 programs
- sh3el seems ok in gxemul/landisk, sh3eb not tested
- vax seems OK in simh (same c++ exception issues)

all ports kernels have been tested to build (though perhaps with
some uncommited changes only needed for some, while most changes
are commited, about 15 are not but many ports build without them.)


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

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.2 src/external/gpl3/gcc/README.gcc10:1.3
--- src/external/gpl3/gcc/README.gcc10:1.2	Mon Apr 12 08:31:30 2021
+++ src/external/gpl3/gcc/README.gcc10	Tue Apr 13 08:22:40 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.2 2021/04/12 08:31:30 mrg Exp $
+$NetBSD: README.gcc10,v 1.3 2021/04/13 08:22:40 mrg Exp $
 
 
 new stuff:
@@ -21,7 +21,7 @@ todo:
 arch/feature list.
 
 tools:		does build.sh tools work?
-kernels:	does a kernel run?
+kernels:	does a kernel run?  y (yes), b (builds/ready), ? (not ready)
 libgcc:		does libgcc build?
 native-gcc:	does a full mknative-gcc complete?
 make release:	does build.sh release complete?
@@ -34,37 +34,37 @@ architecture	tools	kernels	libgcc	native
 	-	---	--	--			---	
 aarch64		y	n[3]	y	y		n		?	?	?
 aarch64be	y	n	n	y		n		?	?	?
-alpha		y	n	n	y		n		?	?	?
-earmv4		y	n	n	y		n		?	?	?
-earmv4eb	y	n	n	y		n		?	?	?
-earmv5		y	n	n	y		n		?	?	?
-earmv5eb	y	n	n	y		n		?	?	?
-earmv5hf	y	n	n	y		n		?	?	?
-earmv5hfeb	y	n	n	y		n		?	?	?
-earmv6		y	n	n	y		n		?	?	?
-earmv6eb	y	n	n	y		n		?	?	?
-earmv6hf	y	n	n	y		n		?	?	?
-earmv6hfeb	y	n	n	y		n		?	?	?
-earmv7		y	n	n	y		n		?	?	?
-earmv7eb	y	n	n	y		n		?	?	?
-earmv7hf	y	n	n	y		n		?	?	?
-earmv7hfeb	y	n	n	y		n		?	?	?
-hppa		y	n	n	y		n		?	?	?
-i386		y	n	n	y		n		?	?	?
-ia64		y	n	n	y		n		?	N/A	?
-m68000		y	n	n	y		n		?	?	?
-m68k		y	n	n	y		n		?	?	?
-mipseb		y	n	y	y		y		?	?	?
-mipsel		y	n	y	y		y		?	?	?
-mips64eb	y	n	y	y		y		?	?	?
-mips64el	y	n	y	y		y		?	?	?
-powerpc		y	n	y	y		y		?	?	?
-powerpc64	y	n	y	y		y		N/A	N/A	?
-sh3eb		y	n	n	y		n		?	?	?
-sh3el		y	n	n	y		n		?	?	?
+alpha		y	b	y	y		y		?	?	?
+earmv4		y	y	y	y		y		y	?	n
+earmv4eb	y	b	y	y		n		?	?	?
+earmv5		y	b	y	y		n		?	?	?
+earmv5eb	y	b	y	y		n		?	?	?
+earmv5hf	y	b	y	y		n		?	?	?
+earmv5hfeb	y	b	y	y		n		?	?	?
+earmv6		y	b	y	y		n		?	?	?
+earmv6eb	y	b	y	y		n		?	?	?
+earmv6hf	y	b	y	y		n		?	?	?
+earmv6hfeb	y	b	y	y		n		?	?	?
+earmv7		y	b	y	y		n		?	?	?
+earmv7eb	y	b	y	y		n		?	?	?
+earmv7hf	y	y	y	y		y		y	y	n
+earmv7hfeb	y	b	y	y		y		?	?	?
+hppa		y	b	y	y		y		?	?	?
+i386		y	y	y	y		y		y	?	?
+ia64		y	y	y	y		n[2]		?	N/A	n
+m68000		y	b	y	y		n[1]		?	?	?
+m68k		y	y	y	y		y		?	?	?
+mipseb		y	b	y	y		y		?	?	?
+mipsel		y	b	y	y		y		?	?	?
+mips64eb	y	y	y	y		y		n[4,5]	?	?
+mips64el	y	b	y	y		y		?	?	?
+powerpc		y	b	y	y		y		?	?	?
+powerpc64	y	b	y	y		y		N/A	N/A	?
+sh3eb		y	b	y	y		y		?	?	?
+sh3el		y	y	y	y		y		y	?	?
 sparc		y	y	y	y		y		y	?	?
-sparc64		y	y	y	y		y		y	?	?
-vax		y	n	n	y		n		?	?	?
+sparc64		y	y	y	y		y		y	y	n
+vax		y	y	y	y		y		y	n[6]	n
 x86_64		y	y	y	y		y		y	?	?
 riscv32		y	N/A	y	y		y		N/A	N/A	n
 riscv64		y	N/A	y	y		y		N/A	N/A	n
@@ -73,8 +73,34 @@ coldfire	?	N/A	?	?		?		N/A	N/A
 	-	---	--	--			---
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 
+[1] - ramdisk.fs is too large, needs fixing.
+[2] - rescue fails to build:
+  /tmp//ccnNTCsS.s: Assembler messages:
+  /tmp//ccnNTCsS.s:610: Warning: .label_state outside of body region
+  /tmp//ccnNTCsS.s:611: Warning: .restore outside of body region
+  /tmp//ccnNTCsS.s: Error: 2 warnings, treating warnings as errors
 [3] - missing __aarch64_swp1_acq in kernels.
-
+[4] - edgerouter lite3 crashes early in boot:
+  [   1.000] u-boot bootmem desc @ 0x24108 version 3.0
+  [   1.000] phys segment: 0xfc000 @ 0x102000
+  [   1.000] adding 0xfc000 @ 0x102000 to freelist 3
+  [   1.000] phys segment: 0x7276000 @ 0xe8a000
+  [   1.000] adding 0x7276000 @ 0xe8a000 to freelist 3
+  [   1.000] phys 

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

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 08:06:11 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/libgcc: emutls.c

Log Message:
make this match the builtin prototypes.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.9 -r1.2 src/external/gpl3/gcc/dist/libgcc/emutls.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/gpl3/gcc/dist/libgcc/emutls.c
diff -u src/external/gpl3/gcc/dist/libgcc/emutls.c:1.1.1.9 src/external/gpl3/gcc/dist/libgcc/emutls.c:1.2
--- src/external/gpl3/gcc/dist/libgcc/emutls.c:1.1.1.9	Sat Apr 10 22:09:58 2021
+++ src/external/gpl3/gcc/dist/libgcc/emutls.c	Tue Apr 13 08:06:11 2021
@@ -50,8 +50,8 @@ struct __emutls_array
   void **data[];
 };
 
-void *__emutls_get_address (struct __emutls_object *);
-void __emutls_register_common (struct __emutls_object *, word, word, void *);
+void *__emutls_get_address (void *);
+void __emutls_register_common (void *, word, word, void *);
 
 #ifdef __GTHREADS
 #ifdef __GTHREAD_MUTEX_INIT
@@ -124,8 +124,10 @@ emutls_alloc (struct __emutls_object *ob
 }
 
 void *
-__emutls_get_address (struct __emutls_object *obj)
+__emutls_get_address (void *vobj)
 {
+  struct __emutls_object *obj = vobj;
+
   if (! __gthread_active_p ())
 {
   if (__builtin_expect (obj->loc.ptr == NULL, 0))
@@ -188,9 +190,11 @@ __emutls_get_address (struct __emutls_ob
 }
 
 void
-__emutls_register_common (struct __emutls_object *obj,
+__emutls_register_common (void *vobj,
 			  word size, word align, void *templ)
 {
+  struct __emutls_object *obj = vobj;
+
   if (obj->size < size)
 {
   obj->size = size;



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

2021-04-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 13 06:30:36 UTC 2021

Modified Files:
src/external/gpl3/gcc/usr.bin/backend: Makefile

Log Message:
more -O0 for vax


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/external/gpl3/gcc/usr.bin/backend/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/backend/Makefile
diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.64 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.65
--- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.64	Mon Apr 12 00:05:56 2021
+++ src/external/gpl3/gcc/usr.bin/backend/Makefile	Tue Apr 13 06:30:36 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.64 2021/04/12 00:05:56 mrg Exp $
+#	$NetBSD: Makefile,v 1.65 2021/04/13 06:30:36 mrg Exp $
 
 LIBISPRIVATE=	yes
 
@@ -552,6 +552,7 @@ COPTS.internal-fn.c+=-O0
 COPTS.lto-streamer-out.c+=-O0
 COPTS.omp-low.c+=-O0
 COPTS.predict.c+=-O0
+COPTS.range-op.cc+=-O0
 COPTS.recog.c+=-O0
 COPTS.sanopt.c+=-O0
 COPTS.stmt.c+=-O0
@@ -591,8 +592,8 @@ COPTS.ubsan.c+=-O0
 COPTS.varasm.c+=-O0
 COPTS.vr-values.c+=-O0
 COPTS.web.c+=-O0
-COPTS.wide-int.cc+=-O0
 COPTS.wide-int-range.cc+=-O0
+COPTS.wide-int.cc+=-O0
 .else
 COPTS.tree.c=	${${ACTIVE_CC} == "clang" :? -O0 :}
 .endif



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

2021-04-12 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 09:03:39 UTC 2021

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

Log Message:
arm/netbsd-elf.h is necessary for eabi targets.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 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.67 src/external/gpl3/gcc/dist/gcc/config.gcc:1.68
--- src/external/gpl3/gcc/dist/gcc/config.gcc:1.67	Sun Apr 11 01:37:18 2021
+++ src/external/gpl3/gcc/dist/gcc/config.gcc	Mon Apr 12 09:03:39 2021
@@ -1280,7 +1280,7 @@ arm*-*-netbsdelf*)
 	esac
 	case ${target} in
 	arm*-*-netbsdelf-*eabi*)
-	tm_file="${tm_file} arm/bpabi.h arm/netbsd-eabi.h"
+	tm_file="${tm_file} arm/bpabi.h arm/netbsd-elf.h arm/netbsd-eabi.h"
 	# GCC 7 vs NetBSD/eabi -> avoid arm unwinder
 	#tmake_file="$tmake_file arm/t-bpabi"
 	tmake_file="$tmake_file arm/t-netbsdeabi"
@@ -1288,7 +1288,7 @@ arm*-*-netbsdelf*)
 	default_use_cxa_atexit=yes
 	;;
 	*)
-	tm_file="$tm_file arm/bpabi.h arm/netbsd-elf.h arm/netbsd-eabi.h"
+	tm_file="$tm_file arm/bpabi.h arm/netbsd-elf.h"
 	#tmake_file="$tmake_file arm/t-bpabi arm/t-netbsdeabi"
 	tmake_file="$tmake_file arm/t-netbsd"
 	;;



CVS commit: src/external/gpl3/gcc

2021-04-12 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 08:31:30 UTC 2021

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

Log Message:
updates:
- arm64 doesn't build (missing __aarch64_swp1_acq in kernels)
- mips cpu targets all build (maybe not all ports)
- powerpc builds (maybe not all ports)


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

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.gcc10
diff -u src/external/gpl3/gcc/README.gcc10:1.1 src/external/gpl3/gcc/README.gcc10:1.2
--- src/external/gpl3/gcc/README.gcc10:1.1	Mon Apr 12 00:05:54 2021
+++ src/external/gpl3/gcc/README.gcc10	Mon Apr 12 08:31:30 2021
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc10,v 1.1 2021/04/12 00:05:54 mrg Exp $
+$NetBSD: README.gcc10,v 1.2 2021/04/12 08:31:30 mrg Exp $
 
 
 new stuff:
@@ -32,7 +32,7 @@ switched:	has port switched?  y (yes), n
 
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf	switched
 	-	---	--	--			---	
-aarch64		y	n	n	y		n		?	?	?
+aarch64		y	n[3]	y	y		n		?	?	?
 aarch64be	y	n	n	y		n		?	?	?
 alpha		y	n	n	y		n		?	?	?
 earmv4		y	n	n	y		n		?	?	?
@@ -54,12 +54,12 @@ i386		y	n	n	y		n		?	?	?
 ia64		y	n	n	y		n		?	N/A	?
 m68000		y	n	n	y		n		?	?	?
 m68k		y	n	n	y		n		?	?	?
-mipseb		y	n	n	y		n		?	?	?
-mipsel		y	n	n	y		n		?	?	?
-mips64eb	y	n	n	y		n		?	?	?
-mips64el	y	n	n	y		n		?	?	?
-powerpc		n[1]	n	n	n		n		?	?	?
-powerpc64	n[1]	n	n	n		n		N/A	N/A	?
+mipseb		y	n	y	y		y		?	?	?
+mipsel		y	n	y	y		y		?	?	?
+mips64eb	y	n	y	y		y		?	?	?
+mips64el	y	n	y	y		y		?	?	?
+powerpc		y	n	y	y		y		?	?	?
+powerpc64	y	n	y	y		y		N/A	N/A	?
 sh3eb		y	n	n	y		n		?	?	?
 sh3el		y	n	n	y		n		?	?	?
 sparc		y	y	y	y		y		y	?	?
@@ -73,7 +73,7 @@ coldfire	?	N/A	?	?		?		N/A	N/A
 	-	---	--	--			---
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 
-[1] - rs6000.c is not yet merged, build issues.
+[3] - missing __aarch64_swp1_acq in kernels.
 
 
 
@@ -96,14 +96,14 @@ earmv7hf:	 		 	 	n		n
 m68k:		n		n	n	n		n		n		n		n		n		n 	n
 
 		evbmips		emips		ews4800mips	mipsco		newsmips	sgimips
-mipseb:		n		n		n		n		n		n
+mipseb:		y		n		n		n		n		n
 
 		evbmips		algor		arc		cobalt		hpcmips		pmax
-mipsel:		n		n		n		n		n		n
+mipsel:		y		n		n		n		n		n
 
 		algor		evbmips		pmax
-mips64eb:	 		n		 
-mips64el:	n		n		n
+mips64eb:	 		y		 
+mips64el:	n		y		n
 
 		amigappc	bebox	evbppc	ibmnws		macppc		mvmeppc		ofppc		prep		rs6000		sandpoint
 powerpc:	n		n	n	n		n		n		n		n		n		n



CVS commit: src/external/gpl3/gcc

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 00:05:56 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/config: netbsd.h
src/external/gpl3/gcc/dist/libgomp: acc_prof.h
src/external/gpl3/gcc/dist/libstdc++-v3/include/ext: numeric_traits.h
src/external/gpl3/gcc/lib/libgcc: Makefile.inc
src/external/gpl3/gcc/lib/libgcc/libgcc: Makefile
src/external/gpl3/gcc/lib/libgcc/libgcc_eh: Makefile
src/external/gpl3/gcc/lib/libgcc/libgcc_s: Makefile
src/external/gpl3/gcc/lib/libgomp: Makefile defs.mk
src/external/gpl3/gcc/lib/libiberty: defs.mk
src/external/gpl3/gcc/lib/libstdc++-v3/include: Makefile
src/external/gpl3/gcc/lib/libubsan: Makefile
src/external/gpl3/gcc/usr.bin: Makefile.inc
src/external/gpl3/gcc/usr.bin/backend: Makefile
src/external/gpl3/gcc/usr.bin/cc1plus: Makefile
src/external/gpl3/gcc/usr.bin/common: defs.mk
src/external/gpl3/gcc/usr.bin/lto1: Makefile
Added Files:
src/external/gpl3/gcc: README.gcc10
Removed Files:
src/external/gpl3/gcc: README.gcc9

Log Message:
various changes to get GCC 10 to build here.

- fix path to compiler-specific includes
- missing (void) for (older) C
- fix __is_signed/__is_signed_val change
- avoid compiler warning-as-errors
- add to existing COPTS.file values, instead of setting
- bump libgomp minor; functions were added
- add new 'compare' c++ header
- handle new analyzer subdirectory.  set TARGET_MACHINE for lto-streamer-in.c.
  remove params.list etc handling.
- coroutines.cc is another .cc not .c.  adjust .PATH to suit.
- add new lto1 sources
- couple of files not in /arch/ subdirs missed in mknative update.

rs6000.c is still not merged.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/README.gcc10
cvs rdiff -u -r1.16 -r0 src/external/gpl3/gcc/README.gcc9
cvs rdiff -u -r1.36 -r1.37 src/external/gpl3/gcc/dist/gcc/config/netbsd.h
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libgomp/acc_prof.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/dist/libstdc++-v3/include/ext/numeric_traits.h
cvs rdiff -u -r1.46 -r1.47 src/external/gpl3/gcc/lib/libgcc/Makefile.inc
cvs rdiff -u -r1.28 -r1.29 src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gcc/lib/libgcc/libgcc_eh/Makefile
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile
cvs rdiff -u -r1.25 -r1.26 src/external/gpl3/gcc/lib/libgomp/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/lib/libgomp/defs.mk
cvs rdiff -u -r1.27 -r1.28 src/external/gpl3/gcc/lib/libiberty/defs.mk
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gcc/lib/libstdc++-v3/include/Makefile
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/lib/libubsan/Makefile
cvs rdiff -u -r1.32 -r1.33 src/external/gpl3/gcc/usr.bin/Makefile.inc
cvs rdiff -u -r1.63 -r1.64 src/external/gpl3/gcc/usr.bin/backend/Makefile
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/usr.bin/cc1plus/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/usr.bin/common/defs.mk
cvs rdiff -u -r1.5 -r1.6 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/dist/gcc/config/netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.36 src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.37
--- src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.36	Sun Apr 11 00:02:12 2021
+++ src/external/gpl3/gcc/dist/gcc/config/netbsd.h	Mon Apr 12 00:05:54 2021
@@ -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-9"
+#define GCC_INCLUDE_DIR "/usr/include/gcc-10"
 
 /* Under NetBSD, the normal location of the various *crt*.o files is the
/usr/lib directory.  */

Index: src/external/gpl3/gcc/dist/libgomp/acc_prof.h
diff -u src/external/gpl3/gcc/dist/libgomp/acc_prof.h:1.1.1.1 src/external/gpl3/gcc/dist/libgomp/acc_prof.h:1.2
--- src/external/gpl3/gcc/dist/libgomp/acc_prof.h:1.1.1.1	Sat Apr 10 22:09:57 2021
+++ src/external/gpl3/gcc/dist/libgomp/acc_prof.h	Mon Apr 12 00:05:54 2021
@@ -235,7 +235,7 @@ extern void acc_prof_register (acc_event
 			   acc_register_t) __GOACC_NOTHROW;
 extern void acc_prof_unregister (acc_event_t, acc_prof_callback,
  acc_register_t) __GOACC_NOTHROW;
-typedef void (*acc_query_fn) ();
+typedef void (*acc_query_fn) (void);
 typedef acc_query_fn (*acc_prof_lookup_func) (const char *);
 extern acc_query_fn acc_prof_lookup (const char *) __GOACC_NOTHROW;
 /* Don't tag 'acc_register_library' as '__GOACC_NOTHROW': this function can be

Index: src/external/gpl3/gcc/dist/libstdc++-v3/include/ext/numeric_traits.h
diff -u src/external/gpl3/gcc/dist/libstdc++-v3/include/ext/numeric_traits.h:1.9 

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

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 11 23:54:29 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer: ChangeLog LOCAL_PATCHES MERGE
Makefile.in aclocal.m4 configure configure.ac configure.tgt
merge.sh
src/external/gpl3/gcc/dist/libsanitizer/asan: Makefile.am Makefile.in
asan_activation.h asan_activation_flags.inc asan_allocator.h
asan_descriptions.h asan_errors.h asan_fake_stack.h asan_flags.h
asan_flags.inc asan_init_version.h asan_interceptors.h
asan_interceptors_memintrinsics.h asan_interface.inc
asan_interface_internal.h asan_internal.h asan_malloc_local.h
asan_mapping.h asan_mapping_myriad.h asan_mapping_sparc64.h
asan_poisoning.h asan_premap_shadow.h asan_report.h
asan_scariness_score.h asan_stack.h asan_stats.h
asan_suppressions.h asan_thread.h libtool-version
src/external/gpl3/gcc/dist/libsanitizer/builtins: assembly.h
src/external/gpl3/gcc/dist/libsanitizer/include/sanitizer:
allocator_interface.h asan_interface.h common_interface_defs.h
coverage_interface.h dfsan_interface.h hwasan_interface.h
linux_syscall_hooks.h lsan_interface.h msan_interface.h
scudo_interface.h tsan_interface.h tsan_interface_atomic.h
src/external/gpl3/gcc/dist/libsanitizer/interception: Makefile.am
Makefile.in interception.h interception_linux.h interception_mac.h
interception_win.h
src/external/gpl3/gcc/dist/libsanitizer/libbacktrace: Makefile.in
src/external/gpl3/gcc/dist/libsanitizer/lsan: Makefile.am Makefile.in
libtool-version lsan.h lsan_common.h lsan_flags.inc lsan_thread.h
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: Makefile.am
Makefile.in sancov_flags.h sancov_flags.inc sanitizer_addrhashmap.h
sanitizer_allocator.h sanitizer_allocator_bytemap.h
sanitizer_allocator_checks.h sanitizer_allocator_combined.h
sanitizer_allocator_interface.h sanitizer_allocator_internal.h
sanitizer_allocator_local_cache.h sanitizer_allocator_primary32.h
sanitizer_allocator_primary64.h sanitizer_allocator_report.h
sanitizer_allocator_secondary.h
sanitizer_allocator_size_class_map.h sanitizer_allocator_stats.h
sanitizer_asm.h sanitizer_atomic.h sanitizer_atomic_clang.h
sanitizer_atomic_clang_mips.h sanitizer_atomic_clang_other.h
sanitizer_atomic_clang_x86.h sanitizer_atomic_msvc.h
sanitizer_bitvector.h sanitizer_bvgraph.h sanitizer_common.h
sanitizer_common_interceptors.inc
sanitizer_common_interceptors_format.inc
sanitizer_common_interceptors_ioctl.inc
sanitizer_common_interface.inc sanitizer_common_interface_posix.inc
sanitizer_common_syscalls.inc sanitizer_coverage_interface.inc
sanitizer_dbghelp.h sanitizer_deadlock_detector.h
sanitizer_deadlock_detector_interface.h sanitizer_errno.h
sanitizer_errno_codes.h sanitizer_file.h sanitizer_flag_parser.h
sanitizer_flags.h sanitizer_flags.inc sanitizer_freebsd.h
sanitizer_fuchsia.h sanitizer_getauxval.h
sanitizer_interceptors_ioctl_netbsd.inc
sanitizer_interface_internal.h sanitizer_internal_defs.h
sanitizer_lfstack.h sanitizer_libc.h sanitizer_libignore.h
sanitizer_linux.h sanitizer_list.h sanitizer_mac.h
sanitizer_malloc_mac.inc sanitizer_mutex.h
sanitizer_persistent_allocator.h sanitizer_placement_new.h
sanitizer_platform.h sanitizer_platform_interceptors.h
sanitizer_platform_limits_netbsd.h
sanitizer_platform_limits_openbsd.h
sanitizer_platform_limits_solaris.h sanitizer_posix.h
sanitizer_procmaps.h sanitizer_quarantine.h
sanitizer_report_decorator.h sanitizer_ring_buffer.h
sanitizer_rtems.h sanitizer_signal_interceptors.inc
sanitizer_stackdepot.h sanitizer_stackdepotbase.h
sanitizer_stacktrace.h sanitizer_stacktrace_printer.h
sanitizer_stoptheworld.h sanitizer_suppressions.h
sanitizer_symbolizer.h sanitizer_symbolizer_fuchsia.h
sanitizer_symbolizer_internal.h sanitizer_symbolizer_libbacktrace.h
sanitizer_symbolizer_mac.h sanitizer_symbolizer_rtems.h
sanitizer_syscall_generic.inc sanitizer_syscall_linux_aarch64.inc
sanitizer_syscall_linux_arm.inc sanitizer_syscall_linux_x86_64.inc
sanitizer_syscalls_netbsd.inc sanitizer_thread_registry.h
sanitizer_tls_get_addr.h sanitizer_vector.h sanitizer_win.h
sanitizer_win_defs.h sanitizer_win_dll_thunk.h
sanitizer_win_weak_interception.h

CVS commit: src/external/gpl3/gcc

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 11 20:27:11 UTC 2021

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/aarch64:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/aarch64eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/alpha:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earm: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmhfeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hf:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hfeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7hf:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7hfeb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/hppa: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/i386: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/ia64: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/m68000:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/m68k: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mips64eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mips64el:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mipseb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/mipsel:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/riscv32:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/riscv64:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sh3eb:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sh3el:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sparc:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/sparc64:
backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/vax: backtrace-supported.h
src/external/gpl3/gcc/lib/libbacktrace/arch/x86_64:
backtrace-supported.h
src/external/gpl3/gcc/lib/libgcc/arch/aarch64: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/aarch64eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/alpha: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earm: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmhfeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv4: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv4eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6hf: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv6hfeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7hf: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv7hfeb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/hppa: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/i386: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/ia64: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/m68000: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/m68k: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mips64eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mips64el: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/mipseb: auto-target.h defs.mk

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

2021-04-10 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 11 01:38:40 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/libgomp: configure

Log Message:
disable testsuite components.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/dist/libgomp/configure

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/libgomp/configure
diff -u src/external/gpl3/gcc/dist/libgomp/configure:1.11 src/external/gpl3/gcc/dist/libgomp/configure:1.12
--- src/external/gpl3/gcc/dist/libgomp/configure:1.11	Sun Apr 11 00:02:20 2021
+++ src/external/gpl3/gcc/dist/libgomp/configure	Sun Apr 11 01:38:39 2021
@@ -17056,7 +17056,7 @@ ac_config_files="$ac_config_files Makefi
 
 #ac_config_files="$ac_config_files testsuite/libgomp-test-support.pt.exp:testsuite/libgomp-test-support.exp.in"
 
-ac_config_files="$ac_config_files testsuite/libgomp-site-extra.exp"
+#ac_config_files="$ac_config_files testsuite/libgomp-site-extra.exp"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure



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

2021-04-10 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 11 01:38:05 UTC 2021

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

Log Message:
revert a local change that i can't figure out how to port
makes vax-gcc10 tools build.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gcc/dist/gcc/config/vax/vax.md

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/vax/vax.md
diff -u src/external/gpl3/gcc/dist/gcc/config/vax/vax.md:1.16 src/external/gpl3/gcc/dist/gcc/config/vax/vax.md:1.17
--- src/external/gpl3/gcc/dist/gcc/config/vax/vax.md:1.16	Sun Apr 11 00:02:15 2021
+++ src/external/gpl3/gcc/dist/gcc/config/vax/vax.md	Sun Apr 11 01:38:05 2021
@@ -216,27 +216,29 @@
   ""
   "
 {
+#if 0
   if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) <= 48)
 {
-  emit_insn (gen_movmemsi1_2 (operands[0], operands[1], operands[2]));
+  emit_insn (gen_cpymemsi1_2 (operands[0], operands[1], operands[2]));
   DONE;
 }
+#endif
   emit_insn (gen_cpymemhi1 (operands[0], operands[1], operands[2]));
   DONE;
 }")
 
+;;(define_insn "cpymemsi1_2"
+;;  [(set (match_operand:BLK 0 "memory_operand" "=B")
+;;	(match_operand:BLK 1 "memory_operand" "B"))
+;;   (use (match_operand:SI 2 "const_int_operand" "g"))]
+;;  "INTVAL (operands[2]) <= 48"
+;;  "* return vax_output_cpymemsi (insn, operands);")
+
 ;; The definition of this insn does not really explain what it does,
 ;; but it should suffice
 ;; that anything generated as this insn will be recognized as one
 ;; and that it won't successfully combine with anything.
 
-(define_insn "movmemsi1_2"
-  [(set (match_operand:BLK 0 "memory_operand" "=B")
-	(match_operand:BLK 1 "memory_operand" "B"))
-   (use (match_operand:SI 2 "const_int_operand" "g"))]
-  "INTVAL (operands[2]) <= 48"
-  "* return vax_output_movmemsi (insn, operands);")
-
 (define_insn "cpymemhi1"
   [(set (match_operand:BLK 0 "memory_operand" "=o")
 	(match_operand:BLK 1 "memory_operand" "o"))



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

2021-04-10 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 11 01:37:18 UTC 2021

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

Log Message:
reduce diffs to upstream slightly.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 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.66 src/external/gpl3/gcc/dist/gcc/config.gcc:1.67
--- src/external/gpl3/gcc/dist/gcc/config.gcc:1.66	Sun Apr 11 00:02:11 2021
+++ src/external/gpl3/gcc/dist/gcc/config.gcc	Sun Apr 11 01:37:18 2021
@@ -1272,8 +1272,8 @@ arm*-*-freebsd*)# ARM Fr
 	with_tls=${with_tls:-gnu}
 	;;
 arm*-*-netbsdelf*)
-	tm_file="dbxelf.h elfos.h ${nbsd_tm_file} arm/elf.h"
 	tmake_file="${tmake_file} arm/t-arm"
+	tm_file="dbxelf.h elfos.h ${nbsd_tm_file} arm/elf.h"
 	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
 	case ${target} in
 	arm*eb-*) tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ;;



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

2021-04-10 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 11 00:26:04 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc: Makefile.in

Log Message:
re-disable selftests


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/gpl3/gcc/dist/gcc/Makefile.in

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/Makefile.in
diff -u src/external/gpl3/gcc/dist/gcc/Makefile.in:1.22 src/external/gpl3/gcc/dist/gcc/Makefile.in:1.23
--- src/external/gpl3/gcc/dist/gcc/Makefile.in:1.22	Sun Apr 11 00:02:11 2021
+++ src/external/gpl3/gcc/dist/gcc/Makefile.in	Sun Apr 11 00:26:04 2021
@@ -1733,7 +1733,7 @@ $(FULL_DRIVER_NAME): ./xgcc
 #
 # SELFTEST_DEPS need to be set before including language makefile fragments.
 # Otherwise $(SELFTEST_DEPS) is empty when used from /Make-lang.in.
-SELFTEST_DEPS = $(GCC_PASSES) stmp-int-hdrs $(srcdir)/testsuite/selftests
+SELFTEST_DEPS = $(GCC_PASSES) stmp-int-hdrs
 
 # Language makefile fragments.
 



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

2021-04-10 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 11 00:02:27 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist: LAST_UPDATED MD5SUMS NEWS config.guess
config.sub configure configure.ac
src/external/gpl3/gcc/dist/INSTALL: binaries.html build.html
configure.html download.html finalinstall.html gfdl.html index.html
old.html prerequisites.html specific.html test.html
src/external/gpl3/gcc/dist/config: tls.m4
src/external/gpl3/gcc/dist/gcc: ChangeLog Makefile.in alias.c
auto-profile.c builtins.c cfgexpand.c common.opt config.gcc
config.host configure configure.ac cppbuiltin.c cppdefault.c
debug.h diagnostic.c dse.c dwarf2out.c except.c expr.c
file-prefix-map.c file-prefix-map.h final.c fold-const.c gcc.c
gcc.h genattrtab.c genemit.c genmultilib genrecog.c ggc-common.c
gimplify.c graphite-isl-ast-to-gimple.c graphite.h hwint.h
ipa-inline.c ira-color.c opts-global.c opts.c output.h reload.c
reload1.c rtlanal.c system.h target-def.h targhooks.c toplev.c
tree-cfg.c tree-ssa-ccp.c tree.c tree.h var-tracking.c varasm.c
src/external/gpl3/gcc/dist/gcc/c: Make-lang.in
src/external/gpl3/gcc/dist/gcc/c-family: c-cppbuiltin.c c-format.c
c-format.h c-opts.c c.opt
src/external/gpl3/gcc/dist/gcc/common/config/aarch64: aarch64-common.c
src/external/gpl3/gcc/dist/gcc/common/config/arm: arm-common.c
src/external/gpl3/gcc/dist/gcc/common/config/or1k: or1k-common.c
src/external/gpl3/gcc/dist/gcc/common/config/riscv: riscv-common.c
src/external/gpl3/gcc/dist/gcc/config: freebsd-spec.h host-netbsd.c
netbsd-elf.h netbsd-stdint.h netbsd.h t-linux t-netbsd
src/external/gpl3/gcc/dist/gcc/config/aarch64: driver-aarch64.c
t-aarch64
src/external/gpl3/gcc/dist/gcc/config/alpha: alpha.h elf.h netbsd.h
t-alpha
src/external/gpl3/gcc/dist/gcc/config/arc: arc-modes.def arc-protos.h
arc.c arc.h arc.md arc.opt t-arc
src/external/gpl3/gcc/dist/gcc/config/arm: arm.c arm.h arm.md bpabi.h
elf.h freebsd.h netbsd-elf.h t-arm t-rtems thumb2.md
src/external/gpl3/gcc/dist/gcc/config/i386: constraints.md cpuid.h
driver-i386.c i386-opts.h i386-protos.h i386.c i386.h i386.md
i386.opt netbsd-elf.h netbsd64.h pmm_malloc.h predicates.md
src/external/gpl3/gcc/dist/gcc/config/m68k: constraints.md m68k.c
m68k.md netbsd-elf.h
src/external/gpl3/gcc/dist/gcc/config/mips: mips.c netbsd.h t-mips
src/external/gpl3/gcc/dist/gcc/config/or1k: constraints.md elf.h
or1k-protos.h or1k.c or1k.h or1k.md or1k.opt predicates.md t-or1k
src/external/gpl3/gcc/dist/gcc/config/pa: pa.c pa.h
src/external/gpl3/gcc/dist/gcc/config/riscv: constraints.md elf.h
generic.md linux.h peephole.md predicates.md riscv-ftypes.def
riscv-modes.def riscv-protos.h riscv.c riscv.h riscv.md riscv.opt
sync.md
src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd.h ppc-asm.h
sysv4.h t-netbsd t-rs6000 vxworksae.h
src/external/gpl3/gcc/dist/gcc/config/sh: netbsd-elf.h sh.c t-sh
src/external/gpl3/gcc/dist/gcc/config/sparc: constraints.md
netbsd-elf.h predicates.md sparc.md sync.md
src/external/gpl3/gcc/dist/gcc/config/vax: builtins.md constraints.md
elf.h netbsd-elf.h predicates.md vax-protos.h vax.c vax.h vax.md
src/external/gpl3/gcc/dist/gcc/cp: Make-lang.in cfns.gperf cfns.h
decl.c except.c
src/external/gpl3/gcc/dist/gcc/doc: cpp.1 cpp.info cpp.texi cppenv.texi
cppinternals.info cppopts.texi extend.texi fsf-funding.7 g++.1
gcc.1 gcc.info gccinstall.info gccint.info gcov-tool.1 gcov.1
gcov.texi gfdl.7 gfortran.1 gpl.7 invoke.texi
src/external/gpl3/gcc/dist/gcc/ginclude: stddef.h unwind-arm-common.h
src/external/gpl3/gcc/dist/gcc/objc: Make-lang.in
src/external/gpl3/gcc/dist/gcc/objcp: Make-lang.in
src/external/gpl3/gcc/dist/include: objalloc.h
src/external/gpl3/gcc/dist/intl: configure
src/external/gpl3/gcc/dist/libbacktrace: configure
src/external/gpl3/gcc/dist/libcpp: Makefile.in configure files.c init.c
internal.h lex.c macro.c
src/external/gpl3/gcc/dist/libcpp/include: cpplib.h
src/external/gpl3/gcc/dist/libgcc: Makefile.in config.host configure
gthr-posix.h unwind-compat.c unwind-dw2-fde-dip.c unwind-dw2-fde.c
unwind-dw2.c unwind-generic.h unwind-seh.c unwind-sjlj.c
src/external/gpl3/gcc/dist/libgcc/config/alpha: qrnnd.S
src/external/gpl3/gcc/dist/libgcc/config/arm: pr-support.c
src/external/gpl3/gcc/dist/libgcc/config/c6x: pr-support.c

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

2021-03-28 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Mar 29 01:33:12 UTC 2021

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/mips: mips.c netbsd.h netbsd64.h

Log Message:
Don't override TARGET_ASM_OUTPUT_SOURCE_FILENAME on MIPS for NetBSD -
use the default which includes a '.file "filename"' as the first name so
that the FILE symbols type is set to the real source file name.  Needed
to make ctfconvert work.

OK mrg@.
XXX needs to be fed back to GNU.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/dist/gcc/config/mips/mips.c
cvs rdiff -u -r1.14 -r1.15 \
src/external/gpl3/gcc/dist/gcc/config/mips/netbsd.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h

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/mips/mips.c
diff -u src/external/gpl3/gcc/dist/gcc/config/mips/mips.c:1.11 src/external/gpl3/gcc/dist/gcc/config/mips/mips.c:1.12
--- src/external/gpl3/gcc/dist/gcc/config/mips/mips.c:1.11	Sat Sep  5 09:12:26 2020
+++ src/external/gpl3/gcc/dist/gcc/config/mips/mips.c	Mon Mar 29 01:33:12 2021
@@ -9488,7 +9488,7 @@ mips_output_external (FILE *file, tree d
 
 /* Implement TARGET_ASM_OUTPUT_SOURCE_FILENAME.  */
 
-static void
+static void ATTRIBUTE_UNUSED
 mips_output_filename (FILE *stream, const char *name)
 {
   /* If we are emitting DWARF-2, let dwarf2out handle the ".file"
@@ -22744,8 +22744,10 @@ mips_starting_frame_offset (void)
 #undef TARGET_TRAMPOLINE_INIT
 #define TARGET_TRAMPOLINE_INIT mips_trampoline_init
 
+#ifndef MIPS_USE_GCC_DEFAULT_OUTPUT_SOURCE_FILENAME
 #undef TARGET_ASM_OUTPUT_SOURCE_FILENAME
 #define TARGET_ASM_OUTPUT_SOURCE_FILENAME mips_output_filename
+#endif	/* MIPS_USE_GCC_DEFAULT_OUTPUT_SOURCE_FILENAME */
 
 #undef TARGET_SHIFT_TRUNCATION_MASK
 #define TARGET_SHIFT_TRUNCATION_MASK mips_shift_truncation_mask

Index: src/external/gpl3/gcc/dist/gcc/config/mips/netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/mips/netbsd.h:1.14 src/external/gpl3/gcc/dist/gcc/config/mips/netbsd.h:1.15
--- src/external/gpl3/gcc/dist/gcc/config/mips/netbsd.h:1.14	Sat Sep  5 09:12:26 2020
+++ src/external/gpl3/gcc/dist/gcc/config/mips/netbsd.h	Mon Mar 29 01:33:12 2021
@@ -229,3 +229,5 @@ along with GCC; see the file COPYING3.  
 
 #undef TARGET_WRITABLE_EH_FRAME
 #define TARGET_WRITABLE_EH_FRAME 0
+
+#define	MIPS_USE_GCC_DEFAULT_OUTPUT_SOURCE_FILENAME

Index: src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h
diff -u src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h:1.4 src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h:1.5
--- src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h:1.4	Sat Mar  1 09:44:50 2014
+++ src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h	Mon Mar 29 01:33:12 2021
@@ -45,3 +45,5 @@ Boston, MA 02110-1301, USA.  */
%{mips32} %{mips32r2} %{mips64} %{mips64r2} \
%{bestGnum} %{call_shared} %{no_archive} %{exact_version} \
%(netbsd_link_spec)"
+
+#define	MIPS_USE_GCC_DEFAULT_OUTPUT_SOURCE_FILENAME



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

2020-11-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Dec  1 02:39:09 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/arm: netbsd-eabi.h

Log Message:
Switch earmv6{,hf}eb from BE32 (deprecated) to BE8 (new), which enables

- binary compatibility with earmv7{,hf}eb and later, as well as
  COMPAT_NETBSD32 on aarch64eb
- unaligned memory access

whereas compatibility with earmv5{,hf}eb and prior is lost.

As we have never released kernel and userland for earmv6{,hf}eb yet,
this does not causes any compatibility problems.

Discussed on port-arm and tech-toolchain.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h

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/arm/netbsd-eabi.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.15 src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.16
--- src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.15	Fri Aug 19 05:11:09 2016
+++ src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h	Tue Dec  1 02:39:08 2020
@@ -34,8 +34,6 @@
 #undef  TARGET_LINKER_EMULATION
 #if TARGET_BIG_ENDIAN_DEFAULT
 #define TARGET_LINKER_EMULATION TARGET_LINKER_BIG_EMULATION
-#undef BE8_LINK_SPEC
-#define BE8_LINK_SPEC " %{!mlittle-endian:%{march=armv7-a|mcpu=cortex-a5|mcpu=cortex-a8|mcpu=cortex-a9:%{!r:--be8}}}" 
 #else
 #define TARGET_LINKER_EMULATION TARGET_LINKER_LITTLE_EMULATION
 #endif



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

2020-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov 14 21:24:03 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/gcc: file-prefix-map.c

Log Message:
PR/55802: Andreas Gustafsson: Unbreak reproducible builds.

For reproducible builds to work we need to have a consistent command
line (because the command line gets recorded in dwarf). So we can't
do:

-ffile-prefix-map=/joe/random/src=/usr/src

because then /joe/random/src gets recorded. We do instead:

-ffile-prefix-map=\$NETBSDSRCDIR=/usr/src

The patch restores the environment variable parsing that got lost
in the last 2 gcc upgrades.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/dist/gcc/file-prefix-map.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/gpl3/gcc/dist/gcc/file-prefix-map.c
diff -u src/external/gpl3/gcc/dist/gcc/file-prefix-map.c:1.4 src/external/gpl3/gcc/dist/gcc/file-prefix-map.c:1.5
--- src/external/gpl3/gcc/dist/gcc/file-prefix-map.c:1.4	Sat Sep  5 05:12:23 2020
+++ src/external/gpl3/gcc/dist/gcc/file-prefix-map.c	Sat Nov 14 16:24:03 2020
@@ -40,7 +40,8 @@ static void
 add_prefix_map (file_prefix_map *, const char *arg, const char *opt)
 {
   file_prefix_map *map;
-  const char *p;
+  const char *p, *old;
+  size_t oldlen;
 
   /* Note: looking for the last '='. The thinking is we can control the paths
  inside our projects but not where the users build them.  */
@@ -50,9 +51,28 @@ add_prefix_map (file_prefix_map *, 
   error ("invalid argument %qs to %qs", arg, opt);
   return;
 }
+  if (*arg == '$')
+{
+  char *env = xstrndup (arg + 1, p - (arg + 1));
+  old = getenv(env);
+  if (!old)
+	{
+	  warning (0, "environment variable %qs not set in argument to "
+		   "%s", env, opt);
+	  free(env);
+	  return;
+	}
+  oldlen = strlen(old);
+  free(env);
+}
+  else
+{
+  old = xstrndup (arg, p - arg);
+  oldlen = p - arg;
+}
   map = XNEW (file_prefix_map);
-  map->old_prefix = xstrndup (arg, p - arg);
-  map->old_len = p - arg;
+  map->old_prefix = old;
+  map->old_len = oldlen;
   p++;
   map->new_prefix = xstrdup (p);
   map->new_len = strlen (p);



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

2020-10-19 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Oct 19 07:44:52 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/libcpp: macro.c

Log Message:
Remove unused local diff. Pointed out by htodd.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/dist/libcpp/macro.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/gpl3/gcc/dist/libcpp/macro.c
diff -u src/external/gpl3/gcc/dist/libcpp/macro.c:1.11 src/external/gpl3/gcc/dist/libcpp/macro.c:1.12
--- src/external/gpl3/gcc/dist/libcpp/macro.c:1.11	Sat Sep  5 09:12:29 2020
+++ src/external/gpl3/gcc/dist/libcpp/macro.c	Mon Oct 19 07:44:52 2020
@@ -406,33 +406,6 @@ add_cpp_remap_path (const char *arg)
 	++remap_pairs;
 }
 
-static const char *
-cpp_remap_file (const char *arg, char **tmp_name)
-{
-	char *result;
-	size_t i, len;
-
-	for (i = 0; i < remap_pairs; ++i) {
-		len = strlen (remap_src[i]);
-		if (strncmp (remap_src[i], arg, len))
-			continue;
-		if (arg[len] == '\0')
-			return remap_dst[i];
-		if (arg[len] != '/')
-			continue;
-		arg += len;
-		len = strlen (remap_dst[i]);
-		result = (char *) xmalloc (len + strlen (arg) + 1);
-		memcpy(result, remap_dst[i], len);
-		strcpy(result + len, arg);
-		*tmp_name = result;
-
-		return result;
-	}
-
-	return arg;
-}
-
 /* Helper function for builtin_macro.  Returns the text generated by
a builtin macro. */
 const uchar *



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

2020-10-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Oct 13 07:12:00 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/aarch64: driver-aarch64.c

Log Message:
Reduce diff with upstream a bit.
No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.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/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c
diff -u src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.9 src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.10
--- src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.9	Sat Sep  5 09:12:25 2020
+++ src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c	Tue Oct 13 07:12:00 2020
@@ -177,19 +177,19 @@ host_detect_local_cpu (int argc, const c
   const char *res = NULL;
   static const int num_exts = ARRAY_SIZE (aarch64_extensions);
   char buf[128];
+  FILE *f = NULL;
   bool arch = false;
   bool tune = false;
   bool cpu = false;
   unsigned int i = 0;
+  unsigned char imp = INVALID_IMP;
   unsigned int cores[2] = { INVALID_CORE, INVALID_CORE };
   unsigned int n_cores = 0;
   unsigned int variants[2] = { ALL_VARIANTS, ALL_VARIANTS };
   unsigned int n_variants = 0;
-  unsigned char imp = INVALID_IMP;
   bool processed_exts = false;
   unsigned long extension_flags = 0;
   unsigned long default_flags = 0;
-  FILE *f = NULL;
 
   gcc_assert (argc);
 



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

2020-10-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct  4 14:44:48 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/gcc: builtins.c fold-const.c tree.c tree.h

Log Message:
Apply by hand a patch to fix http://r6.ca/blog/20200929T023701Z.html
aka "the memcmp bug", from a patch for gcc-10 in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189
Tested on x86_64 by running a full build, install and running it.
Testing that the problem has been fixed with one of the unit tests provided.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gcc/dist/gcc/builtins.c
cvs rdiff -u -r1.1.1.19 -r1.2 src/external/gpl3/gcc/dist/gcc/fold-const.c
cvs rdiff -u -r1.1.1.14 -r1.2 src/external/gpl3/gcc/dist/gcc/tree.c
cvs rdiff -u -r1.1.1.12 -r1.2 src/external/gpl3/gcc/dist/gcc/tree.h

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/builtins.c
diff -u src/external/gpl3/gcc/dist/gcc/builtins.c:1.16 src/external/gpl3/gcc/dist/gcc/builtins.c:1.17
--- src/external/gpl3/gcc/dist/gcc/builtins.c:1.16	Sat Sep  5 05:12:23 2020
+++ src/external/gpl3/gcc/dist/gcc/builtins.c	Sun Oct  4 10:44:47 2020
@@ -118,7 +118,7 @@ static rtx expand_builtin_next_arg (void
 static rtx expand_builtin_va_start (tree);
 static rtx expand_builtin_va_end (tree);
 static rtx expand_builtin_va_copy (tree);
-static rtx inline_expand_builtin_string_cmp (tree, rtx);
+static rtx inline_expand_builtin_bytecmp (tree, rtx);
 static rtx expand_builtin_strcmp (tree, rtx);
 static rtx expand_builtin_strncmp (tree, rtx, machine_mode);
 static rtx builtin_memcpy_read_str (void *, HOST_WIDE_INT, scalar_int_mode);
@@ -3199,20 +3199,18 @@ expand_builtin_strnlen (tree exp, rtx ta
 }
 
 /* Callback routine for store_by_pieces.  Read GET_MODE_BITSIZE (MODE)
-   bytes from constant string DATA + OFFSET and return it as target
-   constant.  */
+   bytes from bytes at DATA + OFFSET and return it reinterpreted as
+   a target constant.  */
 
 static rtx
 builtin_memcpy_read_str (void *data, HOST_WIDE_INT offset,
 			 scalar_int_mode mode)
 {
-  const char *str = (const char *) data;
+  /* The REPresentation pointed to by DATA need not be a nul-terminated
+ string but the caller guarantees it's large enough for MODE.  */
+  const char *rep = (const char *) data;
 
-  gcc_assert (offset >= 0
-	  && ((unsigned HOST_WIDE_INT) offset + GET_MODE_SIZE (mode)
-		  <= strlen (str) + 1));
-
-  return c_readstr (str + offset, mode);
+  return c_readstr (rep + offset, mode, /*nul_terminated=*/false);
 }
 
 /* LEN specify length of the block of memcpy/memset operation.
@@ -3829,7 +3827,6 @@ static rtx
 expand_builtin_memory_copy_args (tree dest, tree src, tree len,
  rtx target, tree exp, memop_ret retmode)
 {
-  const char *src_str;
   unsigned int src_align = get_pointer_alignment (src);
   unsigned int dest_align = get_pointer_alignment (dest);
   rtx dest_mem, src_mem, dest_addr, len_rtx;
@@ -3859,21 +3856,29 @@ expand_builtin_memory_copy_args (tree de
   len_rtx = expand_normal (len);
   determine_block_size (len, len_rtx, _size, _size,
 			_max_size);
-  src_str = c_getstr (src);
 
-  /* If SRC is a string constant and block move would be done
- by pieces, we can avoid loading the string from memory
- and only stored the computed constants.  */
-  if (src_str
+  /* Try to get the byte representation of the constant SRC points to,
+ with its byte size in NBYTES.  */
+  unsigned HOST_WIDE_INT nbytes;
+  const char *rep = c_getstr (src, );
+
+  /* If the function's constant bound LEN_RTX is less than or equal
+ to the byte size of the representation of the constant argument,
+ and if block move would be done by pieces, we can avoid loading
+ the bytes from memory and only store the computed constant.
+ This works in the overlap (memmove) case as well because
+ store_by_pieces just generates a series of stores of constants
+ from the representation returned by c_getstr().  */
+  if (rep
   && CONST_INT_P (len_rtx)
-  && (unsigned HOST_WIDE_INT) INTVAL (len_rtx) <= strlen (src_str) + 1
+  && (unsigned HOST_WIDE_INT) INTVAL (len_rtx) <= nbytes
   && can_store_by_pieces (INTVAL (len_rtx), builtin_memcpy_read_str,
-			  CONST_CAST (char *, src_str),
+			  CONST_CAST (char *, rep),
 			  dest_align, false))
 {
   dest_mem = store_by_pieces (dest_mem, INTVAL (len_rtx),
   builtin_memcpy_read_str,
-  CONST_CAST (char *, src_str),
+  CONST_CAST (char *, rep),
   dest_align, false, retmode);
   dest_mem = force_operand (XEXP (dest_mem, 0), target);
   dest_mem = convert_memory_address (ptr_mode, dest_mem);
@@ -3889,11 +3894,9 @@ expand_builtin_memory_copy_args (tree de
   && (retmode == RETURN_BEGIN || target == const0_rtx))
 method = BLOCK_OP_TAILCALL;
   if (retmode == RETURN_END && target != const0_rtx)
-

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

2020-10-02 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Oct  2 14:36:54 UTC 2020

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

Log Message:
Do not assume that _lwp_getprivate() returns unbiased private pointer

Cherry-pick and adapt:

>From 2a9ce60de98e53198047daaeeec3cf09ece4e693 Mon Sep 17 00:00:00 2001
From: Kamil Rytarowski 
Date: Fri, 2 Oct 2020 16:13:09 +0200
Subject: [PATCH] [compiler-rt] [netbsd] Improve the portability of
 ThreadSelfTlsTcb

Use __lwp_gettcb_fast() and __lwp_getprivate_fast(), as _lwp_getprivate()
can be a biased pointer and invalid for use in this function on all CPUs.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \

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.16 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.17
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc:1.16	Thu Sep 10 12:53:05 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc	Fri Oct  2 14:36:54 2020
@@ -25,6 +25,10 @@
 #include "sanitizer_placement_new.h"
 #include "sanitizer_procmaps.h"
 
+#if SANITIZER_NETBSD
+#define _RTLD_SOURCE  // for __lwp_gettcb_fast() / __lwp_getprivate_fast()
+#endif
+
 #include   // for dlsym()
 #include 
 #include 
@@ -418,7 +422,13 @@ uptr ThreadSelf() {
 
 #if SANITIZER_NETBSD
 static struct tls_tcb * ThreadSelfTlsTcb() {
-  return (struct tls_tcb *)_lwp_getprivate();
+  struct tls_tcb *tcb = nullptr;
+#ifdef __HAVE___LWP_GETTCB_FAST
+  tcb = (struct tls_tcb *)__lwp_gettcb_fast();
+#elif defined(__HAVE___LWP_GETPRIVATE_FAST)
+  tcb = (struct tls_tcb *)__lwp_getprivate_fast();
+#endif
+  return tcb;
 }
 
 uptr ThreadSelf() {



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

2020-09-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Sep 21 20:00:45 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib/libsupc++: Makefile.common

Log Message:
fix missing deps for cow-fs_dir* and cow-fs_ops*.

should fix build issues reported on current-users.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 \
src/external/gpl3/gcc/lib/libsupc++/Makefile.common

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/libsupc++/Makefile.common
diff -u src/external/gpl3/gcc/lib/libsupc++/Makefile.common:1.18 src/external/gpl3/gcc/lib/libsupc++/Makefile.common:1.19
--- src/external/gpl3/gcc/lib/libsupc++/Makefile.common:1.18	Wed Sep 16 21:24:30 2020
+++ src/external/gpl3/gcc/lib/libsupc++/Makefile.common	Mon Sep 21 20:00:44 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.common,v 1.18 2020/09/16 21:24:30 mrg Exp $
+#	$NetBSD: Makefile.common,v 1.19 2020/09/21 20:00:44 mrg Exp $
 
 DIST=		${GCCDIST}
 GNUHOSTDIST=	${DIST}
@@ -78,7 +78,7 @@ COPTS.${_f}+=	-std=gnu++1z
 COPTS.${_f}+=	-std=gnu++17 -fimplicit-templates
 .endfor
 
-.for _f in dir ops fs_dir fs_ops
+.for _f in dir ops fs_dir fs_ops cow-fs_dir cow-fs_ops
 ${_f}.o ${_f}.d ${_f}.pico ${_f}.po: bits/largefile-config.h
 .endfor
 



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

2020-09-17 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Sep 17 15:43:24 UTC 2020

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

Log Message:
Use internal_ptrace() instead of ptrace()

Cherry-pick:

commit 0008fb343704bafc3469703be930b8a65d7c47fa
Author: Kamil Rytarowski 
Date:   Mon Sep 14 10:10:49 2020 +0200

[compiler-rt] [netbsd] Use internal_ptrace() instead of ptrace()


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_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_stoptheworld_netbsd_libcdep.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.4 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.5
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.4	Thu Sep 17 15:42:17 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc	Thu Sep 17 15:43:24 2020
@@ -131,7 +131,7 @@ bool ThreadSuspender::SuspendAllThreads(
   pl.pl_lwpid = 0;
 
   int val;
-  while ((val = ptrace(op, pid_, (void *), sizeof(pl))) != -1 &&
+  while ((val = internal_ptrace(op, pid_, (void *), sizeof(pl))) != -1 &&
  pl.pl_lwpid != 0) {
 suspended_threads_list_.Append(pl.pl_lwpid);
 VReport(2, "Appended thread %d in process %d.\n", pl.pl_lwpid, pid_);



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

2020-09-17 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Sep 17 15:42:17 UTC 2020

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

Log Message:
Undo setting _KERNTYPES

The sparc ptrace(2) headers were fixed to work without defined _KERNTYPES.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_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_stoptheworld_netbsd_libcdep.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.3 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.4
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.3	Sun Sep 13 08:51:58 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc	Thu Sep 17 15:42:17 2020
@@ -18,7 +18,6 @@
 
 #if SANITIZER_NETBSD
 
-#define _KERNTYPES	/* we want register_t for some ptrace functions */
 #include "sanitizer_stoptheworld.h"
 
 #include "sanitizer_atomic.h"



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

2020-09-16 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Sep 16 21:24:30 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib/libsupc++: Makefile.common

Log Message:
fix dependencies for bits/largefile-config.h.  the .cc files don't
depend on it, the outputs of those do.  should fix build issue
reported by otis@.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
src/external/gpl3/gcc/lib/libsupc++/Makefile.common

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/libsupc++/Makefile.common
diff -u src/external/gpl3/gcc/lib/libsupc++/Makefile.common:1.17 src/external/gpl3/gcc/lib/libsupc++/Makefile.common:1.18
--- src/external/gpl3/gcc/lib/libsupc++/Makefile.common:1.17	Wed Sep  9 09:52:16 2020
+++ src/external/gpl3/gcc/lib/libsupc++/Makefile.common	Wed Sep 16 21:24:30 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.common,v 1.17 2020/09/09 09:52:16 mrg Exp $
+#	$NetBSD: Makefile.common,v 1.18 2020/09/16 21:24:30 mrg Exp $
 
 DIST=		${GCCDIST}
 GNUHOSTDIST=	${DIST}
@@ -78,7 +78,9 @@ COPTS.${_f}+=	-std=gnu++1z
 COPTS.${_f}+=	-std=gnu++17 -fimplicit-templates
 .endfor
 
-dir.cc ops.cc fs_dir.cc fs_ops.cc: bits/largefile-config.h
+.for _f in dir ops fs_dir fs_ops
+${_f}.o ${_f}.d ${_f}.pico ${_f}.po: bits/largefile-config.h
+.endfor
 
 bits/largefile-config.h:
 	mkdir -p bits



CVS commit: src/external/gpl3/gcc

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 08:44:02 UTC 2020

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

Log Message:
all mips and powerpc and sh3 build now.
sparc64 seems ok.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 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.14 src/external/gpl3/gcc/README.gcc9:1.15
--- src/external/gpl3/gcc/README.gcc9:1.14	Tue Sep 15 05:21:46 2020
+++ src/external/gpl3/gcc/README.gcc9	Tue Sep 15 08:44:02 2020
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc9,v 1.14 2020/09/15 05:21:46 mrg Exp $
+$NetBSD: README.gcc9,v 1.15 2020/09/15 08:44:02 mrg Exp $
 
 new stuff:
 	cc1objcplus
@@ -51,16 +51,16 @@ i386		y	y	y	y		y		y	y	y
 ia64		y	y	y	y		y		y	N/A	y
 m68000		y	y	y	y		y		y	?	n
 m68k		y	y	y	y		y		y	y[11]	n
-mipseb		y	y	y	y		y[3]		n	n	n
-mipsel		y	y	y	y		y[3]		y	n	n
-mips64eb	y	y	y	y		y[3]		y	y	n
-mips64el	y	y	y	y		y[3]		n	n	n
-powerpc		y	y	y	y		y[3]		y	y	n
-powerpc64	y	y	y	y		y		?	N/A	n
-sh3eb		y	n	y	y		y		?	?	?
+mipseb		y	y	y	y		y		n	n	n
+mipsel		y	y	y	y		y		y	n	n
+mips64eb	y	y	y	y		y		y	y	n
+mips64el	y	y	y	y		y		n	n	n
+powerpc		y	y	y	y		y		y	y	n
+powerpc64	y	y	y	y		y		N/A	N/A	n
+sh3eb		y	y	y	y		y		?	?	?
 sh3el		y	y	y	y		y		y	y	n
 sparc		y	y	y	y		y		y	y	n
-sparc64		y	y	y	y		y		n	n	?
+sparc64		y	y	y	y		y		y	n	?
 vax		y	y	y	y		y		y	y	n
 x86_64		y	y	y	y		y		y	y	y
 riscv32		y	N/A	y	y		y		N/A	N/A	y	
@@ -70,8 +70,7 @@ coldfire	?	N/A	?	?		?		N/A	N/A
 	-	---	--	--			---
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 
-[3]: consult cpu/platform table for full data
-[8]: prep and bebox floppies overflow; need to find if they are size limited
+[1]: kernels and boot programs, etc., don't build
 [10]: tests in lib/libc/sys are skipped; see port-alpha/55652
 [11]: at least there's no regression in kernel and lib/libc/{gen,sys}
 
@@ -91,7 +90,7 @@ earmv7:		 		 	 	y		y
 earmv7hf:	 		 	 	y		y
 
 		amiga		atari	cesfic	hp300		luna68k		mac68k		mvme68k		news68k		next68k		sun3	x68k
-m68k:		r		y	y	y		y		r		y		y		y		r 	y
+m68k:		y		y	y	y		y		y		y		y		y		y 	y
 
 		evbmips		emips		ews4800mips	mipsco		newsmips	sgimips
 mipseb:		y		y		y		y		y		y
@@ -104,11 +103,11 @@ mips64eb:	 		y		 
 mips64el:	y		y		y
 
 		amigappc	bebox	evbppc	ibmnws		macppc		mvmeppc		ofppc		prep		rs6000		sandpoint
-powerpc:	y		n[8]	y	y		y		y		y		n[8]		y		y
+powerpc:	y		y	y	y		y		y		y		y		y		y
 
 		evbppc		macppc		ofppc
-powerpc64:	y		?		?
+powerpc64:	y		n[1]		n[1]
 
 		dreamcast	evbsh3		hpcsh		landisk		mmeye
-sh3eb:		 		-		 		 		r
-sh3el:		r		-		-		y
+sh3eb:		 		y		 		 		y
+sh3el:		y		y		y		y



CVS commit: src/external/gpl3/gcc

2020-09-14 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 05:21:46 UTC 2020

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

Log Message:
powerpc64, sh3 and vax builds now work.
sh3 and vax now works (workarounds commited.)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 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.13 src/external/gpl3/gcc/README.gcc9:1.14
--- src/external/gpl3/gcc/README.gcc9:1.13	Mon Sep 14 19:51:54 2020
+++ src/external/gpl3/gcc/README.gcc9	Tue Sep 15 05:21:46 2020
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc9,v 1.13 2020/09/14 19:51:54 skrll Exp $
+$NetBSD: README.gcc9,v 1.14 2020/09/15 05:21:46 mrg Exp $
 
 new stuff:
 	cc1objcplus
@@ -56,12 +56,12 @@ mipsel		y	y	y	y		y[3]		y	n	n
 mips64eb	y	y	y	y		y[3]		y	y	n
 mips64el	y	y	y	y		y[3]		n	n	n
 powerpc		y	y	y	y		y[3]		y	y	n
-powerpc64	y	?	y	y		n[6]		?	n	?
-sh3eb		y	n	y	y		n[1]		n	n	?
-sh3el		y	n	y	y		n		n	n	?
+powerpc64	y	y	y	y		y		?	N/A	n
+sh3eb		y	n	y	y		y		?	?	?
+sh3el		y	y	y	y		y		y	y	n
 sparc		y	y	y	y		y		y	y	n
 sparc64		y	y	y	y		y		n	n	?
-vax		y	n	y	y		n[2]		y	y	?
+vax		y	y	y	y		y		y	y	n
 x86_64		y	y	y	y		y		y	y	y
 riscv32		y	N/A	y	y		y		N/A	N/A	y	
 riscv64		y	N/A	y	y		y		N/A	N/A	y
@@ -70,22 +70,14 @@ coldfire	?	N/A	?	?		?		N/A	N/A
 	-	---	--	--			---
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 
-[1]: /usr/xsrc/external/mit/pixman/dist/pixman/pixman-fast-path.c: In function 'fast_composite_scaled_nearest__565_normal_OVER':
- /usr/xsrc/external/mit/pixman/dist/pixman/pixman-fast-path.c:1204:1: internal compiler error: Segmentation fault
-  1204 | FAST_NEAREST (_565_normal, , 0565, uint32_t, uint16_t, OVER, NORMAL)
-[2]: /usr/src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h: In member function 'void __sanitizer::StaticSpinMutex::LockSlow()':
- /usr/src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h:58:3: error: unable to generate reloads for:
- 58 |   }
-|   ^
 [3]: consult cpu/platform table for full data
-[6]: /usr/src/sys/compat/common/compat_util.c:116:1: internal compiler error: in rs6000_pltseq_template, at config/rs6000/rs6000.c:21977
-[8]: prep floppies overflow; need to find if they are size limited
+[8]: prep and bebox floppies overflow; need to find if they are size limited
 [10]: tests in lib/libc/sys are skipped; see port-alpha/55652
 [11]: at least there's no regression in kernel and lib/libc/{gen,sys}
 
 
 CPU vs platform test table (for CPUs with multiple ports).  this is "make release" or just kernels.
-values:		y (yes), k (kernels only), n (failed), r (running), ? (not attempted)
+values:		y (yes), k (kernels only), n (failed), r (running), ? (not attempted), nx (yes, no x11)
 
 CPU		platform list
 ---		 
@@ -112,12 +104,11 @@ mips64eb:	 		y		 
 mips64el:	y		y		y
 
 		amigappc	bebox	evbppc	ibmnws		macppc		mvmeppc		ofppc		prep		rs6000		sandpoint
-powerpc:	y		y	r	y		r		y		y		n[8]		y		y
+powerpc:	y		n[8]	y	y		y		y		y		n[8]		y		y
 
 		evbppc		macppc		ofppc
-powerpc64:	n		?		?
+powerpc64:	y		?		?
 
 		dreamcast	evbsh3		hpcsh		landisk		mmeye
-sh3eb:		-		-		-		-		-
-sh3el:		-		-		-		-		-
-
+sh3eb:		 		-		 		 		r
+sh3el:		r		-		-		y



CVS commit: src/external/gpl3/gcc

2020-09-14 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 05:19:35 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib: Makefile.sanitizer
src/external/gpl3/gcc/usr.bin/backend: Makefile
src/external/gpl3/gcc/usr.bin/common-target: Makefile

Log Message:
make build and work on sh3 and vax.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc/lib/Makefile.sanitizer
cvs rdiff -u -r1.62 -r1.63 src/external/gpl3/gcc/usr.bin/backend/Makefile
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/usr.bin/common-target/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/lib/Makefile.sanitizer
diff -u src/external/gpl3/gcc/lib/Makefile.sanitizer:1.15 src/external/gpl3/gcc/lib/Makefile.sanitizer:1.16
--- src/external/gpl3/gcc/lib/Makefile.sanitizer:1.15	Sat Sep 12 15:01:38 2020
+++ src/external/gpl3/gcc/lib/Makefile.sanitizer	Tue Sep 15 05:19:34 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.sanitizer,v 1.15 2020/09/12 15:01:38 kamil Exp $
+#	$NetBSD: Makefile.sanitizer,v 1.16 2020/09/15 05:19:34 mrg Exp $
 
 SANITIZER=${GCCDIST}/libsanitizer
 .PATH: ${SANITIZER}/interception ${SANITIZER}/sanitizer_common
@@ -103,6 +103,7 @@ COPTS.sanitizer_printf.cc += -O1
 COPTS.sanitizer_procmaps_common.cc += -O1
 COPTS.sanitizer_stackdepot.cc += -O1
 COPTS.sanitizer_symbolizer_libcdep.cc += -O1
+COPTS.sanitizer_symbolizer_report.cc += -O1
 COPTS.ubsan_diag.cc += -O1
 COPTS.ubsan_init.cc += -O1
 .endif

Index: src/external/gpl3/gcc/usr.bin/backend/Makefile
diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.62 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.63
--- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.62	Sun Sep  6 10:50:53 2020
+++ src/external/gpl3/gcc/usr.bin/backend/Makefile	Tue Sep 15 05:19:34 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.62 2020/09/06 10:50:53 mrg Exp $
+#	$NetBSD: Makefile,v 1.63 2020/09/15 05:19:34 mrg Exp $
 
 LIBISPRIVATE=	yes
 
@@ -581,6 +581,7 @@ COPTS.tree-ssa-loop-ivopts.c+=-O0
 COPTS.tree-ssa-loop-manip.c+=-O0
 COPTS.tree-ssa-loop-niter.c+=-O0
 COPTS.tree-ssa-math-opts.c+=-O0
+COPTS.tree-ssa-phiopt.c+= -O0
 COPTS.tree-ssa-pre.c+=-O0
 COPTS.tree-ssa-reassoc.c+=-O0
 COPTS.tree-ssa-strlen.c+=-O0
@@ -599,6 +600,7 @@ COPTS.varasm.c+=-O0
 COPTS.vr-values.c+=-O0
 COPTS.web.c+=-O0
 COPTS.wide-int.cc+=-O0
+COPTS.wide-int-range.cc+=-O0
 .else
 COPTS.tree.c=	${${ACTIVE_CC} == "clang" :? -O0 :}
 .endif

Index: src/external/gpl3/gcc/usr.bin/common-target/Makefile
diff -u src/external/gpl3/gcc/usr.bin/common-target/Makefile:1.9 src/external/gpl3/gcc/usr.bin/common-target/Makefile:1.10
--- src/external/gpl3/gcc/usr.bin/common-target/Makefile:1.9	Thu Oct 24 18:48:09 2019
+++ src/external/gpl3/gcc/usr.bin/common-target/Makefile	Tue Sep 15 05:19:35 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2019/10/24 18:48:09 christos Exp $
+#	$NetBSD: Makefile,v 1.10 2020/09/15 05:19:35 mrg Exp $
 
 LIBISPRIVATE=	yes
 
@@ -22,6 +22,9 @@ COPTS.prefix.c+=	-Wno-stack-protector
 COPTS.opts-common.c+=	-Wno-stack-protector
 COPTS.rs6000-common.c+=	-Wno-stack-protector
 COPTS.arm-common.c+=	-Wno-stack-protector
+.if ${MACHINE_CPU} == "sh3"
+COPTS.opts.c+=		${GCC_NO_FORMAT_TRUNCATION}
+.endif
 
 GENPROG_ERROR_DEPENDS=errors.lo
 



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

2020-09-14 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 05:06:56 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd64.h

Log Message:
merge generic changes in eg rs6000/freebsd64.h into netbsd64.h


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h

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/rs6000/netbsd64.h
diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.26 src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.27
--- src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.26	Mon Sep  7 22:21:55 2020
+++ src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h	Tue Sep 15 05:06:56 2020
@@ -20,6 +20,10 @@
Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.  */
 
+/* Undef gnu-user.h macros we don't want.  */
+#undef CPLUSPLUS_CPP_SPEC
+#undef LINK_GCC_C_SEQUENCE_SPEC
+
 #ifndef RS6000_BI_ARCH
 
 #undef	DEFAULT_ABI
@@ -105,7 +109,7 @@ extern int dot_symbols;
 	{			\
 	  rs6000_current_abi = ABI_ELFv2;			\
 	  if (dot_symbols)	\
-		error ("-mcall-aixdesc incompatible with -mabi=elfv2"); \
+		error ("%<-mcall-aixdesc%> incompatible with %<-mabi=elfv2%>"); \
 	}			\
 	  if (rs6000_isa_flags & OPTION_MASK_RELOCATABLE)	\
 	{			\
@@ -131,14 +135,14 @@ extern int dot_symbols;
 	  if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0)	\
 	{			\
 	  rs6000_isa_flags |= OPTION_MASK_POWERPC64;	\
-	  error ("-m64 requires a PowerPC64 cpu");		\
+	  error ("%<-m64%> requires a PowerPC64 cpu");	\
 	}			\
 	  if ((rs6000_isa_flags_explicit			\
 	   & OPTION_MASK_MINIMAL_TOC) != 0)			\
 	{			\
 	  if (global_options_set.x_rs6000_current_cmodel	\
 		  && rs6000_current_cmodel != CMODEL_SMALL)	\
-		error ("-mcmodel incompatible with other toc options"); \
+		error ("%<-mcmodel%> incompatible with other toc options"); \
 	  SET_CMODEL (CMODEL_SMALL);			\
 	}			\
 	  else			\
@@ -422,13 +426,13 @@ extern int dot_symbols;
 #undef  ASM_OUTPUT_SPECIAL_POOL_ENTRY_P
 #define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE)\
   (TARGET_TOC   \
-   && (GET_CODE (X) == SYMBOL_REF   \
+   && (SYMBOL_REF_P (X)			\
|| (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS  \
-   && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF)   \
+   && SYMBOL_REF_P (XEXP (XEXP (X, 0), 0)))			\
|| GET_CODE (X) == LABEL_REF \
-   || (GET_CODE (X) == CONST_INT\
+   || (CONST_INT_P (X)		\
&& GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode))  \
-   || (GET_CODE (X) == CONST_DOUBLE \
+   || (CONST_DOUBLE_P (X)		\
&& ((TARGET_64BIT\
 && (TARGET_MINIMAL_TOC  \
 || (SCALAR_FLOAT_MODE_P (GET_MODE (X))  \
@@ -542,6 +546,7 @@ extern int dot_symbols;
 #undef UINTMAX_TYPE
 #define UINTMAX_TYPE UINT64_TYPE
 
+#if 0
 /* Override rs6000.h definition.  */
 #undef  ASM_APP_ON
 #define ASM_APP_ON "#APP\n"
@@ -549,6 +554,7 @@ extern int dot_symbols;
 /* Override rs6000.h definition.  */
 #undef  ASM_APP_OFF
 #define ASM_APP_OFF "#NO_APP\n"
+#endif
 
 #undef  RS6000_MCOUNT
 #define RS6000_MCOUNT "_mcount"



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

2020-09-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep 15 04:55:23 UTC 2020

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

Log Message:
Do not build libtsan on sparc64


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/gpl3/gcc/lib/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/lib/Makefile
diff -u src/external/gpl3/gcc/lib/Makefile:1.19 src/external/gpl3/gcc/lib/Makefile:1.20
--- src/external/gpl3/gcc/lib/Makefile:1.19	Sun Sep 13 02:37:32 2020
+++ src/external/gpl3/gcc/lib/Makefile	Tue Sep 15 04:55:23 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.19 2020/09/13 02:37:32 kamil Exp $
+#	$NetBSD: Makefile,v 1.20 2020/09/15 04:55:23 martin Exp $
 
 .include 
 
@@ -13,8 +13,10 @@ SUBDIR+= libsupc++ libstdc++-v3
 
 SUBDIR+= .WAIT libasan liblsan libubsan
 
-# TSan does not work with 32bit address space
-.if (!empty(MACHINE_ARCH:M*64*) || ${MACHINE_ARCH} == alpha)
+# TSan does not work with 32bit address space and has not been porter
+# to all architectures
+.if (!empty(MACHINE_ARCH:M*64*) || ${MACHINE_ARCH} == alpha) && \
+	${MACHINE_ARCH} != "sparc64"
 SUBDIR+= libtsan
 .endif
 .endif



CVS commit: src/external/gpl3/gcc

2020-09-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Sep 14 19:51:54 UTC 2020

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

Log Message:
hppa status


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 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.12 src/external/gpl3/gcc/README.gcc9:1.13
--- src/external/gpl3/gcc/README.gcc9:1.12	Mon Sep 14 01:19:50 2020
+++ src/external/gpl3/gcc/README.gcc9	Mon Sep 14 19:51:54 2020
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc9,v 1.12 2020/09/14 01:19:50 mrg Exp $
+$NetBSD: README.gcc9,v 1.13 2020/09/14 19:51:54 skrll Exp $
 
 new stuff:
 	cc1objcplus
@@ -46,7 +46,7 @@ earmv7		y	n	n	y		n		?	?	y
 earmv7eb	y	n	n	y		n		?	?	y
 earmv7hf	y	y	y	y		y		y	y	y
 earmv7hfeb	y	n	n	y		n		?	?	y
-hppa		y	y	y	y		y		?	?	?
+hppa		y	y	y	y		y		y	y	y
 i386		y	y	y	y		y		y	y	y
 ia64		y	y	y	y		y		y	N/A	y
 m68000		y	y	y	y		y		y	?	n



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

2020-09-14 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Sep 14 15:01:58 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib/libasan: Makefile
src/external/gpl3/gcc/lib/liblsan: Makefile
src/external/gpl3/gcc/lib/libtsan: Makefile
src/external/gpl3/gcc/lib/libubsan: Makefile

Log Message:
Consistently, always link sanitizer runtime with libm and libpthread

This reflects the behavior from LLVM and avoids issues with dlsym(3) APIs.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/external/gpl3/gcc/lib/libasan/Makefile
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/lib/liblsan/Makefile
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/lib/libtsan/Makefile
cvs rdiff -u -r1.17 -r1.18 src/external/gpl3/gcc/lib/libubsan/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/lib/libasan/Makefile
diff -u src/external/gpl3/gcc/lib/libasan/Makefile:1.32 src/external/gpl3/gcc/lib/libasan/Makefile:1.33
--- src/external/gpl3/gcc/lib/libasan/Makefile:1.32	Mon Sep  7 09:09:40 2020
+++ src/external/gpl3/gcc/lib/libasan/Makefile	Mon Sep 14 15:01:57 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2020/09/07 09:09:40 mrg Exp $
+# $NetBSD: Makefile,v 1.33 2020/09/14 15:01:57 kamil Exp $
 
 UNSUPPORTED_COMPILER.clang=	# defined
 NOSANITIZER=	# defined
@@ -46,6 +46,7 @@ LIB=	asan
 SRCS+=	${ASAN_SRCS} lsan_common.cc lsan_common_linux.cc
 LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt
 LIBDPLIBS+= m  ${NETBSDSRCDIR}/lib/libm
+LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
 CPPFLAGS+=-DCAN_SANITIZE_UB=0
 
 .if ${MACHINE_ARCH} == "vax"

Index: src/external/gpl3/gcc/lib/liblsan/Makefile
diff -u src/external/gpl3/gcc/lib/liblsan/Makefile:1.7 src/external/gpl3/gcc/lib/liblsan/Makefile:1.8
--- src/external/gpl3/gcc/lib/liblsan/Makefile:1.7	Fri May 15 14:29:53 2020
+++ src/external/gpl3/gcc/lib/liblsan/Makefile	Mon Sep 14 15:01:57 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2020/05/15 14:29:53 joerg Exp $
+# $NetBSD: Makefile,v 1.8 2020/09/14 15:01:57 kamil Exp $
 
 .include 
 
@@ -23,7 +23,9 @@ COPTS.sanitizer_file.cc += -O1
 
 LIB=	lsan
 SRCS+=	${LSAN_SRCS}
+LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm
 LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt
+LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
 
 CWARNFLAGS.clang+=	-Wno-error=unused-private-field
 

Index: src/external/gpl3/gcc/lib/libtsan/Makefile
diff -u src/external/gpl3/gcc/lib/libtsan/Makefile:1.14 src/external/gpl3/gcc/lib/libtsan/Makefile:1.15
--- src/external/gpl3/gcc/lib/libtsan/Makefile:1.14	Mon Sep 14 14:33:01 2020
+++ src/external/gpl3/gcc/lib/libtsan/Makefile	Mon Sep 14 15:01:58 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2020/09/14 14:33:01 kamil Exp $
+# $NetBSD: Makefile,v 1.15 2020/09/14 15:01:58 kamil Exp $
 
 UNSUPPORTED_COMPILER.clang= # defined
 NOSANITIZER=# defined
@@ -64,6 +64,7 @@ LIB=	tsan
 SRCS+=	${TSAN_SRCS}
 LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt
 LIBDPLIBS+= m  ${NETBSDSRCDIR}/lib/libm
+LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
 CPPFLAGS+=-DCAN_SANITIZE_UB=0
 COPTS.tsan_interceptors.cc += -Wno-unused-function
 

Index: src/external/gpl3/gcc/lib/libubsan/Makefile
diff -u src/external/gpl3/gcc/lib/libubsan/Makefile:1.17 src/external/gpl3/gcc/lib/libubsan/Makefile:1.18
--- src/external/gpl3/gcc/lib/libubsan/Makefile:1.17	Sat Sep  5 09:50:15 2020
+++ src/external/gpl3/gcc/lib/libubsan/Makefile	Mon Sep 14 15:01:58 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.17 2020/09/05 09:50:15 mrg Exp $
+#	$NetBSD: Makefile,v 1.18 2020/09/14 15:01:58 kamil Exp $
 
 UNSUPPORTED_COMPILER.clang=	# defined
 LIBISCXX = yes
@@ -32,7 +32,9 @@ COPTS.sanitizer_file.cc += -O1
 
 LIB=	ubsan
 SRCS+=	${UBSAN_SRCS}
+LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm
 LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt
+LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
 CPPFLAGS+=-DCAN_SANITIZE_UB=1
 
 .include 



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

2020-09-14 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Sep 14 14:56:43 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/tsan: tsan_rtl_amd64.S

Log Message:
Undo local patch adding GNU-stack

This is unneeded on NetBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S

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/tsan/tsan_rtl_amd64.S
diff -u src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S:1.8 src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S:1.9
--- src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S:1.8	Sat Sep  5 09:12:32 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S	Mon Sep 14 14:56:43 2020
@@ -397,7 +397,7 @@ ASM_SYMBOL_INTERCEPTOR(__sigsetjmp):
 ASM_SIZE(ASM_SYMBOL_INTERCEPTOR(__sigsetjmp))
 #endif  // !defined(__APPLE__) && !defined(__NetBSD__)
 
-#if defined(__FreeBSD__) || defined(__linux__) || defined(__NetBSD__)
+#if defined(__FreeBSD__) || defined(__linux__)
 /* We do not need executable stack.  */
 /* This note is not needed on NetBSD. */
 .section.note.GNU-stack,"",@progbits



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

2020-09-14 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Sep 14 14:33:01 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib/libtsan: Makefile
Removed Files:
src/external/gpl3/gcc/lib/libtsan: tsan_rtl_unimpl.cc

Log Message:
Avoid using dummy tsan_rtl_unimpl.cc

Instead of providing broken support, error during build to catch the
problem quickly.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/lib/libtsan/Makefile
cvs rdiff -u -r1.1 -r0 src/external/gpl3/gcc/lib/libtsan/tsan_rtl_unimpl.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/lib/libtsan/Makefile
diff -u src/external/gpl3/gcc/lib/libtsan/Makefile:1.13 src/external/gpl3/gcc/lib/libtsan/Makefile:1.14
--- src/external/gpl3/gcc/lib/libtsan/Makefile:1.13	Sun Sep 13 02:37:32 2020
+++ src/external/gpl3/gcc/lib/libtsan/Makefile	Mon Sep 14 14:33:01 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2020/09/13 02:37:32 kamil Exp $
+# $NetBSD: Makefile,v 1.14 2020/09/14 14:33:01 kamil Exp $
 
 UNSUPPORTED_COMPILER.clang= # defined
 NOSANITIZER=# defined
@@ -48,11 +48,16 @@ TSAN_SRCS= \
 	tsan_symbolize.cc \
 	tsan_sync.cc 
 
-# XXX ${MACHINE} won't match mips64 or ppc64
-.if exists(${SANITIZER}/tsan/tsan_rtl_${MACHINE}.S)
-TSAN_SRCS+= tsan_rtl_${MACHINE}.S
+.if ${MACHINE_ARCH} == "x86_64"
+TSAN_SRCS+= tsan_rtl_amd64.S
+.elif ${MACHINE_ARCH} == "aarch64"
+TSAN_SRCS+= tsan_rtl_aarch64.S
+.elif ${MACHINE_ARCH} == "mips64el"
+TSAN_SRCS+= tsan_rtl_mips64.S
+.elif ${MACHINE_ARCH} == "powerpc64"
+TSAN_SRCS+= tsan_rtl_ppc64.S
 .else
-TSAN_SRCS+= tsan_rtl_unimpl.cc
+.error Unsupported
 .endif
 
 LIB=	tsan



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

2020-09-14 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Sep 14 11:56:01 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/tsan: tsan_interceptors.cc

Log Message:
Catch unsupported LONG_JMP_SP_ENV_SLOT

A variation of this patch is pending upstream: https://reviews.llvm.org/D87602


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.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/tsan/tsan_interceptors.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.11 src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.12
--- src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.11	Sat Sep 12 22:23:57 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc	Mon Sep 14 11:56:01 2020
@@ -497,12 +497,16 @@ static void SetJmp(ThreadState *thr, upt
 }
 
 static void LongJmp(ThreadState *thr, uptr *env) {
-#ifdef __powerpc__
+#if SANITIZER_NETBSD
+# ifdef __x86_64__
+  uptr mangled_sp = env[6];
+# else
+#  error Unsupported
+# endif
+#elif defined(__powerpc__)
   uptr mangled_sp = env[0];
 #elif SANITIZER_FREEBSD
   uptr mangled_sp = env[2];
-#elif SANITIZER_NETBSD
-  uptr mangled_sp = env[6];
 #elif SANITIZER_MAC
 # ifdef __aarch64__
   uptr mangled_sp =



CVS commit: src/external/gpl3/gcc

2020-09-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Sep 14 01:19:50 UTC 2020

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

Log Message:
fixed armv7-eb build issue; as not gcc related.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 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.11 src/external/gpl3/gcc/README.gcc9:1.12
--- src/external/gpl3/gcc/README.gcc9:1.11	Sun Sep 13 23:32:04 2020
+++ src/external/gpl3/gcc/README.gcc9	Mon Sep 14 01:19:50 2020
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc9,v 1.11 2020/09/13 23:32:04 mrg Exp $
+$NetBSD: README.gcc9,v 1.12 2020/09/14 01:19:50 mrg Exp $
 
 new stuff:
 	cc1objcplus
@@ -80,7 +80,6 @@ architecture	tools	kernels	libgcc	native
 [3]: consult cpu/platform table for full data
 [6]: /usr/src/sys/compat/common/compat_util.c:116:1: internal compiler error: in rs6000_pltseq_template, at config/rs6000/rs6000.c:21977
 [8]: prep floppies overflow; need to find if they are size limited
-[9]: evbarmv7-eb has dtb sets issues
 [10]: tests in lib/libc/sys are skipped; see port-alpha/55652
 [11]: at least there's no regression in kernel and lib/libc/{gen,sys}
 
@@ -96,7 +95,7 @@ earm:		 		 	 	y		y		 		y		 		 		y
 earmhf:		 		 	 	y		y		 		 		 		 		 
 earmv6:		 		 	 	y		y
 earmv6hf:	 		 	 	y		y
-earmv7:		 		 	 	y[9]		y
+earmv7:		 		 	 	y		y
 earmv7hf:	 		 	 	y		y
 
 		amiga		atari	cesfic	hp300		luna68k		mac68k		mvme68k		news68k		next68k		sun3	x68k



CVS commit: src/external/gpl3/gcc

2020-09-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Sep 13 23:23:00 UTC 2020

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

Log Message:
riscv64 vs xorg-server is solved (non-gcc specific issue.)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 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.9 src/external/gpl3/gcc/README.gcc9:1.10
--- src/external/gpl3/gcc/README.gcc9:1.9	Sun Sep 13 21:21:04 2020
+++ src/external/gpl3/gcc/README.gcc9	Sun Sep 13 23:23:00 2020
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc9,v 1.9 2020/09/13 21:21:04 mrg Exp $
+$NetBSD: README.gcc9,v 1.10 2020/09/13 23:23:00 mrg Exp $
 
 new stuff:
 	cc1objcplus
@@ -64,7 +64,7 @@ sparc64		y	y	y	y		y		n	n	?
 vax		y	n	y	y		n[2]		y	y	?
 x86_64		y	y	y	y		y		y	y	y
 riscv32		y	N/A	y	y		y		N/A	N/A	n	
-riscv64		y	N/A	y	y		n[4]		N/A	N/A	?
+riscv64		y	N/A	y	y		y		N/A	N/A	n
 --
 coldfire	?	N/A	?	?		?		N/A	N/A
 	-	---	--	--			---
@@ -78,7 +78,6 @@ architecture	tools	kernels	libgcc	native
  58 |   }
 |   ^
 [3]: consult cpu/platform table for full data
-[4]: triggers weird xorg-server issue; perhaps related to _XSERVER64 not being present
 [6]: /usr/src/sys/compat/common/compat_util.c:116:1: internal compiler error: in rs6000_pltseq_template, at config/rs6000/rs6000.c:21977
 [8]: prep floppies overflow; need to find if they are size limited
 [9]: evbarmv7-eb has dtb sets issues



CVS commit: src/external/gpl3/gcc

2020-09-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Sep 13 21:21:04 UTC 2020

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

Log Message:
note some platforms switched and some are ready to switch.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 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.8 src/external/gpl3/gcc/README.gcc9:1.9
--- src/external/gpl3/gcc/README.gcc9:1.8	Fri Sep 11 05:24:14 2020
+++ src/external/gpl3/gcc/README.gcc9	Sun Sep 13 21:21:04 2020
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc9,v 1.8 2020/09/11 05:24:14 rin Exp $
+$NetBSD: README.gcc9,v 1.9 2020/09/13 21:21:04 mrg Exp $
 
 new stuff:
 	cc1objcplus
@@ -29,32 +29,32 @@ switched:	has port switched?  y (yes), n
 
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf	switched
 	-	---	--	--			---	
-aarch64		y	y	y	y		y		y	y	n
-aarch64be	y	y	y	y		?		?	?	n
+aarch64		y	y	y	y		y		y	y	y
+aarch64be	y	y	y	y		?		?	?	y
 alpha		y	y	y	y		y		y	y[10]	n
-earmv4		y	y	y	y		y		?	?	?
-earmv4eb	y	n	n	y		n		?	?	?
-earm		y	n	n	y		n		?	?	?
-earmeb		y	n	n	y		n		?	?	?
-earmhf		y	n	n	y		n		?	?	?
-earmhfeb	y	n	n	y		n		?	?	?
-earmv6		y	n	n	y		n		?	?	?
-earmv6eb	y	n	n	y		n		?	?	?
-earmv6hf	y	n	n	y		n		?	?	?
-earmv6hfeb	y	n	n	y		n		?	?	?
-earmv7		y	n	n	y		n		?	?	?
-earmv7eb	y	n	n	y		n		?	?	?
-earmv7hf	y	y	y	y		y		y	y	n
-earmv7hfeb	y	n	n	y		n		?	?	?
+earmv4		y	y	y	y		y		?	?	y
+earmv4eb	y	n	n	y		n		?	?	y
+earm		y	n	n	y		n		?	?	y
+earmeb		y	n	n	y		n		?	?	y
+earmhf		y	n	n	y		n		?	?	y
+earmhfeb	y	n	n	y		n		?	?	y
+earmv6		y	n	n	y		n		?	?	y
+earmv6eb	y	n	n	y		n		?	?	y
+earmv6hf	y	n	n	y		n		?	?	y
+earmv6hfeb	y	n	n	y		n		?	?	y
+earmv7		y	n	n	y		n		?	?	y
+earmv7eb	y	n	n	y		n		?	?	y
+earmv7hf	y	y	y	y		y		y	y	y
+earmv7hfeb	y	n	n	y		n		?	?	y
 hppa		y	y	y	y		y		?	?	?
-i386		y	y	y	y		y		y	y	n
+i386		y	y	y	y		y		y	y	y
 ia64		y	y	y	y		y		y	N/A	n
 m68000		y	y	y	y		y		y	?	n
 m68k		y	y	y	y		y		y	y[11]	n
-mipseb		y	y	y	y		y[3]		n	n	?
-mipsel		y	y	y	y		y[3]		y	n	?
+mipseb		y	y	y	y		y[3]		n	n	n
+mipsel		y	y	y	y		y[3]		y	n	n
 mips64eb	y	y	y	y		y[3]		y	y	n
-mips64el	y	y	y	y		y[3]		n	n	?
+mips64el	y	y	y	y		y[3]		n	n	n
 powerpc		y	y	y	y		y[3]		y	y	n
 powerpc64	y	?	y	y		n[6]		?	n	?
 sh3eb		y	n	y	y		n[1]		n	n	?
@@ -62,7 +62,7 @@ sh3el		y	n	y	y		n		n	n	?
 sparc		y	y	y	y		y		y	y	n
 sparc64		y	y	y	y		y		n	n	?
 vax		y	n	y	y		n[2]		y	y	?
-x86_64		y	y	y	y		y		y	y	n
+x86_64		y	y	y	y		y		y	y	y
 riscv32		y	N/A	y	y		y		N/A	N/A	n	
 riscv64		y	N/A	y	y		n[4]		N/A	N/A	?
 --



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

2020-09-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 13 08:51:59 UTC 2020

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

Log Message:
Add missing dkbad.h include and define _KERNTYPES so we get all internal
types (like register_t) that we need for ptrace.
Fixes the build on sparc64.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \

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

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_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_platform_limits_netbsd.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.5 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.6
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.5	Sat Sep 12 15:01:38 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc	Sun Sep 13 08:51:58 2020
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 

Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.2 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.3
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc:1.2	Fri Sep 11 01:07:00 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cc	Sun Sep 13 08:51:58 2020
@@ -18,6 +18,7 @@
 
 #if SANITIZER_NETBSD
 
+#define _KERNTYPES	/* we want register_t for some ptrace functions */
 #include "sanitizer_stoptheworld.h"
 
 #include "sanitizer_atomic.h"



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

2020-09-12 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sun Sep 13 03:00:12 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/include/sanitizer:
netbsd_syscall_hooks.h
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_syscalls_netbsd.inc

Log Message:
Sync netbsd_syscall_hooks.h with LLVM r. 74760bb00fb9b78a

Update the syscall definitionss from a snapshot 2.5 years old to the
current one.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \

src/external/gpl3/gcc/dist/libsanitizer/include/sanitizer/netbsd_syscall_hooks.h
cvs rdiff -u -r1.1.1.1 -r1.2 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_syscalls_netbsd.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/include/sanitizer/netbsd_syscall_hooks.h
diff -u src/external/gpl3/gcc/dist/libsanitizer/include/sanitizer/netbsd_syscall_hooks.h:1.1.1.1 src/external/gpl3/gcc/dist/libsanitizer/include/sanitizer/netbsd_syscall_hooks.h:1.2
--- src/external/gpl3/gcc/dist/libsanitizer/include/sanitizer/netbsd_syscall_hooks.h:1.1.1.1	Sat Sep  5 07:52:57 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/include/sanitizer/netbsd_syscall_hooks.h	Sun Sep 13 03:00:12 2020
@@ -1,7 +1,8 @@
 //===-- netbsd_syscall_hooks.h ===//
 //
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===--===//
 //
@@ -19,8 +20,8 @@
 // DO NOT EDIT! THIS FILE HAS BEEN GENERATED!
 //
 // Generated with: generate_netbsd_syscalls.awk
-// Generated date: 2018-03-03
-// Generated from: syscalls.master,v 1.291 2018/01/06 16:41:23 kamil Exp
+// Generated date: 2020-09-10
+// Generated from: syscalls.master,v 1.306 2020/08/14 00:53:16 riastradh Exp
 //
 //===--===//
 #ifndef SANITIZER_NETBSD_SYSCALL_HOOKS_H
@@ -473,7 +474,12 @@
   __sanitizer_syscall_pre_impl_dup2((long long)(from), (long long)(to))
 #define __sanitizer_syscall_post_dup2(res, from, to)   \
   __sanitizer_syscall_post_impl_dup2(res, (long long)(from), (long long)(to))
-/* syscall 91 has been skipped */
+#define __sanitizer_syscall_pre_getrandom(buf, buflen, flags)  \
+  __sanitizer_syscall_pre_impl_getrandom(  \
+  (long long)(buf), (long long)(buflen), (long long)(flags))
+#define __sanitizer_syscall_post_getrandom(res, buf, buflen, flags)\
+  __sanitizer_syscall_post_impl_getrandom( \
+  res, (long long)(buf), (long long)(buflen), (long long)(flags))
 #define __sanitizer_syscall_pre_fcntl(fd, cmd, arg)\
   __sanitizer_syscall_pre_impl_fcntl((long long)(fd), (long long)(cmd),\
  (long long)(arg))
@@ -848,9 +854,31 @@
 #define __sanitizer_syscall_post_sysarch(res, op, parms)   \
   __sanitizer_syscall_post_impl_sysarch(res, (long long)(op),  \
 (long long)(parms))
-/* syscall 166 has been skipped */
-/* syscall 167 has been skipped */
-/* syscall 168 has been skipped */
+#define __sanitizer_syscall_pre___futex(uaddr, op, val, timeout, uaddr2, val2, \
+val3)  \
+  __sanitizer_syscall_pre_impl___futex((long long)(uaddr), (long long)(op),\
+   (long long)(val), (long long)(timeout), \
+   (long long)(uaddr2), (long long)(val2), \
+   (long long)(val3))
+#define __sanitizer_syscall_post___futex(res, uaddr, op, val, timeout, uaddr2, \
+ val2, val3)   \
+  __sanitizer_syscall_post_impl___futex(   \
+  res, (long long)(uaddr), (long long)(op), (long long)(val),  \
+  (long long)(timeout), (long long)(uaddr2), (long long)(val2),\
+  (long long)(val3))
+#define __sanitizer_syscall_pre___futex_set_robust_list(head, len) \
+  __sanitizer_syscall_pre_impl___futex_set_robust_list((long long)(head),  \
+   (long long)(len))
+#define __sanitizer_syscall_post___futex_set_robust_list(res, head, len)   \
+  __sanitizer_syscall_post_impl___futex_set_robust_list(   \
+  res, 

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

2020-09-12 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Sep 12 23:04:44 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib/libtsan: Makefile

Log Message:
Always link TSan runtime with librt and libm

With these changes, TSan/amd64 works.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/lib/libtsan/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/lib/libtsan/Makefile
diff -u src/external/gpl3/gcc/lib/libtsan/Makefile:1.11 src/external/gpl3/gcc/lib/libtsan/Makefile:1.12
--- src/external/gpl3/gcc/lib/libtsan/Makefile:1.11	Sat Sep 12 22:24:22 2020
+++ src/external/gpl3/gcc/lib/libtsan/Makefile	Sat Sep 12 23:04:44 2020
@@ -1,4 +1,7 @@
-# $NetBSD: Makefile,v 1.11 2020/09/12 22:24:22 kamil Exp $
+# $NetBSD: Makefile,v 1.12 2020/09/12 23:04:44 kamil Exp $
+
+UNSUPPORTED_COMPILER.clang= # defined
+NOSANITIZER=# defined
 
 .include 
 
@@ -53,6 +56,8 @@ TSAN_SRCS+= tsan_rtl_unimpl.cc
 
 LIB=	tsan
 SRCS+=	${TSAN_SRCS}
+LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt
+LIBDPLIBS+= m  ${NETBSDSRCDIR}/lib/libm
 CPPFLAGS+=-DCAN_SANITIZE_UB=0
 COPTS.tsan_interceptors.cc += -Wno-unused-function
 



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

2020-09-12 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Sep 12 22:52:24 UTC 2020

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

Log Message:
Disable GetNamedMappingFd for NetBSD

Analogous logic is in LLVM rev. 74760bb00fb9b78a2fe122.

Removes undefined symbol linkage to shm_unlink and shm_open.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.2 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_posix_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_posix_libcdep.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc:1.1.1.7 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc:1.2
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc:1.1.1.7	Sat Sep  5 07:52:57 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc	Sat Sep 12 22:52:24 2020
@@ -304,7 +304,7 @@ void PlatformPrepareForSandboxing(__sani
   MemoryMappingLayout::CacheMemoryMappings();
 }
 
-#if SANITIZER_ANDROID || SANITIZER_GO
+#if SANITIZER_ANDROID || SANITIZER_GO || SANITIZER_NETBSD
 int GetNamedMappingFd(const char *name, uptr size) {
   return -1;
 }



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

2020-09-12 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Sep 12 22:24:22 UTC 2020

Modified Files:
src/external/gpl3/gcc/lib/libtsan: Makefile

Log Message:
Ignore unused functions in tsan_interceptors.cc


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/lib/libtsan/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/lib/libtsan/Makefile
diff -u src/external/gpl3/gcc/lib/libtsan/Makefile:1.10 src/external/gpl3/gcc/lib/libtsan/Makefile:1.11
--- src/external/gpl3/gcc/lib/libtsan/Makefile:1.10	Wed Oct  2 02:54:35 2019
+++ src/external/gpl3/gcc/lib/libtsan/Makefile	Sat Sep 12 22:24:22 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2019/10/02 02:54:35 mrg Exp $
+# $NetBSD: Makefile,v 1.11 2020/09/12 22:24:22 kamil Exp $
 
 .include 
 
@@ -54,5 +54,6 @@ TSAN_SRCS+= tsan_rtl_unimpl.cc
 LIB=	tsan
 SRCS+=	${TSAN_SRCS}
 CPPFLAGS+=-DCAN_SANITIZE_UB=0
+COPTS.tsan_interceptors.cc += -Wno-unused-function
 
 .include 



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

2020-09-12 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Sep 12 22:23:57 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/tsan: tsan_interceptors.cc

Log Message:
Sync chunks of tsan_interceptors.cc with LLVM rev. 74760bb00fb9b78a2fe122

Sync tsan_interceptors.cc with upstream file tsan_interceptors_posix.cpp.

Changes:
 - define fileno_unlocked() for NetBSD
 - use defined __sanitizer_FILE for NetBSD
 - handle symbol indirection for vfork and nanosleep
 - delete sem_* API, currently moved to common code with sanitizers
 - undef SANITIZER_INTERCEPT_PTHREAD_SIGMASK to fix build
 - remove locally introduced SANITIZER_NETBSD

With these changes, TSan for GCC builds.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.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/tsan/tsan_interceptors.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.10 src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.11
--- src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.10	Sat Sep 12 21:30:36 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc	Sat Sep 12 22:23:57 2020
@@ -40,17 +40,16 @@ using namespace __tsan;  // NOLINT
 
 #if SANITIZER_NETBSD
 #define dirfd(dirp) (*(int *)(dirp))
-#define fileno_unlocked fileno
+#define fileno_unlocked(fp)  \
+  (((__sanitizer_FILE *)fp)->_file == -1 \
+   ? -1  \
+   : (int)(unsigned short)(((__sanitizer_FILE *)fp)->_file))
 
-#if _LP64
-#define __sF_size 152
-#else
-#define __sF_size 88
-#endif
-
-#define stdout ((char*)&__sF + (__sF_size * 1))
-#define stderr ((char*)&__sF + (__sF_size * 2))
+#define stdout ((__sanitizer_FILE*)&__sF[1])
+#define stderr ((__sanitizer_FILE*)&__sF[2])
 
+#define nanosleep __nanosleep50
+#define vfork __vfork14
 #endif
 
 #if SANITIZER_ANDROID
@@ -92,8 +91,8 @@ DECLARE_REAL_AND_INTERCEPTOR(void *, mal
 DECLARE_REAL_AND_INTERCEPTOR(void, free, void *ptr)
 extern "C" void *pthread_self();
 extern "C" void _exit(int status);
-extern "C" int fileno_unlocked(void *stream);
 #if !SANITIZER_NETBSD
+extern "C" int fileno_unlocked(void *stream);
 extern "C" int dirfd(void *dirp);
 #endif
 #if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_NETBSD
@@ -1417,61 +1416,6 @@ TSAN_INTERCEPTOR(int, pthread_once, void
   return 0;
 }
 
-TSAN_INTERCEPTOR(int, sem_init, void *s, int pshared, unsigned value) {
-  SCOPED_TSAN_INTERCEPTOR(sem_init, s, pshared, value);
-  int res = REAL(sem_init)(s, pshared, value);
-  return res;
-}
-
-TSAN_INTERCEPTOR(int, sem_destroy, void *s) {
-  SCOPED_TSAN_INTERCEPTOR(sem_destroy, s);
-  int res = REAL(sem_destroy)(s);
-  return res;
-}
-
-TSAN_INTERCEPTOR(int, sem_wait, void *s) {
-  SCOPED_TSAN_INTERCEPTOR(sem_wait, s);
-  int res = BLOCK_REAL(sem_wait)(s);
-  if (res == 0) {
-Acquire(thr, pc, (uptr)s);
-  }
-  return res;
-}
-
-TSAN_INTERCEPTOR(int, sem_trywait, void *s) {
-  SCOPED_TSAN_INTERCEPTOR(sem_trywait, s);
-  int res = BLOCK_REAL(sem_trywait)(s);
-  if (res == 0) {
-Acquire(thr, pc, (uptr)s);
-  }
-  return res;
-}
-
-TSAN_INTERCEPTOR(int, sem_timedwait, void *s, void *abstime) {
-  SCOPED_TSAN_INTERCEPTOR(sem_timedwait, s, abstime);
-  int res = BLOCK_REAL(sem_timedwait)(s, abstime);
-  if (res == 0) {
-Acquire(thr, pc, (uptr)s);
-  }
-  return res;
-}
-
-TSAN_INTERCEPTOR(int, sem_post, void *s) {
-  SCOPED_TSAN_INTERCEPTOR(sem_post, s);
-  Release(thr, pc, (uptr)s);
-  int res = REAL(sem_post)(s);
-  return res;
-}
-
-TSAN_INTERCEPTOR(int, sem_getvalue, void *s, int *sval) {
-  SCOPED_TSAN_INTERCEPTOR(sem_getvalue, s, sval);
-  int res = REAL(sem_getvalue)(s, sval);
-  if (res == 0) {
-Acquire(thr, pc, (uptr)s);
-  }
-  return res;
-}
-
 #if SANITIZER_LINUX && !SANITIZER_ANDROID
 TSAN_INTERCEPTOR(int, __fxstat, int version, int fd, void *buf) {
   SCOPED_TSAN_INTERCEPTOR(__fxstat, version, fd, buf);
@@ -2236,6 +2180,7 @@ static void HandleRecvmsg(ThreadState *t
 #define NEED_TLS_GET_ADDR
 #endif
 #undef SANITIZER_INTERCEPT_TLS_GET_ADDR
+#undef SANITIZER_INTERCEPT_PTHREAD_SIGMASK
 
 #define COMMON_INTERCEPT_FUNCTION(name) INTERCEPT_FUNCTION(name)
 #define COMMON_INTERCEPT_FUNCTION_VER(name, ver)  \
@@ -2476,7 +2421,6 @@ static void syscall_fd_close(uptr pc, in
   TSAN_SYSCALL();
   FdClose(thr, pc, fd);
 }
-#endif
 
 static USED void syscall_fd_acquire(uptr pc, int fd) {
   TSAN_SYSCALL();
@@ -2490,7 +2434,6 @@ static USED void syscall_fd_release(uptr
   FdRelease(thr, pc, fd);
 }
 
-#if !SANITIZER_NETBSD
 static void syscall_pre_fork(uptr pc) {
   TSAN_SYSCALL();
   ForkBefore(thr, pc);



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

2020-09-12 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Sep 12 21:30:36 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/tsan: tsan_interceptors.cc

Log Message:
Remove dead code block (from a local patch)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.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/tsan/tsan_interceptors.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.9 src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.10
--- src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc:1.9	Sat Sep  5 09:12:32 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors.cc	Sat Sep 12 21:30:36 2020
@@ -57,21 +57,6 @@ using namespace __tsan;  // NOLINT
 #define mallopt(a, b)
 #endif
 
-#if 0 // XXXMRG
-#if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD
-#define PTHREAD_CREATE_DETACHED 1
-#elif SANITIZER_MAC
-#define PTHREAD_CREATE_DETACHED 2
-#endif
-#if SANITIZER_NETBSD
-#define	__errno_location __errno
-#define	pthread_yield sched_yield
-#define	fileno_unlocked fileno
-#define	stdout __sF[1]
-#define	stderr __sF[2]
-#endif
-#endif
-
 #ifdef __mips__
 const int kSigCount = 129;
 #else



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

2020-09-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Sep 11 09:01:41 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/lsan: lsan_common.cc

Log Message:
__mips64 does not mean 64 bit address space.  also check _LP64.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.2 \
src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.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/lsan/lsan_common.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.cc:1.1.1.7 src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.cc:1.2
--- src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.cc:1.1.1.7	Sat Sep  5 07:52:57 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.cc	Fri Sep 11 09:01:41 2020
@@ -135,7 +135,7 @@ static inline bool CanBeAHeapPointer(upt
 #if defined(__x86_64__)
   // Accept only canonical form user-space addresses.
   return ((p >> 47) == 0);
-#elif defined(__mips64)
+#elif defined(__mips64) && defined(_LP64)
   return ((p >> 40) == 0);
 #elif defined(__aarch64__)
   unsigned runtimeVMA =



CVS commit: src/external/gpl3/gcc

2020-09-10 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Sep 11 05:24:14 UTC 2020

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

Log Message:
Update table for alpha, m68000, m68k, and powerpc:

- alpha is running and no regression in ATF (tests in lib/libc/sys are
  skipped due to port-alpha/55652).

- m68000 is successfully built and running at a same level as before.

- m68k (amiga, mac68k, sun3) is running and no regression in a tiny
  subset of ATF (kernel, lib/libc/{gen,sys}).

- macppc (oea) and evbppc (booke, ibm4xx) are running and no regression
  in ATF.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 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.7 src/external/gpl3/gcc/README.gcc9:1.8
--- src/external/gpl3/gcc/README.gcc9:1.7	Mon Sep  7 23:47:02 2020
+++ src/external/gpl3/gcc/README.gcc9	Fri Sep 11 05:24:14 2020
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc9,v 1.7 2020/09/07 23:47:02 mrg Exp $
+$NetBSD: README.gcc9,v 1.8 2020/09/11 05:24:14 rin Exp $
 
 new stuff:
 	cc1objcplus
@@ -31,7 +31,7 @@ architecture	tools	kernels	libgcc	native
 	-	---	--	--			---	
 aarch64		y	y	y	y		y		y	y	n
 aarch64be	y	y	y	y		?		?	?	n
-alpha		y	y	y	y		y		?	?	?
+alpha		y	y	y	y		y		y	y[10]	n
 earmv4		y	y	y	y		y		?	?	?
 earmv4eb	y	n	n	y		n		?	?	?
 earm		y	n	n	y		n		?	?	?
@@ -49,13 +49,13 @@ earmv7hfeb	y	n	n	y		n		?	?	?
 hppa		y	y	y	y		y		?	?	?
 i386		y	y	y	y		y		y	y	n
 ia64		y	y	y	y		y		y	N/A	n
-m68000		y	n	n	y		n[7]		n	?	?
-m68k		y	y	y	y		y		y	?	?
+m68000		y	y	y	y		y		y	?	n
+m68k		y	y	y	y		y		y	y[11]	n
 mipseb		y	y	y	y		y[3]		n	n	?
 mipsel		y	y	y	y		y[3]		y	n	?
 mips64eb	y	y	y	y		y[3]		y	y	n
 mips64el	y	y	y	y		y[3]		n	n	?
-powerpc		y	y	y	y		y[3]		y	n	n
+powerpc		y	y	y	y		y[3]		y	y	n
 powerpc64	y	?	y	y		n[6]		?	n	?
 sh3eb		y	n	y	y		n[1]		n	n	?
 sh3el		y	n	y	y		n		n	n	?
@@ -80,9 +80,10 @@ architecture	tools	kernels	libgcc	native
 [3]: consult cpu/platform table for full data
 [4]: triggers weird xorg-server issue; perhaps related to _XSERVER64 not being present
 [6]: /usr/src/sys/compat/common/compat_util.c:116:1: internal compiler error: in rs6000_pltseq_template, at config/rs6000/rs6000.c:21977
-[7]: libstdc++ does not build
 [8]: prep floppies overflow; need to find if they are size limited
 [9]: evbarmv7-eb has dtb sets issues
+[10]: tests in lib/libc/sys are skipped; see port-alpha/55652
+[11]: at least there's no regression in kernel and lib/libc/{gen,sys}
 
 
 CPU vs platform test table (for CPUs with multiple ports).  this is "make release" or just kernels.
@@ -100,7 +101,7 @@ earmv7:		 		 	 	y[9]		y
 earmv7hf:	 		 	 	y		y
 
 		amiga		atari	cesfic	hp300		luna68k		mac68k		mvme68k		news68k		next68k		sun3	x68k
-m68k:		y		y	y	y		y		y		y		y		y		y 	y
+m68k:		r		y	y	y		y		r		y		y		y		r 	y
 
 		evbmips		emips		ews4800mips	mipsco		newsmips	sgimips
 mipseb:		y		y		y		y		y		y
@@ -113,7 +114,7 @@ mips64eb:	 		y		 
 mips64el:	y		y		y
 
 		amigappc	bebox	evbppc	ibmnws		macppc		mvmeppc		ofppc		prep		rs6000		sandpoint
-powerpc:	y		y	y	y		y		y		y		n[8]		y		y
+powerpc:	y		y	r	y		r		y		y		n[8]		y		y
 
 		evbppc		macppc		ofppc
 powerpc64:	n		?		?



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

2020-09-10 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Sep 11 01:45:53 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_linux.h

Log Message:
Add prototypes of internal_sigdelset() and internal_clone()

Cherry-pick the missing change from:

commit 983d7ddd0b278b45d815cbac9197205b39c4860a
Author: Kamil Rytarowski 
Date:   Thu Jul 11 06:22:35 2019 +

Add NetBSD LSan support

Summary:
Combine few relatively small changes into one:

 - implement internal_ptrace() and internal_clone() for NetBSD
 - add support for stoptheworld based on the ptrace(2) API
 - define COMPILER_RT_HAS_LSAN for NetBSD
 - enable tests for NetBSD/amd64

Inspired by the original implementation by Christos Zoulas in netbsd/src 
for GCC.

The implementation is in theory CPU independent through well defined macros
across all NetBSD ports, however only the x86_64 version was tested.

Reviewers: mgorny, dvyukov, vitalybuka, joerg, jfb

Reviewed By: vitalybuka

Subscribers: dexonsmith, jfb, srhines, kubamracek, llvm-commits, christos

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64057

llvm-svn: 365735


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h

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.h
diff -u 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.11
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h:1.10	Sat Sep  5 13:35:55 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h	Fri Sep 11 01:45:53 2020
@@ -74,12 +74,8 @@ uptr internal_prctl(int option, uptr arg
 #endif  // SANITIZER_LINUX
 
 #ifdef SANITIZER_NETBSD
-int internal_sigaction_norestorer(int signum, const void *act, void *oldact);
-#define internal_sigdelset(set, signum) \
-__sigdelset(set, signum)
-#define internal_clone(fn, child_stack, flags, arg, \
-parent_tidptr, newtls, child_tidptr) \
-__clone(fn, child_stack, flags, arg)
+void internal_sigdelset(__sanitizer_sigset_t *set, int signum);
+uptr internal_clone(int (*fn)(void *), void *child_stack, int flags, void *arg);
 #endif
 
 // This class reads thread IDs from /proc//task using only syscalls.



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

2020-09-10 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Sep 11 01:08:36 UTC 2020

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_getauxval.h

Log Message:
Add getauxval() compat for NetBSD

Cherry-pick and adapt:

commit 02519fc7a6f8c528f67975a9f78ce64dabf402b4
Author: Kamil Rytarowski 
Date:   Thu Sep 12 18:57:58 2019 +

Add getauxval() compat for NetBSD

Summary:
getauxval() is not available on NetBSD and there is no a direct equivalent.

Add a function that implements the same semantics with NetBSD internals.

Reorder the GetPageSize() functions to prefer the sysctl approach for 
NetBSD.
It no longer makes a difference which approach is better. Avoid changing
conditional code path.

Reviewers: vitalybuka, dvyukov, mgorny, joerg

Reviewed By: vitalybuka

Subscribers: llvm-commits, #sanitizers

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D67329

llvm-svn: 371758


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_getauxval.h

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_getauxval.h
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_getauxval.h:1.1.1.1 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_getauxval.h:1.2
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_getauxval.h:1.1.1.1	Sat Sep  5 07:52:57 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_getauxval.h	Fri Sep 11 01:08:36 2020
@@ -8,6 +8,7 @@
 // Common getauxval() guards and definitions.
 // getauxval() is not defined until glibc version 2.16, or until API level 21
 // for Android.
+// Implement the getauxval() compat function for NetBSD.
 //
 //===--===//
 
@@ -41,6 +42,23 @@ extern "C" SANITIZER_WEAK_ATTRIBUTE
 unsigned long getauxval(unsigned long type);  // NOLINT
 # endif
 
-#endif // SANITIZER_LINUX || SANITIZER_FUCHSIA
+#elif SANITIZER_NETBSD
+
+#define SANITIZER_USE_GETAUXVAL 1
+
+#include 
+#include 
+
+static inline decltype(AuxInfo::a_v) getauxval(decltype(AuxInfo::a_type) type) {
+  for (const AuxInfo *aux = (const AuxInfo *)_dlauxinfo();
+   aux->a_type != AT_NULL; ++aux) {
+if (type == aux->a_type)
+  return aux->a_v;
+  }
+
+  return 0;
+}
+
+#endif
 
 #endif // SANITIZER_GETAUXVAL_H



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

2020-09-10 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Sep 11 01:07:53 UTC 2020

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

Log Message:
Use sysctl to implement GetPageSize()

Cherry-pick code chunk from newer LLVM compiler-rt.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.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.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.36 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.37
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.36	Mon Sep  7 00:22:51 2020
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc	Fri Sep 11 01:07:53 2020
@@ -1139,6 +1139,14 @@ uptr GetPageSize() {
 // Android post-M sysconf(_SC_PAGESIZE) crashes if called from .preinit_array.
 #if SANITIZER_ANDROID
   return 4096;
+#elif SANITIZER_FREEBSD || SANITIZER_NETBSD
+// Use sysctl as sysconf can trigger interceptors internally.
+  int pz = 0;
+  uptr pzl = sizeof(pz);
+  int mib[2] = {CTL_HW, HW_PAGESIZE};
+  int rv = internal_sysctl(mib, 2, , , nullptr, 0);
+  CHECK_EQ(rv, 0);
+  return (uptr)pz;
 #elif SANITIZER_LINUX && (defined(__x86_64__) || defined(__i386__))
   return EXEC_PAGESIZE;
 #elif SANITIZER_USE_GETAUXVAL



  1   2   3   4   5   6   7   8   9   10   >