CVS commit: src/external/bsd/elftoolchain/dist/common

2021-04-29 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Thu Apr 29 17:38:08 UTC 2021

Modified Files:
src/external/bsd/elftoolchain/dist/common: elfdefinitions.h

Log Message:
Add a version control system marker.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/external/bsd/elftoolchain/dist/common/elfdefinitions.h

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

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/elfdefinitions.h
diff -u src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.6 src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.7
--- src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.6	Thu Apr  8 19:37:43 2021
+++ src/external/bsd/elftoolchain/dist/common/elfdefinitions.h	Thu Apr 29 17:38:08 2021
@@ -1,3 +1,5 @@
+/*	$NetBSD: elfdefinitions.h,v 1.7 2021/04/29 17:38:08 jkoshy Exp $	*/
+
 /*-
  * Copyright (c) 2010,2021 Joseph Koshy
  * All rights reserved.



CVS commit: src/external/bsd/elftoolchain/dist/common

2021-04-24 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Sat Apr 24 09:42:00 UTC 2021

Removed Files:
src/external/bsd/elftoolchain/dist/common: native-elf-format
os.Linux.mk

Log Message:
Remove files that no longer exist upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 \
src/external/bsd/elftoolchain/dist/common/native-elf-format \
src/external/bsd/elftoolchain/dist/common/os.Linux.mk

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



CVS commit: src

2021-04-09 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Fri Apr  9 20:49:05 UTC 2021

Modified Files:
src/external/bsd: Makefile
src/lib: Makefile

Log Message:
Avoid duplicate directory traversals when building Elftoolchain sources.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/external/bsd/Makefile
cvs rdiff -u -r1.290 -r1.291 src/lib/Makefile

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

Modified files:

Index: src/external/bsd/Makefile
diff -u src/external/bsd/Makefile:1.71 src/external/bsd/Makefile:1.72
--- src/external/bsd/Makefile:1.71	Mon Jun 15 01:57:31 2020
+++ src/external/bsd/Makefile	Fri Apr  9 20:49:05 2021
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.71 2020/06/15 01:57:31 christos Exp $
+#	$NetBSD: Makefile,v 1.72 2021/04/09 20:49:05 jkoshy Exp $
 
 .include 
 
-SUBDIR=	acpica am-utils bc byacc cron dhcpcd ekermit elftosb \
-	fetch file flex jemalloc less \
+SUBDIR=	acpica am-utils bc byacc cron dhcpcd elftoolchain/common \
+	ekermit elftosb fetch file flex jemalloc less \
 	libarchive libevent libfido2 liblzf libpcap mdocml \
 	ntp openresolv tcpdump tmux top tre wpa
 

Index: src/lib/Makefile
diff -u src/lib/Makefile:1.290 src/lib/Makefile:1.291
--- src/lib/Makefile:1.290	Thu Apr  8 08:10:30 2021
+++ src/lib/Makefile	Fri Apr  9 20:49:05 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.290 2021/04/08 08:10:30 jkoshy Exp $
+#	$NetBSD: Makefile,v 1.291 2021/04/09 20:49:05 jkoshy Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include 
@@ -62,7 +62,7 @@ SUBDIR+=	../external/bsd/am-utils/lib
 
 SUBDIR+=	../external/bsd/flex/lib
 SUBDIR+=	../external/bsd/tre/lib
-SUBDIR+=	../external/bsd/elftoolchain	# libelf and libdwarf
+SUBDIR+=	../external/bsd/elftoolchain/lib
 SUBDIR+=	../external/bsd/liblzf/lib
 SUBDIR+=	../external/bsd/libpcap/lib
 
@@ -118,7 +118,6 @@ SUBDIR+=	../external/public-domain/xz/li
 SUBDIR+=	../crypto/external/bsd/netpgp/libmj
 SUBDIR+=	../crypto/external/bsd/netpgp/lib/verify # depends on libz
 SUBDIR+=	../external/bsd/blocklist/lib		# depends on libpthread
-SUBDIR+=	../external/bsd/elftoolchain/lib/libdwarf # depends on libelf
 SUBDIR+=	../external/mit/lua/lib # depends on libm
 SUBDIR+=	../external/public-domain/sqlite/lib # depends on libm
 SUBDIR+=	libcurses	# depends on libterminfo



CVS commit: src/external/bsd/elftoolchain/dist/common

2021-04-08 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Thu Apr  8 19:37:43 UTC 2021

Modified Files:
src/external/bsd/elftoolchain/dist/common: elfdefinitions.h

Log Message:
Update Elftoolchain 'common/elfdefinitions.h' to upstream r3943.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/bsd/elftoolchain/dist/common/elfdefinitions.h

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

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/elfdefinitions.h
diff -u src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.5 src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.6
--- src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.5	Sun Mar  7 14:53:59 2021
+++ src/external/bsd/elftoolchain/dist/common/elfdefinitions.h	Thu Apr  8 19:37:43 2021
@@ -1,7 +1,5 @@
-/*	$NetBSD: elfdefinitions.h,v 1.5 2021/03/07 14:53:59 jkoshy Exp $	*/
-
 /*-
- * Copyright (c) 2010 Joseph Koshy
+ * Copyright (c) 2010,2021 Joseph Koshy
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,2969 +23,12 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * Id: elfdefinitions.h 3916 2020-12-12 11:26:53Z jkoshy
- */
-
-/*
- * These definitions are based on:
- * - The public specification of the ELF format as defined in the
- *   October 2009 draft of System V ABI.
- *   See: http://www.sco.com/developers/gabi/latest/ch4.intro.html
- * - The May 1998 (version 1.5) draft of "The ELF-64 object format".
- * - Processor-specific ELF ABI definitions for sparc, i386, amd64, mips,
- *   ia64, powerpc, and RISC-V processors.
- * - The "Linkers and Libraries Guide", from Sun Microsystems.
+ * Id: elfdefinitions.h 3942 2021-04-05 12:16:03Z jkoshy
  */
 
 #ifndef _ELFDEFINITIONS_H_
 #define _ELFDEFINITIONS_H_
 
-#include 
-
-/*
- * Types of capabilities.
- */
-
-#define	_ELF_DEFINE_CAPABILITIES()\
-_ELF_DEFINE_CA(CA_SUNW_NULL,	0,	"ignored")		\
-_ELF_DEFINE_CA(CA_SUNW_HW_1,	1,	"hardware capability")	\
-_ELF_DEFINE_CA(CA_SUNW_SW_1,	2,	"software capability")
-
-#undef	_ELF_DEFINE_CA
-#define	_ELF_DEFINE_CA(N, V, DESCR)	N = V ,
-enum {
-	_ELF_DEFINE_CAPABILITIES()
-	CA__LAST__
-};
-
-/*
- * Flags used with dynamic linking entries.
- */
-
-#define	_ELF_DEFINE_DYN_FLAGS()	\
-_ELF_DEFINE_DF(DF_ORIGIN,   0x1,			\
-	"object being loaded may refer to $ORIGIN")		\
-_ELF_DEFINE_DF(DF_SYMBOLIC, 0x2,			\
-	"search library for references before executable")	\
-_ELF_DEFINE_DF(DF_TEXTREL,  0x4,			\
-	"relocation entries may modify text segment")		\
-_ELF_DEFINE_DF(DF_BIND_NOW, 0x8,			\
-	"process relocation entries at load time")		\
-_ELF_DEFINE_DF(DF_STATIC_TLS,   0x10,			\
-	"uses static thread-local storage")			\
-_ELF_DEFINE_DF(DF_1_BIND_NOW,   0x1,			\
-	"process relocation entries at load time")		\
-_ELF_DEFINE_DF(DF_1_GLOBAL, 0x2,			\
-	"unused")		\
-_ELF_DEFINE_DF(DF_1_GROUP,  0x4,			\
-	"object is a member of a group")			\
-_ELF_DEFINE_DF(DF_1_NODELETE,   0x8,			\
-	"object cannot be deleted from a process")		\
-_ELF_DEFINE_DF(DF_1_LOADFLTR,   0x10,			\
-	"immediate load filtees")\
-_ELF_DEFINE_DF(DF_1_INITFIRST,  0x20,			\
-	"initialize object first")\
-_ELF_DEFINE_DF(DF_1_NOOPEN, 0x40,			\
-	"disallow dlopen()")	\
-_ELF_DEFINE_DF(DF_1_ORIGIN, 0x80,			\
-	"object being loaded may refer to $ORIGIN")		\
-_ELF_DEFINE_DF(DF_1_DIRECT, 0x100,			\
-	"direct bindings enabled")\
-_ELF_DEFINE_DF(DF_1_INTERPOSE,  0x400,			\
-	"object is interposer")	\
-_ELF_DEFINE_DF(DF_1_NODEFLIB,   0x800,			\
-	"ignore default library search path")			\
-_ELF_DEFINE_DF(DF_1_NODUMP, 0x1000,			\
-	"disallow dldump()")	\
-_ELF_DEFINE_DF(DF_1_CONFALT,0x2000,			\
-	"object is a configuration alternative")		\
-_ELF_DEFINE_DF(DF_1_ENDFILTEE,  0x4000,			\
-	"filtee terminates filter search")			\
-_ELF_DEFINE_DF(DF_1_DISPRELDNE, 0x8000,			\
-	"displacement relocation done")\
-_ELF_DEFINE_DF(DF_1_DISPRELPND, 0x1,			\
-	"displacement relocation pending")
-#undef	_ELF_DEFINE_DF
-#define	_ELF_DEFINE_DF(N, V, DESCR)	N = V ,
-enum {
-	_ELF_DEFINE_DYN_FLAGS()
-	DF__LAST__
-};
-
-
-/*
- * Dynamic linking entry types.
- */
-
-#define	_ELF_DEFINE_DYN_TYPES()		\
-_ELF_DEFINE_DT(DT_NULL, 0, "end of array")			\
-_ELF_DEFINE_DT(DT_NEEDED,   1, "names a needed library")	\
-_ELF_DEFINE_DT(DT_PLTRELSZ, 2,	\
-	"size in bytes of associated relocation entries")		\
-_ELF_DEFINE_DT

CVS commit: src/lib

2021-04-08 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Thu Apr  8 08:10:30 UTC 2021

Modified Files:
src/lib: Makefile

Log Message:
Redo r1.288: traverse the complete imported Elftoolchain tree during a build.


To generate a diff of this commit:
cvs rdiff -u -r1.289 -r1.290 src/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/lib/Makefile
diff -u src/lib/Makefile:1.289 src/lib/Makefile:1.290
--- src/lib/Makefile:1.289	Tue Apr  6 21:13:04 2021
+++ src/lib/Makefile	Thu Apr  8 08:10:30 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.289 2021/04/06 21:13:04 jkoshy Exp $
+#	$NetBSD: Makefile,v 1.290 2021/04/08 08:10:30 jkoshy Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include 
@@ -62,7 +62,7 @@ SUBDIR+=	../external/bsd/am-utils/lib
 
 SUBDIR+=	../external/bsd/flex/lib
 SUBDIR+=	../external/bsd/tre/lib
-SUBDIR+=	../external/bsd/elftoolchain/lib/libelf
+SUBDIR+=	../external/bsd/elftoolchain	# libelf and libdwarf
 SUBDIR+=	../external/bsd/liblzf/lib
 SUBDIR+=	../external/bsd/libpcap/lib
 



CVS commit: src/external/bsd/elftoolchain

2021-04-07 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Wed Apr  7 20:32:55 UTC 2021

Modified Files:
src/external/bsd/elftoolchain: Makefile

Log Message:
Traverse the Elftoolchain 'common' module before
the rest of the imported hierarchy.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/elftoolchain/Makefile

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

Modified files:

Index: src/external/bsd/elftoolchain/Makefile
diff -u src/external/bsd/elftoolchain/Makefile:1.2 src/external/bsd/elftoolchain/Makefile:1.3
--- src/external/bsd/elftoolchain/Makefile:1.2	Tue Apr  6 19:44:24 2021
+++ src/external/bsd/elftoolchain/Makefile	Wed Apr  7 20:32:54 2021
@@ -1,5 +1,6 @@
-# $NetBSD: Makefile,v 1.2 2021/04/06 19:44:24 jkoshy Exp $
+# $NetBSD: Makefile,v 1.3 2021/04/07 20:32:54 jkoshy Exp $
 SUBDIR=		common
+SUBDIR+=	.WAIT		# 'common' should be processed first.
 SUBDIR+=	lib
 
 .include 



CVS commit: src/external/bsd/elftoolchain/lib

2021-04-07 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Wed Apr  7 20:31:16 UTC 2021

Modified Files:
src/external/bsd/elftoolchain/lib: Makefile

Log Message:
Ensure that the 'libelf' directory is traversed before 'libdwarf'.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/elftoolchain/lib/Makefile

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

Modified files:

Index: src/external/bsd/elftoolchain/lib/Makefile
diff -u src/external/bsd/elftoolchain/lib/Makefile:1.1 src/external/bsd/elftoolchain/lib/Makefile:1.2
--- src/external/bsd/elftoolchain/lib/Makefile:1.1	Sun Mar  9 16:58:04 2014
+++ src/external/bsd/elftoolchain/lib/Makefile	Wed Apr  7 20:31:16 2021
@@ -1,3 +1,6 @@
-#	$NetBSD: Makefile,v 1.1 2014/03/09 16:58:04 christos Exp $
-SUBDIR=	libelf libdwarf
+#	$NetBSD: Makefile,v 1.2 2021/04/07 20:31:16 jkoshy Exp $
+SUBDIR=		libelf
+SUBDIR+=	.WAIT		# Process 'libelf' before 'libdwarf'.
+SUBDIR+=	libdwarf
+
 .include 



CVS commit: src/lib

2021-04-06 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Tue Apr  6 21:13:04 UTC 2021

Modified Files:
src/lib: Makefile

Log Message:
Attempt to unbreak the build by reverting r1.288.


To generate a diff of this commit:
cvs rdiff -u -r1.288 -r1.289 src/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/lib/Makefile
diff -u src/lib/Makefile:1.288 src/lib/Makefile:1.289
--- src/lib/Makefile:1.288	Tue Apr  6 20:13:43 2021
+++ src/lib/Makefile	Tue Apr  6 21:13:04 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.288 2021/04/06 20:13:43 jkoshy Exp $
+#	$NetBSD: Makefile,v 1.289 2021/04/06 21:13:04 jkoshy Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include 
@@ -62,7 +62,7 @@ SUBDIR+=	../external/bsd/am-utils/lib
 
 SUBDIR+=	../external/bsd/flex/lib
 SUBDIR+=	../external/bsd/tre/lib
-SUBDIR+=	../external/bsd/elftoolchain  # libelf and libdwarf
+SUBDIR+=	../external/bsd/elftoolchain/lib/libelf
 SUBDIR+=	../external/bsd/liblzf/lib
 SUBDIR+=	../external/bsd/libpcap/lib
 
@@ -118,6 +118,7 @@ SUBDIR+=	../external/public-domain/xz/li
 SUBDIR+=	../crypto/external/bsd/netpgp/libmj
 SUBDIR+=	../crypto/external/bsd/netpgp/lib/verify # depends on libz
 SUBDIR+=	../external/bsd/blocklist/lib		# depends on libpthread
+SUBDIR+=	../external/bsd/elftoolchain/lib/libdwarf # depends on libelf
 SUBDIR+=	../external/mit/lua/lib # depends on libm
 SUBDIR+=	../external/public-domain/sqlite/lib # depends on libm
 SUBDIR+=	libcurses	# depends on libterminfo



CVS commit: src/lib

2021-04-06 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Tue Apr  6 20:13:43 UTC 2021

Modified Files:
src/lib: Makefile

Log Message:
Traverse the complete imported Elftoolchain tree during a build.


To generate a diff of this commit:
cvs rdiff -u -r1.287 -r1.288 src/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/lib/Makefile
diff -u src/lib/Makefile:1.287 src/lib/Makefile:1.288
--- src/lib/Makefile:1.287	Sun Mar  7 15:09:12 2021
+++ src/lib/Makefile	Tue Apr  6 20:13:43 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.287 2021/03/07 15:09:12 christos Exp $
+#	$NetBSD: Makefile,v 1.288 2021/04/06 20:13:43 jkoshy Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include 
@@ -62,7 +62,7 @@ SUBDIR+=	../external/bsd/am-utils/lib
 
 SUBDIR+=	../external/bsd/flex/lib
 SUBDIR+=	../external/bsd/tre/lib
-SUBDIR+=	../external/bsd/elftoolchain/lib/libelf
+SUBDIR+=	../external/bsd/elftoolchain  # libelf and libdwarf
 SUBDIR+=	../external/bsd/liblzf/lib
 SUBDIR+=	../external/bsd/libpcap/lib
 
@@ -118,7 +118,6 @@ SUBDIR+=	../external/public-domain/xz/li
 SUBDIR+=	../crypto/external/bsd/netpgp/libmj
 SUBDIR+=	../crypto/external/bsd/netpgp/lib/verify # depends on libz
 SUBDIR+=	../external/bsd/blocklist/lib		# depends on libpthread
-SUBDIR+=	../external/bsd/elftoolchain/lib/libdwarf # depends on libelf
 SUBDIR+=	../external/mit/lua/lib # depends on libm
 SUBDIR+=	../external/public-domain/sqlite/lib # depends on libm
 SUBDIR+=	libcurses	# depends on libterminfo



CVS commit: src/external/bsd/elftoolchain

2021-04-06 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Tue Apr  6 19:44:24 UTC 2021

Modified Files:
src/external/bsd/elftoolchain: Makefile

Log Message:
Mirror upstream build steps: traverse 'common' before traversing 'lib'.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/elftoolchain/Makefile

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

Modified files:

Index: src/external/bsd/elftoolchain/Makefile
diff -u src/external/bsd/elftoolchain/Makefile:1.1 src/external/bsd/elftoolchain/Makefile:1.2
--- src/external/bsd/elftoolchain/Makefile:1.1	Sun Mar  9 16:58:03 2014
+++ src/external/bsd/elftoolchain/Makefile	Tue Apr  6 19:44:24 2021
@@ -1,3 +1,5 @@
-# $NetBSD: Makefile,v 1.1 2014/03/09 16:58:03 christos Exp $
-SUBDIR=lib
+# $NetBSD: Makefile,v 1.2 2021/04/06 19:44:24 jkoshy Exp $
+SUBDIR=		common
+SUBDIR+=	lib
+
 .include 



CVS commit: src/external/bsd/elftoolchain/common

2021-04-06 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Tue Apr  6 19:40:20 UTC 2021

Added Files:
src/external/bsd/elftoolchain/common: Makefile
src/external/bsd/elftoolchain/common/sys: Makefile

Log Message:
Prepare for  and  to be installed
into ${DESTDIR}/usr/include.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/elftoolchain/common/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/elftoolchain/common/sys/Makefile

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

Added files:

Index: src/external/bsd/elftoolchain/common/Makefile
diff -u /dev/null src/external/bsd/elftoolchain/common/Makefile:1.1
--- /dev/null	Tue Apr  6 19:40:20 2021
+++ src/external/bsd/elftoolchain/common/Makefile	Tue Apr  6 19:40:19 2021
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1 2021/04/06 19:40:19 jkoshy Exp $
+
+.include 
+
+TOP=	${.CURDIR}/../dist
+SRCDIR=	${TOP}/common
+
+.PATH:	${SRCDIR}
+
+SUBDIR=		sys
+
+INCS=		elfdefinitions.h
+INCSDIR=	/usr/include
+
+.PHONY:	all clean clobber depend obj
+
+all depend:
+
+clean clobber:
+	rm -f ${CLEANFILES}
+
+cleandepend:
+	rm -f ${.OBJDIR}/.depend
+
+.include 
+.include 

Index: src/external/bsd/elftoolchain/common/sys/Makefile
diff -u /dev/null src/external/bsd/elftoolchain/common/sys/Makefile:1.1
--- /dev/null	Tue Apr  6 19:40:20 2021
+++ src/external/bsd/elftoolchain/common/sys/Makefile	Tue Apr  6 19:40:19 2021
@@ -0,0 +1,28 @@
+# $NetBSD: Makefile,v 1.1 2021/04/06 19:40:19 jkoshy Exp $
+
+.include 
+
+TOP=	${.CURDIR}/../../dist
+SRCDIR=	${TOP}/common/sys
+
+.PATH:	${SRCDIR}
+
+INCS=		elfdefinitions.h
+INCSDIR=	/usr/include/sys
+
+elfdefinitions.h:	elfdefinitions.m4 elfconstants.m4
+	${TOOL_M4} -I${SRCDIR} -D SRCDIR=${SRCDIR} ${M4FLAGS} \
+		elfdefinitions.m4 > ${.TARGET}
+
+.PHONY:	all clean clobber depend
+
+all depend:	elfdefinitions.h
+
+clean clobber:
+	rm -f ${INCS}
+
+cleandepend:
+	rm -f ${.OBJDIR}/.depend
+
+.include 
+.include 



CVS commit: src/external/bsd/elftoolchain/dist/common

2021-04-06 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Tue Apr  6 19:28:26 UTC 2021

Modified Files:
src/external/bsd/elftoolchain/dist/common: Makefile

Log Message:
Sync with upstream r3943.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/elftoolchain/dist/common/Makefile

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

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/Makefile
diff -u src/external/bsd/elftoolchain/dist/common/Makefile:1.2 src/external/bsd/elftoolchain/dist/common/Makefile:1.3
--- src/external/bsd/elftoolchain/dist/common/Makefile:1.2	Thu Nov 26 21:52:00 2020
+++ src/external/bsd/elftoolchain/dist/common/Makefile	Tue Apr  6 19:28:25 2021
@@ -1,7 +1,9 @@
-# Id: Makefile 3594 2018-04-11 18:26:50Z jkoshy
+# Id: Makefile 3938 2021-04-04 18:16:18Z jkoshy
 
 TOP=	..
 
+SUBDIR=		sys
+
 INCS=		elfdefinitions.h
 INCSDIR=	/usr/include
 
@@ -16,3 +18,4 @@ cleandepend:
 	rm -f ${.OBJDIR}/.depend
 
 .include "${TOP}/mk/elftoolchain.inc.mk"
+.include "${TOP}/mk/elftoolchain.subdir.mk"



CVS commit: src/external/bsd/elftoolchain/dist/common/sys

2021-04-06 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Tue Apr  6 18:38:04 UTC 2021

Added Files:
src/external/bsd/elftoolchain/dist/common/sys: Makefile elfconstants.m4
elfdefinitions.m4

Log Message:
Add files present in upstream revision r3943.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/elftoolchain/dist/common/sys/Makefile \
src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4 \
src/external/bsd/elftoolchain/dist/common/sys/elfdefinitions.m4

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

Added files:

Index: src/external/bsd/elftoolchain/dist/common/sys/Makefile
diff -u /dev/null src/external/bsd/elftoolchain/dist/common/sys/Makefile:1.1
--- /dev/null	Tue Apr  6 18:38:04 2021
+++ src/external/bsd/elftoolchain/dist/common/sys/Makefile	Tue Apr  6 18:38:04 2021
@@ -0,0 +1,25 @@
+# Id: Makefile 3943 2021-04-05 17:03:34Z jkoshy
+
+TOP=	../..
+
+SRCS=		elfdefinitions.m4 elfconstants.m4
+INCS=		elfdefinitions.h
+INCSDIR=	/usr/include/sys
+
+CLEANFILES=	${INCS}
+
+.PHONY:	all clean clobber depend obj
+
+all:	${INCS}
+
+elfdefinitions.h:	elfdefinitions.m4 elfconstants.m4
+	m4 -I${.CURDIR} -D SRCDIR=${.CURDIR} ${M4FLAGS} \
+		elfdefinitions.m4 > ${.TARGET}
+
+depend cleandepend:
+
+clean clobber:
+	rm -f ${CLEANFILES}
+
+.include "${TOP}/mk/elftoolchain.inc.mk"
+.include "${TOP}/mk/elftoolchain.m4.mk"
Index: src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4
diff -u /dev/null src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4:1.1
--- /dev/null	Tue Apr  6 18:38:04 2021
+++ src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4	Tue Apr  6 18:38:04 2021
@@ -0,0 +1,2592 @@
+# Copyright (c) 2010,2021 Joseph Koshy
+# 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 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 AUTHOR 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.
+
+# These definitions are based on:
+# - The public specification of the ELF format as defined in the
+#   October 2009 draft of System V ABI.
+#   See: http://www.sco.com/developers/gabi/latest/ch4.intro.html
+# - The May 1998 (version 1.5) draft of "The ELF-64 object format".
+# - Processor-specific ELF ABI definitions for sparc, i386, amd64, mips,
+#   ia64, powerpc, and RISC-V processors.
+# - The "Linkers and Libraries Guide", from Sun Microsystems.
+
+define(`VCSID_ELFCONSTANTS_M4',
+	`Id: elfconstants.m4 3939 2021-04-04 20:15:13Z jkoshy')
+
+#
+# Types of capabilities.
+# 
+define(`DEFINE_CAPABILITIES',`
+DEFINE_CAPABILITY(`CA_SUNW_NULL',	0,	`ignored')
+DEFINE_CAPABILITY(`CA_SUNW_HW_1',	1,	`hardware capability')
+DEFINE_CAPABILITY(`CA_SUNW_SW_1',	2,	`software capability')')
+
+#
+# Flags used with dynamic linking entries.
+#
+define(`DEFINE_DYN_FLAGS',`
+DEFINE_DYN_FLAG(`DF_ORIGIN',   0x1,
+	`object being loaded may refer to `$ORIGIN'')
+DEFINE_DYN_FLAG(`DF_SYMBOLIC', 0x2,
+	`search library for references before executable')
+DEFINE_DYN_FLAG(`DF_TEXTREL',  0x4,
+	`relocation entries may modify text segment')
+DEFINE_DYN_FLAG(`DF_BIND_NOW', 0x8,
+	`process relocation entries at load time')
+DEFINE_DYN_FLAG(`DF_STATIC_TLS',   0x10,
+	`uses static thread-local storage')
+DEFINE_DYN_FLAG(`DF_1_BIND_NOW',   0x1,
+	`process relocation entries at load time')
+DEFINE_DYN_FLAG(`DF_1_GLOBAL', 0x2,
+	`unused')
+DEFINE_DYN_FLAG(`DF_1_GROUP',  0x4,
+	`object is a member of a group')
+DEFINE_DYN_FLAG(`DF_1_NODELETE',   0x8,
+	`object cannot be deleted from a process')
+DEFINE_DYN_FLAG(`DF_1_LOADFLTR',   0x10,
+	`immediate load filtees')
+DEFINE_DYN_FLAG(`DF_1_INITFIRST',  0x20,
+	`initialize object first')
+DEFINE_DYN_FLAG(`DF_1_NOOPEN', 0x

CVS commit: src/external/bsd/elftoolchain/dist/common

2021-03-10 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Wed Mar 10 21:36:29 UTC 2021

Modified Files:
src/external/bsd/elftoolchain/dist/common: _elftc.h

Log Message:
Update to upstream elftoolchain revision r3933.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/elftoolchain/dist/common/_elftc.h

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

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/_elftc.h
diff -u src/external/bsd/elftoolchain/dist/common/_elftc.h:1.7 src/external/bsd/elftoolchain/dist/common/_elftc.h:1.8
--- src/external/bsd/elftoolchain/dist/common/_elftc.h:1.7	Thu Nov 26 21:01:47 2020
+++ src/external/bsd/elftoolchain/dist/common/_elftc.h	Wed Mar 10 21:36:29 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: _elftc.h,v 1.7 2020/11/26 21:01:47 jkoshy Exp $	*/
+/*	$NetBSD: _elftc.h,v 1.8 2021/03/10 21:36:29 jkoshy Exp $	*/
 
 /*-
  * Copyright (c) 2009 Joseph Koshy
@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * Id: _elftc.h 3894 2020-11-20 18:02:53Z jkoshy
+ * Id: _elftc.h 3933 2021-03-10 21:09:49Z jkoshy
  */
 
 /**
@@ -384,6 +384,10 @@ extern const char *__progname;
 #include 
 #include 
 
+#ifndef	roundup2
+#define	roundup2	roundup
+#endif
+
 #define	ELFTC_BYTE_ORDER			_BYTE_ORDER
 #define	ELFTC_BYTE_ORDER_LITTLE_ENDIAN		_LITTLE_ENDIAN
 #define	ELFTC_BYTE_ORDER_BIG_ENDIAN		_BIG_ENDIAN



CVS commit: src/external/bsd/elftoolchain/dist/libelf

2021-03-08 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Mon Mar  8 20:55:06 UTC 2021

Modified Files:
src/external/bsd/elftoolchain/dist/libelf: elf.3 elf_begin.3 elf_cntl.3
elf_end.3 elf_errmsg.3 elf_fill.3 elf_flagdata.3 elf_getarhdr.3
elf_getarsym.3 elf_getbase.3 elf_getdata.3 elf_getident.3
elf_getphdrnum.3 elf_getphnum.3 elf_getscn.3 elf_getshdrnum.3
elf_getshdrstrndx.3 elf_getshnum.3 elf_getshstrndx.3 elf_hash.3
elf_kind.3 elf_memory.3 elf_next.3 elf_open.3 elf_rand.3
elf_rawfile.3 elf_strptr.3 elf_update.3 elf_version.3 gelf.3
gelf_checksum.3 gelf_fsize.3 gelf_getcap.3 gelf_getclass.3
gelf_getdyn.3 gelf_getehdr.3 gelf_getmove.3 gelf_getphdr.3
gelf_getrel.3 gelf_getrela.3 gelf_getshdr.3 gelf_getsym.3
gelf_getsyminfo.3 gelf_getsymshndx.3 gelf_newehdr.3 gelf_newphdr.3
gelf_update_ehdr.3 gelf_xlatetof.3

Log Message:
Update libelf's manual pages to upstream revision [r3928].


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/elftoolchain/dist/libelf/elf.3
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/elftoolchain/dist/libelf/elf_begin.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_cntl.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_end.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_errmsg.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_fill.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_flagdata.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getarhdr.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getarsym.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getbase.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getdata.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getident.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getphdrnum.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getphnum.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getscn.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getshdrnum.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getshdrstrndx.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getshnum.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getshstrndx.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_hash.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_kind.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_memory.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_next.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_open.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_rand.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_rawfile.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_strptr.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_update.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_version.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_checksum.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_fsize.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getcap.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getclass.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getdyn.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getehdr.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getmove.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getphdr.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getrel.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getrela.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getshdr.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getsym.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getsyminfo.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getsymshndx.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_newehdr.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_newphdr.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_update_ehdr.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_xlatetof.3

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

Modified files:

Index: src/external/bsd/elftoolchain/dist/libelf/elf.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf.3:1.4	Thu Apr 28 07:06:11 2016
+++ src/external/bsd/elftoolchain/dist/libelf/elf.3	Mon Mar  8 20:55:06 2021
@@ -1,6 +1,6 @@
-.\"	$NetBSD: elf.3,v 1.4 2016/04/28 07:06:11 wiz Exp $
+.\"	$NetBSD: elf.3,v 1.5 2021/03/08 20:55:06 jkoshy Exp $
 .\"
-.\" Copyright (c) 2006-2008,2011 Joseph Koshy.  All rights reserved.
+.\" Copyright (c) 2006-2008,2011,2019 Joseph Koshy.  All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that t

CVS commit: src/external/bsd/elftoolchain/dist/common

2021-03-07 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Sun Mar  7 14:53:59 UTC 2021

Modified Files:
src/external/bsd/elftoolchain/dist/common: elfdefinitions.h

Log Message:
Sync with Elftoolchain [r3916]: update the list of known EM_* values.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/elftoolchain/dist/common/elfdefinitions.h

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

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/elfdefinitions.h
diff -u src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.4 src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.5
--- src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.4	Thu Nov 19 20:58:30 2020
+++ src/external/bsd/elftoolchain/dist/common/elfdefinitions.h	Sun Mar  7 14:53:59 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: elfdefinitions.h,v 1.4 2020/11/19 20:58:30 jkoshy Exp $	*/
+/*	$NetBSD: elfdefinitions.h,v 1.5 2021/03/07 14:53:59 jkoshy Exp $	*/
 
 /*-
  * Copyright (c) 2010 Joseph Koshy
@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * Id: elfdefinitions.h 3858 2020-05-11 22:53:38Z emaste
+ * Id: elfdefinitions.h 3916 2020-12-12 11:26:53Z jkoshy
  */
 
 /*
@@ -873,7 +873,34 @@ _ELF_DEFINE_EM(EM_KMX32,211,
 _ELF_DEFINE_EM(EM_KMX16,212, "KM211 KMX16 16-bit processor") \
 _ELF_DEFINE_EM(EM_KMX8, 213, "KM211 KMX8 8-bit processor")  \
 _ELF_DEFINE_EM(EM_KVARC,214, "KM211 KMX32 KVARC processor") \
-_ELF_DEFINE_EM(EM_RISCV,243, "RISC-V")
+_ELF_DEFINE_EM(EM_CDP,  215, "Paneve CDP architecture family") \
+_ELF_DEFINE_EM(EM_COGE, 216, "Cognitive Smart Memory Processor") \
+_ELF_DEFINE_EM(EM_COOL, 217, "Bluechip Systems CoolEngine") \
+_ELF_DEFINE_EM(EM_NORC, 218, "Nanoradio Optimized RISC")\
+_ELF_DEFINE_EM(EM_CSR_KALIMBA,  219,\
+	"CSR Kalimba architecture family")  \
+_ELF_DEFINE_EM(EM_Z80,  220, "Zilog Z80")   \
+_ELF_DEFINE_EM(EM_VISIUM,   221,\
+	"Controls and Data Services VISIUMcore processor")  \
+_ELF_DEFINE_EM(EM_FT32, 222,\
+	"FTDI Chip FT32 high performance 32-bit RISC architecture") \
+_ELF_DEFINE_EM(EM_MOXIE,223, "Moxie processor family")  \
+_ELF_DEFINE_EM(EM_AMDGPU,   224, "AMD GPU architecture")\
+_ELF_DEFINE_EM(EM_RISCV,243, "RISC-V")  \
+_ELF_DEFINE_EM(EM_LANAI,244, "Lanai processor") \
+_ELF_DEFINE_EM(EM_CEVA, 245,\
+	"CEVA Processor Architecture Family") 		\
+_ELF_DEFINE_EM(EM_CEVA_X2,  246, "CEVA X2 Processor Family") 	\
+_ELF_DEFINE_EM(EM_BPF,  247,\
+	"Linux BPF – in-kernel virtual machine") 	\
+_ELF_DEFINE_EM(EM_GRAPHCORE_IPU,248,\
+	"Graphcore Intelligent Processing Unit") 	\
+_ELF_DEFINE_EM(EM_IMG1, 249, "Imagination Technologies") 	\
+_ELF_DEFINE_EM(EM_NFP,  250,\
+	"Netronome Flow Processor (NFP)") 	\
+_ELF_DEFINE_EM(EM_CSKY, 252, "C-SKY processor family")  \
+_ELF_DEFINE_EM(EM_65816,257, "WDC 65816/65C816")\
+_ELF_DEFINE_EM(EM_KF32, 259, "ChipON KungFu 32")
 
 #undef	_ELF_DEFINE_EM
 #define	_ELF_DEFINE_EM(N, V, DESCR)	N = V ,



CVS commit: src/external/bsd/elftoolchain/dist/common

2020-11-30 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Mon Nov 30 22:26:30 UTC 2020

Modified Files:
src/external/bsd/elftoolchain/dist/common: uthash.h

Log Message:
Unbreak the lint build (sync to elftoolchain [r3912]).


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/elftoolchain/dist/common/uthash.h

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

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/uthash.h
diff -u src/external/bsd/elftoolchain/dist/common/uthash.h:1.3 src/external/bsd/elftoolchain/dist/common/uthash.h:1.4
--- src/external/bsd/elftoolchain/dist/common/uthash.h:1.3	Wed Nov 18 22:23:05 2020
+++ src/external/bsd/elftoolchain/dist/common/uthash.h	Mon Nov 30 22:26:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uthash.h,v 1.3 2020/11/18 22:23:05 jkoshy Exp $	*/
+/*	$NetBSD: uthash.h,v 1.4 2020/11/30 22:26:30 jkoshy Exp $	*/
 
 /*
 Copyright (c) 2003-2018, Troy D. Hanson http://troydhanson.github.com/uthash/
@@ -76,6 +76,8 @@ typedef unsigned char uint8_t;
 #endif
 #elif defined(__GNUC__) && !defined(__VXWORKS__)
 #include 
+#elif defined(__lint__)
+#include 
 #else
 typedef unsigned int uint32_t;
 typedef unsigned char uint8_t;



CVS commit: src/external/bsd/elftoolchain/dist/common

2020-11-26 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Thu Nov 26 21:52:00 UTC 2020

Modified Files:
src/external/bsd/elftoolchain/dist/common: Makefile native-elf-format
os.Linux.mk

Log Message:
Sync with elftoolchain upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/bsd/elftoolchain/dist/common/Makefile \
src/external/bsd/elftoolchain/dist/common/native-elf-format
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/elftoolchain/dist/common/os.Linux.mk

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

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/Makefile
diff -u src/external/bsd/elftoolchain/dist/common/Makefile:1.1.1.2 src/external/bsd/elftoolchain/dist/common/Makefile:1.2
--- src/external/bsd/elftoolchain/dist/common/Makefile:1.1.1.2	Sat Feb 20 02:42:01 2016
+++ src/external/bsd/elftoolchain/dist/common/Makefile	Thu Nov 26 21:52:00 2020
@@ -1,4 +1,4 @@
-# Id: Makefile 3022 2014-04-17 18:05:58Z jkoshy 
+# Id: Makefile 3594 2018-04-11 18:26:50Z jkoshy
 
 TOP=	..
 
@@ -7,12 +7,12 @@ INCSDIR=	/usr/include
 
 .PHONY:	all clean clobber depend obj
 
-all depend obj:
+all depend:
 
 clean clobber:
 	rm -f ${CLEANFILES}
 
 cleandepend:
-	rm -f .depend
+	rm -f ${.OBJDIR}/.depend
 
 .include "${TOP}/mk/elftoolchain.inc.mk"
Index: src/external/bsd/elftoolchain/dist/common/native-elf-format
diff -u src/external/bsd/elftoolchain/dist/common/native-elf-format:1.1.1.2 src/external/bsd/elftoolchain/dist/common/native-elf-format:1.2
--- src/external/bsd/elftoolchain/dist/common/native-elf-format:1.1.1.2	Sat Feb 20 02:42:01 2016
+++ src/external/bsd/elftoolchain/dist/common/native-elf-format	Thu Nov 26 21:52:00 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Id: native-elf-format 3293 2016-01-07 19:26:27Z emaste 
+# Id: native-elf-format 3893 2020-11-20 17:11:04Z jkoshy
 #
 # Find the native ELF format for a host platform by compiling a
 # test object and examining the resulting object.
@@ -9,7 +9,7 @@
 # information statically at compile time.
 
 program=`basename $0`
-tmp_c=`mktemp -u nefXX`.c
+tmp_c=`mktemp ${MAKEOBJDIRPREFIX+"-p ${MAKEOBJDIRPREFIX}"} -u nefXX`.c
 tmp_o=`echo ${tmp_c} | sed -e 's/.c$/.o/'`
 
 trap "rm -f ${tmp_c} ${tmp_o}"	0 1 2 3 15
@@ -35,8 +35,12 @@ $1 ~ "Machine:" {
 elfarch = "EM_386";
 } else if (match($0, "MIPS")) {
 elfarch = "EM_MIPS";
-} else if (match($0, ".*[xX]86-64")) {
+} else if (match($0, ".*[xX]86[-_]64")) {
 elfarch = "EM_X86_64";
+} else if (match($0, "PowerPC64")) {
+elfarch = "EM_PPC64";
+	} else if (match($0, "ARM")) {
+	elfarch = "EM_ARM";
 } else {
 elfarch = "unknown";
 }

Index: src/external/bsd/elftoolchain/dist/common/os.Linux.mk
diff -u src/external/bsd/elftoolchain/dist/common/os.Linux.mk:1.1.1.1 src/external/bsd/elftoolchain/dist/common/os.Linux.mk:1.2
--- src/external/bsd/elftoolchain/dist/common/os.Linux.mk:1.1.1.1	Sun Mar  9 16:25:59 2014
+++ src/external/bsd/elftoolchain/dist/common/os.Linux.mk	Thu Nov 26 21:52:00 2020
@@ -1,13 +1,15 @@
 #
 # Build recipes for Linux based operating systems.
 #
-# Id: os.Linux.mk 2064 2011-10-26 15:12:32Z jkoshy 
+# Id: os.Linux.mk 3594 2018-04-11 18:26:50Z jkoshy
 
 _NATIVE_ELF_FORMAT = native-elf-format
 
-.BEGIN:	${_NATIVE_ELF_FORMAT}.h
+.if !make(obj)
+.BEGIN:	${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h
 
-${_NATIVE_ELF_FORMAT}.h:
+${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h:
 	${.CURDIR}/${_NATIVE_ELF_FORMAT} > ${.TARGET} || rm ${.TARGET}
+.endif
 
-CLEANFILES += ${_NATIVE_ELF_FORMAT}.h
+CLEANFILES += ${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h



CVS commit: src/external/bsd/elftoolchain/dist/common

2020-11-26 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Thu Nov 26 21:01:47 UTC 2020

Modified Files:
src/external/bsd/elftoolchain/dist/common: _elftc.h

Log Message:
Restore an overlooked 'Id' line.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/elftoolchain/dist/common/_elftc.h

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

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/_elftc.h
diff -u src/external/bsd/elftoolchain/dist/common/_elftc.h:1.6 src/external/bsd/elftoolchain/dist/common/_elftc.h:1.7
--- src/external/bsd/elftoolchain/dist/common/_elftc.h:1.6	Sat Nov 21 21:04:25 2020
+++ src/external/bsd/elftoolchain/dist/common/_elftc.h	Thu Nov 26 21:01:47 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: _elftc.h,v 1.6 2020/11/21 21:04:25 jkoshy Exp $	*/
+/*	$NetBSD: _elftc.h,v 1.7 2020/11/26 21:01:47 jkoshy Exp $	*/
 
 /*-
  * Copyright (c) 2009 Joseph Koshy
@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: _elftc.h,v 1.6 2020/11/21 21:04:25 jkoshy Exp $
+ * Id: _elftc.h 3894 2020-11-20 18:02:53Z jkoshy
  */
 
 /**



CVS commit: src/external/bsd/elftoolchain/dist/common

2020-11-21 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Sat Nov 21 21:04:25 UTC 2020

Modified Files:
src/external/bsd/elftoolchain/dist/common: _elftc.h

Log Message:
Sync '_elftc.h' with the upstream elftoolchain project.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/elftoolchain/dist/common/_elftc.h

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

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/_elftc.h
diff -u src/external/bsd/elftoolchain/dist/common/_elftc.h:1.5 src/external/bsd/elftoolchain/dist/common/_elftc.h:1.6
--- src/external/bsd/elftoolchain/dist/common/_elftc.h:1.5	Sun Mar 13 03:47:41 2016
+++ src/external/bsd/elftoolchain/dist/common/_elftc.h	Sat Nov 21 21:04:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: _elftc.h,v 1.5 2016/03/13 03:47:41 christos Exp $	*/
+/*	$NetBSD: _elftc.h,v 1.6 2020/11/21 21:04:25 jkoshy Exp $	*/
 
 /*-
  * Copyright (c) 2009 Joseph Koshy
@@ -25,11 +25,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * Id: _elftc.h 3244 2015-08-31 19:53:08Z emaste 
+ * $Id: _elftc.h,v 1.6 2020/11/21 21:04:25 jkoshy Exp $
  */
 
 /**
- ** Miscellanous definitions needed by multiple components.
+ ** Miscellaneous definitions needed by multiple components.
  **/
 
 #ifndef	_ELFTC_H
@@ -284,49 +284,34 @@ struct name {			\
 
 /*
  * VCS Ids.
+ *
+ * The marker below is intended to be replaced with a project-specific
+ * definition of the ELFTC_VCSID macro.
  */
 
+#ifndef ELFTC_VCSID
+#define	ELFTC_VCSID(ID)		/**/
+#endif
+
 #ifndef	ELFTC_VCSID
 
-#if defined(__DragonFly__)
-#define	ELFTC_VCSID(ID)		__RCSID(ID)
-#endif
+#if defined(__DragonFly__) || defined(__NetBSD__)
 
-#if defined(__FreeBSD__)
-#define	ELFTC_VCSID(ID)		__FBSDID(ID)
-#endif
+#define	ELFTC_VCSID(ID)		__RCSID(ID)
 
-#if defined(__APPLE__) || defined(__GLIBC__) || defined(__GNU__) || \
-defined(__linux__)
-#if defined(__GNUC__)
-#define	ELFTC_VCSID(ID)		__asm__(".ident\t\"" ID "\"")
-#else
-#define	ELFTC_VCSID(ID)		/**/
-#endif
-#endif
+#elif defined(__FreeBSD__)
 
-#if defined(__minix)
-#if defined(__GNUC__)
-#define	ELFTC_VCSID(ID)		__asm__(".ident\t\"" ID "\"")
-#else
-#define	ELFTC_VCSID(ID)		/**/
-#endif	/* __GNU__ */
-#endif
+#define	ELFTC_VCSID(ID)		__FBSDID(ID)
 
-#if defined(__NetBSD__)
-#define	ELFTC_VCSID(ID)		__RCSID(ID)
-#endif
+#elif defined(__APPLE__) || defined(__OpenBSD__) || defined(__GLIBC__) || \
+defined(__GNU__) || defined(__linux__) || defined(__minix)
 
-#if defined(__OpenBSD__)
 #if defined(__GNUC__)
 #define	ELFTC_VCSID(ID)		__asm__(".ident\t\"" ID "\"")
 #else
 #define	ELFTC_VCSID(ID)		/**/
-#endif	/* __GNUC__ */
 #endif
 
-#ifndef ELFTC_VCSID
-#define	ELFTC_VCSID(ID)		/**/
 #endif
 
 #endif	/* ELFTC_VCSID */
@@ -344,7 +329,7 @@ struct name {			\
 
 #define	ELFTC_GETPROGNAME()	getprogname()
 
-#endif	/* __DragonFly__ || __FreeBSD__ || __minix || __NetBSD__ */
+#endif	/* __APPLE__ || __DragonFly__ || __FreeBSD__ || __minix || __NetBSD__ */
 
 
 #if defined(__GLIBC__) || defined(__linux__)
@@ -372,12 +357,41 @@ extern const char *__progname;
 #endif	/* ELFTC_GETPROGNAME */
 
 
-#ifndef HAVE_NBTOOL_CONFIG_H
-/**
- ** Per-OS configuration.
- **/
+/*
+ * Per-OS configuration.
+ *
+ * The following symbols are supported by this configuration fragment,
+ * although not all the OSes so referenced are fully supported.
+ *
+ * Cross-compilation:
+ *
+ * HAVE_NBTOOL_CONFIG_H : cross-compiling NetBSD tools on various OSes.
+ *
+ * Native compilation:
+ *
+ * __APPLE__ : compiling under Mac OS X.
+ * __DragonFly__ : compiling under DragonFlyBSD.
+ * __GLIBC__ : compiling under GNU based systems, such as GNU/kFreeBSD.
+ * __linux__ : compiling under GNU/Linux systems.
+ * __FreeBSD__   : compiling under FreeBSD.
+ * __minix   : compiling under Minix3.
+ * __NetBSD__: compiling (native) under NetBSD.
+ * __OpenBSD__   : compiling under OpenBSD.
+ */
 
-#if defined(__APPLE__)
+#if defined(HAVE_NBTOOL_CONFIG_H)
+
+#include 
+#include 
+
+#define	ELFTC_BYTE_ORDER			_BYTE_ORDER
+#define	ELFTC_BYTE_ORDER_LITTLE_ENDIAN		_LITTLE_ENDIAN
+#define	ELFTC_BYTE_ORDER_BIG_ENDIAN		_BIG_ENDIAN
+
+#define	ELFTC_HAVE_MMAP1
+#define	ELFTC_HAVE_STRMODE			1
+
+#elif defined(__APPLE__)
 
 #include 
 #define	htobe32(x)	OSSwapHostToBigInt32(x)
@@ -391,10 +405,8 @@ extern const char *__progname;
 #define	ELFTC_HAVE_STRMODE			1
 
 #define ELFTC_NEED_BYTEORDER_EXTENSIONS		1
-#endif /* __APPLE__ */
-
 
-#if defined(__DragonFly__)
+#elif defined(__DragonFly__)
 
 #include 
 #include 
@@ -405,9 +417,7 @@ extern const char *__progname;
 
 #define	ELFTC_HAVE_MMAP1
 
-#endif
-
-#if defined(__GLIBC__) || defined(__linux__)
+#elif defined(__GLIBC__) || defined(__linux__)
 
 #include 
 
@@ -427,10 +437,7 @@ extern const char *__progname;
 
 #d

CVS commit: src/external/bsd/elftoolchain/dist/common

2020-11-19 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Thu Nov 19 20:58:30 UTC 2020

Modified Files:
src/external/bsd/elftoolchain/dist/common: elfdefinitions.h

Log Message:
Update 'elfdefinitions.h' to elftoolchain revision [r3891].


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/elftoolchain/dist/common/elfdefinitions.h

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

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/elfdefinitions.h
diff -u src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.3 src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.4
--- src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.3	Sat Feb 20 02:43:41 2016
+++ src/external/bsd/elftoolchain/dist/common/elfdefinitions.h	Thu Nov 19 20:58:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: elfdefinitions.h,v 1.3 2016/02/20 02:43:41 christos Exp $	*/
+/*	$NetBSD: elfdefinitions.h,v 1.4 2020/11/19 20:58:30 jkoshy Exp $	*/
 
 /*-
  * Copyright (c) 2010 Joseph Koshy
@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * Id: elfdefinitions.h 3392 2016-02-05 19:51:22Z emaste 
+ * Id: elfdefinitions.h 3858 2020-05-11 22:53:38Z emaste
  */
 
 /*
@@ -35,7 +35,7 @@
  *   See: http://www.sco.com/developers/gabi/latest/ch4.intro.html
  * - The May 1998 (version 1.5) draft of "The ELF-64 object format".
  * - Processor-specific ELF ABI definitions for sparc, i386, amd64, mips,
- *   ia64, and powerpc processors.
+ *   ia64, powerpc, and RISC-V processors.
  * - The "Linkers and Libraries Guide", from Sun Microsystems.
  */
 
@@ -74,7 +74,39 @@ _ELF_DEFINE_DF(DF_TEXTREL,  0x4,
 _ELF_DEFINE_DF(DF_BIND_NOW, 0x8,			\
 	"process relocation entries at load time")		\
 _ELF_DEFINE_DF(DF_STATIC_TLS,   0x10,			\
-	"uses static thread-local storage")
+	"uses static thread-local storage")			\
+_ELF_DEFINE_DF(DF_1_BIND_NOW,   0x1,			\
+	"process relocation entries at load time")		\
+_ELF_DEFINE_DF(DF_1_GLOBAL, 0x2,			\
+	"unused")		\
+_ELF_DEFINE_DF(DF_1_GROUP,  0x4,			\
+	"object is a member of a group")			\
+_ELF_DEFINE_DF(DF_1_NODELETE,   0x8,			\
+	"object cannot be deleted from a process")		\
+_ELF_DEFINE_DF(DF_1_LOADFLTR,   0x10,			\
+	"immediate load filtees")\
+_ELF_DEFINE_DF(DF_1_INITFIRST,  0x20,			\
+	"initialize object first")\
+_ELF_DEFINE_DF(DF_1_NOOPEN, 0x40,			\
+	"disallow dlopen()")	\
+_ELF_DEFINE_DF(DF_1_ORIGIN, 0x80,			\
+	"object being loaded may refer to $ORIGIN")		\
+_ELF_DEFINE_DF(DF_1_DIRECT, 0x100,			\
+	"direct bindings enabled")\
+_ELF_DEFINE_DF(DF_1_INTERPOSE,  0x400,			\
+	"object is interposer")	\
+_ELF_DEFINE_DF(DF_1_NODEFLIB,   0x800,			\
+	"ignore default library search path")			\
+_ELF_DEFINE_DF(DF_1_NODUMP, 0x1000,			\
+	"disallow dldump()")	\
+_ELF_DEFINE_DF(DF_1_CONFALT,0x2000,			\
+	"object is a configuration alternative")		\
+_ELF_DEFINE_DF(DF_1_ENDFILTEE,  0x4000,			\
+	"filtee terminates filter search")			\
+_ELF_DEFINE_DF(DF_1_DISPRELDNE, 0x8000,			\
+	"displacement relocation done")\
+_ELF_DEFINE_DF(DF_1_DISPRELPND, 0x1,			\
+	"displacement relocation pending")
 #undef	_ELF_DEFINE_DF
 #define	_ELF_DEFINE_DF(N, V, DESCR)	N = V ,
 enum {
@@ -155,6 +187,8 @@ _ELF_DEFINE_DT(DT_SUNW_FILTER,  0x60
 	"offset of string naming standard filtees")			\
 _ELF_DEFINE_DT(DT_SUNW_CAP, 0x6010UL,			\
 	"address of hardware capabilities section")			\
+_ELF_DEFINE_DT(DT_SUNW_ASLR,0x6023UL,			\
+	"Address Space Layout Randomization flag")			\
 _ELF_DEFINE_DT(DT_HIOS, 0x6000UL,			\
 	"end of OS-specific types")	\
 _ELF_DEFINE_DT(DT_VALRNGLO, 0x6D00UL,			\
@@ -186,6 +220,10 @@ _ELF_DEFINE_DT(DT_ADDRRNGLO,0x6F
 	"start of range using the d_ptr field")\
 _ELF_DEFINE_DT(DT_GNU_HASH,	0x6EF5UL,			\
 	"GNU style hash tables")	\
+_ELF_DEFINE_DT(DT_TLSDESC_PLT,	0x6EF6UL,			\
+	"location of PLT entry for TLS descriptor resolver calls")	\
+_ELF_DEFINE_DT(DT_TLSDESC_GOT,	0x6EF7UL,			\
+	"location of GOT entry used by TLS descriptor resolver PLT entry") \
 _ELF_DEFINE_DT(DT_GNU_CONFLICT, 0x6EF8UL,			\
 	"address of conflict section")	\
 _ELF_DEFINE_DT(DT_GNU_LIBLIST,  0x6EF9UL,			\
@@ -271,7 +309,7 @@ _ELF_DEFINE_DT(DT_MIPS_DELTA_RELOC, 0x70
 _ELF_DEFINE_DT(DT_MIPS_DELTA_RELOC_NO, 0x701CUL,			\
 	"number of entries in DT_MIPS_DELTA_RELOC")			\
 _ELF_DEFINE_DT(DT_MIPS_DELTA

CVS commit: src/external/bsd/elftoolchain/dist/common

2020-11-18 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Wed Nov 18 22:23:05 UTC 2020

Modified Files:
src/external/bsd/elftoolchain/dist/common: utarray.h uthash.h

Log Message:
Sync 'utarray.h' and 'uthash.h' with elftoolchain revision [r3891].

This change upgrades these files to UT{HASH,ARRAY}_VERSION 2.1.0.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/elftoolchain/dist/common/utarray.h \
src/external/bsd/elftoolchain/dist/common/uthash.h

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

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/utarray.h
diff -u src/external/bsd/elftoolchain/dist/common/utarray.h:1.2 src/external/bsd/elftoolchain/dist/common/utarray.h:1.3
--- src/external/bsd/elftoolchain/dist/common/utarray.h:1.2	Sun Mar  9 16:58:03 2014
+++ src/external/bsd/elftoolchain/dist/common/utarray.h	Wed Nov 18 22:23:05 2020
@@ -1,7 +1,7 @@
-/*	$NetBSD: utarray.h,v 1.2 2014/03/09 16:58:03 christos Exp $	*/
+/*	$NetBSD: utarray.h,v 1.3 2020/11/18 22:23:05 jkoshy Exp $	*/
 
 /*
-Copyright (c) 2008-2013, Troy D. Hanson   http://uthash.sourceforge.net
+Copyright (c) 2008-2018, Troy D. Hanson   http://troydhanson.github.com/uthash/
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -23,28 +23,30 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY 
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-/* Id: utarray.h 2694 2012-11-24 17:11:58Z kaiwang27  */
-
-/* a dynamic array implementation using macros 
- * see http://uthash.sourceforge.net/utarray
+/* a dynamic array implementation using macros
  */
 #ifndef UTARRAY_H
 #define UTARRAY_H
 
-#define UTARRAY_VERSION 1.9.7
+#define UTARRAY_VERSION 2.1.0
+
+#include   /* size_t */
+#include   /* memset, etc */
+#include   /* exit */
 
 #ifdef __GNUC__
-#define _UNUSED_ __attribute__ ((__unused__)) 
+#define UTARRAY_UNUSED __attribute__((__unused__))
 #else
-#define _UNUSED_ 
+#define UTARRAY_UNUSED
 #endif
 
-#include   /* size_t */
-#include   /* memset, etc */
-#include   /* exit */
+#ifdef oom
+#error "The name of macro 'oom' has been changed to 'utarray_oom'. Please update your code."
+#define utarray_oom() oom()
+#endif
 
-#ifndef oom
-#define oom() exit(-1)
+#ifndef utarray_oom
+#define utarray_oom() exit(-1)
 #endif
 
 typedef void (ctor_f)(void *dst, const void *src);
@@ -65,13 +67,13 @@ typedef struct {
 
 #define utarray_init(a,_icd) do { \
   memset(a,0,sizeof(UT_array));   \
-  (a)->icd=*_icd; \
+  (a)->icd = *(_icd); \
 } while(0)
 
 #define utarray_done(a) do {  \
   if ((a)->n) {   \
 if ((a)->icd.dtor) {  \
-  size_t _ut_i;   \
+  unsigned _ut_i; \
   for(_ut_i=0; _ut_i < (a)->i; _ut_i++) { \
 (a)->icd.dtor(utarray_eltptr(a,_ut_i));   \
   }   \
@@ -82,7 +84,10 @@ typedef struct {
 } while(0)
 
 #define utarray_new(a,_icd) do {  \
-  a=(UT_array*)malloc(sizeof(UT_array));  \
+  (a) = (UT_array*)malloc(sizeof(UT_array));  \
+  if ((a) == NULL) {  \
+utarray_oom();\
+  }   \
   utarray_init(a,_icd);   \
 } while(0)
 
@@ -92,9 +97,14 @@ typedef struct {
 } while(0)
 
 #define utarray_reserve(a,by) do {\
-  if (((a)->i+by) > ((a)->n)) {   \
-while(((a)->i+by) > ((a)->n)) { (a)->n = ((a)->n ? (2*(a)->n) : 8); } \
-if ( ((a)->d=(char*)realloc((a)->d, (a)->n*(a)->icd.sz)) == NULL) oom();  \
+  if (((a)->i+(by)) > (a)->n) {   \
+char *utarray_tmp;\
+while (((a)->i+(by)) > (a)->n) { (a)->n = ((a)->n ? (2*(a)->n) : 8); }\
+utarray_tmp=(char*)realloc((a)->d, (a)->n*(a)->icd.sz);   \
+if (utarray_tmp == NULL) {\
+  utarray_oom();  \
+}  

CVS commit: src/external/bsd

2012-10-07 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Mon Oct  8 01:45:11 UTC 2012

Modified Files:
src/external/bsd: Makefile

Log Message:
Style fix: keep lists of names sorted.

Reviewed by:christos


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/external/bsd/Makefile

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

Modified files:

Index: src/external/bsd/Makefile
diff -u src/external/bsd/Makefile:1.32 src/external/bsd/Makefile:1.33
--- src/external/bsd/Makefile:1.32	Fri Mar 23 21:31:27 2012
+++ src/external/bsd/Makefile	Mon Oct  8 01:45:11 2012
@@ -1,14 +1,21 @@
-#	$NetBSD: Makefile,v 1.32 2012/03/23 21:31:27 christos Exp $
+#	$NetBSD: Makefile,v 1.33 2012/10/08 01:45:11 jkoshy Exp $
 
 .include bsd.own.mk
 
-SUBDIR=	acpica am-utils bind cron dhcpcd fetch file flex less libarchive \
-	libevent liblzf libpcap mdocml openresolv top byacc wpa ntp tcpdump \
-	tmux tre
+SUBDIR=	acpica am-utils bind byacc cron dhcpcd fetch file flex less \
+	libarchive libevent liblzf libpcap mdocml ntp openresolv tcpdump \
+	tmux top tre wpa
 
 .if (${MKATF} != no)
 SUBDIR+= atf
 .endif
+.if (${MKCRYPTO} != no)
+SUBDIR+= pkg_install ../../crypto/external/bsd
+.endif
+# IP Filter
+.if (${MKIPFILTER} != no)
+SUBDIR+=ipf
+.endif
 .if (${MKISCSI} != no)
 SUBDIR+= iscsi 
 .endif
@@ -18,15 +25,8 @@ SUBDIR+= openldap
 .if (${MKLLVM} != no)
 SUBDIR+= llvm
 .endif
-.if (${MKCRYPTO} != no)
-SUBDIR+= pkg_install ../../crypto/external/bsd
-.endif
 .if (${MKPCC} != no)
 SUBDIR+= pcc
 .endif
-# IP Filter
-.if (${MKIPFILTER} != no)
-SUBDIR+=ipf
-.endif
 
 .include bsd.subdir.mk



CVS commit: src/share/mk

2012-10-01 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Tue Oct  2 04:53:11 UTC 2012

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

Log Message:
Document the MKKMOD build knob.


To generate a diff of this commit:
cvs rdiff -u -r1.303 -r1.304 src/share/mk/bsd.README

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

Modified files:

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.303 src/share/mk/bsd.README:1.304
--- src/share/mk/bsd.README:1.303	Sun Sep 30 03:07:25 2012
+++ src/share/mk/bsd.README	Tue Oct  2 04:53:11 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.303 2012/09/30 03:07:25 jkoshy Exp $
+#	$NetBSD: bsd.README,v 1.304 2012/10/02 04:53:11 jkoshy Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make include files for the NetBSD
@@ -223,6 +223,9 @@ MKKERBEROS	If no, disables building of
 		infrastructure (libraries and support programs).
 		Default: yes
 
+MKKMOD		If no, disables building of kernel modules.
+		Default: yes
+
 MKLDAP		If no, disables building of LDAP infrastructure
 		(libraries and support programs).
 		Default: yes



CVS commit: src/share/man/man5

2012-09-30 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Sun Sep 30 06:00:26 UTC 2012

Modified Files:
src/share/man/man5: mk.conf.5

Log Message:
Correct a typo.

Reported by:tsutsui


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/share/man/man5/mk.conf.5

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

Modified files:

Index: src/share/man/man5/mk.conf.5
diff -u src/share/man/man5/mk.conf.5:1.63 src/share/man/man5/mk.conf.5:1.64
--- src/share/man/man5/mk.conf.5:1.63	Sun Sep 30 03:48:16 2012
+++ src/share/man/man5/mk.conf.5	Sun Sep 30 06:00:26 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: mk.conf.5,v 1.63 2012/09/30 03:48:16 jkoshy Exp $
+.\	$NetBSD: mk.conf.5,v 1.64 2012/09/30 06:00:26 jkoshy Exp $
 .\
 .\  Copyright (c) 1999-2003 The NetBSD Foundation, Inc.
 .\  All rights reserved.
@@ -309,7 +309,7 @@ then file deletions will not be verified
 Indicates whether support for multiple ABIs is to be built and
 installed.
 .DFLTy
-on amd64, mips and sparc64,
+on amd64, mips64 and sparc64,
 .Dq no
 on other architectures.
 .



CVS commit: src/share/mk

2012-09-29 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Sat Sep 29 12:03:42 UTC 2012

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

Log Message:
Document the MKDTRACE build knob.

Reviewed by:apb


To generate a diff of this commit:
cvs rdiff -u -r1.301 -r1.302 src/share/mk/bsd.README

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

Modified files:

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.301 src/share/mk/bsd.README:1.302
--- src/share/mk/bsd.README:1.301	Thu Sep 20 15:48:54 2012
+++ src/share/mk/bsd.README	Sat Sep 29 12:03:41 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.301 2012/09/20 15:48:54 abs Exp $
+#	$NetBSD: bsd.README,v 1.302 2012/09/29 12:03:41 jkoshy Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make include files for the NetBSD
@@ -157,6 +157,11 @@ MKDEBUGLIB	Build *_g.a debugging librari
 MKDOC		If no, don't build or install the documentation.
 		Default: yes
 
+MKDTRACE	If no, do not build and install the kernel modules,
+		utilities and libraries used to implement the dtrace(1)
+		facility.
+		Default: no
+
 MKDYNAMICROOT	If no, build programs in /bin and /sbin statically,
 		don't install certain libraries in /lib, and don't
 		install the shared linker into /libexec.



CVS commit: src/share/man/man5

2012-09-29 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Sun Sep 30 03:48:16 UTC 2012

Modified Files:
src/share/man/man5: mk.conf.5

Log Message:
Document build knobs MKBSDTAR, MKCLEANSRC, MKCLEANVERIFY, MKCOMPAT,
MKDTRACE, MKLVM, MKNPF, MKPIGZGZIP, MKREPRO, MKRUMP, MKX11FONTS and MKZFS.

Reviewed by:joerg


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/share/man/man5/mk.conf.5

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

Modified files:

Index: src/share/man/man5/mk.conf.5
diff -u src/share/man/man5/mk.conf.5:1.62 src/share/man/man5/mk.conf.5:1.63
--- src/share/man/man5/mk.conf.5:1.62	Wed Sep 19 23:06:22 2012
+++ src/share/man/man5/mk.conf.5	Sun Sep 30 03:48:16 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: mk.conf.5,v 1.62 2012/09/19 23:06:22 abs Exp $
+.\	$NetBSD: mk.conf.5,v 1.63 2012/09/30 03:48:16 jkoshy Exp $
 .\
 .\  Copyright (c) 1999-2003 The NetBSD Foundation, Inc.
 .\  All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd September 19, 2012
+.Dd September 30, 2012
 .Dt MK.CONF 5
 .Os
 .\ turn off hyphenation
@@ -238,12 +238,81 @@ or
 .Xr mdsetimage 8 .
 .DFLTy
 .
+.It Sy MKBSDTAR
+.YorN
+If
+.Dq yes ,
+.Sy libarchive Ns - Ns
+based implementations of
+.Xr cpio 1
+and
+.Xr tar 1
+are built and installed.
+If
+.Dq no ,
+.Xr pax 1
+based frontends are used.
+.DFLTn
+.
 .It Sy MKCATPAGES
 .YorN
 Indicates whether preformatted plaintext manual pages will be created
 and installed.
 .DFLTy
 .
+.It Sy MKCLEANSRC
+.YorN
+Indicates whether
+.Sq make clean
+and
+.Sq make cleandir
+will delete file names in
+.Sy CLEANFILES
+or
+.Sy CLEANDIRFILES
+from both the object directory,
+.Sy .OBJDIR ,
+and the source directory,
+.Sy .SRCDIR .
+.Pp
+If
+.Dq yes ,
+then these file names will be deleted relative to both
+.Sy .OBJDIR
+and
+.Sy .CURDIR .
+If
+.Dq no ,
+then the deletion will be performed relative to
+.Sy .OBJDIR
+only.
+.DFLTy
+.
+.It Sy MKCLEANVERIFY
+.YorN
+Controls whether
+.Sq make clean
+and
+.Sq make cleandir
+will verify that files have been deleted.
+If
+.Dq yes ,
+then file deletions will be verified using
+.Xr ls 1 .
+If
+.Dq no ,
+then file deletions will not be verified.
+.DFLTy
+.
+.It Sy MKCOMPAT
+.YorN
+Indicates whether support for multiple ABIs is to be built and
+installed.
+.DFLTy
+on amd64, mips and sparc64,
+.Dq no
+on other architectures.
+.
 .It Sy MKCOMPLEX
 .YorN
 Indicates whether the
@@ -301,6 +370,13 @@ Indicates whether system documentation d
 will be installed.
 .DFLTy
 .
+.It Sy MKDTRACE
+.YorN
+Indicates whether the kernel modules, utilities and libraries for
+.Xr dtrace 1
+support are to be built and installed.
+.DFLTn
+.
 .It Sy MKDYNAMICROOT
 .YorN
 Indicates whether all programs should be dynamically linked,
@@ -472,6 +548,13 @@ installed into
 .Sy DESTDIR Ns Pa /usr/libdata/lint .
 .DFLTy
 .
+.It Sy MKLVM
+.YorN
+If not
+.Dq no ,
+build and install the logical volume manager.
+.DFLTy
+.
 .It Sy MKMAN
 .YorN
 Indicates whether manual pages will be installed.
@@ -501,6 +584,11 @@ Indicates whether Native Language System
 built and installed.
 .DFLTy
 .
+.It Sy MKNPF
+.YorN
+Indicates whether the NPF packet filter is to be built and installed.
+.DFLTy
+.
 .It Sy MKOBJ
 .YorN
 Indicates whether object directories will be created when running
@@ -591,6 +679,16 @@ Indicates whether Position Independent E
 are built and installed.
 .DFLTn
 .
+.It Sy MKPIGZGZIP
+.YorN
+If
+.Dq no ,
+the
+.Xr pigz 1
+utility is not installed as
+.Xr gzip 1 .
+.DFLTn
+.
 .It Sy MKPOSTFIX
 .YorN
 Indicates whether Postfix is built.
@@ -607,6 +705,22 @@ however, some platforms turn off
 .Sy MKPROFILE
 by default at times due to toolchain problems with profiled code.
 .
+.It Sy MKREPRO
+.YorN
+Indicates whether builds are to be reproducible.
+If
+.Dq yes ,
+two builds from the same source tree will produce the same build
+results.
+.DFLTn
+.
+.It Sy MKRUMP
+.YorN
+Indicates whether the
+.Xr rump 3
+headers, libraries and programs are to be installed.
+.DFLTy
+.
 .It Sy MKSHARE
 .YorN
 Indicates whether files destined to reside in
@@ -682,12 +796,28 @@ depending on the value of
 .DFLTn
 .Pp
 .
+.It Sy MKX11FONTS
+.YorN
+If
+.Dq no ,
+do not build and install the X fonts.
+.DFLTy
+.
 .It Sy MKYP
 .YorN
 Indicates whether the YP (NIS) infrastructure
 (libraries and support programs) is built.
 .DFLTy
 .
+.It Sy MKZFS
+.YorN
+Indicates whether the ZFS kernel module and the utilities and
+libraries used to manage the ZFS system are to be built.
+.DFLTy
+on i386 and amd64,
+.Dq no
+on other architectures.
+.
 .It Sy OBJMACHINE
 If defined, creates objdirs of the form
 .Pa obj. Ns Sy MACHINE ,



CVS commit: src/distrib/notes/common

2012-03-15 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Fri Mar 16 05:43:10 UTC 2012

Modified Files:
src/distrib/notes/common: main

Log Message:
Add an entry for myself.


To generate a diff of this commit:
cvs rdiff -u -r1.484 -r1.485 src/distrib/notes/common/main

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.484 src/distrib/notes/common/main:1.485
--- src/distrib/notes/common/main:1.484	Sat Jan 14 22:56:30 2012
+++ src/distrib/notes/common/main	Fri Mar 16 05:43:09 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.484 2012/01/14 22:56:30 jmcneill Exp $
+.\	$NetBSD: main,v 1.485 2012/03/16 05:43:09 jkoshy Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -1222,6 +1222,7 @@ If you're one of them, and would like to
 .It Ta Wayne Knowles Ta Mt w...@netbsd.org
 .It Ta Takayoshi Kochi Ta Mt ko...@netbsd.org
 .It Ta Jonathan A. Kollasch Ta Mt jakll...@netbsd.org
+.It Ta Joseph Koshy Ta Mt jko...@netbsd.org
 .It Ta Radoslaw Kujawa Ta Mt rkuj...@netbsd.org
 .It Ta Jochen Kunz Ta Mt jk...@netbsd.org
 .It Ta Martti Kuparinen Ta Mt mar...@netbsd.org