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

2023-08-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Aug  7 01:14:19 UTC 2023

Modified Files:
src/sys/crypto/arch/arm: arm_neon.h

Log Message:
sys/crypto: aarch64: Catch up with builtin rename for GCC12

Kernel self tests successfully pass for aarch64{,eb}.

Same binary generated by GCC10 and GCC12 for:
---
#include 
#include "arm_neon.h"

uint32x4_t my_vshrq_n_u32(uint32x4_t v, uint8_t bits)
{
return vshrq_n_u32(v, bits);
}

uint8x16_t my_vshrq_n_u8(uint8x16_t v, uint8_t bits)
{
return vshrq_n_u8(v, bits);
}
---


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/crypto/arch/arm/arm_neon.h

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

Modified files:

Index: src/sys/crypto/arch/arm/arm_neon.h
diff -u src/sys/crypto/arch/arm/arm_neon.h:1.1 src/sys/crypto/arch/arm/arm_neon.h:1.2
--- src/sys/crypto/arch/arm/arm_neon.h:1.1	Mon Aug  7 01:07:36 2023
+++ src/sys/crypto/arch/arm/arm_neon.h	Mon Aug  7 01:14:19 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm_neon.h,v 1.1 2023/08/07 01:07:36 rin Exp $	*/
+/*	$NetBSD: arm_neon.h,v 1.2 2023/08/07 01:14:19 rin Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -522,7 +522,11 @@ static __inline uint32x4_t
 vshrq_n_u32(uint32x4_t __v, uint8_t __bits)
 {
 #ifdef __aarch64__
+#  if __GNUC_PREREQ__(12, 0)
+	return __builtin_aarch64_lshrv4si_uus(__v, __bits);
+#  else
 	return (uint32x4_t)__builtin_aarch64_lshrv4si((int32x4_t)__v, __bits);
+#  endif
 #else
 	return (uint32x4_t)__builtin_neon_vshru_nv4si((int32x4_t)__v, __bits);
 #endif
@@ -538,7 +542,11 @@ static __inline uint8x16_t
 vshrq_n_u8(uint8x16_t __v, uint8_t __bits)
 {
 #ifdef __aarch64__
+#  if __GNUC_PREREQ__(12, 0)
+	return __builtin_aarch64_lshrv16qi_uus(__v, __bits);
+#  else
 	return (uint8x16_t)__builtin_aarch64_lshrv16qi((int8x16_t)__v, __bits);
+#  endif
 #else
 	return (uint8x16_t)__builtin_neon_vshru_nv16qi((int8x16_t)__v, __bits);
 #endif



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

2023-08-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Aug  7 01:14:19 UTC 2023

Modified Files:
src/sys/crypto/arch/arm: arm_neon.h

Log Message:
sys/crypto: aarch64: Catch up with builtin rename for GCC12

Kernel self tests successfully pass for aarch64{,eb}.

Same binary generated by GCC10 and GCC12 for:
---
#include 
#include "arm_neon.h"

uint32x4_t my_vshrq_n_u32(uint32x4_t v, uint8_t bits)
{
return vshrq_n_u32(v, bits);
}

uint8x16_t my_vshrq_n_u8(uint8x16_t v, uint8_t bits)
{
return vshrq_n_u8(v, bits);
}
---


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/crypto/arch/arm/arm_neon.h

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



CVS commit: src/sys/crypto

2023-08-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Aug  7 01:07:36 UTC 2023

Modified Files:
src/sys/crypto/aes/arch/arm: aes_neon_impl.h
src/sys/crypto/aes/arch/x86: aes_sse2_impl.h aes_ssse3_impl.h
src/sys/crypto/chacha/arch/arm: chacha_neon.c
src/sys/crypto/chacha/arch/x86: chacha_sse2.c
Added Files:
src/sys/crypto/arch/arm: arm_neon.h arm_neon_imm.h
src/sys/crypto/arch/x86: immintrin.h immintrin_ext.h
Removed Files:
src/sys/crypto/aes/arch/arm: arm_neon.h arm_neon_imm.h
src/sys/crypto/aes/arch/x86: immintrin.h immintrin_ext.h
src/sys/crypto/chacha/arch/arm: arm_neon.h arm_neon_imm.h
src/sys/crypto/chacha/arch/x86: immintrin.h

Log Message:
sys/crypto: Introduce arch/{arm,x86} to share common MD headers

Dedup between aes and chacha. No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/crypto/aes/arch/arm/aes_neon_impl.h
cvs rdiff -u -r1.12 -r0 src/sys/crypto/aes/arch/arm/arm_neon.h
cvs rdiff -u -r1.2 -r0 src/sys/crypto/aes/arch/arm/arm_neon_imm.h
cvs rdiff -u -r1.2 -r1.3 src/sys/crypto/aes/arch/x86/aes_sse2_impl.h
cvs rdiff -u -r1.1 -r1.2 src/sys/crypto/aes/arch/x86/aes_ssse3_impl.h
cvs rdiff -u -r1.5 -r0 src/sys/crypto/aes/arch/x86/immintrin.h
cvs rdiff -u -r1.1 -r0 src/sys/crypto/aes/arch/x86/immintrin_ext.h
cvs rdiff -u -r0 -r1.1 src/sys/crypto/arch/arm/arm_neon.h \
src/sys/crypto/arch/arm/arm_neon_imm.h
cvs rdiff -u -r0 -r1.1 src/sys/crypto/arch/x86/immintrin.h \
src/sys/crypto/arch/x86/immintrin_ext.h
cvs rdiff -u -r1.7 -r0 src/sys/crypto/chacha/arch/arm/arm_neon.h
cvs rdiff -u -r1.2 -r0 src/sys/crypto/chacha/arch/arm/arm_neon_imm.h
cvs rdiff -u -r1.8 -r1.9 src/sys/crypto/chacha/arch/arm/chacha_neon.c
cvs rdiff -u -r1.2 -r1.3 src/sys/crypto/chacha/arch/x86/chacha_sse2.c
cvs rdiff -u -r1.1 -r0 src/sys/crypto/chacha/arch/x86/immintrin.h

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

Modified files:

Index: src/sys/crypto/aes/arch/arm/aes_neon_impl.h
diff -u src/sys/crypto/aes/arch/arm/aes_neon_impl.h:1.3 src/sys/crypto/aes/arch/arm/aes_neon_impl.h:1.4
--- src/sys/crypto/aes/arch/arm/aes_neon_impl.h:1.3	Sat Aug  8 14:47:01 2020
+++ src/sys/crypto/aes/arch/arm/aes_neon_impl.h	Mon Aug  7 01:07:35 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: aes_neon_impl.h,v 1.3 2020/08/08 14:47:01 riastradh Exp $	*/
+/*	$NetBSD: aes_neon_impl.h,v 1.4 2023/08/07 01:07:35 rin Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -31,8 +31,8 @@
 
 #include 
 
-#include "arm_neon.h"
-#include "arm_neon_imm.h"
+#include 
+#include 
 
 #include 
 #include 

Index: src/sys/crypto/aes/arch/x86/aes_sse2_impl.h
diff -u src/sys/crypto/aes/arch/x86/aes_sse2_impl.h:1.2 src/sys/crypto/aes/arch/x86/aes_sse2_impl.h:1.3
--- src/sys/crypto/aes/arch/x86/aes_sse2_impl.h:1.2	Mon Jun 29 23:50:05 2020
+++ src/sys/crypto/aes/arch/x86/aes_sse2_impl.h	Mon Aug  7 01:07:36 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: aes_sse2_impl.h,v 1.2 2020/06/29 23:50:05 riastradh Exp $	*/
+/*	$NetBSD: aes_sse2_impl.h,v 1.3 2023/08/07 01:07:36 rin Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -33,8 +33,8 @@
 
 #include 
 #include 
-#include 
-#include 
+#include 
+#include 
 
 void aes_sse2_bitslice_Sbox(__m128i[static 4]);
 void aes_sse2_bitslice_invSbox(__m128i[static 4]);

Index: src/sys/crypto/aes/arch/x86/aes_ssse3_impl.h
diff -u src/sys/crypto/aes/arch/x86/aes_ssse3_impl.h:1.1 src/sys/crypto/aes/arch/x86/aes_ssse3_impl.h:1.2
--- src/sys/crypto/aes/arch/x86/aes_ssse3_impl.h:1.1	Mon Jun 29 23:51:35 2020
+++ src/sys/crypto/aes/arch/x86/aes_ssse3_impl.h	Mon Aug  7 01:07:36 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: aes_ssse3_impl.h,v 1.1 2020/06/29 23:51:35 riastradh Exp $	*/
+/*	$NetBSD: aes_ssse3_impl.h,v 1.2 2023/08/07 01:07:36 rin Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -33,8 +33,8 @@
 
 #include 
 #include 
-#include 
-#include 
+#include 
+#include 
 
 __m128i aes_ssse3_enc1(const struct aesenc *, __m128i, unsigned);
 __m128i aes_ssse3_dec1(const struct aesdec *, __m128i, unsigned);

Index: src/sys/crypto/chacha/arch/arm/chacha_neon.c
diff -u src/sys/crypto/chacha/arch/arm/chacha_neon.c:1.8 src/sys/crypto/chacha/arch/arm/chacha_neon.c:1.9
--- src/sys/crypto/chacha/arch/arm/chacha_neon.c:1.8	Sat Aug  8 14:47:01 2020
+++ src/sys/crypto/chacha/arch/arm/chacha_neon.c	Mon Aug  7 01:07:36 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: chacha_neon.c,v 1.8 2020/08/08 14:47:01 riastradh Exp $	*/
+/*	$NetBSD: chacha_neon.c,v 1.9 2023/08/07 01:07:36 rin Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -29,8 +29,8 @@
 #include 
 #include 
 
-#include "arm_neon.h"
-#include "arm_neon_imm.h"
+#include 
+#include 
 #include "chacha_neon.h"
 
 /*

Index: src/sys/crypto/chacha/arch/x86/chacha_sse2.c
diff -u src/sys/crypto/chacha/arch/x86/chacha_sse2.c:1.2 src/sys/crypto/chacha/arch/x86/chacha_sse2.c:1.3
--- 

CVS commit: src/sys/crypto

2023-08-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Aug  7 01:07:36 UTC 2023

Modified Files:
src/sys/crypto/aes/arch/arm: aes_neon_impl.h
src/sys/crypto/aes/arch/x86: aes_sse2_impl.h aes_ssse3_impl.h
src/sys/crypto/chacha/arch/arm: chacha_neon.c
src/sys/crypto/chacha/arch/x86: chacha_sse2.c
Added Files:
src/sys/crypto/arch/arm: arm_neon.h arm_neon_imm.h
src/sys/crypto/arch/x86: immintrin.h immintrin_ext.h
Removed Files:
src/sys/crypto/aes/arch/arm: arm_neon.h arm_neon_imm.h
src/sys/crypto/aes/arch/x86: immintrin.h immintrin_ext.h
src/sys/crypto/chacha/arch/arm: arm_neon.h arm_neon_imm.h
src/sys/crypto/chacha/arch/x86: immintrin.h

Log Message:
sys/crypto: Introduce arch/{arm,x86} to share common MD headers

Dedup between aes and chacha. No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/crypto/aes/arch/arm/aes_neon_impl.h
cvs rdiff -u -r1.12 -r0 src/sys/crypto/aes/arch/arm/arm_neon.h
cvs rdiff -u -r1.2 -r0 src/sys/crypto/aes/arch/arm/arm_neon_imm.h
cvs rdiff -u -r1.2 -r1.3 src/sys/crypto/aes/arch/x86/aes_sse2_impl.h
cvs rdiff -u -r1.1 -r1.2 src/sys/crypto/aes/arch/x86/aes_ssse3_impl.h
cvs rdiff -u -r1.5 -r0 src/sys/crypto/aes/arch/x86/immintrin.h
cvs rdiff -u -r1.1 -r0 src/sys/crypto/aes/arch/x86/immintrin_ext.h
cvs rdiff -u -r0 -r1.1 src/sys/crypto/arch/arm/arm_neon.h \
src/sys/crypto/arch/arm/arm_neon_imm.h
cvs rdiff -u -r0 -r1.1 src/sys/crypto/arch/x86/immintrin.h \
src/sys/crypto/arch/x86/immintrin_ext.h
cvs rdiff -u -r1.7 -r0 src/sys/crypto/chacha/arch/arm/arm_neon.h
cvs rdiff -u -r1.2 -r0 src/sys/crypto/chacha/arch/arm/arm_neon_imm.h
cvs rdiff -u -r1.8 -r1.9 src/sys/crypto/chacha/arch/arm/chacha_neon.c
cvs rdiff -u -r1.2 -r1.3 src/sys/crypto/chacha/arch/x86/chacha_sse2.c
cvs rdiff -u -r1.1 -r0 src/sys/crypto/chacha/arch/x86/immintrin.h

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



CVS commit: src/sys/crypto/aes/arch/arm

2023-08-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Aug  7 00:58:35 UTC 2023

Modified Files:
src/sys/crypto/aes/arch/arm: arm_neon.h

Log Message:
sys/crypto/{aes,chacha}/arch/arm/arm_neon.h: Sync (whitespace fix)

No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/crypto/aes/arch/arm/arm_neon.h

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

Modified files:

Index: src/sys/crypto/aes/arch/arm/arm_neon.h
diff -u src/sys/crypto/aes/arch/arm/arm_neon.h:1.11 src/sys/crypto/aes/arch/arm/arm_neon.h:1.12
--- src/sys/crypto/aes/arch/arm/arm_neon.h:1.11	Mon Sep  7 18:06:13 2020
+++ src/sys/crypto/aes/arch/arm/arm_neon.h	Mon Aug  7 00:58:35 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm_neon.h,v 1.11 2020/09/07 18:06:13 jakllsch Exp $	*/
+/*	$NetBSD: arm_neon.h,v 1.12 2023/08/07 00:58:35 rin Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -232,7 +232,7 @@ static __inline uint32_t
 vgetq_lane_u32(uint32x4_t __v, uint8_t __i)
 {
 #ifdef __aarch64__
-	return __v[__neon_laneq_index(__v,__i)];
+	return __v[__neon_laneq_index(__v, __i)];
 #else
 	return (uint32_t)__builtin_neon_vget_laneuv4si((int32x4_t)__v, __i);
 #endif



CVS commit: src/sys/crypto/aes/arch/arm

2023-08-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Aug  7 00:58:35 UTC 2023

Modified Files:
src/sys/crypto/aes/arch/arm: arm_neon.h

Log Message:
sys/crypto/{aes,chacha}/arch/arm/arm_neon.h: Sync (whitespace fix)

No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/crypto/aes/arch/arm/arm_neon.h

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



CVS commit: src/tests/usr.bin

2023-08-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Aug  7 00:54:54 UTC 2023

Modified Files:
src/tests/usr.bin/c++: t_asan_global_buffer_overflow.sh
src/tests/usr.bin/cc: t_asan_global_buffer_overflow.sh

Log Message:
t_asan_global_buffer_overflow: Avoid ODR Violation for pic variants

Common symbol triggers ODR (One Definition Rule) Violation correctly,
instead of Global Buffer Overflow.

XXX
Add test for odr_violation.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/tests/usr.bin/c++/t_asan_global_buffer_overflow.sh
cvs rdiff -u -r1.3 -r1.4 \
src/tests/usr.bin/cc/t_asan_global_buffer_overflow.sh

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

Modified files:

Index: src/tests/usr.bin/c++/t_asan_global_buffer_overflow.sh
diff -u src/tests/usr.bin/c++/t_asan_global_buffer_overflow.sh:1.3 src/tests/usr.bin/c++/t_asan_global_buffer_overflow.sh:1.4
--- src/tests/usr.bin/c++/t_asan_global_buffer_overflow.sh:1.3	Tue Jan 29 20:02:34 2019
+++ src/tests/usr.bin/c++/t_asan_global_buffer_overflow.sh	Mon Aug  7 00:54:54 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: t_asan_global_buffer_overflow.sh,v 1.3 2019/01/29 20:02:34 mgorny Exp $
+#	$NetBSD: t_asan_global_buffer_overflow.sh,v 1.4 2023/08/07 00:54:54 rin Exp $
 #
 # Copyright (c) 2018, 2019 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -31,12 +31,13 @@
 ASAN_CODE='
 #include 
 #include 
-int arr[5] = {-1};
 void foo(int);
 #ifndef PIC_MAIN
+extern int arr[];
 void foo(int index) { arr[index] = 0; }
 #endif
 #ifndef PIC_FOO
+int arr[5] = {-1};
 int main(int argc, char **argv) {foo(argc + 5); printf("CHECK\n"); exit(0);}
 #endif
 '

Index: src/tests/usr.bin/cc/t_asan_global_buffer_overflow.sh
diff -u src/tests/usr.bin/cc/t_asan_global_buffer_overflow.sh:1.3 src/tests/usr.bin/cc/t_asan_global_buffer_overflow.sh:1.4
--- src/tests/usr.bin/cc/t_asan_global_buffer_overflow.sh:1.3	Tue Jan 29 19:56:37 2019
+++ src/tests/usr.bin/cc/t_asan_global_buffer_overflow.sh	Mon Aug  7 00:54:54 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: t_asan_global_buffer_overflow.sh,v 1.3 2019/01/29 19:56:37 mgorny Exp $
+#	$NetBSD: t_asan_global_buffer_overflow.sh,v 1.4 2023/08/07 00:54:54 rin Exp $
 #
 # Copyright (c) 2018, 2019 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -31,12 +31,13 @@
 ASAN_CODE='
 #include 
 #include 
-int arr[5] = {-1};
 void foo(int);
 #ifndef PIC_MAIN
+extern int arr[];
 void foo(int index) { arr[index] = 0; }
 #endif
 #ifndef PIC_FOO
+int arr[5] = {-1};
 int main(int argc, char **argv) {foo(argc + 5); printf("CHECK\n"); exit(0);}
 #endif
 '



CVS commit: src/tests/usr.bin

2023-08-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Aug  7 00:54:54 UTC 2023

Modified Files:
src/tests/usr.bin/c++: t_asan_global_buffer_overflow.sh
src/tests/usr.bin/cc: t_asan_global_buffer_overflow.sh

Log Message:
t_asan_global_buffer_overflow: Avoid ODR Violation for pic variants

Common symbol triggers ODR (One Definition Rule) Violation correctly,
instead of Global Buffer Overflow.

XXX
Add test for odr_violation.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/tests/usr.bin/c++/t_asan_global_buffer_overflow.sh
cvs rdiff -u -r1.3 -r1.4 \
src/tests/usr.bin/cc/t_asan_global_buffer_overflow.sh

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



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

2023-08-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Aug  7 00:47:29 UTC 2023

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

Log Message:
lists/m68k: Obsolete gcc-9 headers


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/distrib/sets/lists/comp/ad.m68k

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

Modified files:

Index: src/distrib/sets/lists/comp/ad.m68k
diff -u src/distrib/sets/lists/comp/ad.m68k:1.66 src/distrib/sets/lists/comp/ad.m68k:1.67
--- src/distrib/sets/lists/comp/ad.m68k:1.66	Fri Aug  4 08:54:00 2023
+++ src/distrib/sets/lists/comp/ad.m68k	Mon Aug  7 00:47:29 2023
@@ -1,4 +1,4 @@
-# $NetBSD: ad.m68k,v 1.66 2023/08/04 08:54:00 mrg Exp $
+# $NetBSD: ad.m68k,v 1.67 2023/08/07 00:47:29 rin Exp $
 ./usr/bin/elf2aoutcomp-sysutil-bin
 ./usr/include/gcc-4.5/math-68881.h		comp-c-include		obsolete
 ./usr/include/gcc-4.5/tgmath.h			comp-c-include		obsolete
@@ -12,8 +12,8 @@
 ./usr/include/gcc-7/tgmath.h			comp-c-include		obsolete
 ./usr/include/gcc-8/math-68881.h		comp-c-include		obsolete
 ./usr/include/gcc-8/tgmath.h			comp-c-include		obsolete
-./usr/include/gcc-9/math-68881.h		comp-c-include		gcc=9
-./usr/include/gcc-9/tgmath.h			comp-c-include		gcc=9
+./usr/include/gcc-9/math-68881.h		comp-c-include		obsolete
+./usr/include/gcc-9/tgmath.h			comp-c-include		obsolete
 ./usr/include/gcc-10/math-68881.h		comp-c-include		gcc=10
 ./usr/include/gcc-10/tgmath.h			comp-c-include		gcc=10
 ./usr/include/gcc-12/math-68881.h		comp-c-include		gcc=12



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

2023-08-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Aug  7 00:47:29 UTC 2023

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

Log Message:
lists/m68k: Obsolete gcc-9 headers


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/distrib/sets/lists/comp/ad.m68k

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



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

2023-08-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Aug  7 00:45:47 UTC 2023

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

Log Message:
lists/aarch64: Obsolete gcc-9 headers


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/distrib/sets/lists/comp/ad.aarch64

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

Modified files:

Index: src/distrib/sets/lists/comp/ad.aarch64
diff -u src/distrib/sets/lists/comp/ad.aarch64:1.49 src/distrib/sets/lists/comp/ad.aarch64:1.50
--- src/distrib/sets/lists/comp/ad.aarch64:1.49	Fri Aug  4 08:54:00 2023
+++ src/distrib/sets/lists/comp/ad.aarch64	Mon Aug  7 00:45:47 2023
@@ -1,4 +1,4 @@
-# $NetBSD: ad.aarch64,v 1.49 2023/08/04 08:54:00 mrg Exp $
+# $NetBSD: ad.aarch64,v 1.50 2023/08/07 00:45:47 rin Exp $
 ./usr/include/aarch64comp-c-include
 ./usr/include/aarch64/ansi.h			comp-c-include
 ./usr/include/aarch64/aout_machdep.h		comp-c-include
@@ -153,10 +153,10 @@
 ./usr/include/gcc-8/arm_fp16.h			comp-c-include		obsolete
 ./usr/include/gcc-8/arm_neon.h			comp-c-include		obsolete
 ./usr/include/gcc-8/tgmath.h			comp-c-include		obsolete
-./usr/include/gcc-9/arm_acle.h			comp-c-include		gcc=9
-./usr/include/gcc-9/arm_fp16.h			comp-c-include		gcc=9
-./usr/include/gcc-9/arm_neon.h			comp-c-include		gcc=9
-./usr/include/gcc-9/tgmath.h			comp-c-include		gcc=9
+./usr/include/gcc-9/arm_acle.h			comp-c-include		obsolete
+./usr/include/gcc-9/arm_fp16.h			comp-c-include		obsolete
+./usr/include/gcc-9/arm_neon.h			comp-c-include		obsolete
+./usr/include/gcc-9/tgmath.h			comp-c-include		obsolete
 ./usr/include/gcc-10/arm_acle.h			comp-c-include		gcc=10
 ./usr/include/gcc-10/arm_bf16.h			comp-c-include		gcc=10
 ./usr/include/gcc-10/arm_fp16.h			comp-c-include		gcc=10



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

2023-08-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Aug  7 00:45:47 UTC 2023

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

Log Message:
lists/aarch64: Obsolete gcc-9 headers


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/distrib/sets/lists/comp/ad.aarch64

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



CVS commit: src/crypto/external/bsd/openssh/dist

2023-08-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Aug  7 00:44:25 UTC 2023

Modified Files:
src/crypto/external/bsd/openssh/dist: channels.c

Log Message:
openssh: channel_new(): Appease GCC12 -Wmaybe-uninitialized for some archs

IIUC, ``found'' is always initialized. Seems like GCC bug.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/crypto/external/bsd/openssh/dist/channels.c

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

Modified files:

Index: src/crypto/external/bsd/openssh/dist/channels.c
diff -u src/crypto/external/bsd/openssh/dist/channels.c:1.39 src/crypto/external/bsd/openssh/dist/channels.c:1.40
--- src/crypto/external/bsd/openssh/dist/channels.c:1.39	Wed Jul 26 17:58:15 2023
+++ src/crypto/external/bsd/openssh/dist/channels.c	Mon Aug  7 00:44:25 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: channels.c,v 1.39 2023/07/26 17:58:15 christos Exp $	*/
+/*	$NetBSD: channels.c,v 1.40 2023/08/07 00:44:25 rin Exp $	*/
 /* $OpenBSD: channels.c,v 1.430 2023/03/10 03:01:51 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen 
@@ -41,7 +41,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: channels.c,v 1.39 2023/07/26 17:58:15 christos Exp $");
+__RCSID("$NetBSD: channels.c,v 1.40 2023/08/07 00:44:25 rin Exp $");
 #include 
 #include 
 #include 
@@ -449,7 +449,7 @@ channel_new(struct ssh *ssh, const char 
 int nonblock)
 {
 	struct ssh_channels *sc = ssh->chanctxt;
-	u_int i, found;
+	u_int i, found = 0 /* XXXGCC12 */;
 	Channel *c;
 	int r;
 



CVS commit: src/crypto/external/bsd/openssh/dist

2023-08-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Aug  7 00:44:25 UTC 2023

Modified Files:
src/crypto/external/bsd/openssh/dist: channels.c

Log Message:
openssh: channel_new(): Appease GCC12 -Wmaybe-uninitialized for some archs

IIUC, ``found'' is always initialized. Seems like GCC bug.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/crypto/external/bsd/openssh/dist/channels.c

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



CVS commit: src/external/gpl3/gcc

2023-08-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Aug  7 00:35:50 UTC 2023

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

Log Message:
README.gcc12: Updated aarch64, arm, i386, m68k, powerpc, and sh3

aarch64{,eb}:
- Everything (without x11 yet) works just fine, except for libtsan
  (not a regression, this is newly introduced to aarch64 for GCC12).

earmv5{,eb}:
- As far as I can see, everything (nox11) seems OK.
- Full ATF is on-going.

earmv[67]hf{,eb}:
- Everything (nox11) works just fine.

i386:
- lib*san requires 64-bit atomic ops. If they are built with -march=i586,
  all tests in ATF pass. Alternatively, we can probably use 32-bit atomic
  variables instead, with some restrictions (now examining).
- New kernel freeze observed during full ATF run.

m68k:
- Another -fstack-protector breakage.
- Full ATF is on-going for amiga.

powerpc:
- Kernel is just working for all subarchs: oea, booke, ibm4xx (405 and
  strictly-alignment 403).

sh3el:
- Kernel is broken [20]. Seems like regressions for function inlining;
  see also [8] for userland. But, -fno-inline does not work unfortunately...


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

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.gcc12
diff -u src/external/gpl3/gcc/README.gcc12:1.8 src/external/gpl3/gcc/README.gcc12:1.9
--- src/external/gpl3/gcc/README.gcc12:1.8	Sat Aug  5 23:52:43 2023
+++ src/external/gpl3/gcc/README.gcc12	Mon Aug  7 00:35:49 2023
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc12,v 1.8 2023/08/05 23:52:43 mrg Exp $
+$NetBSD: README.gcc12,v 1.9 2023/08/07 00:35:49 rin Exp $
 
 
 new stuff:
@@ -31,25 +31,25 @@ switched:	has port switched?  y (yes), n
 
 architecture	tools	kernels	libgcc	native-gcc/sani	make release[2]	runs	atf	switched
 	-	---	--	---			---	
-aarch64		y	y	y	y	n[12]	y		y	y	?
-aarch64eb	y	y	y	y	b	y		y	y	?
+aarch64		y	y	y	y	y[17]	y		y	y	?
+aarch64eb	y	y	y	y	y[17]	y		y	y	?
 alpha		y	y	y	y	b	y		y	y	?
 earmv4		y	b	?	y	?	?		?	?	?
 earmv4eb	y	b	?	y	?	?		?	?	?
-earmv5		y	b	?	y	?	?		?	?	?
-earmv5eb	y	b	?	y	?	?		?	?	?
+earmv5		y	y	y	y	b	y		y	?	?
+earmv5eb	y	y	y	y	b	y		y	?	?
 earmv5hf	y	b	?	y	?	?		?	?	?
 earmv5hfeb	y	b	?	y	?	?		?	?	?
 earmv6		y	b	?	y	?	?		?	?	?
 earmv6eb	y	b	?	y	?	?		?	?	?
-earmv6hf	y	b	?	y	?	y		?	?	?
-earmv6hfeb	y	b	?	y	?	?		?	?	?
+earmv6hf	y	y	y	y	b	y		y	y	?
+earmv6hfeb	y	y	y	y	b	y		y	y	?
 earmv7		y	b	y	y	?	?		?	?	?
 earmv7eb	y	b	?	y	?	?		?	?	?
-earmv7hf	y	b	?	y	b	y		?	?	?
-earmv7hfeb	y	b	?	y	b	y		?	?	?
+earmv7hf	y	y	y	y	b	y		y	y	?
+earmv7hfeb	y	y	y	y	b	y		y	y	?
 hppa		y	b	y	y	?	n[5]		?	?	?
-i386		y	b	y	y	y	y		?	?	?
+i386		y	y	y	y	n[18]	y		y	n[19]	?
 ia64		y	b	y	y	y	y		y[3]	n	?
 m68000		y	y	y	y	n[11]	n		y[14]	?	?
 m68k		y	y	y	y	b	y		y[14]	p[15]	?
@@ -57,10 +57,10 @@ mipseb		y	b	y	y	b	y		?	?	?
 mipsel		y	b	y	y	b	y		?	?	?
 mips64eb	y	b	y	y	b	y		?	?	?
 mips64el	y	b	y	y	b	y		?	?	?
-powerpc		y	?	y	y	?	n[4]		?	?	?
+powerpc		y	y	y	y	?	n[4]		?	?	?
 powerpc64	y	?	?	y	?	?		?	?	?
 sh3eb		y	?	y	y	?	?		?	?	?
-sh3el		y	?	y	y	?	?		?	?	?
+sh3el		y	n[20]	y	y	?	n[8]		?	?	?
 sparc		y	y	y	y	n[atf]	y		y	y	?
 sparc64		y	b	y	y	n[16]	y		y	?	?
 vax		y	?	y	y	?	n		?	?	?
@@ -104,7 +104,7 @@ architecture	tools	kernels	libgcc	native
   ==21499==Hint: address points to the zero page.
   ThreadSanitizer:DEADLYSIGNAL
   ThreadSanitizer: nested bug in the same thread, aborting.
-[14]: "dd count=1" aborts. "COPTS.strsuftoll.c+=-fno-stack-protector" works around the problem.
+[14]: "dd count=1" and "env LC_CTYPE=en_US.UTF-8 locale" abort. -fno-stack-protector for strsuftoll.c and citrus_module.c works around the problem.
 [15]: No regression observed for tests/lib/libc/{sys,gen}.
 [16]: sanitizers crash early:
   Program received signal SIGSEGV, Segmentation fault.
@@ -112,6 +112,20 @@ architecture	tools	kernels	libgcc	native
   #0  0x4064265c in __sanitizer::CheckASLR () at /usr/src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cpp:2181
   #1  0xc704 in ?? ()
   Backtrace stopped: previous frame identical to this frame (corrupt stack?)
+[17]: Not a regression, libtsan is newly introduced. tsan fails with:
+  FATAL: ThreadSanitizer: unexpected memory mapping 0x20010-0x200101000
+[18]: *san requires 64-bit atomic ops:
+  ld: /usr/lib/libasan.so: undefined reference to `__sync_val_compare_and_swap_8'
+  If lib*san is compiled with -march=i586, all tests in usr.bin/{cc,c++} successfully pass.
+[19]: Kernel freezes with garbage parmanently output to console, after lib/libc/sys/t_ptrace_wait:syscall_signal_on_sce fails:
+  syscall_signal_on_sce: [[ 3013.0266693] sorry pid 1847 was killed: orphanes
+  ss
+  ss
+  ss
+  ...
+[20]: Kernel needs -O1 for ffs32() and ffs_nodealloccg() for 

CVS commit: src/external/gpl3/gcc

2023-08-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Aug  7 00:35:50 UTC 2023

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

Log Message:
README.gcc12: Updated aarch64, arm, i386, m68k, powerpc, and sh3

aarch64{,eb}:
- Everything (without x11 yet) works just fine, except for libtsan
  (not a regression, this is newly introduced to aarch64 for GCC12).

earmv5{,eb}:
- As far as I can see, everything (nox11) seems OK.
- Full ATF is on-going.

earmv[67]hf{,eb}:
- Everything (nox11) works just fine.

i386:
- lib*san requires 64-bit atomic ops. If they are built with -march=i586,
  all tests in ATF pass. Alternatively, we can probably use 32-bit atomic
  variables instead, with some restrictions (now examining).
- New kernel freeze observed during full ATF run.

m68k:
- Another -fstack-protector breakage.
- Full ATF is on-going for amiga.

powerpc:
- Kernel is just working for all subarchs: oea, booke, ibm4xx (405 and
  strictly-alignment 403).

sh3el:
- Kernel is broken [20]. Seems like regressions for function inlining;
  see also [8] for userland. But, -fno-inline does not work unfortunately...


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

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



CVS commit: src/share/mk

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:44:49 UTC 2023

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

Log Message:
switch gdb to 13.20 for x86_64


To generate a diff of this commit:
cvs rdiff -u -r1.1349 -r1.1350 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1349 src/share/mk/bsd.own.mk:1.1350
--- src/share/mk/bsd.own.mk:1.1349	Thu Aug  3 10:55:54 2023
+++ src/share/mk/bsd.own.mk	Sun Aug  6 16:44:49 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1349 2023/08/03 14:55:54 rin Exp $
+#	$NetBSD: bsd.own.mk,v 1.1350 2023/08/06 20:44:49 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -119,7 +119,11 @@ EXTERNAL_BINUTILS_SUBDIR=	/does/not/exis
 #
 # What GDB is used?
 #
+.if ${MACHINE_ARCH} == "x86_64"
+HAVE_GDB?=	1320
+.else
 HAVE_GDB?=	1100
+.endif
 
 .if ${HAVE_GDB} == 1320
 EXTERNAL_GDB_SUBDIR=		gdb



CVS commit: src/share/mk

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:44:49 UTC 2023

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

Log Message:
switch gdb to 13.20 for x86_64


To generate a diff of this commit:
cvs rdiff -u -r1.1349 -r1.1350 src/share/mk/bsd.own.mk

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



CVS commit: src/external/gpl3/gdb/bin/gdbtui

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:39:07 UTC 2023

Modified Files:
src/external/gpl3/gdb/bin/gdbtui: Makefile

Log Message:
reorder


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/external/gpl3/gdb/bin/gdbtui/Makefile

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



CVS commit: src/external/gpl3/gdb/bin/gdbtui

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:39:07 UTC 2023

Modified Files:
src/external/gpl3/gdb/bin/gdbtui: Makefile

Log Message:
reorder


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/external/gpl3/gdb/bin/gdbtui/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/gdb/bin/gdbtui/Makefile
diff -u src/external/gpl3/gdb/bin/gdbtui/Makefile:1.17 src/external/gpl3/gdb/bin/gdbtui/Makefile:1.18
--- src/external/gpl3/gdb/bin/gdbtui/Makefile:1.17	Sun Aug  6 16:33:39 2023
+++ src/external/gpl3/gdb/bin/gdbtui/Makefile	Sun Aug  6 16:39:07 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.17 2023/08/06 20:33:39 christos Exp $
+#	$NetBSD: Makefile,v 1.18 2023/08/06 20:39:07 christos Exp $
 
 NOCTF=
 NOMAN=
@@ -22,8 +22,9 @@ CPPFLAGS+=	-I${.CURDIR} \
 		-I${DIST}/readline \
 		-I${DIST}/libdecnumber \
 		-I${DIST} \
-		-I${GDBLIBDIR}/libbfd/arch/${GDB_MACHINE_ARCH} \
+		-I${GDBARCHDIR} \
 		-I${GDBLIBDIR}/libgdbsupport/arch/${GDB_MACHINE_ARCH} \
+		-I${GDBLIBDIR}/libbfd/arch/${GDB_MACHINE_ARCH} \
 		-I${GDBLIBDIR}/libgnulib/arch/${GDB_MACHINE_ARCH} \
 		-I${GDBLIBDIR}/libgnulib/arch/${GDB_MACHINE_ARCH}/gnulib/import \
 		-I${DIST}/bfd \



CVS commit: src/external/gpl3/gdb/bin/gdbtui

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:33:39 UTC 2023

Modified Files:
src/external/gpl3/gdb/bin/gdbtui: Makefile

Log Message:
delete the texinfo parts


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gdb/bin/gdbtui/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/gdb/bin/gdbtui/Makefile
diff -u src/external/gpl3/gdb/bin/gdbtui/Makefile:1.16 src/external/gpl3/gdb/bin/gdbtui/Makefile:1.17
--- src/external/gpl3/gdb/bin/gdbtui/Makefile:1.16	Sun Aug  6 16:32:41 2023
+++ src/external/gpl3/gdb/bin/gdbtui/Makefile	Sun Aug  6 16:33:39 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.16 2023/08/06 20:32:41 christos Exp $
+#	$NetBSD: Makefile,v 1.17 2023/08/06 20:33:39 christos Exp $
 
 NOCTF=
 NOMAN=
@@ -30,22 +30,6 @@ CPPFLAGS+=	-I${.CURDIR} \
 		-I${DIST}/include \
 		${GCPPFLAGS:M-D*}
 
-TEXINFO=	gdb.texinfo stabs.texinfo
-INFOFLAGS=	-I${DIST}/gdb/doc -I${DIST}/gdb/mi \
-		-I${DIST}/readline/readline/doc -I${.CURDIR}/.. -DGDBN=${GDBN}
-
-GDBvn.texi: ${DIST}/gdb/version.in
-	echo "@set GDBVN $$(${TOOL_CAT} ${.ALLSRC})" > ${.TARGET}
-
-gdb-cfg.texi: ${DIST}/gdb/doc/all-cfg.texi
-	${TOOL_CAT} ${.ALLSRC} > ${.TARGET}
-
-CLEANFILES+= GDBvn.texi gdb-cfg.texi
-stabs.info gdb.info: gdb-cfg.texi GDBvn.texi
-
-FILES=		netbsd.xml
-FILESDIR=	/usr/share/gdb/syscalls
-
 .include "../../Makefile.inc"
 .include 
 



CVS commit: src/external/gpl3/gdb/bin/gdbtui

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:33:39 UTC 2023

Modified Files:
src/external/gpl3/gdb/bin/gdbtui: Makefile

Log Message:
delete the texinfo parts


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gdb/bin/gdbtui/Makefile

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



CVS commit: src/external/gpl3/gdb/bin/gdbtui

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:32:41 UTC 2023

Modified Files:
src/external/gpl3/gdb/bin/gdbtui: Makefile

Log Message:
copy the Makefile from gdb.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gdb/bin/gdbtui/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/gdb/bin/gdbtui/Makefile
diff -u src/external/gpl3/gdb/bin/gdbtui/Makefile:1.15 src/external/gpl3/gdb/bin/gdbtui/Makefile:1.16
--- src/external/gpl3/gdb/bin/gdbtui/Makefile:1.15	Fri Sep 17 21:47:09 2021
+++ src/external/gpl3/gdb/bin/gdbtui/Makefile	Sun Aug  6 16:32:41 2023
@@ -1,15 +1,19 @@
-#	$NetBSD: Makefile,v 1.15 2021/09/18 01:47:09 christos Exp $
+#	$NetBSD: Makefile,v 1.16 2023/08/06 20:32:41 christos Exp $
+
 NOCTF=
+NOMAN=
+.include 
 .include "../Makefile.inc"
 
-GDBARCHDIR=${.CURDIR}/../../lib/libgdb/arch/${GDB_MACHINE_ARCH}
+GDBLIBDIR=${.CURDIR}/../../lib
+GDBARCHDIR=${GDBLIBDIR}/libgdb/arch/${GDB_MACHINE_ARCH}
 .include "${GDBARCHDIR}/defs.mk"
 
 PROG=		gdbtui
 
-SRCS=		tui-main.c
+SRCS=		tui-main.c 
 CPPFLAGS+=	-I${.CURDIR} \
-		-I${.CURDIR}/../../lib/libgnulib/arch/${GDB_MACHINE_ARCH}/gnulib \
+		-I${GNULIBDIR}/libgnulib/arch/${GDB_MACHINE_ARCH}/gnulib \
 		-I${DIST}/gdb \
 		-I${DIST}/gdbsupport \
 		-I${DIST}/gdb/config \
@@ -18,75 +22,82 @@ CPPFLAGS+=	-I${.CURDIR} \
 		-I${DIST}/readline \
 		-I${DIST}/libdecnumber \
 		-I${DIST} \
-		-I${.CURDIR}/../../lib/libbfd/arch/${GDB_MACHINE_ARCH} \
-		-I${.CURDIR}/../../lib/libgdbsupport/arch/${GDB_MACHINE_ARCH} \
-		-I${.CURDIR}/../../lib/libgnulib/arch/${GDB_MACHINE_ARCH} \
-		-I${.CURDIR}/../../lib/libgnulib/arch/${GDB_MACHINE_ARCH}/gnulib/import \
+		-I${GDBLIBDIR}/libbfd/arch/${GDB_MACHINE_ARCH} \
+		-I${GDBLIBDIR}/libgdbsupport/arch/${GDB_MACHINE_ARCH} \
+		-I${GDBLIBDIR}/libgnulib/arch/${GDB_MACHINE_ARCH} \
+		-I${GDBLIBDIR}/libgnulib/arch/${GDB_MACHINE_ARCH}/gnulib/import \
 		-I${DIST}/bfd \
 		-I${DIST}/include \
 		${GCPPFLAGS:M-D*}
 
-NOMAN=		# defined
-
-.include 
+TEXINFO=	gdb.texinfo stabs.texinfo
+INFOFLAGS=	-I${DIST}/gdb/doc -I${DIST}/gdb/mi \
+		-I${DIST}/readline/readline/doc -I${.CURDIR}/.. -DGDBN=${GDBN}
+
+GDBvn.texi: ${DIST}/gdb/version.in
+	echo "@set GDBVN $$(${TOOL_CAT} ${.ALLSRC})" > ${.TARGET}
+
+gdb-cfg.texi: ${DIST}/gdb/doc/all-cfg.texi
+	${TOOL_CAT} ${.ALLSRC} > ${.TARGET}
+
+CLEANFILES+= GDBvn.texi gdb-cfg.texi
+stabs.info gdb.info: gdb-cfg.texi GDBvn.texi
+
+FILES=		netbsd.xml
+FILESDIR=	/usr/share/gdb/syscalls
+
+.include "../../Makefile.inc"
+.include 
+
+PROGDPLIBS+= gdb ${GDBLIBDIR}/libgdb
+# XXX: modula2 won't load otherwise, since nothing brings the m2-objs in.
+LIBGDBDIR!=	cd ${GDBLIBDIR}/libgdb && ${PRINTOBJDIR}
+LDADD+=		${LIBGDBDIR}/m2-lang.o
+#LDADD+= -L${LIBGDBDIR} -Wl,--whole-archive -lgdb -Wl,-no-whole-archive
+#DPADD+= ${LIBGDBDIR}/libgdb.a
 
-# Force c++
-CWARNFLAGS.clang+=	-Wno-deprecated
-HOST_CC:=		${HOST_CXX}
-HOST_CFLAGS+=		${HOST_CXXFLAGS}
-CC:=			${CXX}
-CFLAGS:=		${CXXFLAGS} -std=gnu++11 -Wno-error=stack-protector
+# Simulator support
+.if ${GDB_MACHINE_ARCH} == powerpc || ${GDB_MACHINE_ARCH} == powerpcle || \
+${GDB_MACHINE_ARCH} == powerpc64
+PROGDPLIBS+= sim ${.CURDIR}/../lib/libsim
+.elif ${MACHINE_CPU} == xxmips
+PROGDPLIBS+= sim ${.CURDIR}/../lib/libsim
+.endif
 
-LIBCTFDIR!=	 cd ${.CURDIR}/../../lib/libctf	   && ${PRINTOBJDIR}
-LIBGNULIBDIR!=	 cd ${.CURDIR}/../../lib/libgnulib	   && ${PRINTOBJDIR}
-LIBGDBSUPPORTDIR!=   cd ${.CURDIR}/../../lib/libgdbsupport && ${PRINTOBJDIR}
-LIBOPCODESDIR!=	 cd ${.CURDIR}/../../lib/libopcodes	   && ${PRINTOBJDIR}
-LIBBFDDIR!=	 cd ${.CURDIR}/../../lib/libbfd	   && ${PRINTOBJDIR}
-LIBIBERTYDIR!=	 cd ${.CURDIR}/../../lib/libiberty	   && ${PRINTOBJDIR}
-LIBGDBDIR!=	 cd ${.CURDIR}/../../lib/libgdb	   && ${PRINTOBJDIR}
-LIBDECNUMBERDIR!=cd ${.CURDIR}/../../lib/libdecnumber  && ${PRINTOBJDIR}
+PROGDPLIBS+= opcodes ${GDBLIBDIR}/libopcodes \
+bfd ${GDBLIBDIR}/libbfd \
+decnumber ${GDBLIBDIR}/libdecnumber \
+gdbsupport ${GDBLIBDIR}/libgdbsupport \
+backtrace ${GDBLIBDIR}/libbacktrace \
+sframe ${GDBLIBDIR}/libsframe \
+ctf ${GDBLIBDIR}/libctf \
+gnulib ${GDBLIBDIR}/libgnulib \
+iberty ${GDBLIBDIR}/libiberty
 
 .if ${USE_LIBEDIT} == yes
-LIBEDIT=-ledit
+LDADD+= -ledit
+DPADD+= ${LIBEDIT}
 .else
-LIBRLDIR!=  cd ${.CURDIR}/../../lib/libreadline && ${PRINTOBJDIR}
-LIBRL= -L${LIBRLDIR} -lreadline
-LIBRLDP=${LIBRLDIR}/libreadline.a
+PROGDPLIBS+= readline ${GDBLIBDIR}/libreadline
 .endif
 
-LDADD+= -L${LIBGDBDIR} -lgdb
-DPADD+= ${LIBGDBDIR}/libgdb.a
-
-# Simulator support
-.if ${GDB_MACHINE_ARCH} == powerpc || ${GDB_MACHINE_ARCH} == powerpcle || \
-${GDB_MACHINE_ARCH} == powerpc64
-SIMOBJ!=	cd ${.CURDIR}/../../lib/libsim && ${PRINTOBJDIR}
-LDADD+=		-L${SIMOBJ} -lsim
-DPADD+=		${SIMOBJ}/libsim.a
-.elif ${MACHINE_CPU} == xxmips
-SIMOBJ!=	cd 

CVS commit: src/external/gpl3/gdb/bin/gdbtui

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:32:41 UTC 2023

Modified Files:
src/external/gpl3/gdb/bin/gdbtui: Makefile

Log Message:
copy the Makefile from gdb.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gdb/bin/gdbtui/Makefile

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



CVS commit: src/external/gpl3/gdb/bin/gdbserver

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:28:26 UTC 2023

Modified Files:
src/external/gpl3/gdb/bin/gdbserver: Makefile
src/external/gpl3/gdb/bin/gdbserver/arch/x86_64: config.h

Log Message:
Make this build


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/bin/gdbserver/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/bin/gdbserver/arch/x86_64/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/gdb/bin/gdbserver/Makefile
diff -u src/external/gpl3/gdb/bin/gdbserver/Makefile:1.5 src/external/gpl3/gdb/bin/gdbserver/Makefile:1.6
--- src/external/gpl3/gdb/bin/gdbserver/Makefile:1.5	Fri Sep 17 21:47:09 2021
+++ src/external/gpl3/gdb/bin/gdbserver/Makefile	Sun Aug  6 16:28:26 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2021/09/18 01:47:09 christos Exp $
+#	$NetBSD: Makefile,v 1.6 2023/08/06 20:28:26 christos Exp $
 
 NOCTF=
 NOMAN=
@@ -7,7 +7,8 @@ NOMAN=
 
 PROG=		gdbserver
 
-SERVER_SRCS+=	ax.cc debug.cc dll.cc hostio.cc hostio-errno.cc inferiors.cc mem-break.cc notif.cc
+SERVER_SRCS+=	ax.cc debug.cc dll.cc hostio.cc inferiors.cc
+SERVER_SRCS+=	notif.cc mem-break.cc
 SERVER_SRCS+=	regcache.cc remote-utils.cc server.cc symbol.cc target.cc
 SERVER_SRCS+=	tdesc.cc tracepoint.cc utils.cc waitstatus.c version.cc
 
@@ -60,6 +61,6 @@ HOST_CFLAGS+=		${HOST_CXXFLAGS}
 CC:=			${CXX}
 CFLAGS:=		${CXXFLAGS} -std=gnu++11 -Wno-error=stack-protector -pthread
 
-.PATH: ${DIST}/gdbserver ${DIST}/gdb/nat ${DIST}/gdb/arch ${DIST}/gdb/target \
-	${.CURDIR}/arch/${GDB_MACHINE_ARCH} \
+.PATH: ${DIST}/gdbserver ${DIST}/gdb/nat ${DIST}/gdb/arch  \
+	${.CURDIR}/arch/${GDB_MACHINE_ARCH} ${DIST}/gdb/target \
 	${DIST}/../lib/libgdbsupport/arch/${GDB_MACHINE_ARCH}

Index: src/external/gpl3/gdb/bin/gdbserver/arch/x86_64/config.h
diff -u src/external/gpl3/gdb/bin/gdbserver/arch/x86_64/config.h:1.1 src/external/gpl3/gdb/bin/gdbserver/arch/x86_64/config.h:1.2
--- src/external/gpl3/gdb/bin/gdbserver/arch/x86_64/config.h:1.1	Wed Sep 23 19:36:59 2020
+++ src/external/gpl3/gdb/bin/gdbserver/arch/x86_64/config.h	Sun Aug  6 16:28:26 2023
@@ -21,7 +21,7 @@
 #define ENABLE_NLS 1
 
 /* Define if self-testing features should be enabled */
-#define GDB_SELF_TEST 1
+// #define GDB_SELF_TEST 1
 
 /* Define to 1 if you have `alloca', as a function or macro. */
 #define HAVE_ALLOCA 1



CVS commit: src/external/gpl3/gdb/bin/gdbserver

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:28:26 UTC 2023

Modified Files:
src/external/gpl3/gdb/bin/gdbserver: Makefile
src/external/gpl3/gdb/bin/gdbserver/arch/x86_64: config.h

Log Message:
Make this build


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/bin/gdbserver/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/bin/gdbserver/arch/x86_64/config.h

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



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

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:27:15 UTC 2023

Modified Files:
src/external/gpl3/gdb/lib/libgdb/arch/x86_64: defs.mk init.c
src/external/gpl3/gdb/lib/libgnulib/arch/x86_64: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/x86_64/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/x86_64/gnulib/import: string.h
src/external/gpl3/gdb/lib/libiberty/arch/x86_64: defs.mk

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 \
src/external/gpl3/gdb/lib/libgdb/arch/x86_64/defs.mk
cvs rdiff -u -r1.19 -r1.20 \
src/external/gpl3/gdb/lib/libgdb/arch/x86_64/init.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/lib/libgnulib/arch/x86_64/defs.mk
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/lib/libgnulib/arch/x86_64/gnulib/config.h
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/lib/libgnulib/arch/x86_64/gnulib/import/string.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gdb/lib/libiberty/arch/x86_64/defs.mk

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/gdb/lib/libgdb/arch/x86_64/defs.mk
diff -u src/external/gpl3/gdb/lib/libgdb/arch/x86_64/defs.mk:1.20 src/external/gpl3/gdb/lib/libgdb/arch/x86_64/defs.mk:1.21
--- src/external/gpl3/gdb/lib/libgdb/arch/x86_64/defs.mk:1.20	Mon Jul 31 13:02:08 2023
+++ src/external/gpl3/gdb/lib/libgdb/arch/x86_64/defs.mk	Sun Aug  6 16:27:14 2023
@@ -1,5 +1,5 @@
 # This file is automatically generated.  DO NOT EDIT!
-# Generated from: NetBSD: mknative-gdb,v 1.15 2020/12/05 21:27:31 christos Exp 
+# Generated from: NetBSD: mknative-gdb,v 1.16 2023/07/31 17:09:59 christos Exp 
 # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp 
 #
 G_INTERNAL_CFLAGS=  -I. -I${GNUHOSTDIST}/gdb -I${GNUHOSTDIST}/gdb/config -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I${GNUHOSTDIST}/gdb/../include/opcode -I../bfd -I${GNUHOSTDIST}/gdb/../bfd -I${GNUHOSTDIST}/gdb/../include -I${GNUHOSTDIST}/gdb/../readline/readline/.. -I${GNUHOSTDIST}/gdb/../zlib  -I../libdecnumber -I${GNUHOSTDIST}/gdb/../libdecnumber -I./../intl -I${GNUHOSTDIST}/gdb/../gnulib/import -I../gnulib/import -I${GNUHOSTDIST}/gdb/.. -I.. -I${GNUHOSTDIST}/gdb/../libbacktrace/ -I../libbacktrace/  -DTUI=1 -I/usr/obj/amd64-x86_64/tools/include   -I${GNUHOSTDIST}/gdb/.. -pthread  -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-variable -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-error=maybe-uninitialized -Wno-mismatched-tags -Wsuggest-override -Wimplicit-fallthrough=3 -Wduplicated-cond -Wshadow=local -Wdeprecated-copy -Wdeprecated-copy-dtor -Wredundant-move -Wmissing
 -declarations -Wstrict-null-sentinel -Wformat -Wformat-nonliteral 

Index: src/external/gpl3/gdb/lib/libgdb/arch/x86_64/init.c
diff -u src/external/gpl3/gdb/lib/libgdb/arch/x86_64/init.c:1.19 src/external/gpl3/gdb/lib/libgdb/arch/x86_64/init.c:1.20
--- src/external/gpl3/gdb/lib/libgdb/arch/x86_64/init.c:1.19	Mon Jul 31 13:02:08 2023
+++ src/external/gpl3/gdb/lib/libgdb/arch/x86_64/init.c	Sun Aug  6 16:27:14 2023
@@ -1,5 +1,5 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gdb,v 1.15 2020/12/05 21:27:31 christos Exp  */
+/* Generated from: NetBSD: mknative-gdb,v 1.16 2023/07/31 17:09:59 christos Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
 /* Do not modify this file.  */

Index: src/external/gpl3/gdb/lib/libgnulib/arch/x86_64/defs.mk
diff -u src/external/gpl3/gdb/lib/libgnulib/arch/x86_64/defs.mk:1.3 src/external/gpl3/gdb/lib/libgnulib/arch/x86_64/defs.mk:1.4
--- src/external/gpl3/gdb/lib/libgnulib/arch/x86_64/defs.mk:1.3	Mon Jul 31 13:02:09 2023
+++ src/external/gpl3/gdb/lib/libgnulib/arch/x86_64/defs.mk	Sun Aug  6 16:27:14 2023
@@ -1,6 +1,6 @@
 # This file is automatically generated.  DO NOT EDIT!
-# Generated from: NetBSD: mknative-gdb,v 1.15 2020/12/05 21:27:31 christos Exp 
+# Generated from: NetBSD: mknative-gdb,v 1.16 2023/07/31 17:09:59 christos Exp 
 # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp 
 #
 G_OBJS=fnmatch.o frexp.o memmem.o strerror_r.o strstr.o
-G_libgnu_a_OBJECTS= openat-proc.o basename-lgpl.o   canonicalize-lgpl.o chdir-long.o chown.o  cloexec.ocount-one-bits.o  dirname-lgpl.o stripslash.o   error.o exitfail.o  fcntl.o fd-hook.o fd-safer-flag.o dup-safer-flag.o fdopendir.o  filenamecat-lgpl.o   free.o  fstatat.o getcwd.o getcwd-lgpl.o getdelim.o  getline.o  getprogname.o   glob.o globfree.o glob_pattern_p.o hard-locale.olocalcharset.o lock.o lstat.o malloca.o math.o mbrtowc.omemchr.o mempcpy.o  mkdir.o  openat.o openat-die.o   rawmemchr.o  readlink.o rename.o  rmdir.o save-cwd.o scratch_buffer_dupfree.o scratch_buffer_grow.o 

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

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:27:15 UTC 2023

Modified Files:
src/external/gpl3/gdb/lib/libgdb/arch/x86_64: defs.mk init.c
src/external/gpl3/gdb/lib/libgnulib/arch/x86_64: defs.mk
src/external/gpl3/gdb/lib/libgnulib/arch/x86_64/gnulib: config.h
src/external/gpl3/gdb/lib/libgnulib/arch/x86_64/gnulib/import: string.h
src/external/gpl3/gdb/lib/libiberty/arch/x86_64: defs.mk

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 \
src/external/gpl3/gdb/lib/libgdb/arch/x86_64/defs.mk
cvs rdiff -u -r1.19 -r1.20 \
src/external/gpl3/gdb/lib/libgdb/arch/x86_64/init.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/lib/libgnulib/arch/x86_64/defs.mk
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/lib/libgnulib/arch/x86_64/gnulib/config.h
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/lib/libgnulib/arch/x86_64/gnulib/import/string.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gdb/lib/libiberty/arch/x86_64/defs.mk

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



CVS commit: src/external/gpl3/gdb/dist/gdb/nat

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:26:26 UTC 2023

Modified Files:
src/external/gpl3/gdb/dist/gdb/nat: fork-inferior.c

Log Message:
Don't try to switch to thread on signals generated by the shell.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.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/gdb/dist/gdb/nat/fork-inferior.c
diff -u src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c:1.3 src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c:1.4
--- src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c:1.3	Mon Jul 31 13:00:50 2023
+++ src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c	Sun Aug  6 16:26:26 2023
@@ -527,7 +527,9 @@ startup_inferior (process_stratum_target
 
 	  case TARGET_WAITKIND_STOPPED:
 	resume_signal = ws.sig ();
-	switch_to_thread (proc_target, event_ptid);
+	/* Ignore gracefully the !TRAP signals intercepted from the shell.  */
+	if (resume_signal == GDB_SIGNAL_TRAP)
+		switch_to_thread (proc_target, event_ptid);
 	break;
 	}
 



CVS commit: src/external/gpl3/gdb/dist/gdb/nat

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:26:26 UTC 2023

Modified Files:
src/external/gpl3/gdb/dist/gdb/nat: fork-inferior.c

Log Message:
Don't try to switch to thread on signals generated by the shell.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/nat/fork-inferior.c

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



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

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:25:30 UTC 2023

Modified Files:
src/external/gpl3/gdb/dist/gdb: configure.nat

Log Message:
put back libkvm for amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/configure.nat

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/gdb/dist/gdb/configure.nat
diff -u src/external/gpl3/gdb/dist/gdb/configure.nat:1.6 src/external/gpl3/gdb/dist/gdb/configure.nat:1.7
--- src/external/gpl3/gdb/dist/gdb/configure.nat:1.6	Mon Jul 31 13:00:49 2023
+++ src/external/gpl3/gdb/dist/gdb/configure.nat	Sun Aug  6 16:25:30 2023
@@ -383,7 +383,9 @@ case ${gdb_host} in
 	i386)
 		# Host: NetBSD/amd64
 		NATDEPFILES="${NATDEPFILES} netbsd-nat.o amd64-nat.o x86-nat.o \
-		nat/x86-dregs.o x86-bsd-nat.o amd64-bsd-nat.o amd64-netbsd-nat.o"
+		nat/x86-dregs.o x86-bsd-nat.o amd64-bsd-nat.o \
+		amd64-netbsd-nat.o bsd-kvm.o"
+		LOADLIBES='-lkvm'
 		;;
 	sparc)
 		# Host: NetBSD/sparc64



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

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:25:30 UTC 2023

Modified Files:
src/external/gpl3/gdb/dist/gdb: configure.nat

Log Message:
put back libkvm for amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/configure.nat

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



CVS commit: src/external/gpl3/gdb/bin/gdb

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:24:54 UTC 2023

Modified Files:
src/external/gpl3/gdb/bin/gdb: Makefile

Log Message:
- simplify by using PROGDPLIBS
- need --Whole-archive for libgdb to attach modula2, otherwise the file
  does not end up in the list of dependencies from .a archive.


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

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



CVS commit: src/external/gpl3/gdb/bin/gdb

2023-08-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  6 20:24:54 UTC 2023

Modified Files:
src/external/gpl3/gdb/bin/gdb: Makefile

Log Message:
- simplify by using PROGDPLIBS
- need --Whole-archive for libgdb to attach modula2, otherwise the file
  does not end up in the list of dependencies from .a archive.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/gpl3/gdb/bin/gdb/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/gdb/bin/gdb/Makefile
diff -u src/external/gpl3/gdb/bin/gdb/Makefile:1.22 src/external/gpl3/gdb/bin/gdb/Makefile:1.23
--- src/external/gpl3/gdb/bin/gdb/Makefile:1.22	Mon Jul 31 12:59:49 2023
+++ src/external/gpl3/gdb/bin/gdb/Makefile	Sun Aug  6 16:24:54 2023
@@ -1,17 +1,18 @@
-#	$NetBSD: Makefile,v 1.22 2023/07/31 16:59:49 christos Exp $
+#	$NetBSD: Makefile,v 1.23 2023/08/06 20:24:54 christos Exp $
 
 NOCTF=
 .include 
 .include "../Makefile.inc"
 
-GDBARCHDIR=${.CURDIR}/../../lib/libgdb/arch/${GDB_MACHINE_ARCH}
+GDBLIBDIR=${.CURDIR}/../../lib
+GDBARCHDIR=${GDBLIBDIR}/libgdb/arch/${GDB_MACHINE_ARCH}
 .include "${GDBARCHDIR}/defs.mk"
 
 PROG=		gdb
 
-SRCS=		gdb.c
+SRCS=		gdb.c 
 CPPFLAGS+=	-I${.CURDIR} \
-		-I${.CURDIR}/../../lib/libgnulib/arch/${GDB_MACHINE_ARCH}/gnulib \
+		-I${GNULIBDIR}/libgnulib/arch/${GDB_MACHINE_ARCH}/gnulib \
 		-I${DIST}/gdb \
 		-I${DIST}/gdbsupport \
 		-I${DIST}/gdb/config \
@@ -20,10 +21,10 @@ CPPFLAGS+=	-I${.CURDIR} \
 		-I${DIST}/readline \
 		-I${DIST}/libdecnumber \
 		-I${DIST} \
-		-I${.CURDIR}/../../lib/libbfd/arch/${GDB_MACHINE_ARCH} \
-		-I${.CURDIR}/../../lib/libgdbsupport/arch/${GDB_MACHINE_ARCH} \
-		-I${.CURDIR}/../../lib/libgnulib/arch/${GDB_MACHINE_ARCH} \
-		-I${.CURDIR}/../../lib/libgnulib/arch/${GDB_MACHINE_ARCH}/gnulib/import \
+		-I${GDBLIBDIR}/libbfd/arch/${GDB_MACHINE_ARCH} \
+		-I${GDBLIBDIR}/libgdbsupport/arch/${GDB_MACHINE_ARCH} \
+		-I${GDBLIBDIR}/libgnulib/arch/${GDB_MACHINE_ARCH} \
+		-I${GDBLIBDIR}/libgnulib/arch/${GDB_MACHINE_ARCH}/gnulib/import \
 		-I${DIST}/bfd \
 		-I${DIST}/include \
 		${GCPPFLAGS:M-D*}
@@ -47,73 +48,48 @@ FILESDIR=	/usr/share/gdb/syscalls
 .include "../../Makefile.inc"
 .include 
 
-LIBCTFDIR!=	 cd ${.CURDIR}/../../lib/libctf	   && ${PRINTOBJDIR}
-LIBGNULIBDIR!=	 cd ${.CURDIR}/../../lib/libgnulib	   && ${PRINTOBJDIR}
-LIBGDBSUPPORTDIR!=   cd ${.CURDIR}/../../lib/libgdbsupport && ${PRINTOBJDIR}
-LIBOPCODESDIR!=	 cd ${.CURDIR}/../../lib/libopcodes	   && ${PRINTOBJDIR}
-LIBBFDDIR!=	 cd ${.CURDIR}/../../lib/libbfd	   && ${PRINTOBJDIR}
-LIBBACKTRACE!=	 cd ${.CURDIR}/../../lib/libbacktrace  && ${PRINTOBJDIR}
-LIBSFRAME!=	 cd ${.CURDIR}/../../lib/libsframe	   && ${PRINTOBJDIR}
-LIBIBERTYDIR!=	 cd ${.CURDIR}/../../lib/libiberty	   && ${PRINTOBJDIR}
-LIBGDBDIR!=	 cd ${.CURDIR}/../../lib/libgdb	   && ${PRINTOBJDIR}
-LIBDECNUMBERDIR!=cd ${.CURDIR}/../../lib/libdecnumber  && ${PRINTOBJDIR}
-LIBGMP!=	 cd ${.CURDIR}/../../../../lgpl3/gmp/lib/libgmp && ${PRINTOBJDIR}
-
-.if ${USE_LIBEDIT} == yes
-LIBRL=-ledit
-LIBRLDP=${LIBEDIT}
-.else
-LIBRLDIR!=  cd ${.CURDIR}/../../lib/libreadline && ${PRINTOBJDIR}
-LIBRL=  -L${LIBRLDIR} -lreadline
-LIBRLDP=${LIBRLDIR}/libreadline.a
-.endif
-
-LDADD+= -L${LIBGDBDIR} -lgdb
-DPADD+= ${LIBGDBDIR}/libgdb.a
+PROGDPLIBS+= gdb ${GDBLIBDIR}/libgdb
+# XXX: modula2 won't load otherwise, since nothing brings the m2-objs in.
+LIBGDBDIR!=	cd ${GDBLIBDIR}/libgdb && ${PRINTOBJDIR}
+LDADD+=		${LIBGDBDIR}/m2-lang.o
+#LDADD+= -L${LIBGDBDIR} -Wl,--whole-archive -lgdb -Wl,-no-whole-archive
+#DPADD+= ${LIBGDBDIR}/libgdb.a
 
 # Simulator support
 .if ${GDB_MACHINE_ARCH} == powerpc || ${GDB_MACHINE_ARCH} == powerpcle || \
 ${GDB_MACHINE_ARCH} == powerpc64
-SIMOBJ!=	cd ${.CURDIR}/../../lib/libsim && ${PRINTOBJDIR}
-LDADD+=		-L${SIMOBJ} -lsim
-DPADD+=		${SIMOBJ}/libsim.a
+PROGDPLIBS+= sim ${.CURDIR}/../lib/libsim
 .elif ${MACHINE_CPU} == xxmips
-SIMOBJ!=	cd ${.CURDIR}/../../lib/libsim && ${PRINTOBJDIR}
-LDADD+=		-L${SIMOBJ} -lsim
-DPADD+=		${SIMOBJ}/libsim.a
+PROGDPLIBS+= sim ${.CURDIR}/../lib/libsim
 .endif
 
-LDADD+= -L${LIBOPCODESDIR} -lopcodes \
-	-L${LIBBFDDIR} -lbfd \
-	-L${LIBDECNUMBERDIR} -ldecnumber \
-	-L${LIBGDBSUPPORTDIR} -lgdbsupport \
-	-L${LIBBACKTRACE} -lbacktrace \
-	-L${LIBSFRAME} -lsframe \
-	-L${LIBCTFDIR} -lctf \
-	-L${LIBGNULIBDIR} -lgnulib \
-	-L${LIBGMP} -lgmp \
-	${LIBRL} \
-	-lterminfo \
-	-L${LIBIBERTYDIR} -liberty
-
-DPADD+=	${LIBOPCODESDIR}/libopcodes.a \
-	${LIBBFDDIR}/libbfd.a \
-	${LIBDECNUMBERDIR}/libdecnumber.a \
-	${LIBGDBSUPPORTDIR}/libgdbsupport.a \
-	${LIBBACKTRACE}/libbacktrace.a \
-	${LIBSFRAME}/libsframe.a \
-	${LIBCTFDIR}/libctf.a \
-	${LIBGNULIBDIR}/libgnulib.a \
-	${LIBGMP}/libgmp.a \
-	${LIBRLDP} \
-	${LIBTERMINFO} \
-	${LIBIBERTYDIR}/libiberty.a
+PROGDPLIBS+= opcodes ${GDBLIBDIR}/libopcodes \
+bfd ${GDBLIBDIR}/libbfd \
+decnumber 

CVS commit: src

2023-08-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Aug  6 19:44:50 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint1: c11_generic_expression.c
d_c99_bool_strict_syshdr.c d_fold_test.c expr_cast.c
lang_level_c99.c msg_109.c msg_126.c msg_132.c msg_170.c msg_204.c
msg_214.c
src/usr.bin/xlint/lint1: func.c

Log Message:
lint: since C99, a non-void function must return a value


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 \
src/tests/usr.bin/xlint/lint1/c11_generic_expression.c
cvs rdiff -u -r1.21 -r1.22 \
src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/d_fold_test.c \
src/tests/usr.bin/xlint/lint1/msg_126.c \
src/tests/usr.bin/xlint/lint1/msg_170.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/expr_cast.c
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/lang_level_c99.c
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_109.c
cvs rdiff -u -r1.31 -r1.32 src/tests/usr.bin/xlint/lint1/msg_132.c
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/msg_204.c
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_214.c
cvs rdiff -u -r1.173 -r1.174 src/usr.bin/xlint/lint1/func.c

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



CVS commit: src

2023-08-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Aug  6 19:44:50 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint1: c11_generic_expression.c
d_c99_bool_strict_syshdr.c d_fold_test.c expr_cast.c
lang_level_c99.c msg_109.c msg_126.c msg_132.c msg_170.c msg_204.c
msg_214.c
src/usr.bin/xlint/lint1: func.c

Log Message:
lint: since C99, a non-void function must return a value


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 \
src/tests/usr.bin/xlint/lint1/c11_generic_expression.c
cvs rdiff -u -r1.21 -r1.22 \
src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/d_fold_test.c \
src/tests/usr.bin/xlint/lint1/msg_126.c \
src/tests/usr.bin/xlint/lint1/msg_170.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/expr_cast.c
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/lang_level_c99.c
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_109.c
cvs rdiff -u -r1.31 -r1.32 src/tests/usr.bin/xlint/lint1/msg_132.c
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/msg_204.c
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_214.c
cvs rdiff -u -r1.173 -r1.174 src/usr.bin/xlint/lint1/func.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/c11_generic_expression.c
diff -u src/tests/usr.bin/xlint/lint1/c11_generic_expression.c:1.18 src/tests/usr.bin/xlint/lint1/c11_generic_expression.c:1.19
--- src/tests/usr.bin/xlint/lint1/c11_generic_expression.c:1.18	Sun Jul  9 11:18:55 2023
+++ src/tests/usr.bin/xlint/lint1/c11_generic_expression.c	Sun Aug  6 19:44:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: c11_generic_expression.c,v 1.18 2023/07/09 11:18:55 rillig Exp $	*/
+/*	$NetBSD: c11_generic_expression.c,v 1.19 2023/08/06 19:44:50 rillig Exp $	*/
 # 3 "c11_generic_expression.c"
 
 /* lint1-extra-flags: -X 351 */
@@ -17,7 +17,8 @@
 
 /*
  * The type of 'var' is not compatible with any of the types from the
- * generic-association.  This is a compile-time error.
+ * generic-association.  This is a constraint violation that the compiler must
+ * detect, therefore lint doesn't repeat that diagnostic.
  */
 const char *
 classify_type_without_default(double var)
@@ -29,7 +30,7 @@ classify_type_without_default(double var
 	long long: "long long",
 	unsigned: "unsigned"
 	);
-	/* expect-1: warning: function 'classify_type_without_default' expects to return value [214] */
+	/* expect-1: error: function 'classify_type_without_default' expects to return value [214] */
 }
 
 /*

Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c
diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c:1.21 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c:1.22
--- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c:1.21	Wed Aug  2 18:51:25 2023
+++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c	Sun Aug  6 19:44:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: d_c99_bool_strict_syshdr.c,v 1.21 2023/08/02 18:51:25 rillig Exp $	*/
+/*	$NetBSD: d_c99_bool_strict_syshdr.c,v 1.22 2023/08/06 19:44:50 rillig Exp $	*/
 # 3 "d_c99_bool_strict_syshdr.c"
 
 /*
@@ -168,7 +168,7 @@ _Bool
 str_equal_bad(const char *s1, const char *s2)
 {
 	/* expect+2: error: operand of '!' must be bool, not 'int' [330] */
-	/* expect+1: warning: function 'str_equal_bad' expects to return value [214] */
+	/* expect+1: error: function 'str_equal_bad' expects to return value [214] */
 	return !strcmp(s1, s2);
 }
 

Index: src/tests/usr.bin/xlint/lint1/d_fold_test.c
diff -u src/tests/usr.bin/xlint/lint1/d_fold_test.c:1.7 src/tests/usr.bin/xlint/lint1/d_fold_test.c:1.8
--- src/tests/usr.bin/xlint/lint1/d_fold_test.c:1.7	Sun Jul  9 11:18:55 2023
+++ src/tests/usr.bin/xlint/lint1/d_fold_test.c	Sun Aug  6 19:44:50 2023
@@ -81,6 +81,6 @@ void do_while_struct(struct s s)	{ do { 
 
 /* C99 6.5.15 does not require a scalar type, curiously. */
 /* expect+3: error: first operand of '?' must have scalar type [170] */
-/* expect+2: warning: function 'conditional_struct' expects to return value [214] */
+/* expect+2: error: function 'conditional_struct' expects to return value [214] */
 /* expect+1: warning: parameter 's' unused in function 'conditional_struct' [231] */
 int conditional_struct(struct s s)	{ return s ? 1 : 2; }
Index: src/tests/usr.bin/xlint/lint1/msg_126.c
diff -u src/tests/usr.bin/xlint/lint1/msg_126.c:1.7 src/tests/usr.bin/xlint/lint1/msg_126.c:1.8
--- src/tests/usr.bin/xlint/lint1/msg_126.c:1.7	Fri Jul  7 19:45:22 2023
+++ src/tests/usr.bin/xlint/lint1/msg_126.c	Sun Aug  6 19:44:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_126.c,v 1.7 2023/07/07 19:45:22 rillig Exp $	*/
+/*	$NetBSD: msg_126.c,v 1.8 2023/08/06 19:44:50 rillig Exp $	*/
 # 3 "msg_126.c"
 
 // Test for message: incompatible types '%s' and '%s' in conditional [126]
@@ -10,6 +10,6 @@ int
 

CVS commit: src

2023-08-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Aug  6 19:31:06 UTC 2023

Modified Files:
src/distrib/sets/lists/tests: mi
Added Files:
src/tests/usr.bin/xlint/lint1: lang_level_c99.c

Log Message:
tests/lint: document how much of C99 lint already implements


To generate a diff of this commit:
cvs rdiff -u -r1.1285 -r1.1286 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/lang_level_c99.c

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.1285 src/distrib/sets/lists/tests/mi:1.1286
--- src/distrib/sets/lists/tests/mi:1.1285	Fri Aug  4 20:56:08 2023
+++ src/distrib/sets/lists/tests/mi	Sun Aug  6 19:31:06 2023
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1285 2023/08/04 20:56:08 riastradh Exp $
+# $NetBSD: mi,v 1.1286 2023/08/06 19:31:06 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -6697,6 +6697,7 @@
 ./usr/tests/usr.bin/xlint/lint1/init_braces.exp			tests-obsolete		obsolete,atf
 ./usr/tests/usr.bin/xlint/lint1/init_c90.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/init_c90.exp			tests-obsolete		obsolete,atf
+./usr/tests/usr.bin/xlint/lint1/lang_level_c99.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/lex_char.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/lex_char.exp			tests-obsolete		obsolete,atf
 ./usr/tests/usr.bin/xlint/lint1/lex_char_uchar.c		tests-usr.bin-tests	compattestfile,atf

Added files:

Index: src/tests/usr.bin/xlint/lint1/lang_level_c99.c
diff -u /dev/null src/tests/usr.bin/xlint/lint1/lang_level_c99.c:1.1
--- /dev/null	Sun Aug  6 19:31:06 2023
+++ src/tests/usr.bin/xlint/lint1/lang_level_c99.c	Sun Aug  6 19:31:06 2023
@@ -0,0 +1,317 @@
+/*	$NetBSD: lang_level_c99.c,v 1.1 2023/08/06 19:31:06 rillig Exp $	*/
+# 3 "lang_level_c99.c"
+
+/*
+ * Tests that are specific to the C99 language level, in particular, features
+ * that were added in C99.
+ *
+ * In the below comments, [-] means unsupported and [x] means supported.
+ */
+
+/* lint1-flags: -S -w -X 351 */
+
+/* C99 Foreword */
+
+// [-] restricted character set support via digraphs and 
+//
+// Lint neither parses digraphs nor trigraphs.
+
+// [x] wide character library support in  and 
+//
+// On all supported platforms, 'wchar_t' == 'int'.
+
+const int wide_string[] = L"wide";
+
+// [x] more precise aliasing rules via effective type
+//
+// Irrelevant, as lint does not check the runtime behavior.
+
+// [x] restricted pointers
+//
+// Can be parsed, are otherwise ignored.
+
+// [-] variable length arrays
+//
+// Variable length arrays are handled as if the number of elements in the array
+// were always 1.
+
+/* FIXME: Parameter 'n' _is_ actually used. */
+/* expect+2: warning: parameter 'n' unused in function 'variable_length_arrays' [231] */
+unsigned long long
+variable_length_arrays(int n)
+{
+	int vla[n];
+	/* FIXME: The array dimension is not constant, but still negative. */
+	/* expect+1: error: negative array dimension (-4) [20] */
+	typedef int sizeof_vla[-(int)sizeof(vla)];
+	return sizeof(vla);
+}
+
+// [x] flexible array members
+//
+// Flexible array members are parsed but not validated thoroughly.
+
+void
+flexible_array_members(void)
+{
+	struct {
+		int regular;
+		int flexible[];
+	} s = {
+		0,
+		// Flexible array member must not be initialized.  Lint does
+		// not detect this, leaving the job to the C99 compiler.
+		{ 1, 3, 4, }
+	};
+	/* expect+1: error: negative array dimension (-4) [20] */
+	typedef int sizeof_s[-(int)sizeof(s)];
+}
+
+// [x] static and type qualifiers in parameter array declarators
+//
+// Can be parsed, are otherwise ignored.
+
+// [-] complex (and imaginary) support in 
+//
+// Lint does not keep track of which parts of a complex object are initialized.
+//
+// Lint does not support '_Imaginary'.
+
+// [x] type-generic math macros in 
+//
+// Irrelevant, as lint only sees the preprocessed source code.
+
+// [x] the long long int type and library functions
+//
+// On all platforms supported by lint, 'long long' is 64 bits wide.  The other
+// fixed-width types are 'char', 'short', 'int' and (only on 64-bit platforms)
+// '__int128_t'.
+//
+// The lint standard libraries -lstdc and -lposix do not contain the
+// functions added in C99.
+
+/* expect+1: error: negative array dimension (-1) [20] */
+typedef int sizeof_char[-(int)sizeof(char)];
+/* expect+1: error: negative array dimension (-2) [20] */
+typedef int sizeof_short[-(int)sizeof(short)];
+/* expect+1: error: negative array dimension (-4) [20] */
+typedef int sizeof_int[-(int)sizeof(int)];
+/* expect+1: error: negative array dimension (-8) [20] */
+typedef int sizeof_long_long[-(int)sizeof(long long)];
+
+// [x] increased minimum translation limits
+//
+// Irrelevant, as lint does not have 

CVS commit: src

2023-08-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Aug  6 19:31:06 UTC 2023

Modified Files:
src/distrib/sets/lists/tests: mi
Added Files:
src/tests/usr.bin/xlint/lint1: lang_level_c99.c

Log Message:
tests/lint: document how much of C99 lint already implements


To generate a diff of this commit:
cvs rdiff -u -r1.1285 -r1.1286 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/lang_level_c99.c

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



CVS commit: src/sys/kern

2023-08-06 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug  6 17:50:20 UTC 2023

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

Log Message:
xcall(9): Rename condvars to be less confusing.

The `cv' suffix is not helpful and `xclocv' looks like some kind of
clock at first glance.  Just say `xclow' and `xchigh'.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/kern/subr_xcall.c

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



CVS commit: src/sys/kern

2023-08-06 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug  6 17:50:20 UTC 2023

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

Log Message:
xcall(9): Rename condvars to be less confusing.

The `cv' suffix is not helpful and `xclocv' looks like some kind of
clock at first glance.  Just say `xclow' and `xchigh'.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/kern/subr_xcall.c

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

Modified files:

Index: src/sys/kern/subr_xcall.c
diff -u src/sys/kern/subr_xcall.c:1.36 src/sys/kern/subr_xcall.c:1.37
--- src/sys/kern/subr_xcall.c:1.36	Fri Jul  7 17:04:49 2023
+++ src/sys/kern/subr_xcall.c	Sun Aug  6 17:50:20 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_xcall.c,v 1.36 2023/07/07 17:04:49 riastradh Exp $	*/
+/*	$NetBSD: subr_xcall.c,v 1.37 2023/08/06 17:50:20 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2007-2010, 2019 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_xcall.c,v 1.36 2023/07/07 17:04:49 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_xcall.c,v 1.37 2023/08/06 17:50:20 riastradh Exp $");
 
 #include 
 #include 
@@ -149,11 +149,11 @@ xc_init(void)
 
 	memset(xclo, 0, sizeof(xc_state_t));
 	mutex_init(>xc_lock, MUTEX_DEFAULT, IPL_NONE);
-	cv_init(>xc_busy, "xclocv");
+	cv_init(>xc_busy, "xclow");
 
 	memset(xchi, 0, sizeof(xc_state_t));
 	mutex_init(>xc_lock, MUTEX_DEFAULT, IPL_SOFTSERIAL);
-	cv_init(>xc_busy, "xchicv");
+	cv_init(>xc_busy, "xchigh");
 
 	/* Set up a softint for each IPL_SOFT*. */
 #define SETUP_SOFTINT(xipl, sipl) do {	\



CVS commit: src/sys/arch/xen/x86

2023-08-06 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug  6 16:07:53 UTC 2023

Modified Files:
src/sys/arch/xen/x86: xen_ipi.c

Log Message:
xen/x86: Get the right intrframe pointer in ddb ipi.

This was broken with the transition from evtchn_set_handler to
intr_establish_xname in 2017, remained broken with the transition
from intr_establish_xname to xen_intr_establish_xname in 2018, and
still remained broken when xen_intr_establish_xname was changed back
to evtchn_set_handler in 2020.

The mechanism is grody -- instead of a secret second argument to the
interrupt handler, the intrframe pointer should be replaced by a
struct cpu_info member that is saved and restored by the interrupt
handler calling logic.  But we should make sure the replacement
actually works first -- which is not trivial in part because the
users are hidden behind sketchy function pointer casts.

With any luck, this will make `mach cpu N' work in ddb on Xen.

XXX pullup-10
XXX pullup-9 (by patch)


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/xen/x86/xen_ipi.c

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

Modified files:

Index: src/sys/arch/xen/x86/xen_ipi.c
diff -u src/sys/arch/xen/x86/xen_ipi.c:1.40 src/sys/arch/xen/x86/xen_ipi.c:1.41
--- src/sys/arch/xen/x86/xen_ipi.c:1.40	Wed Jan  5 20:21:29 2022
+++ src/sys/arch/xen/x86/xen_ipi.c	Sun Aug  6 16:07:53 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: xen_ipi.c,v 1.40 2022/01/05 20:21:29 christos Exp $ */
+/* $NetBSD: xen_ipi.c,v 1.41 2023/08/06 16:07:53 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2011, 2019 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  * Based on: x86/ipi.c
  */
 
-__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.40 2022/01/05 20:21:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.41 2023/08/06 16:07:53 riastradh Exp $");
 
 #include "opt_ddb.h"
 
@@ -90,18 +90,15 @@ static void (*xen_ipifunc[XEN_NIPIS])(st
 };
 
 static int
-xen_ipi_handler(void *arg)
+xen_ipi_handler(void *arg, struct intrframe *regs)
 {
 	uint32_t pending;
 	int bit;
 	struct cpu_info *ci;
-	struct intrframe *regs;
 
 	ci = curcpu();
-	regs = arg;
 
 	KASSERT(ci == arg);
-	
 	pending = atomic_swap_32(>ci_ipis, 0);
 
 	KDASSERT((pending >> XEN_NIPIS) == 0);
@@ -142,8 +139,9 @@ xen_ipi_init(void)
 	snprintf(intr_xname, sizeof(intr_xname), "%s ipi",
 	device_xname(ci->ci_dev));
 
-	if (event_set_handler(evtchn, xen_ipi_handler, ci, IPL_HIGH, NULL,
-	intr_xname, true, ci) == NULL) {
+	if (event_set_handler(evtchn,
+		__FPTRCAST(int (*)(void *), xen_ipi_handler), ci, IPL_HIGH,
+		NULL, intr_xname, true, ci) == NULL) {
 		panic("%s: unable to register ipi handler\n", __func__);
 		/* NOTREACHED */
 	}



CVS commit: src/sys/arch/xen/x86

2023-08-06 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug  6 16:07:53 UTC 2023

Modified Files:
src/sys/arch/xen/x86: xen_ipi.c

Log Message:
xen/x86: Get the right intrframe pointer in ddb ipi.

This was broken with the transition from evtchn_set_handler to
intr_establish_xname in 2017, remained broken with the transition
from intr_establish_xname to xen_intr_establish_xname in 2018, and
still remained broken when xen_intr_establish_xname was changed back
to evtchn_set_handler in 2020.

The mechanism is grody -- instead of a secret second argument to the
interrupt handler, the intrframe pointer should be replaced by a
struct cpu_info member that is saved and restored by the interrupt
handler calling logic.  But we should make sure the replacement
actually works first -- which is not trivial in part because the
users are hidden behind sketchy function pointer casts.

With any luck, this will make `mach cpu N' work in ddb on Xen.

XXX pullup-10
XXX pullup-9 (by patch)


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/xen/x86/xen_ipi.c

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