CVS commit: src/tools/gcc

2021-08-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Aug 16 06:25:45 UTC 2021

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

Log Message:
fetch experimental_headers, experimental_bits_headers, and ext_host_headers
to install install experimental/* and ext/opt_random.h.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.114 src/tools/gcc/mknative-gcc:1.115
--- src/tools/gcc/mknative-gcc:1.114	Sun Apr 11 07:35:45 2021
+++ src/tools/gcc/mknative-gcc	Mon Aug 16 06:25:45 2021
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.114 2021/04/11 07:35:45 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.115 2021/08/16 06:25:45 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -234,8 +234,10 @@ get_libstdcxx_v3 () {
 	_headers1="$_headers1 pb_headers1 pb_headers2 pb_headers3 pb_headers4"
 	_headers1="$_headers1 pb_headers5 pb_headers6 pb_headers7"
 	_headers1="$_headers1 bits_headers ext_headers host_headers"
-	_headers1="$_headers1 thread_host_headers pstl_headers"
+	_headers1="$_headers1 pstl_headers"
 	_headers1="$_headers1 profile_headers profile_impl_headers"
+	_headers1="$_headers1 experimental_headers experimental_bits_headers"
+	_headers1="$_headers1 ext_host_headers"
 
 	# build files
 	for h in $_build_headers; do



CVS commit: src/tools/compat

2021-07-10 Thread Chris Pinnock
Module Name:src
Committed By:   cjep
Date:   Sun Jul 11 06:15:42 UTC 2021

Modified Files:
src/tools/compat: README

Log Message:
Final note on OpenBSD cross-buildling. Remaining issues were due to
default limits on the build host.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/tools/compat/README

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

Modified files:

Index: src/tools/compat/README
diff -u src/tools/compat/README:1.20 src/tools/compat/README:1.21
--- src/tools/compat/README:1.20	Sun Jul  4 12:57:48 2021
+++ src/tools/compat/README	Sun Jul 11 06:15:42 2021
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.20 2021/07/04 12:57:48 cjep Exp $
+$NetBSD: README,v 1.21 2021/07/11 06:15:42 cjep Exp $
 
 Special notes for cross-hosting a NetBSD build on certain platforms.  
 Only those platforms which have been tested to complete a "build.sh" run
@@ -65,14 +65,17 @@ OpenBSD
 ---
 
 As of -current 20210629, ./build.sh will build src on OpenBSD 6.9
-for all targets except MIPS-based ones. 
+for all platforms.
 
-For builds requiring the LLVM RT library (including X on amd64, 
-i386 and evbarm64-el), the build user's limits needs to be setup 
-for higher memory usage, otherwise the build will fail. This can
-be achieved by either building as root (not recommended) or
-by changing the datasize attribute to infinity for the relevant
-groups and users in /etc/login.conf.
+Due to the default limits placed on user accounts, the host may experience
+memory exhaustion on builds requiring the LLVM RT library (including 
+X on amd64, i386 and evbarm64-el) and for MIPS targets.
+
+This can be avoided by building as root (not ideal) or by asking your
+administrator to increase your limits in login.conf. These two variables
+seem to be sufficient:
+:datasize=infinity:\
+:stacksize-cur=8M:\
 
 NetBSD (earlier releases)
 -



CVS commit: src/tools/compat

2021-07-04 Thread Chris Pinnock
Module Name:src
Committed By:   cjep
Date:   Sun Jul  4 12:57:48 UTC 2021

Modified Files:
src/tools/compat: README

Log Message:
LLVM RT library will actually cross-build from OpenBSD provided sufficient
limits are in place for the build user.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/tools/compat/README

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

Modified files:

Index: src/tools/compat/README
diff -u src/tools/compat/README:1.19 src/tools/compat/README:1.20
--- src/tools/compat/README:1.19	Tue Jun 29 10:02:34 2021
+++ src/tools/compat/README	Sun Jul  4 12:57:48 2021
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.19 2021/06/29 10:02:34 cjep Exp $
+$NetBSD: README,v 1.20 2021/07/04 12:57:48 cjep Exp $
 
 Special notes for cross-hosting a NetBSD build on certain platforms.  
 Only those platforms which have been tested to complete a "build.sh" run
@@ -65,10 +65,14 @@ OpenBSD
 ---
 
 As of -current 20210629, ./build.sh will build src on OpenBSD 6.9
-for some platforms. Known problems:
-* MIPS targets do not currently build. 
-* The LLVM RT library will not build and consequently nor will X on 
-  amd64 and i386.
+for all targets except MIPS-based ones. 
+
+For builds requiring the LLVM RT library (including X on amd64, 
+i386 and evbarm64-el), the build user's limits needs to be setup 
+for higher memory usage, otherwise the build will fail. This can
+be achieved by either building as root (not recommended) or
+by changing the datasize attribute to infinity for the relevant
+groups and users in /etc/login.conf.
 
 NetBSD (earlier releases)
 -



CVS commit: src/tools/compat

2021-06-29 Thread Chris Pinnock
Module Name:src
Committed By:   cjep
Date:   Tue Jun 29 10:02:34 UTC 2021

Modified Files:
src/tools/compat: README

Log Message:
Note OpenBSD cross-build progress


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/tools/compat/README

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

Modified files:

Index: src/tools/compat/README
diff -u src/tools/compat/README:1.18 src/tools/compat/README:1.19
--- src/tools/compat/README:1.18	Mon Jun 28 07:18:01 2021
+++ src/tools/compat/README	Tue Jun 29 10:02:34 2021
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.18 2021/06/28 07:18:01 cjep Exp $
+$NetBSD: README,v 1.19 2021/06/29 10:02:34 cjep Exp $
 
 Special notes for cross-hosting a NetBSD build on certain platforms.  
 Only those platforms which have been tested to complete a "build.sh" run
@@ -61,6 +61,15 @@ HP-UX
 
 * zlib must be available.
 
+OpenBSD
+---
+
+As of -current 20210629, ./build.sh will build src on OpenBSD 6.9
+for some platforms. Known problems:
+* MIPS targets do not currently build. 
+* The LLVM RT library will not build and consequently nor will X on 
+  amd64 and i386.
+
 NetBSD (earlier releases)
 -
 



CVS commit: src/tools/compat

2021-06-28 Thread Chris Pinnock
Module Name:src
Committed By:   cjep
Date:   Mon Jun 28 07:18:01 UTC 2021

Modified Files:
src/tools/compat: README

Log Message:
avoid triggering conflict indicator warnings


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/tools/compat/README

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

Modified files:

Index: src/tools/compat/README
diff -u src/tools/compat/README:1.17 src/tools/compat/README:1.18
--- src/tools/compat/README:1.17	Mon Jun 28 07:16:46 2021
+++ src/tools/compat/README	Mon Jun 28 07:18:01 2021
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.17 2021/06/28 07:16:46 cjep Exp $
+$NetBSD: README,v 1.18 2021/06/28 07:18:01 cjep Exp $
 
 Special notes for cross-hosting a NetBSD build on certain platforms.  
 Only those platforms which have been tested to complete a "build.sh" run
@@ -14,7 +14,7 @@ In addition all hosts must provide the f
   zlib and headers (this requirement may be dropped in future)
 
 FreeBSD
-===
+---
 
 build.sh was recently tested on:
 * FreeBSD 13 (amd64, aarch64) 
@@ -23,7 +23,7 @@ build.sh was recently tested on:
 * FreeBSD 10.4 (amd64)
 
 Linux
-=
+-
 
 build.sh has been tested on:
 * Amazon Linux 2 (x86)
@@ -45,7 +45,7 @@ build.sh has been tested on:
 * There is a known build problem on Linux/aarch64 with glibc <2.28
 
 macOS/Darwin
-
+
 
 build.sh was recently tested on:
 * macOS Big Sur (x86)
@@ -57,12 +57,12 @@ Previously, there have been issues build
 HFS filesystems. build.sh is not working yet on M1-based Macs.
 
 HP-UX
-=
+-
 
 * zlib must be available.
 
 NetBSD (earlier releases)
-=
+-
 
 * Tested on NetBSD 1.5.2 (machine-independently).
 * Should need no special setup.
@@ -70,7 +70,7 @@ NetBSD (earlier releases)
   compat_defs.h will error out if it finds it defined. 
 
 Solaris
-===
+---
 
 (updated instruction for Solaris 11 further below)
 



CVS commit: src/tools/compat

2021-06-28 Thread Chris Pinnock
Module Name:src
Committed By:   cjep
Date:   Mon Jun 28 07:16:46 UTC 2021

Modified Files:
src/tools/compat: README

Log Message:
note on Darwin/Mac


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/tools/compat/README

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

Modified files:

Index: src/tools/compat/README
diff -u src/tools/compat/README:1.16 src/tools/compat/README:1.17
--- src/tools/compat/README:1.16	Wed May 12 06:39:28 2021
+++ src/tools/compat/README	Mon Jun 28 07:16:46 2021
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.16 2021/05/12 06:39:28 cjep Exp $
+$NetBSD: README,v 1.17 2021/06/28 07:16:46 cjep Exp $
 
 Special notes for cross-hosting a NetBSD build on certain platforms.  
 Only those platforms which have been tested to complete a "build.sh" run
@@ -48,13 +48,13 @@ macOS/Darwin
 
 
 build.sh was recently tested on:
-* macOS Big Sur
+* macOS Big Sur (x86)
 * macOS Catalina
 * macOS High Sierra
 
-with up to date Xcode command line tools and APFS filesystems.
-(Previously, there have been issues building on case-insensitive 
-HFS filesystems.)
+with up to date Xcode command line tools and APFS filesystems. 
+Previously, there have been issues building on case-insensitive 
+HFS filesystems. build.sh is not working yet on M1-based Macs.
 
 HP-UX
 =



CVS commit: src/tools/compat

2021-05-30 Thread Chris Pinnock
Module Name:src
Committed By:   cjep
Date:   Sun May 30 10:39:41 UTC 2021

Modified Files:
src/tools/compat: compat_defs.h

Log Message:
PR port-amiga/56188

Include a prototype for __nbcompat_heapsort. The tools for amiga now
build on Darwin where one Amiga specific tool uses heapsort.

Despite being a one-liner, ./build.sh -m amiga tools was tested on
NetBSD, Darwin, FreeBSD & Linux with the change.

Discussed various options with jdc & thorpej. Perhaps in the future
we could look at using qsort instead of heapsort as qsort is
standardised and more likely to be available. We could then remove
heapsort from the compatibility library.


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/tools/compat/compat_defs.h

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

Modified files:

Index: src/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.119 src/tools/compat/compat_defs.h:1.120
--- src/tools/compat/compat_defs.h:1.119	Mon May 24 23:07:40 2021
+++ src/tools/compat/compat_defs.h	Sun May 30 10:39:41 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_defs.h,v 1.119 2021/05/24 23:07:40 uwe Exp $	*/
+/*	$NetBSD: compat_defs.h,v 1.120 2021/05/30 10:39:41 cjep Exp $	*/
 
 #ifndef	__NETBSD_COMPAT_DEFS_H__
 #define	__NETBSD_COMPAT_DEFS_H__
@@ -462,7 +462,9 @@ int __nbcompat_gettemp(char *, int *, in
 ssize_t pread(int, void *, size_t, off_t);
 #endif
 
+int __nbcompat_heapsort (void *, size_t, size_t, int (*)(const void *, const void *));
 #define heapsort __nbcompat_heapsort
+
 #if !HAVE_DECL_HEAPSORT
 int heapsort (void *, size_t, size_t, int (*)(const void *, const void *));
 #endif



CVS commit: src/tools

2021-05-27 Thread Chris Pinnock
Module Name:src
Committed By:   cjep
Date:   Thu May 27 08:41:35 UTC 2021

Modified Files:
src/tools: Makefile
src/tools/date: Makefile

Log Message:
If we are building date earlier, we need to use an uninstalled copy
of host-mkdep and libnbcompat otherwise the build process looks for
tools that might not be there yet (e.g. fresh build).
Reviewed by martin.


To generate a diff of this commit:
cvs rdiff -u -r1.210 -r1.211 src/tools/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tools/date/Makefile

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.210 src/tools/Makefile:1.211
--- src/tools/Makefile:1.210	Wed May 26 20:19:15 2021
+++ src/tools/Makefile	Thu May 27 08:41:35 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.210 2021/05/26 20:19:15 christos Exp $
+#	$NetBSD: Makefile,v 1.211 2021/05/27 08:41:35 cjep Exp $
 
 .include 
 .include 
@@ -80,13 +80,17 @@ LINT_BITS= lint lint2
 # XXX .ORDER does not work when multiple targets are passed on the
 # make command line without "-j", so use dependencies in addition to .ORDER.
 #
-.ORDER: dependall-host-mkdep dependall-compat dependall-binstall
+.ORDER: dependall-host-mkdep dependall-compat dependall-binstall \
+	dependall-date
 .if make(dependall-host-mkdep) && make(dependall-compat)
 dependall-compat: dependall-host-mkdep
 .endif
 .if make(dependall-compat) && make(dependall-binstall)
 dependall-binstall: dependall-compat
 .endif
+.if make(dependall-date)
+dependall-date: dependall-host-mkdep dependall-compat
+.endif
 
 # Dependencies in SUBDIR below ordered to maximize parallel ability.
 # See above for special treatment for host-mkdep, compat, and binstall.

Index: src/tools/date/Makefile
diff -u src/tools/date/Makefile:1.1 src/tools/date/Makefile:1.2
--- src/tools/date/Makefile:1.1	Wed May 26 20:19:15 2021
+++ src/tools/date/Makefile	Thu May 27 08:41:35 2021
@@ -1,6 +1,22 @@
-#	$NetBSD: Makefile,v 1.1 2021/05/26 20:19:15 christos Exp $
+#	$NetBSD: Makefile,v 1.2 2021/05/27 08:41:35 cjep Exp $
+
+.include 
 
 HOSTPROGNAME=	${_TOOL_PREFIX}date
 HOST_SRCDIR=	bin/date
 
+# Prevent Makefile.host from trying to use the version of libnbcompat
+# from ${TOOLDIR}.
+NOCOMPATLIB=
+
+# Use uninstalled copy of host-mkdep
+HOST_MKDEP_OBJ!= cd ${.CURDIR}/../host-mkdep && ${PRINTOBJDIR}
+HOST_MKDEP=	${HOST_MKDEP_OBJ}/host-mkdep
+MKDEP=		${HOST_MKDEP}
+
+# Use uninstalled copy of libnbcompat and associated *.h files
+COMPATLIB_UNINSTALLED= yes
+COMPATOBJ!=	cd ${NETBSDSRCDIR}/tools/compat && ${PRINTOBJDIR}
+.-include	"${COMPATOBJ}/defs.mk"
+
 .include "${.CURDIR}/../Makefile.host"



CVS commit: src/tools

2021-05-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 26 20:19:15 UTC 2021

Modified Files:
src/tools: Makefile
Added Files:
src/tools/date: Makefile

Log Message:
Add a date tool


To generate a diff of this commit:
cvs rdiff -u -r1.209 -r1.210 src/tools/Makefile
cvs rdiff -u -r0 -r1.1 src/tools/date/Makefile

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.209 src/tools/Makefile:1.210
--- src/tools/Makefile:1.209	Thu May  6 09:23:36 2021
+++ src/tools/Makefile	Wed May 26 16:19:15 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.209 2021/05/06 13:23:36 rin Exp $
+#	$NetBSD: Makefile,v 1.210 2021/05/26 20:19:15 christos Exp $
 
 .include 
 .include 
@@ -91,7 +91,7 @@ dependall-binstall: dependall-compat
 # Dependencies in SUBDIR below ordered to maximize parallel ability.
 # See above for special treatment for host-mkdep, compat, and binstall.
 #
-SUBDIR=	host-mkdep compat binstall \
+SUBDIR=	host-mkdep compat binstall date \
 	.WAIT mktemp .WAIT sed .WAIT genassym
 .if ${TOOLS_BUILDRUMP} == "no"
 SUBDIR+= cap_mkdb crunchgen ctags gencat hexdump \

Added files:

Index: src/tools/date/Makefile
diff -u /dev/null src/tools/date/Makefile:1.1
--- /dev/null	Wed May 26 16:19:15 2021
+++ src/tools/date/Makefile	Wed May 26 16:19:15 2021
@@ -0,0 +1,6 @@
+#	$NetBSD: Makefile,v 1.1 2021/05/26 20:19:15 christos Exp $
+
+HOSTPROGNAME=	${_TOOL_PREFIX}date
+HOST_SRCDIR=	bin/date
+
+.include "${.CURDIR}/../Makefile.host"



CVS commit: src/tools/compat

2021-05-24 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon May 24 23:07:41 UTC 2021

Modified Files:
src/tools/compat: compat_defs.h

Log Message:
Fix typo in pathname in a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/tools/compat/compat_defs.h

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

Modified files:

Index: src/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.118 src/tools/compat/compat_defs.h:1.119
--- src/tools/compat/compat_defs.h:1.118	Thu Feb 25 13:41:58 2021
+++ src/tools/compat/compat_defs.h	Mon May 24 23:07:40 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_defs.h,v 1.118 2021/02/25 13:41:58 christos Exp $	*/
+/*	$NetBSD: compat_defs.h,v 1.119 2021/05/24 23:07:40 uwe Exp $	*/
 
 #ifndef	__NETBSD_COMPAT_DEFS_H__
 #define	__NETBSD_COMPAT_DEFS_H__
@@ -454,7 +454,7 @@ char *mkdtemp(char *);
 
 #if !HAVE_MKSTEMP || !HAVE_MKDTEMP
 /* This is a prototype for the internal function defined in
- * src/lib/lib/stdio/gettemp.c */
+ * src/lib/libc/stdio/gettemp.c */
 int __nbcompat_gettemp(char *, int *, int);
 #endif
 



CVS commit: src/tools/compat

2021-05-11 Thread Chris Pinnock
Module Name:src
Committed By:   cjep
Date:   Wed May 12 06:39:28 UTC 2021

Modified Files:
src/tools/compat: README

Log Message:
Add macOS High Sierra to the list of verified build platforms


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/tools/compat/README

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

Modified files:

Index: src/tools/compat/README
diff -u src/tools/compat/README:1.15 src/tools/compat/README:1.16
--- src/tools/compat/README:1.15	Fri May  7 14:52:59 2021
+++ src/tools/compat/README	Wed May 12 06:39:28 2021
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.15 2021/05/07 14:52:59 cjep Exp $
+$NetBSD: README,v 1.16 2021/05/12 06:39:28 cjep Exp $
 
 Special notes for cross-hosting a NetBSD build on certain platforms.  
 Only those platforms which have been tested to complete a "build.sh" run
@@ -50,6 +50,7 @@ macOS/Darwin
 build.sh was recently tested on:
 * macOS Big Sur
 * macOS Catalina
+* macOS High Sierra
 
 with up to date Xcode command line tools and APFS filesystems.
 (Previously, there have been issues building on case-insensitive 



CVS commit: src/tools/gcc

2021-05-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May  8 19:36:28 UTC 2021

Modified Files:
src/tools/gcc: Makefile

Log Message:
Disable again initfini; breaks some archs and not worth dealing with when
we have both gcc's active in the tree.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/tools/gcc/Makefile

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

Modified files:

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.103 src/tools/gcc/Makefile:1.104
--- src/tools/gcc/Makefile:1.103	Fri May  7 19:00:04 2021
+++ src/tools/gcc/Makefile	Sat May  8 15:36:28 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.103 2021/05/07 23:00:04 christos Exp $
+#	$NetBSD: Makefile,v 1.104 2021/05/08 19:36:28 christos Exp $
 
 .include 
 
@@ -37,7 +37,6 @@ COMMON_CONFIGURE_ARGS=	--target=${MACHIN
 			--with-system-zlib \
 			--without-isl \
 			--enable-__cxa_atexit \
-			--enable-initfini-array=yes \
 			--enable-libstdcxx-time=rt \
 			--enable-libstdcxx-threads \
 			--with-diagnostics-color=auto-if-env



CVS commit: src/tools

2021-05-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May  7 23:00:04 UTC 2021

Modified Files:
src/tools/binutils: Makefile
src/tools/gcc: Makefile

Log Message:
enable initfini-array since all platforms support it.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/tools/binutils/Makefile
cvs rdiff -u -r1.102 -r1.103 src/tools/gcc/Makefile

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

Modified files:

Index: src/tools/binutils/Makefile
diff -u src/tools/binutils/Makefile:1.31 src/tools/binutils/Makefile:1.32
--- src/tools/binutils/Makefile:1.31	Fri Apr  3 20:47:30 2020
+++ src/tools/binutils/Makefile	Fri May  7 19:00:04 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.31 2020/04/04 00:47:30 christos Exp $
+#	$NetBSD: Makefile,v 1.32 2021/05/07 23:00:04 christos Exp $
 
 .include 
 
@@ -13,7 +13,7 @@ BRANDING?=	\
 
 CONFIGURE_ARGS=	--target=${MACHINE_GNU_PLATFORM} --disable-nls \
 		--program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \
-		--disable-werror --disable-initfini-array \
+		--disable-werror --enable-initfini-array=yes \
 		${BRANDING}
 
 build/gas/m68k-parse.c: ${GNUHOSTDIST}/gas/m68k-parse.c
@@ -68,7 +68,7 @@ native-binutils: .native/.configure_done
 			--build=`${GNUHOSTDIST}/config.guess` \
 			--host=${MACHINE_GNU_PLATFORM} \
 			--target=${MACHINE_GNU_PLATFORM} \
-			--disable-initfini-array \
+			--enable-initfini-array=yes \
 			${BRANDING} \
 		)
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.102 src/tools/gcc/Makefile:1.103
--- src/tools/gcc/Makefile:1.102	Sun Apr 11 19:55:47 2021
+++ src/tools/gcc/Makefile	Fri May  7 19:00:04 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.102 2021/04/11 23:55:47 mrg Exp $
+#	$NetBSD: Makefile,v 1.103 2021/05/07 23:00:04 christos Exp $
 
 .include 
 
@@ -37,6 +37,7 @@ COMMON_CONFIGURE_ARGS=	--target=${MACHIN
 			--with-system-zlib \
 			--without-isl \
 			--enable-__cxa_atexit \
+			--enable-initfini-array=yes \
 			--enable-libstdcxx-time=rt \
 			--enable-libstdcxx-threads \
 			--with-diagnostics-color=auto-if-env



CVS commit: src/tools/compat

2021-05-07 Thread Chris Pinnock
Module Name:src
Committed By:   cjep
Date:   Fri May  7 14:52:59 UTC 2021

Modified Files:
src/tools/compat: README

Log Message:
More test notes from using build.sh against non NetBSD platforms.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tools/compat/README

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

Modified files:

Index: src/tools/compat/README
diff -u src/tools/compat/README:1.14 src/tools/compat/README:1.15
--- src/tools/compat/README:1.14	Thu May  6 07:32:15 2021
+++ src/tools/compat/README	Fri May  7 14:52:59 2021
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.14 2021/05/06 07:32:15 cjep Exp $
+$NetBSD: README,v 1.15 2021/05/07 14:52:59 cjep Exp $
 
 Special notes for cross-hosting a NetBSD build on certain platforms.  
 Only those platforms which have been tested to complete a "build.sh" run
@@ -16,17 +16,22 @@ In addition all hosts must provide the f
 FreeBSD
 ===
 
-build.sh was recently tested on FreeBSD 13 with the compiler tools installed.
+build.sh was recently tested on:
+* FreeBSD 13 (amd64, aarch64) 
+* FreeBSD 12.2 (amd64, aarch64)
+* FreeBSD 11.4 (amd64)
+* FreeBSD 10.4 (amd64)
 
 Linux
 =
 
 build.sh has been tested on:
 * Amazon Linux 2 (x86)
-* Debian 10 (x86)
-* Red Hat Enterprise Linux 8 (x86)
+* Debian 10 (x86, aarch64)
+* Red Hat Enterprise Linux 8 (x86, aarch64)
 * SUSE Enterprise Server 15 (x86)
-* Ubuntu Server 20.04 (x86)
+* Ubuntu Server 20.04 (x86, aarch64)
+* Ubuntu Server 18.04 (x86)
 
 * The gcc and g++ package must be installed, along with the typical system 
   development packages (glibc-devel, etc.). The g++ package is sometimes 
@@ -37,12 +42,18 @@ build.sh has been tested on:
 * The zlib and zlib-devel packages must be installed (these are
   called zlib1g and zlib1g-dev on Debian and Ubuntu Linux)
 
+* There is a known build problem on Linux/aarch64 with glibc <2.28
+
 macOS/Darwin
 
 
-build.sh was recently tested on macOS Big Sur with an APFS filesystem
-and the Xcode command line tools. (Previously, there have been issues
-building on case-insensitive HFS filesystems.)
+build.sh was recently tested on:
+* macOS Big Sur
+* macOS Catalina
+
+with up to date Xcode command line tools and APFS filesystems.
+(Previously, there have been issues building on case-insensitive 
+HFS filesystems.)
 
 HP-UX
 =



CVS commit: src/tools/compat

2021-05-06 Thread Chris Pinnock
Module Name:src
Committed By:   cjep
Date:   Thu May  6 07:32:16 UTC 2021

Modified Files:
src/tools/compat: README

Log Message:
Update with information from recent testing of different Linux variants
on AWS. Also FreeBSD 13.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tools/compat/README

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

Modified files:

Index: src/tools/compat/README
diff -u src/tools/compat/README:1.13 src/tools/compat/README:1.14
--- src/tools/compat/README:1.13	Sun Sep  9 19:17:21 2018
+++ src/tools/compat/README	Thu May  6 07:32:15 2021
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.13 2018/09/09 19:17:21 palle Exp $
+$NetBSD: README,v 1.14 2021/05/06 07:32:15 cjep Exp $
 
 Special notes for cross-hosting a NetBSD build on certain platforms.  
 Only those platforms which have been tested to complete a "build.sh" run
@@ -8,62 +8,57 @@ All hosts must have a POSIX compatible s
 otherwise set. This can be overridden by setting HOST_SH in the environment.
 
 In addition all hosts must provide the following local tools:
+  gzip
+  gcc
+  g++
+  zlib and headers (this requirement may be dropped in future)
 
-gzip
+FreeBSD
+===
 
-=
-
-NetBSD:
-
-* _NETBSD_SOURCE is *not* to be defined/pulled in during compat/tools builds.
-  compat_defs.h will error out if it finds it defined. 
-
-HP-UX:
-
-* zlib must be available.
-  This will be fixed in the future to include zlib in libnbcompat.
+build.sh was recently tested on FreeBSD 13 with the compiler tools installed.
 
+Linux
 =
 
-LINUX:
-
-* Tested on RedHat Linux 7.1 (i386).
-  Tested on RedHat Linux 7.3 (i686) on 16 Sep 2002.  Requires "LANG=C"
-  in the environment.
-
-* Tested on Redhat Linux 8.0 (i686) in Fall 2003. Requires no special settings.
-
-* Tested on Redhat ES3 and AS3 in spring of 2004. Requires no special settings.
-
-* The gcc (and libstdc++, if needed) package must be installed, along
-  with the typical system development packages (glibc-devel, etc.).
+build.sh has been tested on:
+* Amazon Linux 2 (x86)
+* Debian 10 (x86)
+* Red Hat Enterprise Linux 8 (x86)
+* SUSE Enterprise Server 15 (x86)
+* Ubuntu Server 20.04 (x86)
+
+* The gcc and g++ package must be installed, along with the typical system 
+  development packages (glibc-devel, etc.). The g++ package is sometimes 
+  called gcc-c++.
 
 * The ncurses-devel package must be installed (for nbinfo).
 
-* The zlib and zlib-devel packages must be installed.  This will be
-  fixed in the future to include zlib in libnbcompat.
-
-=
+* The zlib and zlib-devel packages must be installed (these are
+  called zlib1g and zlib1g-dev on Debian and Ubuntu Linux)
 
-MACOS
-  Requires a case sensitive filesystem such as UFS
+macOS/Darwin
+
 
-* Tested on 10.2.8 with Dec 2002 Developer Tools
-- may require a fix to /usr/bin/join, netbsd's join should work fine
-* Tested on 10.3 with xcode 1.5
-- compiles fine out of the box
+build.sh was recently tested on macOS Big Sur with an APFS filesystem
+and the Xcode command line tools. (Previously, there have been issues
+building on case-insensitive HFS filesystems.)
 
+HP-UX
 =
 
-NETBSD (earlier releases):
+* zlib must be available.
 
-* Tested on NetBSD 1.5.2 (machine-independently).
+NetBSD (earlier releases)
+=
 
+* Tested on NetBSD 1.5.2 (machine-independently).
 * Should need no special setup.
+* _NETBSD_SOURCE is *not* to be defined/pulled in during compat/tools builds.
+  compat_defs.h will error out if it finds it defined. 
 
-=
-
-SOLARIS:
+Solaris
+===
 
 (updated instruction for Solaris 11 further below)
 



CVS commit: src/tools

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

Modified Files:
src/tools: Makefile

Log Message:
Make mips-elf2ecoff available for all mips


To generate a diff of this commit:
cvs rdiff -u -r1.207 -r1.208 src/tools/Makefile

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.207 src/tools/Makefile:1.208
--- src/tools/Makefile:1.207	Sat Feb  6 11:14:55 2021
+++ src/tools/Makefile	Sun Apr 25 11:11:28 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.207 2021/02/06 16:14:55 dbj Exp $
+#	$NetBSD: Makefile,v 1.208 2021/04/25 15:11:28 christos Exp $
 
 .include 
 .include 
@@ -180,8 +180,7 @@ SUBDIR+=	arm-elf2aout
 SUBDIR+=	m68k-elf2aout
 .endif
 
-.if (${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \
- ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb")
+.if !empty(MACHINE_ARCH:Mmips*)
 SUBDIR+=	mips-elf2ecoff
 .endif
 



CVS commit: src/tools/gcc

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

Modified Files:
src/tools/gcc: Makefile gcc-version.mk

Log Message:
add a netbsd version for GCC 10.  properly generate omp-device-properties.h.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/tools/gcc/Makefile
cvs rdiff -u -r1.20 -r1.21 src/tools/gcc/gcc-version.mk

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

Modified files:

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.101 src/tools/gcc/Makefile:1.102
--- src/tools/gcc/Makefile:1.101	Sun Apr 11 07:35:45 2021
+++ src/tools/gcc/Makefile	Sun Apr 11 23:55:47 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.101 2021/04/11 07:35:45 mrg Exp $
+#	$NetBSD: Makefile,v 1.102 2021/04/11 23:55:47 mrg Exp $
 
 .include 
 
@@ -234,7 +234,7 @@ MKENV_BUILD_MAKE=cd .native && ${MKNATIV
 		(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e libgcc.mvars tconfig.h); \
 		(cd .native && touch gcc/cc1obj gcc/cc1plus gcc/f771 gcc/libgcc.a gcc/libgcc_s.so)
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
-		(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e omp-device-properties.h)
+		(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e s-omp-device-properties-h)
 .if defined(EXTRA_GCC_TARGETS)
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
 		(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e ${EXTRA_GCC_TARGETS})

Index: src/tools/gcc/gcc-version.mk
diff -u src/tools/gcc/gcc-version.mk:1.20 src/tools/gcc/gcc-version.mk:1.21
--- src/tools/gcc/gcc-version.mk:1.20	Sun Sep  6 21:59:33 2020
+++ src/tools/gcc/gcc-version.mk	Sun Apr 11 23:55:47 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: gcc-version.mk,v 1.20 2020/09/06 21:59:33 mrg Exp $
+#	$NetBSD: gcc-version.mk,v 1.21 2021/04/11 23:55:47 mrg Exp $
 
 # common location for tools and native build
 
@@ -6,4 +6,6 @@
 NETBSD_GCC_VERSION=nb1 20200311
 .elif ${HAVE_GCC} == 9
 NETBSD_GCC_VERSION=nb1 20200907
+.elif ${HAVE_GCC} == 10
+NETBSD_GCC_VERSION=nb1 20210411
 .endif



CVS commit: src/tools/gcc

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Apr 11 07:35:45 UTC 2021

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

Log Message:
fetch omp-device-properties.h and don't try to fetch sanitizer
stuff automatically yet.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/tools/gcc/Makefile
cvs rdiff -u -r1.113 -r1.114 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.100 src/tools/gcc/Makefile:1.101
--- src/tools/gcc/Makefile:1.100	Sun Sep  6 02:24:38 2020
+++ src/tools/gcc/Makefile	Sun Apr 11 07:35:45 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.100 2020/09/06 02:24:38 mrg Exp $
+#	$NetBSD: Makefile,v 1.101 2021/04/11 07:35:45 mrg Exp $
 
 .include 
 
@@ -8,7 +8,7 @@ MODULE=		${EXTERNAL_GCC_SUBDIR}
 GCCDIST=	${.CURDIR}/../../external/gpl3/${EXTERNAL_GCC_SUBDIR}/dist
 GNUHOSTDIST=	${GCCDIST}
 
-.if ${HAVE_GCC} == 7
+.if ${HAVE_GCC} == 9
 MKNATIVE=		${.CURDIR}/mknative-gcc.old
 .endif
 
@@ -233,6 +233,8 @@ MKENV_BUILD_MAKE=cd .native && ${MKNATIV
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
 		(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e libgcc.mvars tconfig.h); \
 		(cd .native && touch gcc/cc1obj gcc/cc1plus gcc/f771 gcc/libgcc.a gcc/libgcc_s.so)
+	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
+		(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e omp-device-properties.h)
 .if defined(EXTRA_GCC_TARGETS)
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
 		(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e ${EXTRA_GCC_TARGETS})

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.113 src/tools/gcc/mknative-gcc:1.114
--- src/tools/gcc/mknative-gcc:1.113	Sun Apr 11 01:44:14 2021
+++ src/tools/gcc/mknative-gcc	Sun Apr 11 07:35:45 2021
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.113 2021/04/11 01:44:14 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.114 2021/04/11 07:35:45 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -401,7 +401,7 @@ get_gcc () {
 			| write_mk $_OUTDIRBASE/usr.bin/common-target/arch/$_MACHINE_ARCH.mk
 
 	write_c $_OUTDIRBASE/usr.bin/libcpp/arch/$_MACHINE_ARCH/config.h <$_TMPDIR/libcpp/config.h
-	hfiles='auto-host configargs config bconfig bversion plugin-version multilib tm'
+	hfiles='auto-host configargs config bconfig bversion plugin-version multilib tm omp-device-properties'
 	for f in $hfiles; do
 		write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$_MACHINE_ARCH/$f.h <$_TMPDIR/gcc/$f.h
 		if [ "${_MACHINE_ARCH}" = "powerpc" -a "${f}" = "configargs" ]
@@ -493,7 +493,8 @@ gcc*)
 	get_gcc_libiberty gcc
 	get_libobjc libobjc
 	get_libstdcxx_v3 libstdc++-v3 gcc
-	get_libsanitizer libsanitizer
+	# wants libstdc++-v3 built
+	# get_libsanitizer libsanitizer
 	get_libdecnumber libdecnumber
 	get_libgomp libgomp
 	get_libbacktrace libbacktrace



CVS commit: src/tools/gcc

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

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

Log Message:
make mknative-gcc.old for GCC 9.  begin to update mknative-gcc for GCC 10.


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/tools/gcc/mknative-gcc
cvs rdiff -u -r1.9 -r1.10 src/tools/gcc/mknative-gcc.old

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.112 src/tools/gcc/mknative-gcc:1.113
--- src/tools/gcc/mknative-gcc:1.112	Wed Sep  9 07:12:04 2020
+++ src/tools/gcc/mknative-gcc	Sun Apr 11 01:44:14 2021
@@ -1,10 +1,10 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.112 2020/09/09 07:12:04 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.113 2021/04/11 01:44:14 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
 #
-# This version is for GCC 9.3
+# This version is for GCC 10.3
 
 # initialise
 
@@ -312,9 +312,11 @@ get_libsanitizer () {
 		getvars $_PLATFORM/libsanitizer/lsan/Makefile \
 			lsan_files
 		getvars $_PLATFORM/libsanitizer/tsan/Makefile \
-			tsan_plugin_files
+			tsan_files
 		getvars $_PLATFORM/libsanitizer/ubsan/Makefile \
-			ubsan_plugin_files
+			ubsan_files
+		getvars $_PLATFORM/libsanitizer/interception/Makefile \
+			interception_files
 
 	} | sanitise_includes \
 	  | write_mk $_OUTDIRBASE/lib/$_subdir/arch/$_MACHINE_ARCH/defs.mk
@@ -491,8 +493,7 @@ gcc*)
 	get_gcc_libiberty gcc
 	get_libobjc libobjc
 	get_libstdcxx_v3 libstdc++-v3 gcc
-	# XXX not yet
-	# get_libsanitizer libsanitizer
+	get_libsanitizer libsanitizer
 	get_libdecnumber libdecnumber
 	get_libgomp libgomp
 	get_libbacktrace libbacktrace

Index: src/tools/gcc/mknative-gcc.old
diff -u src/tools/gcc/mknative-gcc.old:1.9 src/tools/gcc/mknative-gcc.old:1.10
--- src/tools/gcc/mknative-gcc.old:1.9	Sun Sep  6 02:24:38 2020
+++ src/tools/gcc/mknative-gcc.old	Sun Apr 11 01:44:14 2021
@@ -1,10 +1,10 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc.old,v 1.9 2020/09/06 02:24:38 mrg Exp $
+#	$NetBSD: mknative-gcc.old,v 1.10 2021/04/11 01:44:14 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
 #
-# This version is for GCC 7.5
+# This version is for GCC 9.3
 
 # initialise
 
@@ -226,12 +226,16 @@ get_libstdcxx_v3 () {
 	mkdir -p $_OUTDIR/lib/$_subdir/arch/$_MACHINE_ARCH
 
 	_build_headers="c++config.h cxxabi_tweaks.h"
-	_headers1="c_base_headers_extra_install"
-	_headers1="$_headers1 tr1_headers tr2_headers decimal_headers c_compatibility_headers_install"
+	_headers1="backward_headers c_base_headers_extra"
+	_headers1="$_headers1 c_base_headers_extra_install"
+	_headers1="$_headers1 tr1_headers tr2_headers"
+	_headers1="$_headers1 decimal_headers c_compatibility_headers_install"
 	_headers1="$_headers1 debug_headers parallel_headers"
-	_headers2="host_headers thread_host_headers"
-	_pf_headers="profile_headers profile_impl_headers"
-	_pb_headers="pb_headers1 pb_headers2 pb_headers3 pb_headers4 pb_headers5 pb_headers6 pb_headers7"
+	_headers1="$_headers1 pb_headers1 pb_headers2 pb_headers3 pb_headers4"
+	_headers1="$_headers1 pb_headers5 pb_headers6 pb_headers7"
+	_headers1="$_headers1 bits_headers ext_headers host_headers"
+	_headers1="$_headers1 thread_host_headers pstl_headers"
+	_headers1="$_headers1 profile_headers profile_impl_headers"
 
 	# build files
 	for h in $_build_headers; do
@@ -248,6 +252,7 @@ get_libstdcxx_v3 () {
 		getvars $_PLATFORM/libstdc++-v3/Makefile \
 			port_specific_symbol_files
 		getvars $_PLATFORM/libstdc++-v3/src/Makefile \
+			cxx17_sources \
 			cxx11_sources \
 			cxx98_sources
 
@@ -264,6 +269,9 @@ get_libstdcxx_v3 () {
 		# src
 		getvars $_PLATFORM/libstdc++-v3/src/Makefile \
 			libstdc___la_SOURCES | sed 's/^G_libstdc___la_SOURCES=/G_SRC_SOURCES=/'
+		getvars $_PLATFORM/libstdc++-v3/src/c++17/Makefile \
+			libc__17convenience_la_SOURCES | \
+			sed -e 's/^G_libc__17convenience_la_SOURCES=/G_CPP17_SOURCES=/'
 		getvars $_PLATFORM/libstdc++-v3/src/c++11/Makefile \
 			libc__11convenience_la_SOURCES | \
 			sed -e 's/^G_libc__11convenience_la_SOURCES=/G_CPP11_SOURCES=/' \
@@ -282,19 +290,36 @@ get_libstdcxx_v3 () {
 
 		# includes
 		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
-			backward_headers c_base_headers_extra $_headers1 $_pb_headers | \
-sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/##g'
-		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
-			bits_headers ext_headers $_headers2 | \
-sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/##g' -e 's#\${GNUHOSTDIST}/libstdc++-v3/config/##g'
-		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
-			$_pf_headers | sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/profile/##g'
+			$_headers1 | \
+sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/##g' \
+-e 's#\${GNUHOSTDIST}/libstdc++-v3/config/##g'
 		get

CVS commit: src/tools/compat

2021-02-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 25 13:41:58 UTC 2021

Modified Files:
src/tools/compat: Makefile compat_defs.h configure configure.ac
nbtool_config.h.in

Log Message:
Add reallocarray; this is used by the new regex code and we don't want to
convert it to reallocarr so the code is kept similar with the original from
FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/tools/compat/Makefile
cvs rdiff -u -r1.117 -r1.118 src/tools/compat/compat_defs.h
cvs rdiff -u -r1.98 -r1.99 src/tools/compat/configure \
src/tools/compat/configure.ac
cvs rdiff -u -r1.52 -r1.53 src/tools/compat/nbtool_config.h.in

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

Modified files:

Index: src/tools/compat/Makefile
diff -u src/tools/compat/Makefile:1.88 src/tools/compat/Makefile:1.89
--- src/tools/compat/Makefile:1.88	Sat Jun 13 06:49:17 2020
+++ src/tools/compat/Makefile	Thu Feb 25 08:41:58 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.88 2020/06/13 10:49:17 lukem Exp $
+#	$NetBSD: Makefile,v 1.89 2021/02/25 13:41:58 christos Exp $
 
 HOSTLIB=	nbcompat
 
@@ -13,7 +13,8 @@ SRCS=		atoll.c basename.c cdbr.c cdbw.c 
 		mi_vector_hash.c mkdtemp.c \
 		mkstemp.c pread.c putc_unlocked.c pwcache.c pwrite.c \
 		pw_scan.c \
-		raise_default_signal.c rb.c reallocarr.c rmd160.c rmd160hl.c \
+		raise_default_signal.c rb.c reallocarr.c reallocarray.c \
+		rmd160.c rmd160hl.c \
 		regcomp.c regerror.c regexec.c regfree.c \
 		setenv.c setgroupent.c \
 		setpassent.c setprogname.c sha1.c sha1hl.c sha2.c \

Index: src/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.117 src/tools/compat/compat_defs.h:1.118
--- src/tools/compat/compat_defs.h:1.117	Tue Feb 23 11:03:00 2021
+++ src/tools/compat/compat_defs.h	Thu Feb 25 08:41:58 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_defs.h,v 1.117 2021/02/23 16:03:00 rin Exp $	*/
+/*	$NetBSD: compat_defs.h,v 1.118 2021/02/25 13:41:58 christos Exp $	*/
 
 #ifndef	__NETBSD_COMPAT_DEFS_H__
 #define	__NETBSD_COMPAT_DEFS_H__
@@ -556,6 +556,10 @@ int raise_default_signal(int);
 int reallocarr(void *, size_t, size_t);
 #endif
 
+#if !HAVE_DECL_REALLOCARRAY
+void *reallocarray(void *, size_t, size_t);
+#endif
+
 #if !HAVE_DECL_SETENV
 int setenv(const char *, const char *, int);
 #endif

Index: src/tools/compat/configure
diff -u src/tools/compat/configure:1.98 src/tools/compat/configure:1.99
--- src/tools/compat/configure:1.98	Wed Jun 24 10:44:44 2020
+++ src/tools/compat/configure	Thu Feb 25 08:41:58 2021
@@ -4832,6 +4832,19 @@ fi
 cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_REALLOCARR $ac_have_decl
 _ACEOF
+ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "
+#include 
+
+"
+if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_REALLOCARRAY $ac_have_decl
+_ACEOF
 ac_fn_c_check_decl "$LINENO" "getsubopt" "ac_cv_have_decl_getsubopt" "
 #include 
 
@@ -5285,7 +5298,7 @@ for ac_func in atoll asprintf asnprintf 
 	getopt getopt_long group_from_gid gid_from_group \
 	heapsort isblank issetugid lchflags lchmod lchown lutimes mkstemp \
 	mkdtemp poll pread putc_unlocked pwcache_userdb pwcache_groupdb \
-	pwrite raise_default_signal random reallocarr setenv \
+	pwrite raise_default_signal random reallocarr reallocarray setenv \
 	setgroupent setprogname setpassent \
 	snprintb_m snprintf strlcat strlcpy strmode \
 	strcasecmp strncasecmp strndup strnlen strsep strsuftoll strtoi \
Index: src/tools/compat/configure.ac
diff -u src/tools/compat/configure.ac:1.98 src/tools/compat/configure.ac:1.99
--- src/tools/compat/configure.ac:1.98	Wed Jun 24 10:39:01 2020
+++ src/tools/compat/configure.ac	Thu Feb 25 08:41:58 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: configure.ac,v 1.98 2020/06/24 14:39:01 uwe Exp $
+#	$NetBSD: configure.ac,v 1.99 2021/02/25 13:41:58 christos Exp $
 #
 # Autoconf definition file for libnbcompat.
 #
@@ -179,8 +179,9 @@ AC_CHECK_DECLS([asprintf, asnprintf, vas
 #include 
 ])
 
-AC_CHECK_DECLS([atoll, heapsort, mkdtemp, mkstemp, reallocarr, getsubopt,
-	setenv, strtoi, strtoll, strtou, setprogname, getprogname],,, [
+AC_CHECK_DECLS([atoll, heapsort, mkdtemp, mkstemp, reallocarr, reallocarray,
+	getsubopt, setenv, strtoi, strtoll, strtou, setprogname,
+	getprogname],,, [
 #include 
 ])
 
@@ -223,7 +224,7 @@ AC_CHECK_FUNCS(atoll asprintf asnprintf 
 	getopt getopt_long group_from_gid gid_from_group \
 	heapsort isblank issetugid lchflags lchmod lchown lutimes mkstemp \
 	mkdtemp poll pread putc_unlocked pwcache_userdb pwcache_groupdb \
-	pwrite raise_default_signal random reallocarr setenv \
+	pwrite raise_default_signal random reallocarr reallocarray setenv \
 	setgroupent setprogname setpassent \
 	snprintb_m snprintf strlcat strlcpy strmode \
 	strcasecmp strncasecmp strndup strnlen strsep strsuftoll strtoi \

Index: src/tools/compat/nbto

CVS commit: src/tools/compat

2021-02-23 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Feb 23 16:03:01 UTC 2021

Modified Files:
src/tools/compat: compat_defs.h

Log Message:
Fix copy-paste error for heapsort(3), so that it is declared appropriately.


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/tools/compat/compat_defs.h

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

Modified files:

Index: src/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.116 src/tools/compat/compat_defs.h:1.117
--- src/tools/compat/compat_defs.h:1.116	Wed Jun 19 23:33:07 2019
+++ src/tools/compat/compat_defs.h	Tue Feb 23 16:03:00 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_defs.h,v 1.116 2019/06/19 23:33:07 kamil Exp $	*/
+/*	$NetBSD: compat_defs.h,v 1.117 2021/02/23 16:03:00 rin Exp $	*/
 
 #ifndef	__NETBSD_COMPAT_DEFS_H__
 #define	__NETBSD_COMPAT_DEFS_H__
@@ -462,11 +462,10 @@ int __nbcompat_gettemp(char *, int *, in
 ssize_t pread(int, void *, size_t, off_t);
 #endif
 
+#define heapsort __nbcompat_heapsort
 #if !HAVE_DECL_HEAPSORT
 int heapsort (void *, size_t, size_t, int (*)(const void *, const void *));
 #endif
-/* Make them use our version */
-#  define heapsort __nbcompat_heapsort
 
 char	   *flags_to_string(unsigned long, const char *);
 int		string_to_flags(char **, unsigned long *, unsigned long *);



CVS commit: src/tools

2021-02-06 Thread Darrin B. Jewell
Module Name:src
Committed By:   dbj
Date:   Sat Feb  6 16:14:55 UTC 2021

Modified Files:
src/tools: Makefile

Log Message:
tools: allow MKCROSSGDB to work when not building gcc


To generate a diff of this commit:
cvs rdiff -u -r1.206 -r1.207 src/tools/Makefile

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.206 src/tools/Makefile:1.207
--- src/tools/Makefile:1.206	Tue Jul 28 21:38:15 2020
+++ src/tools/Makefile	Sat Feb  6 16:14:55 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.206 2020/07/28 21:38:15 uwe Exp $
+#	$NetBSD: Makefile,v 1.207 2021/02/06 16:14:55 dbj Exp $
 
 .include 
 .include 
@@ -25,26 +25,25 @@
 TOOLS_BUILDRUMP?=no
 
 .if ${TOOLCHAIN_MISSING} == "no"
-. if defined(HAVE_GCC) && ${HAVE_GCC} > 0
-TOOLCHAIN_BITS= gmake .WAIT
+. if (defined(HAVE_GCC) && ${HAVE_GCC} > 0) || \
+ (defined(HAVE_GDB) && ${HAVE_GDB} > 0 && ${MKCROSSGDB:Uno} != "no")
+TOOLCHAIN_BITS+= gmake .WAIT
 TOOLCHAIN_BITS+= gmp .WAIT
 TOOLCHAIN_BITS+= mpfr .WAIT
 TOOLCHAIN_BITS+= mpc .WAIT
 . endif
-.endif
 
-.if ${TOOLCHAIN_MISSING} == "no"
 TOOLCHAIN_BITS+= binutils .WAIT
-.endif
 
-.if defined(HAVE_GCC) && ${HAVE_GCC} > 0
-. if ${TOOLCHAIN_MISSING} == "no"
+. if defined(HAVE_GCC) && ${HAVE_GCC} > 0
 TOOLCHAIN_BITS+= gcc
-.  if ${MKCROSSGDB:Uno} != "no" || make(obj)
+. endif
+
+. if defined(HAVE_GDB) && ${HAVE_GDB} > 0 && ${MKCROSSGDB:Uno} != "no"
 TOOLCHAIN_BITS+= gdb
-.  endif
-TOOLCHAIN_BITS+= .WAIT
 . endif
+
+TOOLCHAIN_BITS+= .WAIT
 .endif
 
 .if defined(HAVE_PCC)



CVS commit: src/tools/lint

2021-01-24 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Jan 24 16:22:55 UTC 2021

Modified Files:
src/tools/lint: Makefile

Log Message:
lint: fix path to installed stdbool.h for strict bool mode


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tools/lint/Makefile

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

Modified files:

Index: src/tools/lint/Makefile
diff -u src/tools/lint/Makefile:1.5 src/tools/lint/Makefile:1.6
--- src/tools/lint/Makefile:1.5	Sun Jan 24 15:43:09 2021
+++ src/tools/lint/Makefile	Sun Jan 24 16:22:55 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2021/01/24 15:43:09 christos Exp $
+#	$NetBSD: Makefile,v 1.6 2021/01/24 16:22:55 rillig Exp $
 
 HOSTPROGNAME=	${MACHINE_GNU_PLATFORM}-lint
 HOST_SRCDIR=	usr.bin/xlint/xlint
@@ -11,9 +11,9 @@ HOST_CPPFLAGS=	-DPATH_LIBEXEC=\"${TOOLDI
 
 STDBOOL_H=${NETBSDSRCDIR}/${HOST_SRCDIR}/strict-bool-stdbool.h
 
-install: ${TOOLDIR}/libdata/lint/stdbool.h
+install: ${TOOLDIR}/libdata/lint/strict-bool/stdbool.h
 
-${TOOLDIR}/libdata/lint/stdbool.h:: ${STDBOOL_H}
+${TOOLDIR}/libdata/lint/strict-bool/stdbool.h:: ${STDBOOL_H}
 	${_MKTARGET_INSTALL}
-	mkdir -p ${TOOLDIR}/libdata/lint
+	mkdir -p ${.TARGET:H}
 	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${STDBOOL_H} ${.TARGET}



CVS commit: src/tools/lint

2021-01-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 24 15:43:09 UTC 2021

Modified Files:
src/tools/lint: Makefile

Log Message:
Install lint's custom stdbool.h and make lint search for it in the right place.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tools/lint/Makefile

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

Modified files:

Index: src/tools/lint/Makefile
diff -u src/tools/lint/Makefile:1.4 src/tools/lint/Makefile:1.5
--- src/tools/lint/Makefile:1.4	Mon Nov 12 18:16:28 2001
+++ src/tools/lint/Makefile	Sun Jan 24 10:43:09 2021
@@ -1,8 +1,19 @@
-#	$NetBSD: Makefile,v 1.4 2001/11/12 23:16:28 tv Exp $
+#	$NetBSD: Makefile,v 1.5 2021/01/24 15:43:09 christos Exp $
 
 HOSTPROGNAME=	${MACHINE_GNU_PLATFORM}-lint
 HOST_SRCDIR=	usr.bin/xlint/xlint
 HOST_CPPFLAGS=	-DPATH_LIBEXEC=\"${TOOLDIR}/libexec\" \
+		-DPATH_LIBLINT=\"${TOOLDIR}/libdata/lint\" \
 		-DTARGET_PREFIX=\"${MACHINE_GNU_PLATFORM}-\"
 
+
 .include "${.CURDIR}/../Makefile.host"
+
+STDBOOL_H=${NETBSDSRCDIR}/${HOST_SRCDIR}/strict-bool-stdbool.h
+
+install: ${TOOLDIR}/libdata/lint/stdbool.h
+
+${TOOLDIR}/libdata/lint/stdbool.h:: ${STDBOOL_H}
+	${_MKTARGET_INSTALL}
+	mkdir -p ${TOOLDIR}/libdata/lint
+	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${STDBOOL_H} ${.TARGET}



CVS commit: src/tools/gdb

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec  5 21:27:31 UTC 2020

Modified Files:
src/tools/gdb: mknative-gdb

Log Message:
Don't bother with gdbserver for archs that don't build it.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tools/gdb/mknative-gdb

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

Modified files:

Index: src/tools/gdb/mknative-gdb
diff -u src/tools/gdb/mknative-gdb:1.14 src/tools/gdb/mknative-gdb:1.15
--- src/tools/gdb/mknative-gdb:1.14	Thu Sep 24 10:53:17 2020
+++ src/tools/gdb/mknative-gdb	Sat Dec  5 16:27:31 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gdb,v 1.14 2020/09/24 14:53:17 christos Exp $
+#	$NetBSD: mknative-gdb,v 1.15 2020/12/05 21:27:31 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/gdb
@@ -218,6 +218,10 @@ get_gdb_libgdb () {
 
 get_gdb_bingdbserver () {
 	local _CTF=$_GDB/bin/gdbserver
+
+	if [ ! -f $_CTF/arch/$_MACHINE_SUBDIR/config.h ]; then
+		return
+	fi
 	mkdir -p $_TOP/$_CTF/arch/$_MACHINE_SUBDIR
 
 	write_c $_CTF/arch/$_MACHINE_SUBDIR/config.h \



CVS commit: src/tools/gdb

2020-10-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Oct  9 23:48:42 UTC 2020

Modified Files:
src/tools/gdb: mknative-gdb.old

Log Message:
Correct target directory; src/external/gpl3/gdb.old not gdb.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tools/gdb/mknative-gdb.old

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

Modified files:

Index: src/tools/gdb/mknative-gdb.old
diff -u src/tools/gdb/mknative-gdb.old:1.1 src/tools/gdb/mknative-gdb.old:1.2
--- src/tools/gdb/mknative-gdb.old:1.1	Thu Sep 17 02:14:48 2020
+++ src/tools/gdb/mknative-gdb.old	Fri Oct  9 23:48:42 2020
@@ -1,8 +1,8 @@
 #!/bin/sh
-#	$NetBSD: mknative-gdb.old,v 1.1 2020/09/17 02:14:48 christos Exp $
+#	$NetBSD: mknative-gdb.old,v 1.2 2020/10/09 23:48:42 rin Exp $
 #
 # Shell script for generating all the constants needed for a native
-# platform build of src/external/gpl3/gdb
+# platform build of src/external/gpl3/gdb.old
 #
 
 # initialise
@@ -12,7 +12,7 @@ _TOP=$3
 _PLATFORM=$4
 _MACHINE_SUBDIR=$5
 _VPATH=`grep VPATH ${_TMPDIR}/Makefile | sed 's,^.*=[ 	]*,,'`
-_GDB=external/gpl3/gdb
+_GDB=external/gpl3/gdb.old
 
 . $_TOP/tools/gcc/mknative.common
 



CVS commit: src/tools/gdb

2020-10-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Oct  9 23:44:46 UTC 2020

Modified Files:
src/tools/gdb: README.mknative

Log Message:
Nowadays, mknative-gdb puts files into external/gpl3/gdb/lib,
instead of external/gpl3/gdb/bin/gdb.

Also, we need to nbmake-MACHINE in external/gpl3/gdb in order to
build dependent libraries correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tools/gdb/README.mknative

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

Modified files:

Index: src/tools/gdb/README.mknative
diff -u src/tools/gdb/README.mknative:1.6 src/tools/gdb/README.mknative:1.7
--- src/tools/gdb/README.mknative:1.6	Fri Jun 21 07:05:02 2019
+++ src/tools/gdb/README.mknative	Fri Oct  9 23:44:46 2020
@@ -1,4 +1,4 @@
-$NetBSD: README.mknative,v 1.6 2019/06/21 07:05:02 maya Exp $
+$NetBSD: README.mknative,v 1.7 2020/10/09 23:44:46 rin Exp $
 
 This file describes how to use the cross-compiler to generate the
 native files for GDB on a target platform.
@@ -34,11 +34,11 @@ work.
native-to-NetBSD GDB on a cross host, and mknative pulls glue data
from this.
 
-   NOTE: this step writes files under src/external/gpl3/gdb/bin/gdb, so you
+   NOTE: this step writes files under src/external/gpl3/gdb/lib, so you
need to do it in a writable src tree!
 
 6. Try out a full build using "nbmake-MACHINE" in
-   src/external/gpl3/gdb/bin; the result should include a native GDB.
+   src/external/gpl3/gdb; the result should include a native GDB.
 
 7. If all is well, commit the glue files and directories added to
-   src/external/gpl3/gdb/bin/gdb.
+   src/external/gpl3/gdb/lib.



CVS commit: src/tools/gmp

2020-09-26 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep 26 20:56:53 UTC 2020

Modified Files:
src/tools/gmp: Makefile

Log Message:
initial working version of native-gmp support.

does not use mknative.common yet, so always updates files and does
not mark them with NetBSD rcsid.  (not a regression from the manual
version at least.)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tools/gmp/Makefile

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

Modified files:

Index: src/tools/gmp/Makefile
diff -u src/tools/gmp/Makefile:1.3 src/tools/gmp/Makefile:1.4
--- src/tools/gmp/Makefile:1.3	Sat Jan  9 01:13:42 2016
+++ src/tools/gmp/Makefile	Sat Sep 26 20:56:53 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2016/01/09 01:13:42 christos Exp $
+#	$NetBSD: Makefile,v 1.4 2020/09/26 20:56:53 mrg Exp $
 #
 
 GNUHOSTDIST=   ${.CURDIR}/../../external/lgpl3/gmp/dist
@@ -15,3 +15,18 @@ CONFIGURE_ENV:=	${CONFIGURE_ENV:NPATH=*:
 
 # Force avoiding possibly non-executable install-sh.
 CONFIGURE_ENV+=	ac_cv_path_mkdir="${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install -d"
+
+# mknative-gmp support
+#
+# XXX early version; does not use mknative.common yet.
+
+native-gmp: .native/.configure_done
+	@echo 'Extracting GNU GMP configury for a native toolchain.'
+	(cd ${.OBJDIR}/.native && \
+	 ${MAKE} -f ${.CURDIR}/../../external/lgpl3/gmp/Makefile.netbsd-gmp copy-files)
+	@echo 'HA HA, only joking. Manual fixes maybe needed now.'
+
+.native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
+	mkdir .native 2>/dev/null || true
+	(cd ${.OBJDIR}/.native && \
+	 ${MAKE} -f ${.CURDIR}/../../external/lgpl3/gmp/Makefile.netbsd-gmp all)



CVS commit: src/tools/gdb

2020-09-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 24 14:53:17 UTC 2020

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

Log Message:
grab the gdbserver version


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/tools/gdb/Makefile
cvs rdiff -u -r1.13 -r1.14 src/tools/gdb/mknative-gdb

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

Modified files:

Index: src/tools/gdb/Makefile
diff -u src/tools/gdb/Makefile:1.39 src/tools/gdb/Makefile:1.40
--- src/tools/gdb/Makefile:1.39	Wed Sep 23 19:21:29 2020
+++ src/tools/gdb/Makefile	Thu Sep 24 10:53:17 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.39 2020/09/23 23:21:29 christos Exp $
+#	$NetBSD: Makefile,v 1.40 2020/09/24 14:53:17 christos Exp $
 
 .include 
 
@@ -117,7 +117,10 @@ native-gdb: .native/.configure_done
 		(cd ${.OBJDIR}/.native/bfd && \
 			${MKENV_BUILD_MAKE} bfd.h bfdver.h) && \
 		(cd ${.OBJDIR}/.native/gdb && \
-			${MKENV_BUILD_MAKE} init.c version.c)
+			${MKENV_BUILD_MAKE} init.c version.c) && \
+		(if [ -d ${.OBJDIR}/.native/gdbserver ]; then \
+			cd ${.OBJDIR}/.native/gdbserver && \
+			${MKENV_BUILD_MAKE} version-generated.cc; fi)
 	@touch $@
 
 clean: clean.native

Index: src/tools/gdb/mknative-gdb
diff -u src/tools/gdb/mknative-gdb:1.13 src/tools/gdb/mknative-gdb:1.14
--- src/tools/gdb/mknative-gdb:1.13	Wed Sep 23 19:21:29 2020
+++ src/tools/gdb/mknative-gdb	Thu Sep 24 10:53:17 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gdb,v 1.13 2020/09/23 23:21:29 christos Exp $
+#	$NetBSD: mknative-gdb,v 1.14 2020/09/24 14:53:17 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/gdb
@@ -222,6 +222,8 @@ get_gdb_bingdbserver () {
 
 	write_c $_CTF/arch/$_MACHINE_SUBDIR/config.h \
 		<$_TMPDIR/gdbserver/config.h
+	write_c $_CTF/arch/$_MACHINE_SUBDIR/version.cc \
+		<$_TMPDIR/gdbserver/version-generated.cc
 }
 
 # main #



CVS commit: src/tools/gdb

2020-09-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Sep 23 23:21:29 UTC 2020

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

Log Message:
Add gdbserver


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/tools/gdb/Makefile
cvs rdiff -u -r1.12 -r1.13 src/tools/gdb/mknative-gdb

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

Modified files:

Index: src/tools/gdb/Makefile
diff -u src/tools/gdb/Makefile:1.38 src/tools/gdb/Makefile:1.39
--- src/tools/gdb/Makefile:1.38	Sun Jun  2 19:28:32 2019
+++ src/tools/gdb/Makefile	Wed Sep 23 19:21:29 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.38 2019/06/02 23:28:32 christos Exp $
+#	$NetBSD: Makefile,v 1.39 2020/09/23 23:21:29 christos Exp $
 
 .include 
 
@@ -87,6 +87,12 @@ CONFIGURE_ARGS_SIM=
 CONFIGURE_ARGS_SIM+= --disable-sim
 .endif
 
+CONFIGURE_ARGS_GDBSERVER=
+.if \
+${MACHINE_CPU} == "x86_64"
+CONFIGURE_ARGS_GDBSERVER+= --enable-gdbserver
+.endif
+
 native-gdb: .native/.configure_done
 	@echo 'Extracting GDB configury for a native toolchain.'
 	MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} gdb \
@@ -101,6 +107,7 @@ native-gdb: .native/.configure_done
 			--prefix=/usr \
 			--with-separate-debug-dir=/usr/libdata/debug \
 			${CONFIGURE_ARGS_SIM} \
+			${CONFIGURE_ARGS_GDBSERVER} \
 			--build=`${GNUHOSTDIST}/config.guess` \
 			--host=${MACHINE_GNU_PLATFORM} \
 			--target=${MACHINE_GNU_PLATFORM})

Index: src/tools/gdb/mknative-gdb
diff -u src/tools/gdb/mknative-gdb:1.12 src/tools/gdb/mknative-gdb:1.13
--- src/tools/gdb/mknative-gdb:1.12	Thu Sep 17 12:54:31 2020
+++ src/tools/gdb/mknative-gdb	Wed Sep 23 19:21:29 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gdb,v 1.12 2020/09/17 16:54:31 christos Exp $
+#	$NetBSD: mknative-gdb,v 1.13 2020/09/23 23:21:29 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/gdb
@@ -151,6 +151,8 @@ get_gdb_libgnulib () {
 	done
 }
 
+# gdb/lib/libgdb #
+
 get_gdb_libgdb () {
 	local _GDBP=$_GDB/lib/libgdb
 
@@ -212,6 +214,16 @@ get_gdb_libgdb () {
 	esac
 }
 
+# gdb/bin/gdbserver`
+
+get_gdb_bingdbserver () {
+	local _CTF=$_GDB/bin/gdbserver
+	mkdir -p $_TOP/$_CTF/arch/$_MACHINE_SUBDIR
+
+	write_c $_CTF/arch/$_MACHINE_SUBDIR/config.h \
+		<$_TMPDIR/gdbserver/config.h
+}
+
 # main #
 
 case $1 in
@@ -225,6 +237,7 @@ all|gdb)	# everything (uses "canadian cr
 	get_gdb_libiberty
 	get_gdb_libreadline
 	get_gdb_libdecnumber
+	get_gdb_bingdbserver
 	exit 0
 	;;
 



CVS commit: src/tools/gdb

2020-09-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 17 16:54:31 UTC 2020

Modified Files:
src/tools/gdb: mknative-gdb

Log Message:
put gnulib stuff under gnulib/ because things import "gnulib/config.h"


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tools/gdb/mknative-gdb

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

Modified files:

Index: src/tools/gdb/mknative-gdb
diff -u src/tools/gdb/mknative-gdb:1.11 src/tools/gdb/mknative-gdb:1.12
--- src/tools/gdb/mknative-gdb:1.11	Thu Sep 17 12:09:18 2020
+++ src/tools/gdb/mknative-gdb	Thu Sep 17 12:54:31 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gdb,v 1.11 2020/09/17 16:09:18 christos Exp $
+#	$NetBSD: mknative-gdb,v 1.12 2020/09/17 16:54:31 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/gdb
@@ -126,7 +126,7 @@ get_gdb_libctf () {
 
 get_gdb_libgnulib () {
 	local _GNULIB=$_GDB/lib/libgnulib
-	mkdir -p $_TOP/$_GNULIB/arch/$_MACHINE_SUBDIR/import
+	mkdir -p $_TOP/$_GNULIB/arch/$_MACHINE_SUBDIR/gnulib/import
 
 	(getvars gnulib/Makefile gl_LIBOBJS |
 	sed -e s/gl_LIB// &&
@@ -146,7 +146,7 @@ get_gdb_libgnulib () {
 	import/unistd.h import/wchar.h \
 	import/wctype.h
 	do
-	write_c $_GNULIB/arch/$_MACHINE_SUBDIR/$i \
+	write_c $_GNULIB/arch/$_MACHINE_SUBDIR/gnulib/$i \
 		< $_TMPDIR/gnulib/$i
 	done
 }



CVS commit: src/tools/gdb

2020-09-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 17 16:09:18 UTC 2020

Modified Files:
src/tools/gdb: mknative-gdb

Log Message:
remove obsolete


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tools/gdb/mknative-gdb

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

Modified files:

Index: src/tools/gdb/mknative-gdb
diff -u src/tools/gdb/mknative-gdb:1.10 src/tools/gdb/mknative-gdb:1.11
--- src/tools/gdb/mknative-gdb:1.10	Thu Sep 17 12:05:34 2020
+++ src/tools/gdb/mknative-gdb	Thu Sep 17 12:09:18 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gdb,v 1.10 2020/09/17 16:05:34 christos Exp $
+#	$NetBSD: mknative-gdb,v 1.11 2020/09/17 16:09:18 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/gdb
@@ -153,8 +153,6 @@ get_gdb_libgnulib () {
 
 get_gdb_libgdb () {
 	local _GDBP=$_GDB/lib/libgdb
-	mkdir -p $_TOP/$_GDBP/arch/$_MACHINE_SUBDIR/gnulib/import
-	mkdir -p $_TOP/$_GDBP/arch/$_MACHINE_SUBDIR/gdbsupport/import
 
 	{
 		getvars gdb/Makefile \



CVS commit: src/tools/gdb

2020-09-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 17 16:05:34 UTC 2020

Modified Files:
src/tools/gdb: mknative-gdb

Log Message:
refine


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tools/gdb/mknative-gdb

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

Modified files:

Index: src/tools/gdb/mknative-gdb
diff -u src/tools/gdb/mknative-gdb:1.9 src/tools/gdb/mknative-gdb:1.10
--- src/tools/gdb/mknative-gdb:1.9	Wed Sep 16 22:14:48 2020
+++ src/tools/gdb/mknative-gdb	Thu Sep 17 12:05:34 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gdb,v 1.9 2020/09/17 02:14:48 christos Exp $
+#	$NetBSD: mknative-gdb,v 1.10 2020/09/17 16:05:34 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/gdb
@@ -85,8 +85,7 @@ get_gdb_libdecnumber () {
 	local _DECNUMBER=$_GDB/lib/libdecnumber
 	mkdir -p $_TOP/$_DECNUMBER/arch/$_MACHINE_SUBDIR
 
-	getvars libdecnumber/Makefile \
-		libdecnumber_a_OBJS |
+	getvars libdecnumber/Makefile libdecnumber_a_OBJS |
 	sed -e s/libdecnumber_a_// |
 	write_mk $_DECNUMBER/arch/$_MACHINE_SUBDIR/defs.mk
 
@@ -97,7 +96,60 @@ get_gdb_libdecnumber () {
 		< $_TMPDIR/libdecnumber/gstdint.h
 }
 
-# gdb/lib/libgdb #
+# gdb/lib/libgdbsupport #
+
+get_gdb_libgdbsupport () {
+	local _GDBSUPPORT=$_GDB/lib/libgdbsupport
+	mkdir -p $_TOP/$_GDBSUPPORT/arch/$_MACHINE_SUBDIR/gdbsupport
+
+	getvars gdbsupport/Makefile libgdbsupport_a_OBJECTS |
+	sed -e s/libgdbsupport_a_// |
+	write_mk $_GDBSUPPORT/arch/$_MACHINE_SUBDIR/defs.mk
+
+	write_c $_GDBSUPPORT/arch/$_MACHINE_SUBDIR/gdbsupport/config.h \
+		<$_TMPDIR/gdbsupport/config.h
+}
+
+get_gdb_libctf () {
+	local _CTF=$_GDB/lib/libctf
+	mkdir -p $_TOP/$_CTF/arch/$_MACHINE_SUBDIR
+
+	getvars libctf/Makefile libctf_la_OBJECTS |
+	sed -e s/libctf_la_// -e 's/\.lo/.o/g' -e s/libctf_la-//g |
+	write_mk $_CTF/arch/$_MACHINE_SUBDIR/defs.mk
+
+	write_c $_CTF/arch/$_MACHINE_SUBDIR/config.h \
+		<$_TMPDIR/libctf/config.h
+}
+
+# gdb/lib/libgnulib #
+
+get_gdb_libgnulib () {
+	local _GNULIB=$_GDB/lib/libgnulib
+	mkdir -p $_TOP/$_GNULIB/arch/$_MACHINE_SUBDIR/import
+
+	(getvars gnulib/Makefile gl_LIBOBJS |
+	sed -e s/gl_LIB// &&
+	getvars gnulib/import/Makefile libgnu_a_OBJECTS |
+	sed -e s/libgnu_a_// -e s@glthread/@@g -e s@malloc/@@g) |
+	write_mk $_GNULIB/arch/$_MACHINE_SUBDIR/defs.mk
+
+	for i in config.h \
+	import/alloca.h import/ctype.h \
+	import/dirent.h import/fcntl.h \
+	import/fnmatch.h import/glob.h \
+	import/inttypes.h import/limits.h \
+	import/locale.h import/math.h \
+	import/signal.h import/stdint.h \
+	import/stdio.h import/stdlib.h \
+	import/string.h import/time.h \
+	import/unistd.h import/wchar.h \
+	import/wctype.h
+	do
+	write_c $_GNULIB/arch/$_MACHINE_SUBDIR/$i \
+		< $_TMPDIR/gnulib/$i
+	done
+}
 
 get_gdb_libgdb () {
 	local _GDBP=$_GDB/lib/libgdb
@@ -124,21 +176,6 @@ get_gdb_libgdb () {
 		< $_TMPDIR/gdb/$i
 	done
 	
-	for i in gnulib/config.h gdbsupport/config.h \
-	gnulib/import/alloca.h gnulib/import/ctype.h \
-	gnulib/import/dirent.h gnulib/import/fcntl.h \
-	gnulib/import/fnmatch.h gnulib/import/glob.h \
-	gnulib/import/inttypes.h gnulib/import/limits.h \
-	gnulib/import/locale.h gnulib/import/math.h \
-	gnulib/import/signal.h gnulib/import/stdint.h \
-	gnulib/import/stdio.h gnulib/import/stdlib.h \
-	gnulib/import/string.h gnulib/import/time.h \
-	gnulib/import/unistd.h gnulib/import/wchar.h \
-	gnulib/import/wctype.h
-	do
-	write_c $_GDBP/arch/$_MACHINE_SUBDIR/$i \
-		< $_TMPDIR/$i
-	done
 
 	for f in nm tm xm; do
 		if [ ! -f $_TMPDIR/gdb/$f.h ]; then 
@@ -182,6 +219,9 @@ get_gdb_libgdb () {
 case $1 in
 all|gdb)	# everything (uses "canadian cross" temp environment)
 	get_gdb_libgdb
+	get_gdb_libgdbsupport
+	get_gdb_libctf
+	get_gdb_libgnulib
 	get_gdb_libbfd
 	get_gdb_libopcodes
 	get_gdb_libiberty



CVS commit: src/tools/gdb

2020-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 17 02:14:49 UTC 2020

Modified Files:
src/tools/gdb: mknative-gdb
Added Files:
src/tools/gdb: mknative-gdb.old

Log Message:
Save the mknative-gdb for 8.3 and prepare the mknative-gdb for 10.x


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tools/gdb/mknative-gdb
cvs rdiff -u -r0 -r1.1 src/tools/gdb/mknative-gdb.old

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

Modified files:

Index: src/tools/gdb/mknative-gdb
diff -u src/tools/gdb/mknative-gdb:1.8 src/tools/gdb/mknative-gdb:1.9
--- src/tools/gdb/mknative-gdb:1.8	Tue May 28 21:56:06 2019
+++ src/tools/gdb/mknative-gdb	Wed Sep 16 22:14:48 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gdb,v 1.8 2019/05/29 01:56:06 christos Exp $
+#	$NetBSD: mknative-gdb,v 1.9 2020/09/17 02:14:48 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/gdb
@@ -71,12 +71,12 @@ get_gdb_libreadline () {
 	mkdir -p $_TOP/$_READLINE/arch/$_MACHINE_SUBDIR
 
 	{
-		getvars readline/Makefile \
+		getvars readline/readline/Makefile \
 			CCFLAGS OBJECTS
 	} | write_mk $_READLINE/arch/$_MACHINE_SUBDIR/defs.mk
 
 	write_c $_READLINE/arch/$_MACHINE_SUBDIR/config.h \
-		<$_TMPDIR/readline/config.h
+		<$_TMPDIR/readline/readline/config.h
 }
 
 # gdb/lib/libdecnumber #
@@ -91,7 +91,7 @@ get_gdb_libdecnumber () {
 	write_mk $_DECNUMBER/arch/$_MACHINE_SUBDIR/defs.mk
 
 	write_c $_DECNUMBER/arch/$_MACHINE_SUBDIR/config.h \
-		<$_TMPDIR/readline/config.h
+		<$_TMPDIR/readline/readline/config.h
 
 	write_c $_DECNUMBER/arch/$_MACHINE_SUBDIR/gstdint.h \
 		< $_TMPDIR/libdecnumber/gstdint.h
@@ -101,7 +101,8 @@ get_gdb_libdecnumber () {
 
 get_gdb_libgdb () {
 	local _GDBP=$_GDB/lib/libgdb
-	mkdir -p $_TOP/$_GDBP/arch/$_MACHINE_SUBDIR/build-gnulib
+	mkdir -p $_TOP/$_GDBP/arch/$_MACHINE_SUBDIR/gnulib/import
+	mkdir -p $_TOP/$_GDBP/arch/$_MACHINE_SUBDIR/gdbsupport/import
 
 	{
 		getvars gdb/Makefile \
@@ -109,6 +110,7 @@ get_gdb_libgdb () {
 	} | sed -e s@arch/@@g -e s@cli/@@g -e s@common/agent@common-agent@ \
 		-e s@common/@@g -e s@compile/@@g -e s@guile/@@g -e s@mi/@@g \
 		-e s@nat/@@g -e s@python/@@g -e s@target/@@g \
+		-e s@dwarf2/@@g -e s@unittests/@@g \
 		-e s@tui/@@g | write_mk $_GDBP/arch/$_MACHINE_SUBDIR/defs.mk
 
 #	getvars gdb/gdbserver/Makefile \
@@ -116,17 +118,35 @@ get_gdb_libgdb () {
 #		| write_mk $_GDB/bin/gdb/arch/$_MACHINE_SUBDIR/gdbserver.mk
 
 	for i in config.h version.c init.c \
-	xml-builtin.c build-gnulib/config.h jit-reader.h
+	xml-builtin.c jit-reader.h
 	do
 	write_c $_GDBP/arch/$_MACHINE_SUBDIR/$i \
 		< $_TMPDIR/gdb/$i
 	done
+	
+	for i in gnulib/config.h gdbsupport/config.h \
+	gnulib/import/alloca.h gnulib/import/ctype.h \
+	gnulib/import/dirent.h gnulib/import/fcntl.h \
+	gnulib/import/fnmatch.h gnulib/import/glob.h \
+	gnulib/import/inttypes.h gnulib/import/limits.h \
+	gnulib/import/locale.h gnulib/import/math.h \
+	gnulib/import/signal.h gnulib/import/stdint.h \
+	gnulib/import/stdio.h gnulib/import/stdlib.h \
+	gnulib/import/string.h gnulib/import/time.h \
+	gnulib/import/unistd.h gnulib/import/wchar.h \
+	gnulib/import/wctype.h
+	do
+	write_c $_GDBP/arch/$_MACHINE_SUBDIR/$i \
+		< $_TMPDIR/$i
+	done
 
 	for f in nm tm xm; do
-		if [ -f $_TMPDIR/gdb/$f.h ]; then 
-			ls -l $_TMPDIR/gdb/$f.h | sed 's,^.*->.*/gdb/,,;s,^,#include <,;s,$,>,' \
-| write_c $_GDBP/arch/$_MACHINE_SUBDIR/$f.h
+		if [ ! -f $_TMPDIR/gdb/$f.h ]; then 
+			continue
 		fi
+		ls -l $_TMPDIR/gdb/$f.h | \
+			sed 's,^.*->.*/gdb/,,;s,^,#include <,;s,$,>,' | \
+			write_c $_GDBP/arch/$_MACHINE_SUBDIR/$f.h
 	done
 
 	local _LIBSIM=$_GDB/lib/libsim

Added files:

Index: src/tools/gdb/mknative-gdb.old
diff -u /dev/null src/tools/gdb/mknative-gdb.old:1.1
--- /dev/null	Wed Sep 16 22:14:49 2020
+++ src/tools/gdb/mknative-gdb.old	Wed Sep 16 22:14:48 2020
@@ -0,0 +1,174 @@
+#!/bin/sh
+#	$NetBSD: mknative-gdb.old,v 1.1 2020/09/17 02:14:48 christos Exp $
+#
+# Shell script for generating all the constants needed for a native
+# platform build of src/external/gpl3/gdb
+#
+
+# initialise
+
+_TMPDIR=$2
+_TOP=$3
+_PLATFORM=$4
+_MACHINE_SUBDIR=$5
+_VPATH=`grep VPATH ${_TMPDIR}/Makefile | sed 's,^.*=[ 	]*,,'`
+_GDB=external/gpl3/gdb
+
+. $_TOP/tools/gcc/mknative.common
+
+# gdb/lib/libbfd #
+
+get_gdb_libbfd () {
+	local _BFD=$_GDB/lib/libbfd
+	mkdir -p $_TOP/$_BFD/arch/$_MACHINE_SUBDIR
+
+	{
+		getvars bfd/Makefile \
+			libbfd_la_DEPENDENCIES libbfd_la_OBJECTS DEFS \
+			INCLUDES TDEFAULTS
+	} | write_mk $_BFD/arch/$_MACHINE_SUBDIR/defs.mk
+
+	for i in bfd-in3.h bfd_stdint.h config.h bfd.h bfdver.h targmatch.h 
+	do
+	write_c $_BFD/arch/$_MACHINE_SUBDIR/$i <$_TMPDIR/bfd/$i
+	done
+}
+
+# gdb/lib/libopcodes #
+
+get_gdb_libopcodes () {
+	local _OPCODES=$_GDB/lib/libopcodes
+	mkdir

CVS commit: src/tools/gcc

2020-09-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Sep  9 07:12:04 UTC 2020

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

Log Message:
more consolidation and properly condition all variables like previously.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.111 src/tools/gcc/mknative-gcc:1.112
--- src/tools/gcc/mknative-gcc:1.111	Wed Sep  9 04:52:32 2020
+++ src/tools/gcc/mknative-gcc	Wed Sep  9 07:12:04 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.111 2020/09/09 04:52:32 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.112 2020/09/09 07:12:04 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -226,14 +226,16 @@ get_libstdcxx_v3 () {
 	mkdir -p $_OUTDIR/lib/$_subdir/arch/$_MACHINE_ARCH
 
 	_build_headers="c++config.h cxxabi_tweaks.h"
-	_headers1="backward_headers c_base_headers_extra c_base_headers_extra_install"
-	_headers1="$_headers1 tr1_headers tr2_headers decimal_headers c_compatibility_headers_install"
+	_headers1="backward_headers c_base_headers_extra"
+	_headers1="$_headers1 c_base_headers_extra_install"
+	_headers1="$_headers1 tr1_headers tr2_headers"
+	_headers1="$_headers1 decimal_headers c_compatibility_headers_install"
 	_headers1="$_headers1 debug_headers parallel_headers"
 	_headers1="$_headers1 pb_headers1 pb_headers2 pb_headers3 pb_headers4"
 	_headers1="$_headers1 pb_headers5 pb_headers6 pb_headers7"
-	# These subdirs get the subdir removed from the values.
-	_headers2="bits_headers ext_headers host_headers thread_host_headers pstl_headers"
-	_headers2="$_headers2 profile_headers profile_impl_headers"
+	_headers1="$_headers1 bits_headers ext_headers host_headers"
+	_headers1="$_headers1 thread_host_headers pstl_headers"
+	_headers1="$_headers1 profile_headers profile_impl_headers"
 
 	# build files
 	for h in $_build_headers; do
@@ -289,10 +291,8 @@ get_libstdcxx_v3 () {
 		# includes
 		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
 			$_headers1 | \
-sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/##g'
-		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
-			$_headers2 | \
-sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/[^/][^/]*/##g'
+sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/##g' \
+-e 's#\${GNUHOSTDIST}/libstdc++-v3/config/##g'
 		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
 			BASIC_FILE_H ALLOCATOR_H CSTDIO_H CLOCALE_H CMESSAGES_H CTIME_H
 	} | sanitise_includes \



CVS commit: src/tools/gcc

2020-09-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Sep  9 04:52:32 UTC 2020

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

Log Message:
consolidate a bunch of libstdc++ variable collection.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.110 src/tools/gcc/mknative-gcc:1.111
--- src/tools/gcc/mknative-gcc:1.110	Tue Sep  8 19:17:24 2020
+++ src/tools/gcc/mknative-gcc	Wed Sep  9 04:52:32 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.110 2020/09/08 19:17:24 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.111 2020/09/09 04:52:32 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -226,12 +226,14 @@ get_libstdcxx_v3 () {
 	mkdir -p $_OUTDIR/lib/$_subdir/arch/$_MACHINE_ARCH
 
 	_build_headers="c++config.h cxxabi_tweaks.h"
-	_headers1="c_base_headers_extra_install"
+	_headers1="backward_headers c_base_headers_extra c_base_headers_extra_install"
 	_headers1="$_headers1 tr1_headers tr2_headers decimal_headers c_compatibility_headers_install"
-	_headers1="$_headers1 debug_headers parallel_headers pstl_headers"
-	_headers2="host_headers thread_host_headers"
-	_pf_headers="profile_headers profile_impl_headers"
-	_pb_headers="pb_headers1 pb_headers2 pb_headers3 pb_headers4 pb_headers5 pb_headers6 pb_headers7"
+	_headers1="$_headers1 debug_headers parallel_headers"
+	_headers1="$_headers1 pb_headers1 pb_headers2 pb_headers3 pb_headers4"
+	_headers1="$_headers1 pb_headers5 pb_headers6 pb_headers7"
+	# These subdirs get the subdir removed from the values.
+	_headers2="bits_headers ext_headers host_headers thread_host_headers pstl_headers"
+	_headers2="$_headers2 profile_headers profile_impl_headers"
 
 	# build files
 	for h in $_build_headers; do
@@ -286,13 +288,11 @@ get_libstdcxx_v3 () {
 
 		# includes
 		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
-			backward_headers c_base_headers_extra $_headers1 $_pb_headers | \
+			$_headers1 | \
 sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/##g'
 		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
-			bits_headers ext_headers $_headers2 | \
-sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/##g' -e 's#\${GNUHOSTDIST}/libstdc++-v3/config/##g'
-		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
-			$_pf_headers | sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/profile/##g'
+			$_headers2 | \
+sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/[^/][^/]*/##g'
 		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
 			BASIC_FILE_H ALLOCATOR_H CSTDIO_H CLOCALE_H CMESSAGES_H CTIME_H
 	} | sanitise_includes \



CVS commit: src/tools/gcc

2020-09-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep  8 19:17:24 UTC 2020

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

Log Message:
oops, pull out the value of pstl_headers.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.109 src/tools/gcc/mknative-gcc:1.110
--- src/tools/gcc/mknative-gcc:1.109	Sun Sep  6 02:24:38 2020
+++ src/tools/gcc/mknative-gcc	Tue Sep  8 19:17:24 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.109 2020/09/06 02:24:38 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.110 2020/09/08 19:17:24 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -228,7 +228,7 @@ get_libstdcxx_v3 () {
 	_build_headers="c++config.h cxxabi_tweaks.h"
 	_headers1="c_base_headers_extra_install"
 	_headers1="$_headers1 tr1_headers tr2_headers decimal_headers c_compatibility_headers_install"
-	_headers1="$_headers1 debug_headers parallel_headers"
+	_headers1="$_headers1 debug_headers parallel_headers pstl_headers"
 	_headers2="host_headers thread_host_headers"
 	_pf_headers="profile_headers profile_impl_headers"
 	_pb_headers="pb_headers1 pb_headers2 pb_headers3 pb_headers4 pb_headers5 pb_headers6 pb_headers7"



CVS commit: src/tools/gcc

2020-09-06 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Sep  6 21:59:34 UTC 2020

Modified Files:
src/tools/gcc: gcc-version.mk

Log Message:
mark GCC 9 as (so far) netbsd 20200907 version.  this should fix the
compiler saying it is "gcc version 9.3.0 ()".

(needs mknative redo.)


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/tools/gcc/gcc-version.mk

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

Modified files:

Index: src/tools/gcc/gcc-version.mk
diff -u src/tools/gcc/gcc-version.mk:1.19 src/tools/gcc/gcc-version.mk:1.20
--- src/tools/gcc/gcc-version.mk:1.19	Tue Aug 11 09:51:57 2020
+++ src/tools/gcc/gcc-version.mk	Sun Sep  6 21:59:33 2020
@@ -1,9 +1,9 @@
-#	$NetBSD: gcc-version.mk,v 1.19 2020/08/11 09:51:57 mrg Exp $
+#	$NetBSD: gcc-version.mk,v 1.20 2020/09/06 21:59:33 mrg Exp $
 
 # common location for tools and native build
 
-.if ${HAVE_GCC} == 7
-NETBSD_GCC_VERSION=nb4 20200810
-.elif ${HAVE_GCC} == 8
+.if ${HAVE_GCC} == 8
 NETBSD_GCC_VERSION=nb1 20200311
+.elif ${HAVE_GCC} == 9
+NETBSD_GCC_VERSION=nb1 20200907
 .endif



CVS commit: src/tools/gcc

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

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

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


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

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

Modified files:

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

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

CVS commit: src/tools/gcc

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

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

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

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


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

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

Modified files:

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.98 src/tools/gcc/Makefile:1.99
--- src/tools/gcc/Makefile:1.98	Thu Aug 13 10:57:53 2020
+++ src/tools/gcc/Makefile	Sat Sep  5 10:58:08 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.98 2020/08/13 10:57:53 mrg Exp $
+#	$NetBSD: Makefile,v 1.99 2020/09/05 10:58:08 mrg Exp $
 
 .include 
 
@@ -95,17 +95,21 @@ MKNATIVE_CONFIG_TARGET_LIBS=
 
 MKNATIVE_CONFIG_TARGET_LIBS+=	configure-target-libgcc
 MKNATIVE_CONFIG_TARGET_LIBS+=	configure-target-libgomp
-.if ${HAVE_GCC} == 8
-MKNATIVE_TARGET=	gcc8
-.elif ${HAVE_GCC} == 7
-MKNATIVE_TARGET=	gcc7
-.endif
+MKNATIVE_TARGET=	gcc
 
 MKNATIVE_CONFIG_TARGET_LIBS+= \
 	configure-target-libstdc++-v3 \
 	configure-target-libbacktrace \
 	configure-target-libobjc
 
+.if ${HAVE_GCC} >= 9
+# XXX needs to build libstdc++ fully, which fails
+.if 0
+MKNATIVE_CONFIG_TARGET_LIBS+= \
+	configure-target-libsanitizer
+.endif
+.endif
+
 BINENV=		/usr/bin/env -i
 
 

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.107 src/tools/gcc/mknative-gcc:1.108
--- src/tools/gcc/mknative-gcc:1.107	Sat Sep  5 09:49:32 2020
+++ src/tools/gcc/mknative-gcc	Sat Sep  5 10:58:08 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.107 2020/09/05 09:49:32 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.108 2020/09/05 10:58:08 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -490,7 +490,8 @@ gcc*)
 	get_gcc_libiberty gcc
 	get_libobjc libobjc
 	get_libstdcxx_v3 libstdc++-v3 gcc
-	get_libsanitizer libsanitizer
+	# XXX not yet
+	# get_libsanitizer libsanitizer
 	get_libdecnumber libdecnumber
 	get_libgomp libgomp
 	get_libbacktrace libbacktrace



CVS commit: src/tools/gcc

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

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

Log Message:
pull out a few more things for GCC 9.


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

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.106 src/tools/gcc/mknative-gcc:1.107
--- src/tools/gcc/mknative-gcc:1.106	Sat Sep  5 09:16:46 2020
+++ src/tools/gcc/mknative-gcc	Sat Sep  5 09:49:32 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.106 2020/09/05 09:16:46 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.107 2020/09/05 09:49:32 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -363,10 +363,10 @@ get_gcc () {
 			GCC_OBJS GCOV_OBJS GCOV_DUMP_OBJS GXX_OBJS GTM_H PROTO_OBJS ${_extravars1} \
 			INCLUDES md_file OBJC_OBJS OBJS out_file version \
 			BUILD_PREFIX RTL_H RTL_BASE_H TREE_H ${_hconfig_h} BASIC_BLOCK_H GCC_H \
-			GGC_H \
+			D_TARGET_DEF \
 			GTFILES_SRCDIR GTFILES_FILES_FILES GTFILES_FILES_LANGS \
-			GTFILES GTFILES_LANG_DIR_NAMES NOEXCEPTION_FLAGS \
-			NATIVE_SYSTEM_HEADER_DIR \
+			GTFILES GTFILES_LANG_DIR_NAMES HASH_TABLE_H \
+			NOEXCEPTION_FLAGS NATIVE_SYSTEM_HEADER_DIR \
 			tm_defines host_xm_file host_xm_defines tm_p_file \
 			target_cpu_default ${_extravars} ${_extravars2} \
 			lang_specs_files ${_extravars3} \



CVS commit: src/tools/gcc

2020-09-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Sep  5 09:16:46 UTC 2020

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

Log Message:
port to GCC 9.3.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.105 src/tools/gcc/mknative-gcc:1.106
--- src/tools/gcc/mknative-gcc:1.105	Thu Aug 13 01:52:37 2020
+++ src/tools/gcc/mknative-gcc	Sat Sep  5 09:16:46 2020
@@ -1,10 +1,10 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.105 2020/08/13 01:52:37 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.106 2020/09/05 09:16:46 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
 #
-# This version is for GCC 8.4
+# This version is for GCC 9.3
 
 # initialise
 
@@ -247,6 +247,7 @@ get_libstdcxx_v3 () {
 		getvars $_PLATFORM/libstdc++-v3/Makefile \
 			port_specific_symbol_files
 		getvars $_PLATFORM/libstdc++-v3/src/Makefile \
+			cxx17_sources \
 			cxx11_sources \
 			cxx98_sources
 
@@ -263,6 +264,9 @@ get_libstdcxx_v3 () {
 		# src
 		getvars $_PLATFORM/libstdc++-v3/src/Makefile \
 			libstdc___la_SOURCES | sed 's/^G_libstdc___la_SOURCES=/G_SRC_SOURCES=/'
+		getvars $_PLATFORM/libstdc++-v3/src/c++17/Makefile \
+			libc__17convenience_la_SOURCES | \
+			sed -e 's/^G_libc__17convenience_la_SOURCES=/G_CPP17_SOURCES=/'
 		getvars $_PLATFORM/libstdc++-v3/src/c++11/Makefile \
 			libc__11convenience_la_SOURCES | \
 			sed -e 's/^G_libc__11convenience_la_SOURCES=/G_CPP11_SOURCES=/' \
@@ -294,6 +298,27 @@ get_libstdcxx_v3 () {
 	  | write_mk $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/defs.mk
 }
 
+# lib/libsanitizer #
+
+get_libsanitizer () {
+	_subdir="$1"
+
+	mkdir -p $_OUTDIR/lib/$_subdir/arch/$MACHINE_ARCH
+
+	{
+		getvars $_PLATFORM/libsanitizer/asan/Makefile \
+			asan_files
+		getvars $_PLATFORM/libsanitizer/lsan/Makefile \
+			lsan_files
+		getvars $_PLATFORM/libsanitizer/tsan/Makefile \
+			tsan_plugin_files
+		getvars $_PLATFORM/libsanitizer/ubsan/Makefile \
+			ubsan_plugin_files
+
+	} | sanitise_includes \
+	  | write_mk $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/defs.mk
+}
+
 # usr.bin/gcc* #
 
 get_gcc_bootstrap () {
@@ -465,6 +490,7 @@ gcc*)
 	get_gcc_libiberty gcc
 	get_libobjc libobjc
 	get_libstdcxx_v3 libstdc++-v3 gcc
+	get_libsanitizer libsanitizer
 	get_libdecnumber libdecnumber
 	get_libgomp libgomp
 	get_libbacktrace libbacktrace



CVS commit: src/tools/gcc

2020-08-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Aug 13 10:57:54 UTC 2020

Modified Files:
src/tools/gcc: Makefile

Log Message:
set MODULE to ${EXTERNAL_GCC_SUBDIR} so this actually works..


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

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

Modified files:

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.97 src/tools/gcc/Makefile:1.98
--- src/tools/gcc/Makefile:1.97	Wed Nov  6 07:26:31 2019
+++ src/tools/gcc/Makefile	Thu Aug 13 10:57:53 2020
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.97 2019/11/06 07:26:31 mrg Exp $
+#	$NetBSD: Makefile,v 1.98 2020/08/13 10:57:53 mrg Exp $
 
 .include 
 
 GCC_LANGUAGES=c c++ objc
-MODULE=			gcc4
+MODULE=		${EXTERNAL_GCC_SUBDIR}
 
 GCCDIST=	${.CURDIR}/../../external/gpl3/${EXTERNAL_GCC_SUBDIR}/dist
 GNUHOSTDIST=	${GCCDIST}



CVS commit: src/tools/gcc

2020-08-12 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Aug 13 01:52:37 UTC 2020

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

Log Message:
set _OUTDIRBASE depending on $0, and then set _OUTDIR based on this.
now you can copy mknative-gcc to mknative-gcc.old without edit.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/tools/gcc/mknative-gcc
cvs rdiff -u -r1.7 -r1.8 src/tools/gcc/mknative-gcc.old

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.104 src/tools/gcc/mknative-gcc:1.105
--- src/tools/gcc/mknative-gcc:1.104	Wed Aug 12 08:53:20 2020
+++ src/tools/gcc/mknative-gcc	Thu Aug 13 01:52:37 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.104 2020/08/12 08:53:20 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.105 2020/08/13 01:52:37 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -24,8 +24,15 @@ fi
 
 . $_TOP/tools/gcc/mknative.common
 
-_OUTDIR="$_TOP/external/gpl3/gcc"
-_OUTDIRBASE="external/gpl3/gcc"
+case $0 in
+	*mknative-gcc.old)
+		_OUTDIRBASE="external/gpl3/gcc.old"
+		;;
+	*)
+		_OUTDIRBASE="external/gpl3/gcc"
+		;;
+esac
+_OUTDIR="$_TOP/$_OUTDIRBASE"
 
 sanitise_includes () {
 	sed \

Index: src/tools/gcc/mknative-gcc.old
diff -u src/tools/gcc/mknative-gcc.old:1.7 src/tools/gcc/mknative-gcc.old:1.8
--- src/tools/gcc/mknative-gcc.old:1.7	Wed Aug 12 08:53:20 2020
+++ src/tools/gcc/mknative-gcc.old	Thu Aug 13 01:52:37 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc.old,v 1.7 2020/08/12 08:53:20 mrg Exp $
+#	$NetBSD: mknative-gcc.old,v 1.8 2020/08/13 01:52:37 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -24,8 +24,15 @@ fi
 
 . $_TOP/tools/gcc/mknative.common
 
-_OUTDIR="$_TOP/external/gpl3/gcc"
-_OUTDIRBASE="external/gpl3/gcc"
+case $0 in
+	*mknative-gcc.old)
+		_OUTDIRBASE="external/gpl3/gcc.old"
+		;;
+	*)
+		_OUTDIRBASE="external/gpl3/gcc"
+		;;
+esac
+_OUTDIR="$_TOP/$_OUTDIRBASE"
 
 sanitise_includes () {
 	sed \



CVS commit: src/tools/gcc

2020-08-12 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Aug 12 08:53:20 UTC 2020

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

Log Message:
mknative-gcc is for GCC 8.4.
mknative-gcc.old is supposed to be for GCC 7, but is the GCC 6
version.  update it and mark it for GCC 7.5.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/tools/gcc/mknative-gcc
cvs rdiff -u -r1.6 -r1.7 src/tools/gcc/mknative-gcc.old

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.103 src/tools/gcc/mknative-gcc:1.104
--- src/tools/gcc/mknative-gcc:1.103	Thu Oct 24 03:19:14 2019
+++ src/tools/gcc/mknative-gcc	Wed Aug 12 08:53:20 2020
@@ -1,10 +1,10 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.103 2019/10/24 03:19:14 christos Exp $
+#	$NetBSD: mknative-gcc,v 1.104 2020/08/12 08:53:20 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
 #
-# This version is for GCC 6.4
+# This version is for GCC 8.4
 
 # initialise
 

Index: src/tools/gcc/mknative-gcc.old
diff -u src/tools/gcc/mknative-gcc.old:1.6 src/tools/gcc/mknative-gcc.old:1.7
--- src/tools/gcc/mknative-gcc.old:1.6	Wed Sep  5 01:20:20 2018
+++ src/tools/gcc/mknative-gcc.old	Wed Aug 12 08:53:20 2020
@@ -1,10 +1,10 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc.old,v 1.6 2018/09/05 01:20:20 mrg Exp $
+#	$NetBSD: mknative-gcc.old,v 1.7 2020/08/12 08:53:20 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
 #
-# This version is for GCC 6.4
+# This version is for GCC 7.5
 
 # initialise
 
@@ -24,8 +24,8 @@ fi
 
 . $_TOP/tools/gcc/mknative.common
 
-_OUTDIR="$_TOP/external/gpl3/gcc.old"
-_OUTDIRBASE="external/gpl3/gcc.old"
+_OUTDIR="$_TOP/external/gpl3/gcc"
+_OUTDIRBASE="external/gpl3/gcc"
 
 sanitise_includes () {
 	sed \
@@ -82,10 +82,18 @@ get_libgcc () {
 			SHLIB_MAPFILES SHLIB_NM_FLAGS
 		getvars gcc/Makefile \
 			NOEXCEPTION_FLAGS EXTRA_HEADERS
-		getlinks config.status libgcc
 	}	| sanitise_includes \
 		| write_mk $_OUTDIRBASE/lib/lib$_subdir/arch/$MACHINE_ARCH/defs.mk
 
+	cd $_TMPDIR/$_PLATFORM/libgcc
+	{
+		getvars $_PLATFORM/libgcc/Makefile \
+			enable_execute_stack \
+			unwind_header md_unwind_header \
+			sfp_machine_header thread_header
+	}	| sanitise_includes \
+		| write_mk $_OUTDIRBASE/lib/lib$_subdir/arch/$MACHINE_ARCH/gthr-defs.mk
+
 	if [ "${MACHINE_ARCH}" = "m68000" ]
 	then
 		ex <<__EOF__ $_OUTDIR/lib/lib$_subdir/arch/$MACHINE_ARCH/defs.mk
@@ -152,6 +160,11 @@ get_libgomp () {
 	_subdir="$1"
 
 	mkdir -p $_OUTDIR/lib/$_subdir/arch/$MACHINE_ARCH
+
+	getvars $_PLATFORM/libgomp/Makefile \
+		libgomp_la_SOURCES \
+		| write_mk $_OUTDIRBASE/lib/$_subdir/defs.mk
+
 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/config.h \
 		<$_TMPDIR/$_PLATFORM/libgomp/config.h
 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/libgomp_f.h \
@@ -169,9 +182,9 @@ get_libbacktrace () {
 
 	mkdir -p $_OUTDIR/lib/$_subdir/arch/$MACHINE_ARCH
 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/config.h \
-		<$_TMPDIR/$_subdir/config.h
+		<$_TMPDIR/$_PLATFORM/$_subdir/config.h
 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/backtrace-supported.h \
-		<$_TMPDIR/$_subdir/backtrace-supported.h
+		<$_TMPDIR/$_PLATFORM/$_subdir/backtrace-supported.h
 }
 
 # lib/libobjc #
@@ -189,7 +202,6 @@ get_libobjc () {
 		getvars $_PLATFORM/libobjc/Makefile \
 			ALL_CFLAGS INCLUDES OBJC_SOURCE_FILES C_SOURCE_FILES OBJC_H \
 			| sed "s,$_GNU_DIST,\${GNUHOSTDIST},g"
-		getlinks $_TMPDIR/$_PLATFORM/libgcc/config.status libgcc
 	} | sanitise_includes \
 	  | write_mk $_OUTDIRBASE/lib/$_subdir/defs.mk
 
@@ -205,7 +217,7 @@ get_libstdcxx_v3 () {
 
 	mkdir -p $_OUTDIR/lib/$_subdir/arch/$MACHINE_ARCH
 
-	_build_headers="c++config.h cxxabi_tweaks.h gthr-posix.h gthr-single.h gthr.h"
+	_build_headers="c++config.h cxxabi_tweaks.h"
 	_headers1="c_base_headers_extra_install"
 	_headers1="$_headers1 tr1_headers tr2_headers decimal_headers c_compatibility_headers_install"
 	_headers1="$_headers1 debug_headers parallel_headers"
@@ -221,10 +233,15 @@ get_libstdcxx_v3 () {
 
 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/gstdint.h \
 		<$_TMPDIR/$_PLATFORM/libstdc++-v3/include/gstdint.h
+	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/symver-config.h \
+		<$_TMPDIR/$_PLATFORM/libstdc++-v3/config.h
 
 	{
 		getvars $_PLATFORM/libstdc++-v3/Makefile \
 			port_specific_symbol_files
+		getvars $_PLATFORM/libstdc++-v3/src/Makefile \
+			cxx11_sources \
+			cxx98_sources
 
 		# libsupc++
 		getvars $_PLATFORM/libstdc++-v3/libsupc++/Makefile \
@@ -247,6 +264,9 @@ get_libstdcxx_v3 () {
 			GLIBCXX_ABI_FLAGS libc__98convenience_la_SOURCES | \
 			sed -e 's/^G_libc__98convenience_la_SOURCES=/G_CPP98_SOURCES=/' \
 			-e 's/codecvt.cc/c98-codecvt.cc/'
+		getvars $_PLATFORM/libstdc++-v3/src/fil

CVS commit: src/tools

2020-07-28 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jul 28 21:38:15 UTC 2020

Modified Files:
src/tools: Makefile

Log Message:
Build mkubootimage for evbsh3 too.


To generate a diff of this commit:
cvs rdiff -u -r1.205 -r1.206 src/tools/Makefile

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.205 src/tools/Makefile:1.206
--- src/tools/Makefile:1.205	Mon Nov 11 22:45:27 2019
+++ src/tools/Makefile	Tue Jul 28 21:38:15 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.205 2019/11/11 22:45:27 joerg Exp $
+#	$NetBSD: Makefile,v 1.206 2020/07/28 21:38:15 uwe Exp $
 
 .include 
 .include 
@@ -214,7 +214,8 @@ SUBDIR+=	elftosb
 .endif
 
 .if ${MACHINE} == "evbarm" || ${MACHINE} == "evbmips" || \
-${MACHINE} == "evbppc" || ${MACHINE} == "sandpoint"
+${MACHINE} == "evbppc" || ${MACHINE} == "evbsh3" || \
+${MACHINE} == "sandpoint"
 SUBDIR+=	mkubootimage
 SUBDIR+=	libfdt .WAIT
 SUBDIR+=	dtc



CVS commit: src/tools/compat

2020-06-24 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jun 24 14:44:44 UTC 2020

Modified Files:
src/tools/compat: configure

Log Message:
Regen: Add AC_MSG_RESULT yes/no to the uio checks.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/tools/compat/configure

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

Modified files:

Index: src/tools/compat/configure
diff -u src/tools/compat/configure:1.97 src/tools/compat/configure:1.98
--- src/tools/compat/configure:1.97	Sat Jun 22 14:40:33 2019
+++ src/tools/compat/configure	Wed Jun 24 14:44:44 2020
@@ -4315,9 +4315,14 @@ enum uio_rw rw;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
 $as_echo "#define HAVE_ENUM_UIO_RW 1" >>confdefs.h
 
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
@@ -4339,9 +4344,14 @@ enum uio_seg seg;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
 $as_echo "#define HAVE_ENUM_UIO_SEG 1" >>confdefs.h
 
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 



CVS commit: src/tools/compat

2020-06-24 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jun 24 14:39:01 UTC 2020

Modified Files:
src/tools/compat: configure.ac

Log Message:
Add AC_MSG_RESULT yes/no to the uio checks.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/tools/compat/configure.ac

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

Modified files:

Index: src/tools/compat/configure.ac
diff -u src/tools/compat/configure.ac:1.97 src/tools/compat/configure.ac:1.98
--- src/tools/compat/configure.ac:1.97	Sat Jun 22 13:42:53 2019
+++ src/tools/compat/configure.ac	Wed Jun 24 14:39:01 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: configure.ac,v 1.97 2019/06/22 13:42:53 hannken Exp $
+#	$NetBSD: configure.ac,v 1.98 2020/06/24 14:39:01 uwe Exp $
 #
 # Autoconf definition file for libnbcompat.
 #
@@ -121,8 +121,11 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #ifdef HAVE_SYS_UIO_H
 #include 
 #endif]],
-[[enum uio_rw rw;]])],[AC_DEFINE([HAVE_ENUM_UIO_RW], 1,
-			[Define if you have the enum uio_rw type.])],)
+[[enum uio_rw rw;]])],
+[AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_ENUM_UIO_RW], 1,
+[Define if you have the enum uio_rw type.])],
+[AC_MSG_RESULT(no)])
 
 AC_MSG_CHECKING([for enum uio_seg])
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@@ -130,8 +133,11 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #ifdef HAVE_SYS_UIO_H
 #include 
 #endif]],
-[[enum uio_seg seg;]])],[AC_DEFINE([HAVE_ENUM_UIO_SEG], 1,
-			[Define if you have the enum uio_seg type.])],)
+[[enum uio_seg seg;]])],
+[AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_ENUM_UIO_SEG], 1,
+[Define if you have the enum uio_seg type.])],
+[AC_MSG_RESULT(no)])
 
 dnl XXX - This is UGLY.  Need a better way to homogenize the bitsized types,
 dnl including use of compiler primitive types via AC_CHECK_SIZEOF.



CVS commit: src/tools/make

2020-06-13 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sat Jun 13 11:39:43 UTC 2020

Modified Files:
src/tools/make: buildmake.sh.in

Log Message:
nbmake bootstrap: be quieter if MAKEVERBOSE==0

More accurately simulate  and don't even print
the "compile" lines with MAKEVERBOSE=0


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tools/make/buildmake.sh.in

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

Modified files:

Index: src/tools/make/buildmake.sh.in
diff -u src/tools/make/buildmake.sh.in:1.14 src/tools/make/buildmake.sh.in:1.15
--- src/tools/make/buildmake.sh.in:1.14	Sat Jun 13 11:32:52 2020
+++ src/tools/make/buildmake.sh.in	Sat Jun 13 11:39:43 2020
@@ -1,5 +1,5 @@
 #! /bin/sh
-#	$NetBSD: buildmake.sh.in,v 1.14 2020/06/13 11:32:52 lukem Exp $
+#	$NetBSD: buildmake.sh.in,v 1.15 2020/06/13 11:39:43 lukem Exp $
 #
 # buildmake.sh.in - Autoconf-processed shell script for building make(1).
 #
@@ -17,11 +17,14 @@ _CFLAGS="${_CFLAGS} @CFLAGS@"
 _LDFLAGS="@LDFLAGS@ @LIBS@"
 
 docmd () {
-	if [ ${MAKEVERBOSE:-2} -lt 2 ]; then
-		echo "$1 ${2##*/}"
-	else
-		echo "$3"
-	fi
+	case "${MAKEVERBOSE:-2}" in
+	0)
+		;;
+	1)
+		echo "$1 ${2##*/}" ;;
+	*)
+		echo "$3" ;;
+	esac
 	$3 || exit 1
 }
 



CVS commit: src/tools/make

2020-06-13 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sat Jun 13 11:32:52 UTC 2020

Modified Files:
src/tools/make: buildmake.sh.in

Log Message:
nbmake bootstrap: consistency fix in MAKEVERBOSE<2 support


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tools/make/buildmake.sh.in

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

Modified files:

Index: src/tools/make/buildmake.sh.in
diff -u src/tools/make/buildmake.sh.in:1.13 src/tools/make/buildmake.sh.in:1.14
--- src/tools/make/buildmake.sh.in:1.13	Sat Jun 13 11:28:24 2020
+++ src/tools/make/buildmake.sh.in	Sat Jun 13 11:32:52 2020
@@ -1,5 +1,5 @@
 #! /bin/sh
-#	$NetBSD: buildmake.sh.in,v 1.13 2020/06/13 11:28:24 lukem Exp $
+#	$NetBSD: buildmake.sh.in,v 1.14 2020/06/13 11:32:52 lukem Exp $
 #
 # buildmake.sh.in - Autoconf-processed shell script for building make(1).
 #
@@ -18,7 +18,7 @@ _LDFLAGS="@LDFLAGS@ @LIBS@"
 
 docmd () {
 	if [ ${MAKEVERBOSE:-2} -lt 2 ]; then
-		echo "   $1 ${2##*/}"
+		echo "$1 ${2##*/}"
 	else
 		echo "$3"
 	fi



CVS commit: src/tools/make

2020-06-13 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sat Jun 13 11:28:24 UTC 2020

Modified Files:
src/tools/make: buildmake.sh.in

Log Message:
nbmake bootstrap: if MAKEVERBOSE < 2, output similar to 


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tools/make/buildmake.sh.in

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

Modified files:

Index: src/tools/make/buildmake.sh.in
diff -u src/tools/make/buildmake.sh.in:1.12 src/tools/make/buildmake.sh.in:1.13
--- src/tools/make/buildmake.sh.in:1.12	Tue Jan 16 08:53:51 2018
+++ src/tools/make/buildmake.sh.in	Sat Jun 13 11:28:24 2020
@@ -1,5 +1,5 @@
 #! /bin/sh
-#	$NetBSD: buildmake.sh.in,v 1.12 2018/01/16 08:53:51 uwe Exp $
+#	$NetBSD: buildmake.sh.in,v 1.13 2020/06/13 11:28:24 lukem Exp $
 #
 # buildmake.sh.in - Autoconf-processed shell script for building make(1).
 #
@@ -17,12 +17,17 @@ _CFLAGS="${_CFLAGS} @CFLAGS@"
 _LDFLAGS="@LDFLAGS@ @LIBS@"
 
 docmd () {
-	echo "$1"
-	$1 || exit 1
+	if [ ${MAKEVERBOSE:-2} -lt 2 ]; then
+		echo "   $1 ${2##*/}"
+	else
+		echo "$3"
+	fi
+	$3 || exit 1
 }
 
 for f in $MKSRCDIR/*.c $MKSRCDIR/lst.lib/*.c; do
-	docmd "${_CC} ${_CFLAGS} -c $f"
+	docmd "compile " "$f" "${_CC} ${_CFLAGS} -c $f"
 done
 
-docmd "${_CC} -o ${_TOOL_PREFIX:-nb}make *.o ${_LDFLAGS}"
+docmd "   link " "${_TOOL_PREFIX:-nb}make" \
+	"${_CC} -o ${_TOOL_PREFIX:-nb}make *.o ${_LDFLAGS}"



CVS commit: src/tools

2020-06-13 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sat Jun 13 10:49:17 UTC 2020

Modified Files:
src/tools: Makefile.gnuhost
src/tools/compat: Makefile
src/tools/host-mkdep: Makefile
src/tools/xz-include: Makefile

Log Message:
tools: configure --silent if MAKEVERBOSE == 0


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/tools/Makefile.gnuhost
cvs rdiff -u -r1.87 -r1.88 src/tools/compat/Makefile
cvs rdiff -u -r1.15 -r1.16 src/tools/host-mkdep/Makefile
cvs rdiff -u -r1.2 -r1.3 src/tools/xz-include/Makefile

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

Modified files:

Index: src/tools/Makefile.gnuhost
diff -u src/tools/Makefile.gnuhost:1.52 src/tools/Makefile.gnuhost:1.53
--- src/tools/Makefile.gnuhost:1.52	Sat Jun 13 08:12:16 2020
+++ src/tools/Makefile.gnuhost	Sat Jun 13 10:49:17 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.gnuhost,v 1.52 2020/06/13 08:12:16 lukem Exp $
+#	$NetBSD: Makefile.gnuhost,v 1.53 2020/06/13 10:49:17 lukem Exp $
 #
 # Rules used when building a GNU host package.  Expects MODULE to be set.
 #
@@ -77,6 +77,11 @@ CONFIGURE_ARGS+=--prefix=${TOOLDIR}
 CONFIGURE_ARGS+=--disable-shared
 .endif
 
+.if ${MAKEVERBOSE} == 0
+CONFIGURE_ARGS+=--silent
+.endif
+
+
 .if ${MAKE_PROGRAM} == ${MAKE}
 .ifndef _NOWRAPPER
 # Some systems have a small ARG_MAX.  On such systems, prevent Make

Index: src/tools/compat/Makefile
diff -u src/tools/compat/Makefile:1.87 src/tools/compat/Makefile:1.88
--- src/tools/compat/Makefile:1.87	Wed May  8 02:25:50 2019
+++ src/tools/compat/Makefile	Sat Jun 13 10:49:17 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.87 2019/05/08 02:25:50 thorpej Exp $
+#	$NetBSD: Makefile,v 1.88 2020/06/13 10:49:17 lukem Exp $
 
 HOSTLIB=	nbcompat
 
@@ -76,10 +76,15 @@ _CURDIR:=	${.CURDIR}
 
 SRCS:=		${SRCS:M*.c}
 
+CONFIGURE_ARGS=	--cache-file=config.cache
+.if ${MAKEVERBOSE} == 0
+CONFIGURE_ARGS+=--silent
+.endif
+
 config.cache: include/.stamp configure nbtool_config.h.in defs.mk.in
 	rm -f ${.TARGET}
 	CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} LDFLAGS=${HOST_LDFLAGS:Q} \
-		${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache
+		${HOST_SH} ${.CURDIR}/configure ${CONFIGURE_ARGS}
 
 defs.mk: config.cache
 	@touch ${.TARGET}

Index: src/tools/host-mkdep/Makefile
diff -u src/tools/host-mkdep/Makefile:1.15 src/tools/host-mkdep/Makefile:1.16
--- src/tools/host-mkdep/Makefile:1.15	Sun Jan 27 05:16:10 2019
+++ src/tools/host-mkdep/Makefile	Sat Jun 13 10:49:17 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2019/01/27 05:16:10 dholland Exp $
+#	$NetBSD: Makefile,v 1.16 2020/06/13 10:49:17 lukem Exp $
 
 .include 
 
@@ -19,11 +19,15 @@ CLEANFILES+=	config.cache config.log con
 #
 CONFIGURE_ENV=	CC=${HOST_CC:Q}
 
+CONFIGURE_ARGS=	--cache-file=config.cache
+.if ${MAKEVERBOSE} == 0
+CONFIGURE_ARGS+=--silent
+.endif
+
 realall: host-mkdep
 host-mkdep: configure host-mkdep.in
 	-rm -f $@
-	${CONFIGURE_ENV} \
-	${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache
+	${CONFIGURE_ENV} ${HOST_SH} ${.CURDIR}/configure ${CONFIGURE_ARGS}
 	chmod +x $@
 
 # Use uninstalled copy of the install program

Index: src/tools/xz-include/Makefile
diff -u src/tools/xz-include/Makefile:1.2 src/tools/xz-include/Makefile:1.3
--- src/tools/xz-include/Makefile:1.2	Tue Sep 25 11:41:35 2018
+++ src/tools/xz-include/Makefile	Sat Jun 13 10:49:17 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2018/09/25 11:41:35 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2020/06/13 10:49:17 lukem Exp $
 
 .include 
 
@@ -9,6 +9,9 @@
 .include "Makefile.inc"
 
 CONFIGURE_ARGS+=	--enable-threads=no --disable-nls
+.if ${MAKEVERBOSE} == 0
+CONFIGURE_ARGS+=	--silent
+.endif
 
 config.status: ${XZSRCDIR}/configure
 	${HOST_SH} ${XZSRCDIR}/configure ${CONFIGURE_ARGS} \



CVS commit: src/tools

2020-06-13 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sat Jun 13 08:12:16 UTC 2020

Modified Files:
src/tools: Makefile.gnuhost

Log Message:
tools: if MAKEVERBOSE < 2, quieten automake builds


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/tools/Makefile.gnuhost

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

Modified files:

Index: src/tools/Makefile.gnuhost
diff -u src/tools/Makefile.gnuhost:1.51 src/tools/Makefile.gnuhost:1.52
--- src/tools/Makefile.gnuhost:1.51	Mon Oct 22 13:19:42 2018
+++ src/tools/Makefile.gnuhost	Sat Jun 13 08:12:16 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.gnuhost,v 1.51 2018/10/22 13:19:42 maya Exp $
+#	$NetBSD: Makefile.gnuhost,v 1.52 2020/06/13 08:12:16 lukem Exp $
 #
 # Rules used when building a GNU host package.  Expects MODULE to be set.
 #
@@ -102,6 +102,10 @@ BUILD_COMMAND=	/usr/bin/env -i ${BUILD_E
 
 MAKE_ARGS+=	BISON=true DESTDIR= INSTALL=${HOST_INSTALL_FILE:Q}
 
+.if ${MAKEVERBOSE} < 2
+MAKE_ARGS+=	V=0
+.endif
+
 ALL_TARGET?=	all
 INSTALL_TARGET?=install
 



CVS commit: src/tools/tic

2020-04-05 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Apr  5 12:31:39 UTC 2020

Modified Files:
src/tools/tic: Makefile

Log Message:
tools: Build tic with full fat terminfo


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tools/tic/Makefile

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

Modified files:

Index: src/tools/tic/Makefile
diff -u src/tools/tic/Makefile:1.5 src/tools/tic/Makefile:1.6
--- src/tools/tic/Makefile:1.5	Wed Nov  2 17:49:20 2011
+++ src/tools/tic/Makefile	Sun Apr  5 12:31:39 2020
@@ -1,7 +1,10 @@
-#	$NetBSD: Makefile,v 1.5 2011/11/02 17:49:20 christos Exp $
+#	$NetBSD: Makefile,v 1.6 2020/04/05 12:31:39 roy Exp $
 
 HOSTPROGNAME=	${_TOOL_PREFIX}tic
 HOST_SRCDIR=	usr.bin/tic
+
+# We need our libterminfo to compile compat and write to the database
+CPPFLAGS+=	-DTERMINFO_COMPILE -DTERMINFO_COMPAT -DTERMINFO_DB
 HOST_SRCS=	compile.c hash.c
 
 TERMINFODIR=	${NETBSDSRCDIR}/lib/libterminfo



CVS commit: src/tools/binutils

2020-04-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr  4 01:34:53 UTC 2020

Modified Files:
src/tools/binutils: mknative-binutils

Log Message:
rename libctf to libgnuctf


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tools/binutils/mknative-binutils

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

Modified files:

Index: src/tools/binutils/mknative-binutils
diff -u src/tools/binutils/mknative-binutils:1.12 src/tools/binutils/mknative-binutils:1.13
--- src/tools/binutils/mknative-binutils:1.12	Fri Apr  3 20:47:52 2020
+++ src/tools/binutils/mknative-binutils	Fri Apr  3 21:34:53 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-binutils,v 1.12 2020/04/04 00:47:52 christos Exp $
+#	$NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/binutils
@@ -49,16 +49,16 @@ get_libopcodes () {
 	} | write_c external/gpl3/binutils/lib/libopcodes/arch/$MACHINE_ARCH/config.h
 }
 
-get_libctf () {
-	mkdir -p $_TOP/external/gpl3/binutils/lib/libctf/arch/$MACHINE_ARCH
+get_libgnuctf () {
+	mkdir -p $_TOP/external/gpl3/binutils/lib/libgnuctf/arch/$MACHINE_ARCH
 
 	{
 		getvars libctf/Makefile libctf_la_SOURCES
-	} | write_mk external/gpl3/binutils/lib/libctf/arch/$MACHINE_ARCH/defs.mk
+	} | write_mk external/gpl3/binutils/lib/libgnuctf/arch/$MACHINE_ARCH/defs.mk
 
 	{
 		cat $_TMPDIR/libctf/config.h
-	} | write_c external/gpl3/binutils/lib/libctf/arch/$MACHINE_ARCH/config.h
+	} | write_c external/gpl3/binutils/lib/libgnuctf/arch/$MACHINE_ARCH/config.h
 }
 
 # external/gpl3/binutils/lib/libiberty #
@@ -150,7 +150,7 @@ case $1 in
 all|binutils)	# everything (uses "canadian cross" temp environment)
 	get_binutils
 	get_libbfd
-	get_libctf
+	get_libgnuctf
 	get_libopcodes
 	get_libiberty
 	exit 0



CVS commit: src/tools/binutils

2020-04-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr  4 00:47:52 UTC 2020

Modified Files:
src/tools/binutils: mknative-binutils

Log Message:
Handle libctf new in binutils 2.34


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tools/binutils/mknative-binutils

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

Modified files:

Index: src/tools/binutils/mknative-binutils
diff -u src/tools/binutils/mknative-binutils:1.11 src/tools/binutils/mknative-binutils:1.12
--- src/tools/binutils/mknative-binutils:1.11	Wed Nov  7 21:08:35 2018
+++ src/tools/binutils/mknative-binutils	Fri Apr  3 20:47:52 2020
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp $
+#	$NetBSD: mknative-binutils,v 1.12 2020/04/04 00:47:52 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/binutils
@@ -49,6 +49,18 @@ get_libopcodes () {
 	} | write_c external/gpl3/binutils/lib/libopcodes/arch/$MACHINE_ARCH/config.h
 }
 
+get_libctf () {
+	mkdir -p $_TOP/external/gpl3/binutils/lib/libctf/arch/$MACHINE_ARCH
+
+	{
+		getvars libctf/Makefile libctf_la_SOURCES
+	} | write_mk external/gpl3/binutils/lib/libctf/arch/$MACHINE_ARCH/defs.mk
+
+	{
+		cat $_TMPDIR/libctf/config.h
+	} | write_c external/gpl3/binutils/lib/libctf/arch/$MACHINE_ARCH/config.h
+}
+
 # external/gpl3/binutils/lib/libiberty #
 
 get_libiberty () {
@@ -138,6 +150,7 @@ case $1 in
 all|binutils)	# everything (uses "canadian cross" temp environment)
 	get_binutils
 	get_libbfd
+	get_libctf
 	get_libopcodes
 	get_libiberty
 	exit 0



CVS commit: src/tools/binutils

2020-04-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr  4 00:47:30 UTC 2020

Modified Files:
src/tools/binutils: Makefile

Log Message:
put the binutils include before /usr/include to get the right md5.h


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/tools/binutils/Makefile

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

Modified files:

Index: src/tools/binutils/Makefile
diff -u src/tools/binutils/Makefile:1.30 src/tools/binutils/Makefile:1.31
--- src/tools/binutils/Makefile:1.30	Thu Dec 27 11:26:52 2018
+++ src/tools/binutils/Makefile	Fri Apr  3 20:47:30 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.30 2018/12/27 16:26:52 christos Exp $
+#	$NetBSD: Makefile,v 1.31 2020/04/04 00:47:30 christos Exp $
 
 .include 
 
@@ -34,7 +34,8 @@ INSTALL_TARGET+=install-gprof
 
 .include "${.CURDIR}/../Makefile.gnuhost"
 
-CCADDFLAGS=	-I${DESTDIR}/usr/include -B${DESTDIR}/usr/lib/
+CCADDFLAGS=	-I${GNUHOSTDIST}/include  -I${DESTDIR}/usr/include
+CCADDFLAGS+=	-B${DESTDIR}/usr/lib/
 LDADDFLAGS=	-L${DESTDIR}/lib -L${DESTDIR}/usr/lib
 
 # Force avoiding possibly non-executable install-sh.



CVS commit: src/tools/gcc

2020-03-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Mar 11 10:07:01 UTC 2020

Modified Files:
src/tools/gcc: gcc-version.mk

Log Message:
update date for GCC 8.4.0 import.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/tools/gcc/gcc-version.mk

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

Modified files:

Index: src/tools/gcc/gcc-version.mk
diff -u src/tools/gcc/gcc-version.mk:1.17 src/tools/gcc/gcc-version.mk:1.18
--- src/tools/gcc/gcc-version.mk:1.17	Mon Sep 30 08:40:20 2019
+++ src/tools/gcc/gcc-version.mk	Wed Mar 11 10:07:01 2020
@@ -1,9 +1,9 @@
-#	$NetBSD: gcc-version.mk,v 1.17 2019/09/30 08:40:20 mrg Exp $
+#	$NetBSD: gcc-version.mk,v 1.18 2020/03/11 10:07:01 mrg Exp $
 
 # common location for tools and native build
 
 .if ${HAVE_GCC} == 7
 NETBSD_GCC_VERSION=nb3 20190319
 .elif ${HAVE_GCC} == 8
-NETBSD_GCC_VERSION=nb1 20190930
+NETBSD_GCC_VERSION=nb1 20200311
 .endif



CVS commit: src/tools/llvm

2020-02-21 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Feb 21 15:00:44 UTC 2020

Modified Files:
src/tools/llvm: Makefile

Log Message:
LLVM doesn't use term.h, so don't check for it when probing here either.
Increase robustness of checks for incremental builds by forcing a
dependency on the Makefile itself.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/tools/llvm/Makefile

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

Modified files:

Index: src/tools/llvm/Makefile
diff -u src/tools/llvm/Makefile:1.22 src/tools/llvm/Makefile:1.23
--- src/tools/llvm/Makefile:1.22	Tue May  1 19:59:47 2018
+++ src/tools/llvm/Makefile	Fri Feb 21 15:00:44 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.22 2018/05/01 19:59:47 christos Exp $
+#	$NetBSD: Makefile,v 1.23 2020/02/21 15:00:44 joerg Exp $
 
 .include 
 
@@ -20,7 +20,7 @@ config/config.status: ${LLVM_SRCDIR}/con
 	--with-python=${.OBJDIR}/config/python
 # --disable-assertions
 
-need-dl:
+need-dl: Makefile
 	printf '#include \nint main(void){void *p; return dladdr(p, p);}' > need-dl.c
 	if ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c > /dev/null 2>&1; then \
 		echo > ${.TARGET}; \
@@ -30,8 +30,8 @@ need-dl:
 		echo > ${.TARGET}; \
 	fi
 
-need-terminfo:
-	printf '#include \nint main(void){return setupterm(0, 0, 0);}' > need-terminfo.c
+need-terminfo: Makefile
+	printf 'int setupterm(char *, int, int *);\nint main(void){return setupterm("", 0, 0);}' > need-terminfo.c
 	for lib in tinfo terminfo ncurses curses; do \
 		if ${HOST_CC} -o need-terminfo.out need-terminfo.c -l$$lib > /dev/null 2>&1; then \
 			echo -l$$lib > ${.TARGET}; \



CVS commit: src/tools/pkg_install

2020-01-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 17 16:50:51 UTC 2020

Modified Files:
src/tools/pkg_install: Makefile.inc

Log Message:
don't try to include the library if we are building it.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tools/pkg_install/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/tools/pkg_install/Makefile.inc
diff -u src/tools/pkg_install/Makefile.inc:1.2 src/tools/pkg_install/Makefile.inc:1.3
--- src/tools/pkg_install/Makefile.inc:1.2	Sun Jan 12 16:27:43 2020
+++ src/tools/pkg_install/Makefile.inc	Fri Jan 17 11:50:51 2020
@@ -1,8 +1,10 @@
-# $NetBSD: Makefile.inc,v 1.2 2020/01/12 21:27:43 christos Exp $
+# $NetBSD: Makefile.inc,v 1.3 2020/01/17 16:50:51 christos Exp $
 
 .include "${NETBSDSRCDIR}/external/bsd/pkg_install/Makefile.inc"
 
+.if !defined(HOSTLIB)
 INSTALL_OBJDIR!= cd ${NETBSDSRCDIR}/tools/pkg_install/lib && ${PRINTOBJDIR}
 LDFLAGS+=-L${INSTALL_OBJDIR}
 LDADD+=-linstall
+.endif
 



CVS commit: src/tools/pkg_install/lib

2020-01-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 13 19:03:03 UTC 2020

Modified Files:
src/tools/pkg_install/lib: Makefile

Log Message:
use the host compiler


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tools/pkg_install/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/tools/pkg_install/lib/Makefile
diff -u src/tools/pkg_install/lib/Makefile:1.1 src/tools/pkg_install/lib/Makefile:1.2
--- src/tools/pkg_install/lib/Makefile:1.1	Sun Jan 12 16:49:39 2020
+++ src/tools/pkg_install/lib/Makefile	Mon Jan 13 14:03:03 2020
@@ -1,10 +1,23 @@
-# $NetBSD: Makefile,v 1.1 2020/01/12 21:49:39 christos Exp $
+# $NetBSD: Makefile,v 1.2 2020/01/13 19:03:03 christos Exp $
 .include 
 
-HOSTLIB=	${LIB}
+HOSTLIB=	install
+
+.include 
+
+SRCS=	automatic.c conflicts.c dewey.c \
+	fexec.c file.c global.c gpgsig.c iterate.c license.c lpkg.c \
+	opattern.c parse-config.c pkcs7.c pkg_signature.c \
+	pkgdb.c pkg_io.c plist.c remove.c \
+	str.c version.c var.c vulnerabilities-file.c xwrapper.c
 
 HOST_CPPFLAGS+=	${CPPFLAGS}
-HOST_SRCS+=	${SRCS}
 
-.include "${NETBSDSRCDIR}/external/bsd/pkg_install/lib/Makefile"
-.include "${.CURDIR}/../Makefile.inc"
+CPPFLAGS+=  -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64
+
+.PATH:  ${NETBSDSRCDIR}/external/bsd/pkg_install/dist/lib
+
+HOST_CPPFLAGS= ${CPPFLAGS}
+
+#.include "${.CURDIR}/../../Makefile.nbincludes"
+.include 



CVS commit: src/tools/pkg_install/lib

2020-01-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 12 21:49:39 UTC 2020

Added Files:
src/tools/pkg_install/lib: Makefile

Log Message:
add Makefile


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/tools/pkg_install/lib/Makefile

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

Added files:

Index: src/tools/pkg_install/lib/Makefile
diff -u /dev/null src/tools/pkg_install/lib/Makefile:1.1
--- /dev/null	Sun Jan 12 16:49:39 2020
+++ src/tools/pkg_install/lib/Makefile	Sun Jan 12 16:49:39 2020
@@ -0,0 +1,10 @@
+# $NetBSD: Makefile,v 1.1 2020/01/12 21:49:39 christos Exp $
+.include 
+
+HOSTLIB=	${LIB}
+
+HOST_CPPFLAGS+=	${CPPFLAGS}
+HOST_SRCS+=	${SRCS}
+
+.include "${NETBSDSRCDIR}/external/bsd/pkg_install/lib/Makefile"
+.include "${.CURDIR}/../Makefile.inc"



CVS commit: src/tools/pkg_install

2020-01-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 12 21:27:45 UTC 2020

Modified Files:
src/tools/pkg_install: Makefile Makefile.inc
src/tools/pkg_install/pkg_add: Makefile
src/tools/pkg_install/pkg_admin: Makefile
src/tools/pkg_install/pkg_create: Makefile
src/tools/pkg_install/pkg_delete: Makefile
src/tools/pkg_install/pkg_info: Makefile

Log Message:
make this compile.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tools/pkg_install/Makefile \
src/tools/pkg_install/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 src/tools/pkg_install/pkg_add/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tools/pkg_install/pkg_admin/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tools/pkg_install/pkg_create/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tools/pkg_install/pkg_delete/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tools/pkg_install/pkg_info/Makefile

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

Modified files:

Index: src/tools/pkg_install/Makefile
diff -u src/tools/pkg_install/Makefile:1.1 src/tools/pkg_install/Makefile:1.2
--- src/tools/pkg_install/Makefile:1.1	Tue Dec  1 04:01:45 2009
+++ src/tools/pkg_install/Makefile	Sun Jan 12 16:27:43 2020
@@ -1,6 +1,5 @@
-#	$NetBSD: Makefile,v 1.1 2009/12/01 09:01:45 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.2 2020/01/12 21:27:43 christos Exp $
 
-SUBDIR=	lib .WAIT pkg_add pkg_create pkg_delete pkg_info
-# XXX pkg_admin
+SUBDIR=	lib .WAIT pkg_add pkg_admin pkg_create pkg_delete pkg_info
 
 .include 
Index: src/tools/pkg_install/Makefile.inc
diff -u src/tools/pkg_install/Makefile.inc:1.1 src/tools/pkg_install/Makefile.inc:1.2
--- src/tools/pkg_install/Makefile.inc:1.1	Tue Dec  1 04:01:45 2009
+++ src/tools/pkg_install/Makefile.inc	Sun Jan 12 16:27:43 2020
@@ -1,3 +1,8 @@
-HOST_LDFLAGS:=	-L../lib -linstall
+# $NetBSD: Makefile.inc,v 1.2 2020/01/12 21:27:43 christos Exp $
+
+.include "${NETBSDSRCDIR}/external/bsd/pkg_install/Makefile.inc"
+
+INSTALL_OBJDIR!= cd ${NETBSDSRCDIR}/tools/pkg_install/lib && ${PRINTOBJDIR}
+LDFLAGS+=-L${INSTALL_OBJDIR}
+LDADD+=-linstall
 
-.include "${NETBSDSRCDIR}/external/bsd/pkg_install/sbin/Makefile.inc"

Index: src/tools/pkg_install/pkg_add/Makefile
diff -u src/tools/pkg_install/pkg_add/Makefile:1.1 src/tools/pkg_install/pkg_add/Makefile:1.2
--- src/tools/pkg_install/pkg_add/Makefile:1.1	Tue Dec  1 04:01:46 2009
+++ src/tools/pkg_install/pkg_add/Makefile	Sun Jan 12 16:27:44 2020
@@ -1,8 +1,9 @@
-#	$NetBSD: Makefile,v 1.1 2009/12/01 09:01:46 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.2 2020/01/12 21:27:44 christos Exp $
+
+.include 
 
 HOSTPROGNAME=	${_TOOL_PREFIX}pkg_add
-HOST_SRCDIR=	external/bsd/pkg_install/sbin/pkg_add
+HOST_SRCDIR=	../external/bsd/pkg_install/sbin/pkg_add
 
 .include "${.CURDIR}/../Makefile.inc"
-
 .include "${.CURDIR}/../../Makefile.host"

Index: src/tools/pkg_install/pkg_admin/Makefile
diff -u src/tools/pkg_install/pkg_admin/Makefile:1.1 src/tools/pkg_install/pkg_admin/Makefile:1.2
--- src/tools/pkg_install/pkg_admin/Makefile:1.1	Tue Dec  1 04:01:46 2009
+++ src/tools/pkg_install/pkg_admin/Makefile	Sun Jan 12 16:27:44 2020
@@ -1,8 +1,9 @@
-#	$NetBSD: Makefile,v 1.1 2009/12/01 09:01:46 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.2 2020/01/12 21:27:44 christos Exp $
+
+.include 
 
 HOSTPROGNAME=	${_TOOL_PREFIX}pkg_admin
-HOST_SRCDIR=	external/bsd/pkg_install/sbin/pkg_admin
+HOST_SRCDIR=	../external/bsd/pkg_install/sbin/pkg_admin
 
 .include "${.CURDIR}/../Makefile.inc"
-
 .include "${.CURDIR}/../../Makefile.host"

Index: src/tools/pkg_install/pkg_create/Makefile
diff -u src/tools/pkg_install/pkg_create/Makefile:1.1 src/tools/pkg_install/pkg_create/Makefile:1.2
--- src/tools/pkg_install/pkg_create/Makefile:1.1	Tue Dec  1 04:01:46 2009
+++ src/tools/pkg_install/pkg_create/Makefile	Sun Jan 12 16:27:44 2020
@@ -1,8 +1,9 @@
-#	$NetBSD: Makefile,v 1.1 2009/12/01 09:01:46 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.2 2020/01/12 21:27:44 christos Exp $
+
+.include 
 
 HOSTPROGNAME=	${_TOOL_PREFIX}pkg_create
-HOST_SRCDIR=	external/bsd/pkg_install/sbin/pkg_create
+HOST_SRCDIR=	../external/bsd/pkg_install/sbin/pkg_create
 
 .include "${.CURDIR}/../Makefile.inc"
-
 .include "${.CURDIR}/../../Makefile.host"

Index: src/tools/pkg_install/pkg_delete/Makefile
diff -u src/tools/pkg_install/pkg_delete/Makefile:1.1 src/tools/pkg_install/pkg_delete/Makefile:1.2
--- src/tools/pkg_install/pkg_delete/Makefile:1.1	Tue Dec  1 04:01:46 2009
+++ src/tools/pkg_install/pkg_delete/Makefile	Sun Jan 12 16:27:45 2020
@@ -1,8 +1,9 @@
-#	$NetBSD: Makefile,v 1.1 2009/12/01 09:01:46 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.2 2020/01/12 21:27:45 christos Exp $
+
+.include 
 
 HOSTPROGNAME=	${_TOOL_PREFIX}pkg_delete
-HOST_SRCDIR=	external/bsd/pkg_install/sbin/pkg_delete
+HOST_SRCDIR=	../external/bsd/pkg_install/sbin/pkg_delete
 
 .include "${.CURDIR}/../Makefile.inc"
-
 .include "${.CURDIR}/../../Makefile.host"

Index: src/tools/pkg_install/pkg_info/Makefile
d

CVS commit: src/tools

2019-05-07 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Tue May  7 10:22:54 UTC 2019

Modified Files:
src/tools: Makefile

Log Message:
Fix build, "pax" must be built before "libprop".

Ok: Matthew Green mrg@


To generate a diff of this commit:
cvs rdiff -u -r1.202 -r1.203 src/tools/Makefile

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.202 src/tools/Makefile:1.203
--- src/tools/Makefile:1.202	Tue May  7 04:29:45 2019
+++ src/tools/Makefile	Tue May  7 10:22:54 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.202 2019/05/07 04:29:45 thorpej Exp $
+#	$NetBSD: Makefile,v 1.203 2019/05/07 10:22:54 hannken Exp $
 
 .include 
 .include 
@@ -101,12 +101,11 @@ SUBDIR+= cap_mkdb crunchgen ctags gencat
 .endif
 
 SUBDIR+= cat rpcgen join lorder m4 mkdep tsort xz-include .WAIT yacc .WAIT awk .WAIT lex
-SUBDIR+= grep xz-lib libprop
+SUBDIR+= grep xz-lib pax .WAIT libprop
 
 .if ${TOOLS_BUILDRUMP} == "no"
 SUBDIR += .WAIT texinfo \
 	.WAIT tic \
-	.WAIT pax \
 	.WAIT ${TOOLCHAIN_BITS} \
 	${DTRACE_BITS} \
 		asn1_compile cksum compile_et db \



CVS commit: src/tools

2019-05-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue May  7 04:29:45 UTC 2019

Modified Files:
src/tools: Makefile
Added Files:
src/tools/libprop: Makefile

Log Message:
Add support for libprop as a host tool library.


To generate a diff of this commit:
cvs rdiff -u -r1.201 -r1.202 src/tools/Makefile
cvs rdiff -u -r0 -r1.1 src/tools/libprop/Makefile

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.201 src/tools/Makefile:1.202
--- src/tools/Makefile:1.201	Wed Apr  3 15:22:05 2019
+++ src/tools/Makefile	Tue May  7 04:29:45 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.201 2019/04/03 15:22:05 joerg Exp $
+#	$NetBSD: Makefile,v 1.202 2019/05/07 04:29:45 thorpej Exp $
 
 .include 
 .include 
@@ -101,7 +101,7 @@ SUBDIR+= cap_mkdb crunchgen ctags gencat
 .endif
 
 SUBDIR+= cat rpcgen join lorder m4 mkdep tsort xz-include .WAIT yacc .WAIT awk .WAIT lex
-SUBDIR+= grep xz-lib
+SUBDIR+= grep xz-lib libprop
 
 .if ${TOOLS_BUILDRUMP} == "no"
 SUBDIR += .WAIT texinfo \

Added files:

Index: src/tools/libprop/Makefile
diff -u /dev/null src/tools/libprop/Makefile:1.1
--- /dev/null	Tue May  7 04:29:46 2019
+++ src/tools/libprop/Makefile	Tue May  7 04:29:45 2019
@@ -0,0 +1,23 @@
+#	$NetBSD: Makefile,v 1.1 2019/05/07 04:29:45 thorpej Exp $
+
+HOSTLIB=	prop
+
+.include 
+
+LIBPROP_DIR=	${.CURDIR}/../../common/lib/libprop
+LIBPROP_INC=	${.CURDIR}/../../common/include
+
+.include "${LIBPROP_DIR}/Makefile.inc"
+
+CPPFLAGS+=	-I${.CURDIR}/../compat -I${LIBPROP_INC}
+CPPFLAGS+=	-I${TOOLDIR}/include/nbinclude
+
+.PATH:		${LIBPROP_DIR}
+
+CPPFLAGS+=	-DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64
+
+HOST_CPPFLAGS:=	${CPPFLAGS} ${HOST_CPPFLAGS}
+CPPFLAGS:=	# empty
+
+.include "${.CURDIR}/../Makefile.nbincludes"
+.include 



CVS commit: src/tools/llvm-lib

2019-04-03 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Apr  3 15:15:17 UTC 2019

Removed Files:
src/tools/llvm-lib/libLLVMAMDGPUAsmParser: Makefile
src/tools/llvm-lib/libLLVMAMDGPUAsmPrinter: Makefile
src/tools/llvm-lib/libLLVMAMDGPUCodeGen: Makefile
src/tools/llvm-lib/libLLVMAMDGPUDisassembler: Makefile
src/tools/llvm-lib/libLLVMAMDGPUMCTargetDesc: Makefile
src/tools/llvm-lib/libLLVMAMDGPUTargetInfo: Makefile
src/tools/llvm-lib/libLLVMAMDGPUUtils: Makefile
src/tools/llvm-lib/libLLVMExecutionEngine: Makefile
src/tools/llvm-lib/libLLVMMCJIT: Makefile

Log Message:
Undo tools part of the AMDGPU changes for LLVM.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/tools/llvm-lib/libLLVMAMDGPUAsmParser/Makefile
cvs rdiff -u -r1.1 -r0 src/tools/llvm-lib/libLLVMAMDGPUAsmPrinter/Makefile
cvs rdiff -u -r1.1 -r0 src/tools/llvm-lib/libLLVMAMDGPUCodeGen/Makefile
cvs rdiff -u -r1.1 -r0 src/tools/llvm-lib/libLLVMAMDGPUDisassembler/Makefile
cvs rdiff -u -r1.1 -r0 src/tools/llvm-lib/libLLVMAMDGPUMCTargetDesc/Makefile
cvs rdiff -u -r1.1 -r0 src/tools/llvm-lib/libLLVMAMDGPUTargetInfo/Makefile
cvs rdiff -u -r1.1 -r0 src/tools/llvm-lib/libLLVMAMDGPUUtils/Makefile
cvs rdiff -u -r1.1 -r0 src/tools/llvm-lib/libLLVMExecutionEngine/Makefile
cvs rdiff -u -r1.1 -r0 src/tools/llvm-lib/libLLVMMCJIT/Makefile

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



CVS commit: src/tools/gcc

2019-02-27 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb 27 09:11:01 UTC 2019

Modified Files:
src/tools/gcc: gcc-version.mk

Log Message:
also bump the X in "nbX" with previous


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tools/gcc/gcc-version.mk

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

Modified files:

Index: src/tools/gcc/gcc-version.mk
diff -u src/tools/gcc/gcc-version.mk:1.14 src/tools/gcc/gcc-version.mk:1.15
--- src/tools/gcc/gcc-version.mk:1.14	Wed Feb 27 09:10:38 2019
+++ src/tools/gcc/gcc-version.mk	Wed Feb 27 09:11:01 2019
@@ -1,9 +1,9 @@
-#	$NetBSD: gcc-version.mk,v 1.14 2019/02/27 09:10:38 mrg Exp $
+#	$NetBSD: gcc-version.mk,v 1.15 2019/02/27 09:11:01 mrg Exp $
 
 # common location for tools and native build
 
 .if ${HAVE_GCC} == 6
 NETBSD_GCC_VERSION=nb4 20181109
 .elif ${HAVE_GCC} == 7
-NETBSD_GCC_VERSION=nb1 20190226
+NETBSD_GCC_VERSION=nb2 20190226
 .endif



CVS commit: src/tools/gcc

2019-02-27 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb 27 09:10:38 UTC 2019

Modified Files:
src/tools/gcc: gcc-version.mk

Log Message:
bump netbsd gcc version date.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tools/gcc/gcc-version.mk

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

Modified files:

Index: src/tools/gcc/gcc-version.mk
diff -u src/tools/gcc/gcc-version.mk:1.13 src/tools/gcc/gcc-version.mk:1.14
--- src/tools/gcc/gcc-version.mk:1.13	Sat Jan 19 12:58:37 2019
+++ src/tools/gcc/gcc-version.mk	Wed Feb 27 09:10:38 2019
@@ -1,9 +1,9 @@
-#	$NetBSD: gcc-version.mk,v 1.13 2019/01/19 12:58:37 mrg Exp $
+#	$NetBSD: gcc-version.mk,v 1.14 2019/02/27 09:10:38 mrg Exp $
 
 # common location for tools and native build
 
 .if ${HAVE_GCC} == 6
 NETBSD_GCC_VERSION=nb4 20181109
 .elif ${HAVE_GCC} == 7
-NETBSD_GCC_VERSION=nb1 20190119
+NETBSD_GCC_VERSION=nb1 20190226
 .endif



CVS commit: src/tools/gcc

2019-02-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb 26 21:09:18 UTC 2019

Modified Files:
src/tools/gcc: Makefile

Log Message:
Remove "--disable-libstdcxx-dual-abi". This option does not do what
it says: Instead of disabling the dual-abi and letting you choose
which one you want, it disables the cxx11 abi and the
"--with-default-libstdcxx-abi=OPTION" becomes a noop. Removing the
old COW compatibility ABI is not easy. For more info see:

https://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/tools/gcc/Makefile

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

Modified files:

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.91 src/tools/gcc/Makefile:1.92
--- src/tools/gcc/Makefile:1.91	Sat Feb 16 19:22:53 2019
+++ src/tools/gcc/Makefile	Tue Feb 26 16:09:18 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.91 2019/02/17 00:22:53 mrg Exp $
+#	$NetBSD: Makefile,v 1.92 2019/02/26 21:09:18 christos Exp $
 
 .include 
 
@@ -36,7 +36,6 @@ COMMON_CONFIGURE_ARGS=	--target=${MACHIN
 			--with-pkgversion="NetBSD ${NETBSD_GCC_VERSION}" \
 			--with-system-zlib \
 			--without-isl \
-			--disable-libstdcxx-dual-abi \
 			--enable-__cxa_atexit \
 			--enable-libstdcxx-time=rt \
 			--enable-libstdcxx-threads \



CVS commit: src/tools/gcc

2019-02-22 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Feb 23 06:54:45 UTC 2019

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

Log Message:
pull out libstdc++ config.h as-is, for gnu.ver processing.
pull out the cxx11_sources and cxx98_sources values to avoid hard coding.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.100 src/tools/gcc/mknative-gcc:1.101
--- src/tools/gcc/mknative-gcc:1.100	Sat Feb  9 03:57:00 2019
+++ src/tools/gcc/mknative-gcc	Sat Feb 23 06:54:45 2019
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.100 2019/02/09 03:57:00 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.101 2019/02/23 06:54:45 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -233,10 +233,15 @@ get_libstdcxx_v3 () {
 
 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/gstdint.h \
 		<$_TMPDIR/$_PLATFORM/libstdc++-v3/include/gstdint.h
+	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/symver-config.h \
+		<$_TMPDIR/$_PLATFORM/libstdc++-v3/config.h
 
 	{
 		getvars $_PLATFORM/libstdc++-v3/Makefile \
 			port_specific_symbol_files
+		getvars $_PLATFORM/libstdc++-v3/src/Makefile \
+			cxx11_sources \
+			cxx98_sources
 
 		# libsupc++
 		getvars $_PLATFORM/libstdc++-v3/libsupc++/Makefile \



CVS commit: src/tools/gcc

2019-02-16 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 17 00:22:53 UTC 2019

Modified Files:
src/tools/gcc: Makefile

Log Message:
don't pass --disable-symver to mknative configure.  this turns off
the checking for gcc 4.6 and some exception handling routines which
we need on several platforms.

this should fix missing symbol issues seen on current-users.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/tools/gcc/Makefile

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

Modified files:

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.90 src/tools/gcc/Makefile:1.91
--- src/tools/gcc/Makefile:1.90	Sun Feb  3 11:57:25 2019
+++ src/tools/gcc/Makefile	Sun Feb 17 00:22:53 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.90 2019/02/03 11:57:25 mrg Exp $
+#	$NetBSD: Makefile,v 1.91 2019/02/17 00:22:53 mrg Exp $
 
 .include 
 
@@ -187,7 +187,6 @@ EXTRA_GCC_TARGETS=	i386-builtin-types.in
 
 NATIVE_CONFIGURE_ARGS+=	\
 			--disable-multilib \
-			--disable-symvers \
 			--disable-libstdcxx-pch \
 			--build=`${GCCDIST}/config.guess` \
 			--host=${MACHINE_GNU_PLATFORM} \



CVS commit: src/tools/gcc

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 01:46:59 UTC 2019

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

Log Message:
common-target source list is MD.  make it so.


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

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.98 src/tools/gcc/mknative-gcc:1.99
--- src/tools/gcc/mknative-gcc:1.98	Mon Feb  4 00:55:26 2019
+++ src/tools/gcc/mknative-gcc	Mon Feb  4 01:46:59 2019
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.98 2019/02/04 00:55:26 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.99 2019/02/04 01:46:59 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -302,6 +302,7 @@ get_gcc () {
 	mkdir -p $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH
 	mkdir -p $_OUTDIR/usr.bin/libcpp/arch/$MACHINE_ARCH
 	mkdir -p $_OUTDIR/usr.bin/include/arch
+	mkdir -p $_OUTDIR/usr.bin/common-target/arch
 	_buildname="BUILD_"
 	_libcppsubdir=""
 	_extravars="TM_H ALL_OPT_FILES"
@@ -357,7 +358,7 @@ get_gcc () {
 			| write_mk $_OUTDIRBASE/usr.bin/common/defs.mk
 	getvars gcc/Makefile \
 		OBJS-libcommon-target \
-			| write_mk $_OUTDIRBASE/usr.bin/common-target/defs.mk
+			| write_mk $_OUTDIRBASE/usr.bin/common-target/arch/$MACHINE_ARCH.mk
 
 	write_c $_OUTDIRBASE/usr.bin/libcpp/arch/$MACHINE_ARCH/config.h <$_TMPDIR/libcpp/config.h
 	hfiles='auto-host configargs config bconfig bversion plugin-version multilib tm'



CVS commit: src/tools/gcc

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb  4 00:55:26 UTC 2019

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

Log Message:
- don't getlinks here, they're no longer used.
- pullout the libcommon, libcommon-target and libgomp source list so they
  don't have to be hard coded in the reachover makefile


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

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.97 src/tools/gcc/mknative-gcc:1.98
--- src/tools/gcc/mknative-gcc:1.97	Fri Feb  1 09:27:23 2019
+++ src/tools/gcc/mknative-gcc	Mon Feb  4 00:55:26 2019
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.97 2019/02/01 09:27:23 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.98 2019/02/04 00:55:26 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -82,7 +82,6 @@ get_libgcc () {
 			SHLIB_MAPFILES SHLIB_NM_FLAGS
 		getvars gcc/Makefile \
 			NOEXCEPTION_FLAGS EXTRA_HEADERS
-		getlinks config.status libgcc
 	}	| sanitise_includes \
 		| write_mk $_OUTDIRBASE/lib/lib$_subdir/arch/$MACHINE_ARCH/defs.mk
 
@@ -161,6 +160,11 @@ get_libgomp () {
 	_subdir="$1"
 
 	mkdir -p $_OUTDIR/lib/$_subdir/arch/$MACHINE_ARCH
+
+	getvars $_PLATFORM/libgomp/Makefile \
+		libgomp_la_SOURCES \
+		| write_mk $_OUTDIRBASE/lib/$_subdir/defs.mk
+
 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/config.h \
 		<$_TMPDIR/$_PLATFORM/libgomp/config.h
 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/libgomp_f.h \
@@ -198,7 +202,6 @@ get_libobjc () {
 		getvars $_PLATFORM/libobjc/Makefile \
 			ALL_CFLAGS INCLUDES OBJC_SOURCE_FILES C_SOURCE_FILES OBJC_H \
 			| sed "s,$_GNU_DIST,\${GNUHOSTDIST},g"
-		getlinks $_TMPDIR/$_PLATFORM/libgcc/config.status libgcc
 	} | sanitise_includes \
 	  | write_mk $_OUTDIRBASE/lib/$_subdir/defs.mk
 
@@ -275,7 +278,6 @@ get_libstdcxx_v3 () {
 			$_pf_headers | sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/profile/##g'
 		getvars $_PLATFORM/libstdc++-v3/include/Makefile \
 			BASIC_FILE_H ALLOCATOR_H CSTDIO_H CLOCALE_H CMESSAGES_H CTIME_H
-		getlinks $_TMPDIR/$_PLATFORM/libgcc/config.status libgcc
 	} | sanitise_includes \
 	  | write_mk $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/defs.mk
 }
@@ -350,6 +352,13 @@ get_gcc () {
 		EXTRA_HEADERS \
 			| write_mk $_OUTDIRBASE/usr.bin/include/arch/$MACHINE_ARCH.mk
 
+	getvars gcc/Makefile \
+		OBJS-libcommon \
+			| write_mk $_OUTDIRBASE/usr.bin/common/defs.mk
+	getvars gcc/Makefile \
+		OBJS-libcommon-target \
+			| write_mk $_OUTDIRBASE/usr.bin/common-target/defs.mk
+
 	write_c $_OUTDIRBASE/usr.bin/libcpp/arch/$MACHINE_ARCH/config.h <$_TMPDIR/libcpp/config.h
 	hfiles='auto-host configargs config bconfig bversion plugin-version multilib tm'
 	for f in $hfiles; do



CVS commit: src/tools/gcc

2019-02-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb  3 11:57:25 UTC 2019

Modified Files:
src/tools/gcc: Makefile

Log Message:
add || true to the gthr-default.h copy, it can fail first time around


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/tools/gcc/Makefile

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

Modified files:

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.89 src/tools/gcc/Makefile:1.90
--- src/tools/gcc/Makefile:1.89	Fri Feb  1 09:27:23 2019
+++ src/tools/gcc/Makefile	Sun Feb  3 11:57:25 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.89 2019/02/01 09:27:23 mrg Exp $
+#	$NetBSD: Makefile,v 1.90 2019/02/03 11:57:25 mrg Exp $
 
 .include 
 
@@ -197,7 +197,7 @@ MKENV_BUILD_MAKE=cd .native && ${MKNATIV
 .native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
 	mkdir .native .native/gcc .native/gcc/include 2>/dev/null || true
 	# If this fails, gthreads won't be configured initially, but reconfig will.
-	-cp ${DESTDIR}/usr/include/g++/bits/gthr-default.h .native/gcc/include
+	cp ${DESTDIR}/usr/include/g++/bits/gthr-default.h .native/gcc/include || true
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
 		(cd .native && ${MKNATIVE_ENV} \
 			${HOST_SH} ${GNUHOSTDIST}/configure \



CVS commit: src/tools/gcc

2019-02-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Feb  1 09:27:24 UTC 2019

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

Log Message:
- use --with-default-libstdcxx-abi=new for GCC, otherwise we get the
  old ABI with --disable-libstdcxx-dual-abi
- fix libbacktrace mknative
- find gthr-default.h for libstdc++ mknative
- fetch FILESYSTEM_SOURCES


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/tools/gcc/Makefile
cvs rdiff -u -r1.96 -r1.97 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.88 src/tools/gcc/Makefile:1.89
--- src/tools/gcc/Makefile:1.88	Sat Jan 19 12:58:37 2019
+++ src/tools/gcc/Makefile	Fri Feb  1 09:27:23 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.88 2019/01/19 12:58:37 mrg Exp $
+#	$NetBSD: Makefile,v 1.89 2019/02/01 09:27:23 mrg Exp $
 
 .include 
 
@@ -39,7 +39,8 @@ COMMON_CONFIGURE_ARGS=	--target=${MACHIN
 			--disable-libstdcxx-dual-abi \
 			--enable-__cxa_atexit \
 			--enable-libstdcxx-time=rt \
-			--enable-libstdcxx-threads
+			--enable-libstdcxx-threads \
+			--with-diagnostics-color=auto-if-env
 .if defined(GCC_CONFIG_ARCH.${MACHINE_ARCH})
 COMMON_CONFIGURE_ARGS+=	--with-arch=${GCC_CONFIG_ARCH.${MACHINE_ARCH}}
 .endif
@@ -47,7 +48,9 @@ COMMON_CONFIGURE_ARGS+=	--with-arch=${GC
 COMMON_CONFIGURE_ARGS+=	--with-tune=${GCC_CONFIG_TUNE.${MACHINE_ARCH}}
 .endif
 
-COMMON_CONFIGURE_ARGS+= --with-diagnostics-color=auto-if-env
+.if ${HAVE_GCC} >= 7
+COMMON_CONFIGURE_ARGS+=	--with-default-libstdcxx-abi=new
+.endif
 
 CONFIGURE_ARGS=	${COMMON_CONFIGURE_ARGS}
 CONFIGURE_ARGS+= \
@@ -94,6 +97,7 @@ MKNATIVE_TARGET=	gcc6
 
 MKNATIVE_CONFIG_TARGET_LIBS+= \
 	configure-target-libstdc++-v3 \
+	configure-target-libbacktrace \
 	configure-target-libobjc
 
 BINENV=		/usr/bin/env -i
@@ -105,7 +109,7 @@ MKNATIVE_ENV=	${BINENV} ${CONFIGURE_ENV:
 			CFLAGS_FOR_BUILD="-I${TOOLDIR}/include" \
 			CC=${CC:Q}' '${CCADDFLAGS:Q} \
 			CXX=${CXX:Q}' '${CCADDFLAGS:Q}' '${CXXADDFLAGS:Q} \
-			CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \
+			CPP=${CPP:Q}' '-I${DESTDIR}/usr/include' '-I${DESTDIR}/usr/include/g++/bits \
 			CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= \
 			AS=${AS:Q} AWK=${TOOL_AWK:Q} LD=${LD:Q} \
 			MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
@@ -185,14 +189,15 @@ NATIVE_CONFIGURE_ARGS+=	\
 			--disable-multilib \
 			--disable-symvers \
 			--disable-libstdcxx-pch \
-			--disable-libstdcxx-dual-abi \
 			--build=`${GCCDIST}/config.guess` \
 			--host=${MACHINE_GNU_PLATFORM} \
 			--with-sysroot=${DESTDIR}
 MKENV_BUILD_MAKE=cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE}
 
 .native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
-	mkdir .native 2>/dev/null || true
+	mkdir .native .native/gcc .native/gcc/include 2>/dev/null || true
+	# If this fails, gthreads won't be configured initially, but reconfig will.
+	-cp ${DESTDIR}/usr/include/g++/bits/gthr-default.h .native/gcc/include
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
 		(cd .native && ${MKNATIVE_ENV} \
 			${HOST_SH} ${GNUHOSTDIST}/configure \

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.96 src/tools/gcc/mknative-gcc:1.97
--- src/tools/gcc/mknative-gcc:1.96	Sat Jan 19 20:02:06 2019
+++ src/tools/gcc/mknative-gcc	Fri Feb  1 09:27:23 2019
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.96 2019/01/19 20:02:06 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.97 2019/02/01 09:27:23 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -178,9 +178,9 @@ get_libbacktrace () {
 
 	mkdir -p $_OUTDIR/lib/$_subdir/arch/$MACHINE_ARCH
 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/config.h \
-		<$_TMPDIR/$_subdir/config.h
+		<$_TMPDIR/$_PLATFORM/$_subdir/config.h
 	write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/backtrace-supported.h \
-		<$_TMPDIR/$_subdir/backtrace-supported.h
+		<$_TMPDIR/$_PLATFORM/$_subdir/backtrace-supported.h
 }
 
 # lib/libobjc #
@@ -256,6 +256,9 @@ get_libstdcxx_v3 () {
 			GLIBCXX_ABI_FLAGS libc__98convenience_la_SOURCES | \
 			sed -e 's/^G_libc__98convenience_la_SOURCES=/G_CPP98_SOURCES=/' \
 			-e 's/codecvt.cc/c98-codecvt.cc/'
+		getvars $_PLATFORM/libstdc++-v3/src/filesystem/Makefile \
+			libstdc__fs_la_SOURCES | \
+			sed -e 's/^G_libstdc__fs_la_SOURCES=/G_FILESYSTEM_SOURCES=/'
 		getvars $_PLATFORM/libstdc++-v3/Makefile ATOMICITY_SRCDIR \
 			BASIC_FILE_CC CLOCALE_CC CCODECVT_CC CCOLLATE_CC \
 			CCTYPE_CC  CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_CC \



CVS commit: src/tools/m68k-elf2aout

2019-01-26 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jan 27 05:16:38 UTC 2019

Modified Files:
src/tools/m68k-elf2aout: Makefile

Log Message:
fix duplicated chunk from merge


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tools/m68k-elf2aout/Makefile

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

Modified files:

Index: src/tools/m68k-elf2aout/Makefile
diff -u src/tools/m68k-elf2aout/Makefile:1.4 src/tools/m68k-elf2aout/Makefile:1.5
--- src/tools/m68k-elf2aout/Makefile:1.4	Sun Jan 27 02:08:50 2019
+++ src/tools/m68k-elf2aout/Makefile	Sun Jan 27 05:16:38 2019
@@ -1,6 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2019/01/27 02:08:50 pgoyette Exp $
-
-.include 
+#	$NetBSD: Makefile,v 1.5 2019/01/27 05:16:38 dholland Exp $
 
 .include 
 



CVS commit: src/tools/host-mkdep

2019-01-26 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jan 27 05:16:10 UTC 2019

Modified Files:
src/tools/host-mkdep: Makefile

Log Message:
fix duplicated chunk from merge


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tools/host-mkdep/Makefile

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

Modified files:

Index: src/tools/host-mkdep/Makefile
diff -u src/tools/host-mkdep/Makefile:1.14 src/tools/host-mkdep/Makefile:1.15
--- src/tools/host-mkdep/Makefile:1.14	Sun Jan 27 02:08:50 2019
+++ src/tools/host-mkdep/Makefile	Sun Jan 27 05:16:10 2019
@@ -1,6 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2019/01/27 02:08:50 pgoyette Exp $
-
-.include 
+#	$NetBSD: Makefile,v 1.15 2019/01/27 05:16:10 dholland Exp $
 
 .include 
 



CVS commit: src/tools/compat

2019-01-26 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jan 27 05:15:32 UTC 2019

Modified Files:
src/tools/compat: nbtool_config.h.in

Log Message:
Restore comment accidentally lost in merge.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/tools/compat/nbtool_config.h.in

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

Modified files:

Index: src/tools/compat/nbtool_config.h.in
diff -u src/tools/compat/nbtool_config.h.in:1.48 src/tools/compat/nbtool_config.h.in:1.49
--- src/tools/compat/nbtool_config.h.in:1.48	Sun Jan 27 02:08:50 2019
+++ src/tools/compat/nbtool_config.h.in	Sun Jan 27 05:15:32 2019
@@ -1,5 +1,6 @@
+/* nbtool_config.h.in.  Generated from configure.ac by autoheader.  */
 
-/*  $NetBSD: nbtool_config.h.in,v 1.48 2019/01/27 02:08:50 pgoyette Exp $*/
+/*  $NetBSD: nbtool_config.h.in,v 1.49 2019/01/27 05:15:32 dholland Exp $*/
  
 #ifndef __NETBSD_NBTOOL_CONFIG_H__
 #define __NETBSD_NBTOOL_CONFIG_H__



CVS commit: src/tools/gcc

2019-01-19 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Jan 19 17:08:40 UTC 2019

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

Log Message:
also pull out these variables:
enable_execute_stack
unwind_header
md_unwind_header
sfp_machine_header
thread_header


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.94 src/tools/gcc/mknative-gcc:1.95
--- src/tools/gcc/mknative-gcc:1.94	Tue Sep  4 22:57:25 2018
+++ src/tools/gcc/mknative-gcc	Sat Jan 19 17:08:39 2019
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.94 2018/09/04 22:57:25 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.95 2019/01/19 17:08:39 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -82,6 +82,10 @@ get_libgcc () {
 			SHLIB_MAPFILES SHLIB_NM_FLAGS
 		getvars gcc/Makefile \
 			NOEXCEPTION_FLAGS EXTRA_HEADERS
+		getvars gcc/Makefile \
+			enable_execute_stack \
+			unwind_header md_unwind_header \
+			sfp_machine_header thread_header
 		getlinks config.status libgcc
 	}	| sanitise_includes \
 		| write_mk $_OUTDIRBASE/lib/lib$_subdir/arch/$MACHINE_ARCH/defs.mk



CVS commit: src/tools

2019-01-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  2 13:29:22 UTC 2019

Modified Files:
src/tools: Makefile

Log Message:
use MACHINE_CPU for elf2aout


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/tools/Makefile

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.197 src/tools/Makefile:1.198
--- src/tools/Makefile:1.197	Mon Dec 31 08:35:15 2018
+++ src/tools/Makefile	Wed Jan  2 08:29:22 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.197 2018/12/31 13:35:15 christos Exp $
+#	$NetBSD: Makefile,v 1.198 2019/01/02 13:29:22 christos Exp $
 
 .include 
 .include 
@@ -173,11 +173,11 @@ SUBDIR+=	macppc-fixcoff
 SUBDIR+=	powerpc-mkbootimage
 .endif
 
-.if ${MACHINE_ARCH} == "arm"
+.if ${MACHINE_CPU} == "arm"
 SUBDIR+=	arm-elf2aout
 .endif
 
-.if ${MACHINE_ARCH} == "m68k"
+.if ${MACHINE_CPU} == "m68k"
 SUBDIR+=	m68k-elf2aout
 .endif
 



CVS commit: src/tools

2018-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 31 13:35:16 UTC 2018

Modified Files:
src/tools: Makefile
Added Files:
src/tools/arm-elf2aout: Makefile a.out.h nlist.h
src/tools/arm-elf2aout/machine: aout_machdep.h
src/tools/arm-elf2aout/sys: aout_mids.h exec_aout.h exec_elf.h

Log Message:
Add an arm-specific elf2aout tool since objdump does not support a.out anymore


To generate a diff of this commit:
cvs rdiff -u -r1.196 -r1.197 src/tools/Makefile
cvs rdiff -u -r0 -r1.1 src/tools/arm-elf2aout/Makefile \
src/tools/arm-elf2aout/a.out.h src/tools/arm-elf2aout/nlist.h
cvs rdiff -u -r0 -r1.1 src/tools/arm-elf2aout/machine/aout_machdep.h
cvs rdiff -u -r0 -r1.1 src/tools/arm-elf2aout/sys/aout_mids.h \
src/tools/arm-elf2aout/sys/exec_aout.h \
src/tools/arm-elf2aout/sys/exec_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/tools/Makefile
diff -u src/tools/Makefile:1.196 src/tools/Makefile:1.197
--- src/tools/Makefile:1.196	Tue Sep 25 01:42:08 2018
+++ src/tools/Makefile	Mon Dec 31 08:35:15 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.196 2018/09/25 05:42:08 joerg Exp $
+#	$NetBSD: Makefile,v 1.197 2018/12/31 13:35:15 christos Exp $
 
 .include 
 .include 
@@ -173,6 +173,10 @@ SUBDIR+=	macppc-fixcoff
 SUBDIR+=	powerpc-mkbootimage
 .endif
 
+.if ${MACHINE_ARCH} == "arm"
+SUBDIR+=	arm-elf2aout
+.endif
+
 .if ${MACHINE_ARCH} == "m68k"
 SUBDIR+=	m68k-elf2aout
 .endif

Added files:

Index: src/tools/arm-elf2aout/Makefile
diff -u /dev/null src/tools/arm-elf2aout/Makefile:1.1
--- /dev/null	Mon Dec 31 08:35:16 2018
+++ src/tools/arm-elf2aout/Makefile	Mon Dec 31 08:35:16 2018
@@ -0,0 +1,17 @@
+#	$NetBSD: Makefile,v 1.1 2018/12/31 13:35:16 christos Exp $
+
+.include 
+
+HOSTPROGNAME=	${_TOOL_PREFIX}arm-elf2aout
+HOST_SRCDIR=	usr.bin/elf2aout
+HOST_CPPFLAGS=	-I${.CURDIR}
+
+.include 
+
+.if   ${TARGET_ENDIANNESS} == "1234"
+CPPFLAGS+= -DTARGET_BYTE_ORDER=LITTLE_ENDIAN
+.elif ${TARGET_ENDIANNESS} == "4321"
+CPPFLAGS+= -DTARGET_BYTE_ORDER=BIG_ENDIAN
+.endif
+
+.include "${.CURDIR}/../Makefile.host"
Index: src/tools/arm-elf2aout/a.out.h
diff -u /dev/null src/tools/arm-elf2aout/a.out.h:1.1
--- /dev/null	Mon Dec 31 08:35:16 2018
+++ src/tools/arm-elf2aout/a.out.h	Mon Dec 31 08:35:16 2018
@@ -0,0 +1,68 @@
+/*	$NetBSD: a.out.h,v 1.1 2018/12/31 13:35:16 christos Exp $	*/
+
+/*-
+ * Copyright (c) 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)a.out.h	8.1 (Berkeley) 6/2/93
+ */
+
+/*-
+ * Copyright (c) 1993 Theo de Raadt.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, IN

CVS commit: src/tools/binutils

2018-12-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec 27 16:26:53 UTC 2018

Modified Files:
src/tools/binutils: Makefile

Log Message:
explicitly disable initfini-array; we don't have it yet.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/tools/binutils/Makefile

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

Modified files:

Index: src/tools/binutils/Makefile
diff -u src/tools/binutils/Makefile:1.29 src/tools/binutils/Makefile:1.30
--- src/tools/binutils/Makefile:1.29	Tue Nov  6 20:14:19 2018
+++ src/tools/binutils/Makefile	Thu Dec 27 11:26:52 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.29 2018/11/07 01:14:19 christos Exp $
+#	$NetBSD: Makefile,v 1.30 2018/12/27 16:26:52 christos Exp $
 
 .include 
 
@@ -13,7 +13,7 @@ BRANDING?=	\
 
 CONFIGURE_ARGS=	--target=${MACHINE_GNU_PLATFORM} --disable-nls \
 		--program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \
-		--disable-werror \
+		--disable-werror --disable-initfini-array \
 		${BRANDING}
 
 build/gas/m68k-parse.c: ${GNUHOSTDIST}/gas/m68k-parse.c



CVS commit: src/tools/gcc

2018-11-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Nov 11 23:05:25 UTC 2018

Modified Files:
src/tools/gcc: gcc-version.mk

Log Message:
our GCC 6.5 is "nb4 20181109".


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tools/gcc/gcc-version.mk

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

Modified files:

Index: src/tools/gcc/gcc-version.mk
diff -u src/tools/gcc/gcc-version.mk:1.11 src/tools/gcc/gcc-version.mk:1.12
--- src/tools/gcc/gcc-version.mk:1.11	Wed Sep  5 05:03:28 2018
+++ src/tools/gcc/gcc-version.mk	Sun Nov 11 23:05:25 2018
@@ -1,9 +1,9 @@
-#	$NetBSD: gcc-version.mk,v 1.11 2018/09/05 05:03:28 mrg Exp $
+#	$NetBSD: gcc-version.mk,v 1.12 2018/11/11 23:05:25 mrg Exp $
 
 # common location for tools and native build
 
 .if ${HAVE_GCC} == 6
-NETBSD_GCC_VERSION=nb3 20180905
+NETBSD_GCC_VERSION=nb4 20181109
 .elif ${HAVE_GCC} == 7
 NETBSD_GCC_VERSION=nb1 20180905
 .endif



CVS commit: src/tools/binutils

2018-11-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov  8 02:08:35 UTC 2018

Modified Files:
src/tools/binutils: mknative-binutils

Log Message:
need global replace


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tools/binutils/mknative-binutils

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

Modified files:

Index: src/tools/binutils/mknative-binutils
diff -u src/tools/binutils/mknative-binutils:1.10 src/tools/binutils/mknative-binutils:1.11
--- src/tools/binutils/mknative-binutils:1.10	Tue Nov  6 20:14:19 2018
+++ src/tools/binutils/mknative-binutils	Wed Nov  7 21:08:35 2018
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-binutils,v 1.10 2018/11/07 01:14:19 christos Exp $
+#	$NetBSD: mknative-binutils,v 1.11 2018/11/08 02:08:35 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/binutils
@@ -96,7 +96,7 @@ get_binutils () {
 DEFS INCLUDES as_new_OBJECTS as_new_LDADD | 
 	sed	-e s/G_as_new_OBJECTS/G_OBJS/ \
 		-e s/G_as_new_LDADD=/G_OBJS+=/ \
-		-e s@config/@@ \
+		-e s@config/@@g \
 		-e 's/\.\..*a//' |
 	write_mk external/gpl3/binutils/usr.bin/gas/arch/$MACHINE_ARCH/defs.mk
 



CVS commit: src/tools/binutils

2018-11-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov  7 01:14:19 UTC 2018

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

Log Message:
Adjust for 2.31.1


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/tools/binutils/Makefile
cvs rdiff -u -r1.9 -r1.10 src/tools/binutils/mknative-binutils

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

Modified files:

Index: src/tools/binutils/Makefile
diff -u src/tools/binutils/Makefile:1.28 src/tools/binutils/Makefile:1.29
--- src/tools/binutils/Makefile:1.28	Tue May  1 15:59:46 2018
+++ src/tools/binutils/Makefile	Tue Nov  6 20:14:19 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.28 2018/05/01 19:59:46 christos Exp $
+#	$NetBSD: Makefile,v 1.29 2018/11/07 01:14:19 christos Exp $
 
 .include 
 
@@ -67,6 +67,7 @@ native-binutils: .native/.configure_done
 			--build=`${GNUHOSTDIST}/config.guess` \
 			--host=${MACHINE_GNU_PLATFORM} \
 			--target=${MACHINE_GNU_PLATFORM} \
+			--disable-initfini-array \
 			${BRANDING} \
 		)
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \

Index: src/tools/binutils/mknative-binutils
diff -u src/tools/binutils/mknative-binutils:1.9 src/tools/binutils/mknative-binutils:1.10
--- src/tools/binutils/mknative-binutils:1.9	Tue Oct  1 11:41:17 2013
+++ src/tools/binutils/mknative-binutils	Tue Nov  6 20:14:19 2018
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp $
+#	$NetBSD: mknative-binutils,v 1.10 2018/11/07 01:14:19 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/binutils
@@ -22,7 +22,7 @@ get_libbfd () {
 	{
 		getvars bfd/Makefile \
 			libbfd_la_DEPENDENCIES libbfd_la_OBJECTS DEFS \
-			INCLUDES TDEFAULTS
+			INCLUDES TDEFAULTS HAVEVECS
 	} | write_mk external/gpl3/binutils/lib/libbfd/arch/$MACHINE_ARCH/defs.mk
 
 	write_c external/gpl3/binutils/lib/libbfd/arch/$MACHINE_ARCH/bfd.h <$_TMPDIR/bfd/bfd.h
@@ -96,6 +96,7 @@ get_binutils () {
 DEFS INCLUDES as_new_OBJECTS as_new_LDADD | 
 	sed	-e s/G_as_new_OBJECTS/G_OBJS/ \
 		-e s/G_as_new_LDADD=/G_OBJS+=/ \
+		-e s@config/@@ \
 		-e 's/\.\..*a//' |
 	write_mk external/gpl3/binutils/usr.bin/gas/arch/$MACHINE_ARCH/defs.mk
 



CVS commit: src/tools

2018-10-22 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Oct 22 13:19:42 UTC 2018

Modified Files:
src/tools: Makefile.gnuhost

Log Message:
Adjust whitespace to look more like assignment than comparison. NFC


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/tools/Makefile.gnuhost

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

Modified files:

Index: src/tools/Makefile.gnuhost
diff -u src/tools/Makefile.gnuhost:1.50 src/tools/Makefile.gnuhost:1.51
--- src/tools/Makefile.gnuhost:1.50	Sun Oct 21 00:26:24 2018
+++ src/tools/Makefile.gnuhost	Mon Oct 22 13:19:42 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.gnuhost,v 1.50 2018/10/21 00:26:24 christos Exp $
+#	$NetBSD: Makefile.gnuhost,v 1.51 2018/10/22 13:19:42 maya Exp $
 #
 # Rules used when building a GNU host package.  Expects MODULE to be set.
 #
@@ -19,7 +19,7 @@
 
 # Disable use of pre-compiled headers on Darwin.
 BUILD_OSTYPE!= uname -s
-HOST_COMPILER_CLANG != if ${HOST_CC} --version | grep -q -s clang; then echo yes; else echo no; fi
+HOST_COMPILER_CLANG!= if ${HOST_CC} --version | grep -q -s clang; then echo yes; else echo no; fi
 .if ${HOST_COMPILER_CLANG} == "yes"
 HOST_CFLAGS+=-O2 -no-cpp-precomp
 .endif



CVS commit: src/tools

2018-10-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct 21 00:26:24 UTC 2018

Modified Files:
src/tools: Makefile.gnuhost

Log Message:
detect clang instead of bundling it with Darwin


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/tools/Makefile.gnuhost

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

Modified files:

Index: src/tools/Makefile.gnuhost
diff -u src/tools/Makefile.gnuhost:1.49 src/tools/Makefile.gnuhost:1.50
--- src/tools/Makefile.gnuhost:1.49	Sun Oct 14 06:23:32 2018
+++ src/tools/Makefile.gnuhost	Sat Oct 20 20:26:24 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.gnuhost,v 1.49 2018/10/14 10:23:32 martin Exp $
+#	$NetBSD: Makefile.gnuhost,v 1.50 2018/10/21 00:26:24 christos Exp $
 #
 # Rules used when building a GNU host package.  Expects MODULE to be set.
 #
@@ -19,7 +19,8 @@
 
 # Disable use of pre-compiled headers on Darwin.
 BUILD_OSTYPE!= uname -s
-.if ${BUILD_OSTYPE} == "Darwin"
+HOST_COMPILER_CLANG != if ${HOST_CC} --version | grep -q -s clang; then echo yes; else echo no; fi
+.if ${HOST_COMPILER_CLANG} == "yes"
 HOST_CFLAGS+=-O2 -no-cpp-precomp
 .endif
 



CVS commit: src/tools/gcc

2018-10-19 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Oct 19 16:16:21 UTC 2018

Modified Files:
src/tools/gcc: Makefile

Log Message:
Pass --without-isl to GCC.

We don't provide one, but if we did the build would fail. This can also
happen if there's a system isl that GCC manages to find.

>From mgorny.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/tools/gcc/Makefile

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

Modified files:

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.86 src/tools/gcc/Makefile:1.87
--- src/tools/gcc/Makefile:1.86	Tue May  1 19:59:46 2018
+++ src/tools/gcc/Makefile	Fri Oct 19 16:16:21 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.86 2018/05/01 19:59:46 christos Exp $
+#	$NetBSD: Makefile,v 1.87 2018/10/19 16:16:21 maya Exp $
 
 .include 
 
@@ -35,6 +35,7 @@ COMMON_CONFIGURE_ARGS=	--target=${MACHIN
 			--with-bugurl=http://www.NetBSD.org/Misc/send-pr.html \
 			--with-pkgversion="NetBSD ${NETBSD_GCC_VERSION}" \
 			--with-system-zlib \
+			--without-isl \
 			--disable-libstdcxx-dual-abi \
 			--enable-__cxa_atexit \
 			--enable-libstdcxx-time=rt \



CVS commit: src/tools

2018-10-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Oct 14 10:23:32 UTC 2018

Modified Files:
src/tools: Makefile.gnuhost

Log Message:
Add FLEX to the configure env, from Lloyd Parkes on tech-toolchain.
Some configure scripts seem to need both LEX and FLEX.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/tools/Makefile.gnuhost

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

Modified files:

Index: src/tools/Makefile.gnuhost
diff -u src/tools/Makefile.gnuhost:1.48 src/tools/Makefile.gnuhost:1.49
--- src/tools/Makefile.gnuhost:1.48	Tue Apr 17 10:08:54 2018
+++ src/tools/Makefile.gnuhost	Sun Oct 14 10:23:32 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.gnuhost,v 1.48 2018/04/17 10:08:54 maya Exp $
+#	$NetBSD: Makefile.gnuhost,v 1.49 2018/10/14 10:23:32 martin Exp $
 #
 # Rules used when building a GNU host package.  Expects MODULE to be set.
 #
@@ -62,6 +62,7 @@ CONFIGURE_ENV+= \
 		INSTALL=${HOST_INSTALL_FILE:Q} \
 		LDFLAGS=${HOST_LDFLAGS:Q} \
 		LEX=${LEX:Q} \
+		FLEX=${LEX:Q} \
 		M4=${TOOL_M4:Q} \
 		MAKE=${MAKE_PROGRAM:Q} \
 		PATH="${TOOLDIR}/bin:$$PATH" \



CVS commit: src/tools/file

2018-09-28 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Sep 28 14:45:16 UTC 2018

Modified Files:
src/tools/file: Makefile

Log Message:
force disable seccomp, in case it gets detected.

the configuration in this version of file is non-functional and results
in build failure if detected. The next version should be fine, but let's
ensure nobody runs into this build failure until it's imported.

reported by e3ef13f4ff44 on freenode.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tools/file/Makefile

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

Modified files:

Index: src/tools/file/Makefile
diff -u src/tools/file/Makefile:1.7 src/tools/file/Makefile:1.8
--- src/tools/file/Makefile:1.7	Sun Apr 15 08:37:33 2012
+++ src/tools/file/Makefile	Fri Sep 28 14:45:16 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2012/04/15 08:37:33 mrg Exp $
+#	$NetBSD: Makefile,v 1.8 2018/09/28 14:45:16 maya Exp $
 #
 
 GNUHOSTDIST=	${.CURDIR}/../../external/bsd/file/dist
@@ -9,7 +9,7 @@ CONFIGURE_ENV+=	CC=${HOST_CC:Q} \
 		CXX=${HOST_CXX:Q}
 
 CONFIGURE_ARGS=	--program-prefix=${_TOOL_PREFIX} --disable-shared \
-		--disable-warnings
+		--disable-warnings --disable-libseccomp
 
 .NOTPARALLEL:
 



CVS commit: src/tools/xz-include

2018-09-25 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Sep 25 17:57:33 UTC 2018

Modified Files:
src/tools/xz-include: Makefile.inc

Log Message:
Add CPPFLAGS+= -std=c99 so tools can build on systems where the
system compiler doesn't default to C99 (eg, NetBSD 6.1).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tools/xz-include/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/tools/xz-include/Makefile.inc
diff -u src/tools/xz-include/Makefile.inc:1.1 src/tools/xz-include/Makefile.inc:1.2
--- src/tools/xz-include/Makefile.inc:1.1	Tue Sep 25 08:54:58 2018
+++ src/tools/xz-include/Makefile.inc	Tue Sep 25 17:57:33 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.1 2018/09/25 08:54:58 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.2 2018/09/25 17:57:33 riz Exp $
 
 XZ_TOPLEVEL:=	${.PARSEDIR}/../../external/public-domain/xz
 
@@ -6,4 +6,6 @@ NOMAN=  # defined
 MKREPRO=no	# Native toolchain might be unable to do it
 MKNLS=no
 
+CPPFLAGS+=	-std=c99
+
 .include "${XZ_TOPLEVEL}/Makefile.inc"



CVS commit: src/tools/xz-include

2018-09-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Sep 25 11:41:35 UTC 2018

Modified Files:
src/tools/xz-include: Makefile

Log Message:
Don't include NLS for the tools build of xz.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tools/xz-include/Makefile

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

Modified files:

Index: src/tools/xz-include/Makefile
diff -u src/tools/xz-include/Makefile:1.1 src/tools/xz-include/Makefile:1.2
--- src/tools/xz-include/Makefile:1.1	Tue Sep 25 05:42:08 2018
+++ src/tools/xz-include/Makefile	Tue Sep 25 11:41:35 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2018/09/25 05:42:08 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2018/09/25 11:41:35 joerg Exp $
 
 .include 
 
@@ -8,7 +8,7 @@
 #
 .include "Makefile.inc"
 
-CONFIGURE_ARGS+=	--enable-threads=no
+CONFIGURE_ARGS+=	--enable-threads=no --disable-nls
 
 config.status: ${XZSRCDIR}/configure
 	${HOST_SH} ${XZSRCDIR}/configure ${CONFIGURE_ARGS} \



CVS commit: src/tools/xz-include

2018-09-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Sep 25 08:54:58 UTC 2018

Added Files:
src/tools/xz-include: Makefile.inc

Log Message:
Add missing Makefile.inc for xz tools.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/tools/xz-include/Makefile.inc

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

Added files:

Index: src/tools/xz-include/Makefile.inc
diff -u /dev/null src/tools/xz-include/Makefile.inc:1.1
--- /dev/null	Tue Sep 25 08:54:58 2018
+++ src/tools/xz-include/Makefile.inc	Tue Sep 25 08:54:58 2018
@@ -0,0 +1,9 @@
+#	$NetBSD: Makefile.inc,v 1.1 2018/09/25 08:54:58 joerg Exp $
+
+XZ_TOPLEVEL:=	${.PARSEDIR}/../../external/public-domain/xz
+
+NOMAN=  # defined
+MKREPRO=no	# Native toolchain might be unable to do it
+MKNLS=no
+
+.include "${XZ_TOPLEVEL}/Makefile.inc"



CVS commit: src/tools/compat

2018-09-09 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Sun Sep  9 19:17:21 UTC 2018

Modified Files:
src/tools/compat: README

Log Message:
Add instructions for building NetBSD on modern Solaris 11 hosts


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tools/compat/README

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

Modified files:

Index: src/tools/compat/README
diff -u src/tools/compat/README:1.12 src/tools/compat/README:1.13
--- src/tools/compat/README:1.12	Tue Apr  5 00:21:22 2005
+++ src/tools/compat/README	Sun Sep  9 19:17:21 2018
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.12 2005/04/05 00:21:22 jmc Exp $
+$NetBSD: README,v 1.13 2018/09/09 19:17:21 palle Exp $
 
 Special notes for cross-hosting a NetBSD build on certain platforms.  
 Only those platforms which have been tested to complete a "build.sh" run
@@ -65,6 +65,8 @@ NETBSD (earlier releases):
 
 SOLARIS:
 
+(updated instruction for Solaris 11 further below)
+
 * Tested on Solaris/x86 8 (5.8) with gcc 2.95.2 and Solaris/sparc 8 (5.8)
   with gcc 3.2 (not yet tested with SUNWspro).
 
@@ -85,3 +87,16 @@ SOLARIS:
   /usr/ucb may optionally be placed before /usr/bin, per your preference,
   but /usr/ucb *MUST NOT* be before /usr/ccs/bin or before the path to
   the host C and C++ compilers.
+
+Solaris 11:
+
+* Solaris 11.3
+ * Set PATH to /usr/xpg6/bin:/usr/xpg4/bin:/usr/bin
+ * Set HOST_CC to /usr/bin/gcc
+
+* Solaris 11.4
+ * Install gcc-5 since the default installed gcc-7 has issues when compiling 
+   toolchain version of groff (hypot())
+ * Set PATH to /usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin
+ * set HOST_CC to /usr/gcc/5/bin/gcc
+ * set HOST_CXX to /usr/gcc/5/bin/g++



CVS commit: src/tools/gcc

2018-09-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Sep  5 05:03:28 UTC 2018

Modified Files:
src/tools/gcc: gcc-version.mk

Log Message:
remove GCC 5 marker.  this is now nb3 20180905.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tools/gcc/gcc-version.mk

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

Modified files:

Index: src/tools/gcc/gcc-version.mk
diff -u src/tools/gcc/gcc-version.mk:1.10 src/tools/gcc/gcc-version.mk:1.11
--- src/tools/gcc/gcc-version.mk:1.10	Wed Mar 28 19:30:41 2018
+++ src/tools/gcc/gcc-version.mk	Wed Sep  5 05:03:28 2018
@@ -1,9 +1,9 @@
-#	$NetBSD: gcc-version.mk,v 1.10 2018/03/28 19:30:41 mrg Exp $
+#	$NetBSD: gcc-version.mk,v 1.11 2018/09/05 05:03:28 mrg Exp $
 
 # common location for tools and native build
 
-.if ${HAVE_GCC} == 5
-NETBSD_GCC_VERSION=nb2 20180327
-.elif ${HAVE_GCC} == 6
-NETBSD_GCC_VERSION=nb2 20180327
+.if ${HAVE_GCC} == 6
+NETBSD_GCC_VERSION=nb3 20180905
+.elif ${HAVE_GCC} == 7
+NETBSD_GCC_VERSION=nb1 20180905
 .endif



CVS commit: src/tools/gcc

2018-09-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Sep  5 01:20:20 UTC 2018

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

Log Message:
copy across GCC 6.4 mknative-gcc into mknative-gcc.old.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tools/gcc/mknative-gcc.old

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

Modified files:

Index: src/tools/gcc/mknative-gcc.old
diff -u src/tools/gcc/mknative-gcc.old:1.5 src/tools/gcc/mknative-gcc.old:1.6
--- src/tools/gcc/mknative-gcc.old:1.5	Wed Oct  4 21:42:20 2017
+++ src/tools/gcc/mknative-gcc.old	Wed Sep  5 01:20:20 2018
@@ -1,10 +1,10 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc.old,v 1.5 2017/10/04 21:42:20 christos Exp $
+#	$NetBSD: mknative-gcc.old,v 1.6 2018/09/05 01:20:20 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
 #
-# This version is for GCC 5.3
+# This version is for GCC 6.4
 
 # initialise
 
@@ -71,7 +71,9 @@ get_libgcc () {
 	cd $_TMPDIR/$_PLATFORM/libgcc
 	{
 		getvars $_PLATFORM/libgcc/Makefile \
-			INCLUDES LIB2ADD LIB2ADDEH LIB2ADD_ST \
+			INCLUDES \
+			INTERNAL_CFLAGS \
+			LIB2ADD LIB2ADDEH LIB2ADD_ST \
 			LIB1ASMFUNCS LIB1ASMSRC \
 			LIB2_DIVMOD_FUNCS LIB2FUNCS_ST \
 			LIB2FUNCS_EXTRA \
@@ -221,6 +223,9 @@ get_libstdcxx_v3 () {
 		<$_TMPDIR/$_PLATFORM/libstdc++-v3/include/gstdint.h
 
 	{
+		getvars $_PLATFORM/libstdc++-v3/Makefile \
+			port_specific_symbol_files
+
 		# libsupc++
 		getvars $_PLATFORM/libstdc++-v3/libsupc++/Makefile \
 			sources | sed 's/^G_sources=/G_LIBSUPCXX_SOURCES=/'
@@ -303,7 +308,7 @@ get_gcc () {
 			-e 's#build/##g'
 		getvars gcc/Makefile \
 			ALL_CFLAGS ALL_CPPFLAGS C_AND_OBJC_OBJS C_OBJS CCCP_OBJS \
-			GCC_OBJS GCOV_OBJS GXX_OBJS GTM_H PROTO_OBJS ${_extravars1} \
+			GCC_OBJS GCOV_OBJS GCOV_DUMP_OBJS GXX_OBJS GTM_H PROTO_OBJS ${_extravars1} \
 			INCLUDES md_file OBJC_OBJS OBJS out_file version \
 			BUILD_PREFIX RTL_H RTL_BASE_H TREE_H ${_hconfig_h} BASIC_BLOCK_H GCC_H \
 			GGC_H \
@@ -366,10 +371,9 @@ __EOF__
 		if [ "${f}" = "configargs" ]
 		then
 			_srcquoted=$(echo "$_SRC" | sed 's/\//\\\//g')
-			ex <<__EOF__ $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h
-/static const char configuration_arguments/ s/$_srcquoted/\/usr\/src/g
-wq
-__EOF__
+			sed -i -E -e "s,$_srcquoted,/usr/src,g" \
+  -e 's/--build=[^ ]+ --host=([^ ]+)/--build=\1 --host=\1/' \
+$_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h
 		fi
 	done
 



CVS commit: src/tools/gcc

2018-09-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep  4 22:57:25 UTC 2018

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

Log Message:
also pullout INTERNAL_CFLAGS for the libgcc build, where it may have
-DHAVE_CC_TLS defined on the command line.  (we already collect all
the other components.)


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.93 src/tools/gcc/mknative-gcc:1.94
--- src/tools/gcc/mknative-gcc:1.93	Tue Sep  4 06:40:37 2018
+++ src/tools/gcc/mknative-gcc	Tue Sep  4 22:57:25 2018
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.93 2018/09/04 06:40:37 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.94 2018/09/04 22:57:25 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -71,7 +71,9 @@ get_libgcc () {
 	cd $_TMPDIR/$_PLATFORM/libgcc
 	{
 		getvars $_PLATFORM/libgcc/Makefile \
-			INCLUDES LIB2ADD LIB2ADDEH LIB2ADD_ST \
+			INCLUDES \
+			INTERNAL_CFLAGS \
+			LIB2ADD LIB2ADDEH LIB2ADD_ST \
 			LIB1ASMFUNCS LIB1ASMSRC \
 			LIB2_DIVMOD_FUNCS LIB2FUNCS_ST \
 			LIB2FUNCS_EXTRA \



CVS commit: src/tools/gcc

2018-09-03 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep  4 06:40:37 UTC 2018

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

Log Message:
in configargs.h, as well as normalising to /usr/src, normalise the
--build to the same as the --host, so that it never changes based
upon the host you ran mknative on.  (some recent changes are only
because i updated a system from netbsd-7 to netbsd-8.  this will
avoid that in the future.)


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.92 src/tools/gcc/mknative-gcc:1.93
--- src/tools/gcc/mknative-gcc:1.92	Tue Feb  6 07:04:01 2018
+++ src/tools/gcc/mknative-gcc	Tue Sep  4 06:40:37 2018
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gcc,v 1.92 2018/02/06 07:04:01 mrg Exp $
+#	$NetBSD: mknative-gcc,v 1.93 2018/09/04 06:40:37 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -369,10 +369,9 @@ __EOF__
 		if [ "${f}" = "configargs" ]
 		then
 			_srcquoted=$(echo "$_SRC" | sed 's/\//\\\//g')
-			ex <<__EOF__ $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h
-/static const char configuration_arguments/ s/$_srcquoted/\/usr\/src/g
-wq
-__EOF__
+			sed -i -E -e "s,$_srcquoted,/usr/src,g" \
+  -e 's/--build=[^ ]+ --host=([^ ]+)/--build=\1 --host=\1/' \
+$_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h
 		fi
 	done
 



CVS commit: src/tools/compat

2018-08-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 30 12:05:35 UTC 2018

Modified Files:
src/tools/compat: Makefile compat_defs.h configure configure.ac
nbtool_config.h.in

Log Message:
deal with getsubopt and strncasecmp (needed by mdocml)


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/tools/compat/Makefile
cvs rdiff -u -r1.113 -r1.114 src/tools/compat/compat_defs.h
cvs rdiff -u -r1.92 -r1.93 src/tools/compat/configure
cvs rdiff -u -r1.93 -r1.94 src/tools/compat/configure.ac
cvs rdiff -u -r1.46 -r1.47 src/tools/compat/nbtool_config.h.in

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

Modified files:

Index: src/tools/compat/Makefile
diff -u src/tools/compat/Makefile:1.85 src/tools/compat/Makefile:1.86
--- src/tools/compat/Makefile:1.85	Thu Aug 16 08:03:36 2018
+++ src/tools/compat/Makefile	Thu Aug 30 08:05:34 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.85 2018/08/16 12:03:36 christos Exp $
+#	$NetBSD: Makefile,v 1.86 2018/08/30 12:05:34 christos Exp $
 
 HOSTLIB=	nbcompat
 
@@ -7,7 +7,7 @@ HOSTLIB=	nbcompat
 SRCS=		atoll.c basename.c cdbr.c cdbw.c dirname.c \
 		dprintf.c fgetln.c flock.c fparseln.c fpurge.c \
 		getcap.c getline.c getmode.c getopt_long.c gettemp.c \
-		heapsort.c \
+		heapsort.c getsubopt.c \
 		issetugid.c lchflags.c lchmod.c lchown.c libyywrap.c \
 		md2.c md2hl.c md4c.c md4hl.c md5c.c md5hl.c \
 		mi_vector_hash.c mkdtemp.c \

Index: src/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.113 src/tools/compat/compat_defs.h:1.114
--- src/tools/compat/compat_defs.h:1.113	Sat Aug 11 12:24:59 2018
+++ src/tools/compat/compat_defs.h	Thu Aug 30 08:05:34 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_defs.h,v 1.113 2018/08/11 16:24:59 christos Exp $	*/
+/*	$NetBSD: compat_defs.h,v 1.114 2018/08/30 12:05:34 christos Exp $	*/
 
 #ifndef	__NETBSD_COMPAT_DEFS_H__
 #define	__NETBSD_COMPAT_DEFS_H__
@@ -255,6 +255,10 @@ extern char *optarg;
 extern int optind, opterr, optopt;
 #endif
 
+#if !HAVE_DECL_GETSUBOPT
+int getsubopt(char **, char * const *, char **);
+#endif
+
 #if !HAVE_DECL_DIRNAME
 char *dirname(char *);
 #endif
@@ -497,6 +501,9 @@ size_t		strnlen(const char *, size_t);
 #if !HAVE_DECL_STRCASECMP
 int		strcasecmp(const char *, const char *);
 #endif
+#if !HAVE_DECL_STRNCASECMP
+int		strncasecmp(const char *, const char *, size_t);
+#endif
 #if !HAVE_DECL_LCHFLAGS
 int		lchflags(const char *, unsigned long);
 #endif

Index: src/tools/compat/configure
diff -u src/tools/compat/configure:1.92 src/tools/compat/configure:1.93
--- src/tools/compat/configure:1.92	Thu Aug 16 08:03:36 2018
+++ src/tools/compat/configure	Thu Aug 30 08:05:34 2018
@@ -4717,6 +4717,19 @@ fi
 cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_REALLOCARR $ac_have_decl
 _ACEOF
+ac_fn_c_check_decl "$LINENO" "getsubopt" "ac_cv_have_decl_getsubopt" "
+#include 
+
+"
+if test "x$ac_cv_have_decl_getsubopt" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETSUBOPT $ac_have_decl
+_ACEOF
 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "
 #include 
 

Index: src/tools/compat/configure.ac
diff -u src/tools/compat/configure.ac:1.93 src/tools/compat/configure.ac:1.94
--- src/tools/compat/configure.ac:1.93	Thu Aug 16 08:03:36 2018
+++ src/tools/compat/configure.ac	Thu Aug 30 08:05:34 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: configure.ac,v 1.93 2018/08/16 12:03:36 christos Exp $
+#	$NetBSD: configure.ac,v 1.94 2018/08/30 12:05:34 christos Exp $
 #
 # Autoconf definition file for libnbcompat.
 #
@@ -145,7 +145,7 @@ AC_CHECK_DECLS([asprintf, asnprintf, vas
 #include 
 ])
 
-AC_CHECK_DECLS([atoll, heapsort, mkdtemp, mkstemp, reallocarr,
+AC_CHECK_DECLS([atoll, heapsort, mkdtemp, mkstemp, reallocarr, getsubopt,
 	setenv, strtoi, strtoll, strtou, setprogname, getprogname],,, [
 #include 
 ])

Index: src/tools/compat/nbtool_config.h.in
diff -u src/tools/compat/nbtool_config.h.in:1.46 src/tools/compat/nbtool_config.h.in:1.47
--- src/tools/compat/nbtool_config.h.in:1.46	Thu Aug 16 08:03:36 2018
+++ src/tools/compat/nbtool_config.h.in	Thu Aug 30 08:05:34 2018
@@ -1,6 +1,6 @@
 /* nbtool_config.h.in.  Generated from configure.ac by autoheader.  */
 
-/*  $NetBSD: nbtool_config.h.in,v 1.46 2018/08/16 12:03:36 christos Exp $*/
+/*  $NetBSD: nbtool_config.h.in,v 1.47 2018/08/30 12:05:34 christos Exp $*/
  
 #ifndef __NETBSD_NBTOOL_CONFIG_H__
 #define __NETBSD_NBTOOL_CONFIG_H__
@@ -154,6 +154,10 @@
don't. */
 #undef HAVE_DECL_GETPROGNAME
 
+/* Define to 1 if you have the declaration of `getsubopt', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETSUBOPT
+
 /* Define to 1 if you have the declaration of `gid_from_group', and to 0 if
you don't. */
 #undef HAVE_DECL_GID_FROM_GROUP



CVS commit: src/tools/lex

2018-08-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 23 06:21:37 UTC 2018

Modified Files:
src/tools/lex: Makefile

Log Message:
PR/53544: Add a dependency on the Makefile to fix incremental builds.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tools/lex/Makefile

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

Modified files:

Index: src/tools/lex/Makefile
diff -u src/tools/lex/Makefile:1.11 src/tools/lex/Makefile:1.12
--- src/tools/lex/Makefile:1.11	Mon Aug 20 06:27:32 2018
+++ src/tools/lex/Makefile	Thu Aug 23 02:21:37 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2018/08/20 10:27:32 christos Exp $
+#	$NetBSD: Makefile,v 1.12 2018/08/23 06:21:37 christos Exp $
 
 HOSTPROGNAME=	${_TOOL_PREFIX}lex
 HOST_SRCDIR=	external/bsd/flex/bin
@@ -19,5 +19,6 @@ parse.c: __BUILD
 parse.h: __BUILD
 
 scan.c: parse.h
+parse.h: Makefile
 
 CLEANFILES+=scan.c parse.c parse.h



  1   2   3   4   5   6   >